@futdevpro/fsm-dynamo 1.20.9 → 1.20.10
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 +21 -21
- package/README.md +721 -721
- package/build/_collections/utils/secret-mask.util.d.ts.map +1 -1
- package/build/_collections/utils/secret-mask.util.js +2 -0
- package/build/_collections/utils/secret-mask.util.js.map +1 -1
- package/build/_modules/socket/_models/sck-socket-event.control-model.js +1 -1
- package/package.json +12 -5
- package/.c8rc.json +0 -26
- 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 -157
- package/.dynamo/version-bump.config.json +0 -5
- package/.github/workflows/main.yml +0 -439
- package/.husky/pre-commit +0 -2
- package/.vscode/settings.json +0 -11
- package/__documentations/2026-05-17-oai-compatible-providers-howto.md +0 -282
- package/__documentations/2026-06-01-fr047-fc-foundation.md +0 -48
- package/__documentations/2026-06-01-fr047-fr048-code-review.md +0 -153
- package/__documentations/2026-06-01-fr047-p1-function-calling-vocabulary.md +0 -75
- package/__documentations/2026-06-05-secret-mask-url-cred-any-scheme.md +0 -37
- package/__documentations/2026-06-06-ngx-models-merge-completion.md +0 -100
- package/__documentations/2026-06-22-dyfm-error-extends-error.md +0 -109
- package/__documentations/2026-08-22-angular-20-phase1-release.md +0 -39
- package/__documentations/2026-08-23-atomic-rollback-manifest-contract.md +0 -53
- package/__documentations/2026-08-23-forms-v2-color-picker-settings.md +0 -23
- package/__documentations/2026-08-23-forms-v2-symbol-picker-settings.md +0 -24
- package/__documentations/plans/00-MASTER-ngx-models-fsm-merge.md +0 -75
- package/__documentations/plans/01-naming-convention-DyNM-to-DyFM.md +0 -103
- package/__documentations/plans/02-consumer-rollout.md +0 -84
- package/_specifications/BACKLOG.md +0 -43
- package/eslint.config.js +0 -4
- package/nodemon.json +0 -23
- package/pnpm-workspace.yaml +0 -2
- package/scripts/_capture-out/ai-error-capture.json +0 -399
- package/scripts/ai-error-capture.js +0 -171
- package/scripts/ai-model-registry-check.js +0 -132
- package/scripts/crypto/CRYPTO-STABILITY-SOLUTION.md +0 -197
- package/scripts/crypto/README.md +0 -114
- package/scripts/crypto/demo-crypto-stability.js +0 -121
- package/scripts/crypto/stress-test-crypto.js +0 -380
- package/scripts/run-coverage-tests.js +0 -24
- package/scripts/verify-build-completeness.js +0 -62
- package/spec/support/helpers/ts-node-helper.js +0 -9
- package/spec/support/jasmine.coverage.json +0 -23
- package/spec/support/jasmine.json +0 -24
- package/src/_collections/constants/data-sizes.const.ts +0 -40
- package/src/_collections/constants/error-defaults.const.ts +0 -20
- package/src/_collections/constants/global-settings.const.spec.ts +0 -32
- package/src/_collections/constants/global-settings.const.ts +0 -29
- package/src/_collections/constants/numbers.const.ts +0 -40
- package/src/_collections/constants/times.const.ts +0 -45
- package/src/_collections/utils/array.util.spec.ts +0 -306
- package/src/_collections/utils/array.util.ts +0 -813
- package/src/_collections/utils/async.util.spec.ts +0 -398
- package/src/_collections/utils/async.util.ts +0 -209
- package/src/_collections/utils/data.util.spec.ts +0 -345
- package/src/_collections/utils/data.util.ts +0 -226
- package/src/_collections/utils/extract-error-message.util.spec.ts +0 -204
- package/src/_collections/utils/extract-error-message.util.ts +0 -223
- package/src/_collections/utils/json-error-helper.util.spec.ts +0 -521
- package/src/_collections/utils/json-error-helper.util.ts +0 -302
- package/src/_collections/utils/log.util.spec.ts +0 -975
- package/src/_collections/utils/log.util.ts +0 -667
- package/src/_collections/utils/math/box-bounds.spec.ts +0 -74
- package/src/_collections/utils/math/box-bounds.util.ts +0 -183
- package/src/_collections/utils/math/math.util.spec.ts +0 -94
- package/src/_collections/utils/math/math.util.ts +0 -141
- package/src/_collections/utils/math/random.util.spec.ts +0 -82
- package/src/_collections/utils/math/random.util.ts +0 -139
- package/src/_collections/utils/math/trigonometry.util.spec.ts +0 -57
- package/src/_collections/utils/math/trigonometry.util.ts +0 -102
- package/src/_collections/utils/math/vector2.util.spec.ts +0 -94
- package/src/_collections/utils/math/vector2.util.ts +0 -653
- package/src/_collections/utils/object.util.spec.ts +0 -646
- package/src/_collections/utils/object.util.ts +0 -739
- package/src/_collections/utils/regex/password-regex.util.spec.ts +0 -51
- package/src/_collections/utils/regex/password-regex.util.ts +0 -66
- package/src/_collections/utils/regex/regex.util.spec.ts +0 -42
- package/src/_collections/utils/regex/regex.util.ts +0 -6
- package/src/_collections/utils/regex/username-regex.util.spec.ts +0 -61
- package/src/_collections/utils/regex/username-regex.util.ts +0 -35
- package/src/_collections/utils/require-env.util.spec.ts +0 -231
- package/src/_collections/utils/require-env.util.ts +0 -138
- package/src/_collections/utils/round-list.util.spec.ts +0 -79
- package/src/_collections/utils/round-list.util.ts +0 -162
- package/src/_collections/utils/secret-mask.util.spec.ts +0 -66
- package/src/_collections/utils/secret-mask.util.ts +0 -262
- package/src/_collections/utils/stack.util.spec.ts +0 -373
- package/src/_collections/utils/stack.util.ts +0 -165
- package/src/_collections/utils/string-case.util.spec.ts +0 -441
- package/src/_collections/utils/string-case.util.ts +0 -362
- package/src/_collections/utils/string.util.spec.ts +0 -975
- package/src/_collections/utils/string.util.ts +0 -450
- package/src/_collections/utils/time.util.spec.ts +0 -50
- package/src/_collections/utils/time.util.ts +0 -481
- package/src/_collections/utils/type-cloning-facility.util.spec.ts +0 -51
- package/src/_collections/utils/type-cloning-facility.util.ts +0 -168
- package/src/_collections/utils/utilities.util.spec.ts +0 -201
- package/src/_collections/utils/utilities.util.ts +0 -68
- package/src/_collections/utils/uuid.util.spec.ts +0 -30
- package/src/_collections/utils/uuid.util.ts +0 -50
- package/src/_enums/basic-property-type.enum.ts +0 -20
- package/src/_enums/data-model-type.enum.ts +0 -29
- package/src/_enums/environment-flag.enum.ts +0 -28
- package/src/_enums/error-level.enum.ts +0 -43
- package/src/_enums/error-status.enum.ts +0 -30
- package/src/_enums/http/http-call-type.enum.ts +0 -43
- package/src/_enums/http/http-event-type.enum.ts +0 -40
- package/src/_enums/http/http-response-type.enum.ts +0 -18
- package/src/_enums/log-style.enum.ts +0 -44
- package/src/_enums/server-connection-status.enum.ts +0 -6
- package/src/_enums/time/day-of-week.enum.ts +0 -55
- package/src/_enums/time/month.enum.ts +0 -25
- package/src/_enums/time/relative-date.enum.ts +0 -24
- package/src/_models/control-models/data-model-params.control-model.spec.ts +0 -156
- package/src/_models/control-models/data-model-params.control-model.ts +0 -362
- package/src/_models/control-models/data-property-params.control-model.spec.ts +0 -93
- package/src/_models/control-models/data-property-params.control-model.ts +0 -210
- package/src/_models/control-models/error.control-model.spec.ts +0 -975
- package/src/_models/control-models/error.control-model.ts +0 -1280
- package/src/_models/control-models/http/http-error-response.control-model.spec.ts +0 -116
- package/src/_models/control-models/http/http-error-response.control-model.ts +0 -52
- package/src/_models/control-models/http/http-headers.control-model.spec.ts +0 -25
- package/src/_models/control-models/http/http-headers.control-model.ts +0 -125
- package/src/_models/control-models/http/http-response.model-base.spec.ts +0 -46
- package/src/_models/control-models/http/http-response.model-base.ts +0 -58
- package/src/_models/control-models/poll.control-model.spec.ts +0 -63
- package/src/_models/control-models/poll.control-model.ts +0 -151
- package/src/_models/control-models/range-value.control-model.spec.ts +0 -187
- package/src/_models/control-models/range-value.control-model.ts +0 -289
- package/src/_models/control-models/server-status.control-model.spec.ts +0 -66
- package/src/_models/control-models/server-status.control-model.ts +0 -94
- package/src/_models/control-models/service-endpoint-settings-base.control-model.spec.ts +0 -145
- package/src/_models/control-models/service-endpoint-settings-base.control-model.ts +0 -187
- package/src/_models/data-models/errors.data-model.spec.ts +0 -71
- package/src/_models/data-models/errors.data-model.ts +0 -201
- package/src/_models/data-models/metadata.data-model.spec.ts +0 -184
- package/src/_models/data-models/metadata.data-model.ts +0 -153
- package/src/_models/interfaces/box-bounds.interface.ts +0 -8
- package/src/_models/interfaces/environment/global-log-settings.interface.ts +0 -86
- package/src/_models/interfaces/environment/global-settings.interface.ts +0 -69
- package/src/_models/interfaces/error-defaults.interface.ts +0 -18
- package/src/_models/interfaces/paged.interface.ts +0 -12
- package/src/_models/interfaces/random-weight.interface.ts +0 -7
- package/src/_models/interfaces/route-settings.interface.ts +0 -15
- package/src/_models/interfaces/search-query.interface.ts +0 -23
- package/src/_models/interfaces/search-result.interface.ts +0 -6
- package/src/_models/interfaces/server-error-statistics.interface.ts +0 -24
- package/src/_models/interfaces/vector2.interface.ts +0 -21
- package/src/_models/types/db-filter.type.ts +0 -110
- package/src/_models/types/db-sort.type.ts +0 -5
- package/src/_models/types/ds-filter.type.ts +0 -68
- package/src/_models/types/ds-sort.type.ts +0 -21
- package/src/_modules/ai/_collections/ai-model-ref.util.ts +0 -88
- package/src/_modules/ai/_collections/ai-model-registry.util.spec.ts +0 -37
- package/src/_modules/ai/_collections/ai-model-registry.util.ts +0 -30
- package/src/_modules/ai/_enums/ai-message-role.enum.ts +0 -7
- package/src/_modules/ai/_enums/ai-model-type.enum.ts +0 -7
- package/src/_modules/ai/_enums/ai-provider.enum.ts +0 -7
- package/src/_modules/ai/_models/ai-call-settings.interface.ts +0 -84
- package/src/_modules/ai/_models/ai-config.interface.ts +0 -14
- package/src/_modules/ai/_models/ai-embedding-request.interface.ts +0 -20
- package/src/_modules/ai/_models/ai-embedding-response.interface.ts +0 -26
- package/src/_modules/ai/_models/ai-llm-request.interface.ts +0 -24
- package/src/_modules/ai/_models/ai-llm-response.interface.ts +0 -30
- package/src/_modules/ai/_models/ai-message.interface.ts +0 -12
- package/src/_modules/ai/_models/ai-model-capabilities.interface.ts +0 -35
- package/src/_modules/ai/_models/ai-model-info.interface.ts +0 -63
- package/src/_modules/ai/_models/ai-model-settings-schema.interface.ts +0 -52
- package/src/_modules/ai/_models/ai-provider-capabilities.interface.ts +0 -28
- package/src/_modules/ai/_models/ai-settings.interface.ts +0 -17
- package/src/_modules/ai/_models/ai-tool-call.interface.ts +0 -18
- package/src/_modules/ai/_models/ai-tool-handler.type.ts +0 -11
- package/src/_modules/ai/_models/ai-tool-result.interface.ts +0 -16
- package/src/_modules/ai/_models/ai-tool.interface.ts +0 -16
- package/src/_modules/ai/_models/ai-user-provider-config.control-model.ts +0 -29
- package/src/_modules/ai/_modules/anthropic/_collections/aai-models.const.ts +0 -135
- package/src/_modules/ai/_modules/anthropic/_enums/aai-model.enum.ts +0 -19
- package/src/_modules/ai/_modules/anthropic/_models/aai-call-settings.control-model.spec.ts +0 -28
- package/src/_modules/ai/_modules/anthropic/_models/aai-call-settings.control-model.ts +0 -23
- package/src/_modules/ai/_modules/anthropic/_models/aai-client-options.interface.ts +0 -10
- package/src/_modules/ai/_modules/anthropic/_models/aai-settings.control-model.spec.ts +0 -22
- package/src/_modules/ai/_modules/anthropic/_models/aai-settings.control-model.ts +0 -27
- package/src/_modules/ai/_modules/anthropic/_models/aai-user-provider-config.control-model.ts +0 -20
- package/src/_modules/ai/_modules/anthropic/index.ts +0 -14
- package/src/_modules/ai/_modules/document-ai/_models/dai-embedding-info.interface.ts +0 -12
- package/src/_modules/ai/_modules/document-ai/_models/dai-vector-search-params.interface.ts +0 -22
- package/src/_modules/ai/_modules/document-ai/index.ts +0 -4
- package/src/_modules/ai/_modules/fdp-ai/_collections/fdpai-models.const.ts +0 -40
- package/src/_modules/ai/_modules/fdp-ai/_enums/fdpai-model.enum.ts +0 -6
- package/src/_modules/ai/_modules/fdp-ai/_models/fdpai-call-settings.control-model.ts +0 -19
- package/src/_modules/ai/_modules/fdp-ai/_models/fdpai-client-options.interface.ts +0 -11
- package/src/_modules/ai/_modules/fdp-ai/_models/fdpai-settings.control-model.ts +0 -24
- package/src/_modules/ai/_modules/fdp-ai/_models/fdpai-user-provider-config.control-model.ts +0 -20
- package/src/_modules/ai/_modules/fdp-ai/index.ts +0 -11
- package/src/_modules/ai/_modules/google-ai/_collections/gai-models.const.ts +0 -161
- package/src/_modules/ai/_modules/google-ai/_enums/gai-model.enum.ts +0 -16
- package/src/_modules/ai/_modules/google-ai/_models/gai-call-settings.control-model.spec.ts +0 -28
- package/src/_modules/ai/_modules/google-ai/_models/gai-call-settings.control-model.ts +0 -21
- package/src/_modules/ai/_modules/google-ai/_models/gai-client-options.interface.ts +0 -8
- package/src/_modules/ai/_modules/google-ai/_models/gai-settings.control-model.spec.ts +0 -22
- package/src/_modules/ai/_modules/google-ai/_models/gai-settings.control-model.ts +0 -25
- package/src/_modules/ai/_modules/google-ai/_models/gai-user-provider-config.control-model.ts +0 -20
- package/src/_modules/ai/_modules/google-ai/index.ts +0 -14
- package/src/_modules/ai/_modules/local-ai/_collections/lai-models.const.ts +0 -59
- package/src/_modules/ai/_modules/local-ai/_enums/lai-model.enum.ts +0 -6
- package/src/_modules/ai/_modules/local-ai/_models/lai-call-settings.control-model.spec.ts +0 -28
- package/src/_modules/ai/_modules/local-ai/_models/lai-call-settings.control-model.ts +0 -18
- package/src/_modules/ai/_modules/local-ai/_models/lai-client-options.interface.ts +0 -9
- package/src/_modules/ai/_modules/local-ai/_models/lai-settings.control-model.spec.ts +0 -22
- package/src/_modules/ai/_modules/local-ai/_models/lai-settings.control-model.ts +0 -23
- package/src/_modules/ai/_modules/local-ai/index.ts +0 -14
- package/src/_modules/ai/_modules/open-ai/_collections/oai-embedding-model-dimensions.const.ts +0 -8
- package/src/_modules/ai/_modules/open-ai/_collections/oai-models.const.ts +0 -404
- package/src/_modules/ai/_modules/open-ai/_enums/oai-model.enum.ts +0 -179
- package/src/_modules/ai/_modules/open-ai/_models/oai-call-settings.control-model.spec.ts +0 -28
- package/src/_modules/ai/_modules/open-ai/_models/oai-call-settings.control-model.ts +0 -21
- package/src/_modules/ai/_modules/open-ai/_models/oai-client-options.interface.ts +0 -81
- package/src/_modules/ai/_modules/open-ai/_models/oai-embedding-info.interface.ts +0 -13
- package/src/_modules/ai/_modules/open-ai/_models/oai-settings.control-model.spec.ts +0 -22
- package/src/_modules/ai/_modules/open-ai/_models/oai-settings.control-model.ts +0 -25
- package/src/_modules/ai/_modules/open-ai/_models/oai-user-provider-config.control-model.ts +0 -21
- package/src/_modules/ai/_modules/open-ai/index.ts +0 -28
- package/src/_modules/ai/index.ts +0 -27
- package/src/_modules/ci-tools/_enums/cit-ci-result-code.enum.ts +0 -11
- package/src/_modules/ci-tools/_enums/cit-ci-step-result-code.enum.ts +0 -10
- package/src/_modules/ci-tools/_models/cit-ci-result-info.data-models.spec.ts +0 -58
- package/src/_modules/ci-tools/_models/cit-ci-result-info.data-models.ts +0 -77
- package/src/_modules/ci-tools/_models/cit-ci-step-result.interface.ts +0 -12
- package/src/_modules/ci-tools/index.ts +0 -8
- package/src/_modules/crypto/_collections/crypto-v1.util.ts +0 -225
- package/src/_modules/crypto/_collections/crypto-v2.util.ts +0 -331
- package/src/_modules/crypto/_collections/crypto-v4.util.ts +0 -702
- package/src/_modules/crypto/_collections/crypto.util.db-envelope.spec.ts +0 -51
- package/src/_modules/crypto/_collections/crypto.util.edge.spec.ts +0 -606
- package/src/_modules/crypto/_collections/crypto.util.extra.spec.ts +0 -643
- package/src/_modules/crypto/_collections/crypto.util.simple.spec.ts +0 -513
- package/src/_modules/crypto/_collections/crypto.util.ts +0 -748
- package/src/_modules/crypto/_models/artifact-signature.interface.ts +0 -39
- package/src/_modules/crypto/_services/artifact-signature.control-service.spec.ts +0 -223
- package/src/_modules/crypto/_services/artifact-signature.control-service.ts +0 -395
- package/src/_modules/crypto/index.ts +0 -16
- package/src/_modules/custom-data/_collections/cud-module-settings.const.ts +0 -21
- package/src/_modules/custom-data/_models/cud.data-model.spec.ts +0 -38
- package/src/_modules/custom-data/_models/cud.data-model.ts +0 -39
- package/src/_modules/custom-data/index.ts +0 -10
- package/src/_modules/data-handler/_models/data-handler-settings.control-model.spec.ts +0 -110
- package/src/_modules/data-handler/_models/data-handler-settings.control-model.ts +0 -110
- package/src/_modules/data-handler/_models/data-handler.control-model.spec.ts +0 -473
- package/src/_modules/data-handler/_models/data-handler.control-model.ts +0 -486
- package/src/_modules/data-handler/_models/data-list-handler.control-model.spec.ts +0 -263
- package/src/_modules/data-handler/_models/data-list-handler.control-model.ts +0 -252
- package/src/_modules/data-handler/_models/data-search-handler.control-model.spec.ts +0 -417
- package/src/_modules/data-handler/_models/data-search-handler.control-model.ts +0 -390
- package/src/_modules/data-handler/_models/list-collector-data-handler.control-model.spec.ts +0 -374
- package/src/_modules/data-handler/_models/list-collector-data-handler.control-model.ts +0 -274
- package/src/_modules/data-handler/index.ts +0 -6
- package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.spec.ts +0 -221
- package/src/_modules/deployment/_collections/atomic-rollback-manifest.util.ts +0 -455
- package/src/_modules/deployment/_models/atomic-rollback-manifest.interface.ts +0 -59
- package/src/_modules/deployment/index.ts +0 -2
- package/src/_modules/game/_collections/audio-mixer.util.spec.ts +0 -198
- package/src/_modules/game/_collections/audio-mixer.util.ts +0 -143
- package/src/_modules/game/_collections/audio-scale.util.spec.ts +0 -140
- package/src/_modules/game/_collections/audio-scale.util.ts +0 -129
- package/src/_modules/game/_enums/audio-channel.enum.ts +0 -22
- package/src/_modules/game/_models/audio-mixer-config.interface.ts +0 -53
- package/src/_modules/game/_models/audio-mixer-settings.interface.ts +0 -38
- package/src/_modules/game/_models/audio-mixer-state.interface.ts +0 -36
- package/src/_modules/game/_models/audio-mixer.control-model.spec.ts +0 -376
- package/src/_modules/game/_models/audio-mixer.control-model.ts +0 -419
- package/src/_modules/game/_models/audio-scale.interface.ts +0 -21
- package/src/_modules/game/_models/seeded-random-state.interface.ts +0 -21
- package/src/_modules/game/_models/seeded-random.control-model.spec.ts +0 -290
- package/src/_modules/game/_models/seeded-random.control-model.ts +0 -311
- package/src/_modules/game/index.ts +0 -15
- package/src/_modules/location/_collections/assets/country-codes-ISO-3166.json +0 -3239
- package/src/_modules/location/_collections/assets/country-divisions-ISO-3166-all-list.json +0 -19036
- package/src/_modules/location/_collections/assets/country-divisions-ISO-3166.json +0 -4994
- package/src/_modules/location/_collections/assets/country-phone-codes.json +0 -1203
- package/src/_modules/location/_collections/assets/country-subdivisions/afghanistan.json +0 -138
- package/src/_modules/location/_collections/assets/country-subdivisions/albania.json +0 -50
- package/src/_modules/location/_collections/assets/country-subdivisions/algeria.json +0 -194
- package/src/_modules/location/_collections/assets/country-subdivisions/andorra.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/angola.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/antigua-and-barbuda.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/argentina.json +0 -98
- package/src/_modules/location/_collections/assets/country-subdivisions/armenia.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/australia.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/austria.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/azerbaijan.json +0 -6
- package/src/_modules/location/_collections/assets/country-subdivisions/bahamas.json +0 -126
- package/src/_modules/location/_collections/assets/country-subdivisions/bahrain.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/bangladesh.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/barbados.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/belarus.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/belgium.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/belize.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/benin.json +0 -50
- package/src/_modules/location/_collections/assets/country-subdivisions/bhutan.json +0 -82
- package/src/_modules/location/_collections/assets/country-subdivisions/bolivia.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/bosnia-and-herzegovina.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/botswana.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/brazil.json +0 -110
- package/src/_modules/location/_collections/assets/country-subdivisions/brunei-darussalam.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/bulgaria.json +0 -114
- package/src/_modules/location/_collections/assets/country-subdivisions/burkina-faso.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/burundi.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/cambodia.json +0 -98
- package/src/_modules/location/_collections/assets/country-subdivisions/cameroon.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/canada.json +0 -80
- package/src/_modules/location/_collections/assets/country-subdivisions/cape-verde.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/central-african-republic.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/chad.json +0 -90
- package/src/_modules/location/_collections/assets/country-subdivisions/chile.json +0 -62
- package/src/_modules/location/_collections/assets/country-subdivisions/china.json +0 -206
- package/src/_modules/location/_collections/assets/country-subdivisions/colombia.json +0 -134
- package/src/_modules/location/_collections/assets/country-subdivisions/comoros.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/congo-the-democratic-republic-of-the.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/congo.json +0 -50
- package/src/_modules/location/_collections/assets/country-subdivisions/costa-rica.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/cote-d-ivoire-republic-of.json +0 -78
- package/src/_modules/location/_collections/assets/country-subdivisions/croatia.json +0 -86
- package/src/_modules/location/_collections/assets/country-subdivisions/cuba.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/cyprus.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/czech-republic.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/denmark.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/djibouti.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/dominica.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/dominican-republic.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/ecuador.json +0 -98
- package/src/_modules/location/_collections/assets/country-subdivisions/egypt.json +0 -118
- package/src/_modules/location/_collections/assets/country-subdivisions/el-salvador.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/equatorial-guinea.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/eritrea.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/estonia.json +0 -62
- package/src/_modules/location/_collections/assets/country-subdivisions/ethiopia.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/fiji.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/finland.json +0 -78
- package/src/_modules/location/_collections/assets/country-subdivisions/france.json +0 -134
- package/src/_modules/location/_collections/assets/country-subdivisions/gabon.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/gambia.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/georgia.json +0 -50
- package/src/_modules/location/_collections/assets/country-subdivisions/germany.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/ghana.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/greece.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/greenland.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/grenada.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/guatemala.json +0 -90
- package/src/_modules/location/_collections/assets/country-subdivisions/guinea-bissau.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/guinea.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/guyana.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/haiti.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/honduras.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/hong-kong.json +0 -5
- package/src/_modules/location/_collections/assets/country-subdivisions/hungary.json +0 -174
- package/src/_modules/location/_collections/assets/country-subdivisions/iceland.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/india.json +0 -182
- package/src/_modules/location/_collections/assets/country-subdivisions/indonesia.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/iran-islamic-republic-of.json +0 -126
- package/src/_modules/location/_collections/assets/country-subdivisions/iraq.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/ireland.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/israel.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/italy.json +0 -82
- package/src/_modules/location/_collections/assets/country-subdivisions/jamaica.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/japan.json +0 -190
- package/src/_modules/location/_collections/assets/country-subdivisions/jordan.json +0 -50
- package/src/_modules/location/_collections/assets/country-subdivisions/kazakhstan.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/kenya.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/kiribati.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/korea-democratic-people-s-republic-of.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/korea-republic-of.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/kuwait.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/kyrgyzstan.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/lao-people-s-democratic-republic.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/latvia.json +0 -478
- package/src/_modules/location/_collections/assets/country-subdivisions/lebanon.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/lesotho.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/liberia.json +0 -62
- package/src/_modules/location/_collections/assets/country-subdivisions/libyan-arab-jamahiriya.json +0 -90
- package/src/_modules/location/_collections/assets/country-subdivisions/liechtenstein.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/lithuania.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/luxembourg.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/macedonia-the-former-yugoslav-republic-of.json +0 -338
- package/src/_modules/location/_collections/assets/country-subdivisions/madagascar.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/malawi.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/malaysia.json +0 -82
- package/src/_modules/location/_collections/assets/country-subdivisions/maldives.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/mali.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/malta.json +0 -274
- package/src/_modules/location/_collections/assets/country-subdivisions/marshall-islands.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/mauritania.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/mauritius.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/mexico.json +0 -162
- package/src/_modules/location/_collections/assets/country-subdivisions/micronesia-federated-states-of.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/moldova-republic-of.json +0 -150
- package/src/_modules/location/_collections/assets/country-subdivisions/monaco.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/mongolia.json +0 -90
- package/src/_modules/location/_collections/assets/country-subdivisions/montenegro.json +0 -94
- package/src/_modules/location/_collections/assets/country-subdivisions/morocco.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/mozambique.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/myanmar.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/namibia.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/nauru.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/nepal.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/netherlands.json +0 -92
- package/src/_modules/location/_collections/assets/country-subdivisions/new-zealand.json +0 -112
- package/src/_modules/location/_collections/assets/country-subdivisions/nicaragua.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/niger.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/nigeria.json +0 -150
- package/src/_modules/location/_collections/assets/country-subdivisions/norway.json +0 -86
- package/src/_modules/location/_collections/assets/country-subdivisions/oman.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/pakistan.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/palau.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/palestinian-territory-occupied.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/panama.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/papua-new-guinea.json +0 -82
- package/src/_modules/location/_collections/assets/country-subdivisions/paraguay.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/peru.json +0 -106
- package/src/_modules/location/_collections/assets/country-subdivisions/philippines.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/poland.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/portugal.json +0 -82
- package/src/_modules/location/_collections/assets/country-subdivisions/qatar.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/romania.json +0 -170
- package/src/_modules/location/_collections/assets/country-subdivisions/russian-federation.json +0 -500
- package/src/_modules/location/_collections/assets/country-subdivisions/rwanda.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/saint-helena-ascension-and-tristan-da-cunha.json +0 -14
- package/src/_modules/location/_collections/assets/country-subdivisions/saint-kitts-and-nevis.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/saint-lucia.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/saint-vincent-and-the-grenadines.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/samoa.json +0 -46
- package/src/_modules/location/_collections/assets/country-subdivisions/san-marino.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/sao-tome-and-principe.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/saudi-arabia.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/senegal.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/serbia.json +0 -10
- package/src/_modules/location/_collections/assets/country-subdivisions/seychelles.json +0 -102
- package/src/_modules/location/_collections/assets/country-subdivisions/sierra-leone.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/singapore.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/slovakia.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/slovenia.json +0 -842
- package/src/_modules/location/_collections/assets/country-subdivisions/solomon-islands.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/somalia.json +0 -74
- package/src/_modules/location/_collections/assets/country-subdivisions/south-africa.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/south-sudan.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/spain.json +0 -347
- package/src/_modules/location/_collections/assets/country-subdivisions/sri-lanka.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/sudan.json +0 -70
- package/src/_modules/location/_collections/assets/country-subdivisions/suriname.json +0 -42
- package/src/_modules/location/_collections/assets/country-subdivisions/swaziland.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/sweden.json +0 -86
- package/src/_modules/location/_collections/assets/country-subdivisions/switzerland.json +0 -106
- package/src/_modules/location/_collections/assets/country-subdivisions/syrian-arab-republic.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/taiwan-province-of-china.json +0 -94
- package/src/_modules/location/_collections/assets/country-subdivisions/tajikistan.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/tanzania-united-republic-of.json +0 -106
- package/src/_modules/location/_collections/assets/country-subdivisions/thailand.json +0 -314
- package/src/_modules/location/_collections/assets/country-subdivisions/timor-leste.json +0 -54
- package/src/_modules/location/_collections/assets/country-subdivisions/togo.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/tonga.json +0 -22
- package/src/_modules/location/_collections/assets/country-subdivisions/trinidad-and-tobago.json +0 -66
- package/src/_modules/location/_collections/assets/country-subdivisions/tunisia.json +0 -98
- package/src/_modules/location/_collections/assets/country-subdivisions/turkey.json +0 -326
- package/src/_modules/location/_collections/assets/country-subdivisions/turkmenistan.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/tuvalu.json +0 -34
- package/src/_modules/location/_collections/assets/country-subdivisions/uganda.json +0 -18
- package/src/_modules/location/_collections/assets/country-subdivisions/ukraine.json +0 -110
- package/src/_modules/location/_collections/assets/country-subdivisions/united-arab-emirates.json +0 -30
- package/src/_modules/location/_collections/assets/country-subdivisions/united-kingdom.json +0 -1197
- package/src/_modules/location/_collections/assets/country-subdivisions/united-states-minor-outlying-islands.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/united-states.json +0 -287
- package/src/_modules/location/_collections/assets/country-subdivisions/uruguay.json +0 -78
- package/src/_modules/location/_collections/assets/country-subdivisions/uzbekistan.json +0 -58
- package/src/_modules/location/_collections/assets/country-subdivisions/vanuatu.json +0 -26
- package/src/_modules/location/_collections/assets/country-subdivisions/venezuela.json +0 -102
- package/src/_modules/location/_collections/assets/country-subdivisions/viet-nam.json +0 -258
- package/src/_modules/location/_collections/assets/country-subdivisions/yemen.json +0 -86
- package/src/_modules/location/_collections/assets/country-subdivisions/zambia.json +0 -38
- package/src/_modules/location/_collections/assets/country-subdivisions/zimbabwe.json +0 -42
- package/src/_modules/location/_collections/loc-country-divisions.const.ts +0 -11
- package/src/_modules/location/_collections/loc-country-isos.const.ts +0 -8
- package/src/_modules/location/_collections/loc-regions.util.spec.ts +0 -61
- package/src/_modules/location/_collections/loc-regions.util.ts +0 -137
- package/src/_modules/location/_collections/loc.util.spec.ts +0 -52
- package/src/_modules/location/_collections/loc.util.ts +0 -74
- package/src/_modules/location/_enums/loc-region.enum.ts +0 -14
- package/src/_modules/location/_enums/loc-sub-region.enum.ts +0 -31
- package/src/_modules/location/_enums/loc-subdivision-region-type.enum.ts +0 -47
- package/src/_modules/location/_models/loc-coordinates.interface.ts +0 -7
- package/src/_modules/location/_models/loc-country-division.interface.ts +0 -8
- package/src/_modules/location/_models/loc-country-iso.interface.ts +0 -23
- package/src/_modules/location/_models/loc-country-phone-code.interface.ts +0 -9
- package/src/_modules/location/_models/loc-division-collection.interface.ts +0 -12
- package/src/_modules/location/_models/loc-division-region-data.interface.ts +0 -9
- package/src/_modules/location/_models/loc-geo-ip-location.interface.ts +0 -27
- package/src/_modules/location/index.ts +0 -22
- package/src/_modules/messaging/README.md +0 -279
- package/src/_modules/messaging/_collections/msg-module-settings.const.ts +0 -46
- package/src/_modules/messaging/_enums/msg-attachment-type.enum.ts +0 -26
- package/src/_modules/messaging/_enums/msg-conversation-type.enum.ts +0 -20
- package/src/_modules/messaging/_enums/msg-delivery-status.enum.ts +0 -17
- package/src/_modules/messaging/_enums/msg-event-key.enum.ts +0 -31
- package/src/_modules/messaging/_enums/msg-participant-role.enum.ts +0 -20
- package/src/_modules/messaging/_enums/msg-provider-type.enum.ts +0 -7
- package/src/_modules/messaging/_enums/msg-status.enum.ts +0 -26
- package/src/_modules/messaging/_enums/msg-type.enum.ts +0 -23
- package/src/_modules/messaging/_models/msg-attachment.interface.ts +0 -46
- package/src/_modules/messaging/_models/msg-conversation.data-model.spec.ts +0 -69
- package/src/_modules/messaging/_models/msg-conversation.data-model.ts +0 -96
- package/src/_modules/messaging/_models/msg-mention.interface.ts +0 -29
- package/src/_modules/messaging/_models/msg-message.data-model.spec.ts +0 -79
- package/src/_modules/messaging/_models/msg-message.data-model.ts +0 -127
- package/src/_modules/messaging/_models/msg-participant.interface.ts +0 -46
- package/src/_modules/messaging/_models/msg-reaction.interface.ts +0 -20
- package/src/_modules/messaging/_models/msg-thread-info.interface.ts +0 -35
- package/src/_modules/messaging/_modules/agent/_enums/agt-process-step-type.enum.ts +0 -35
- package/src/_modules/messaging/_modules/agent/_enums/agt-tool-status.enum.ts +0 -23
- package/src/_modules/messaging/_modules/agent/_models/agt-process-step.interface.ts +0 -55
- package/src/_modules/messaging/_modules/agent/_models/agt-reasoning-info.interface.ts +0 -26
- package/src/_modules/messaging/_modules/agent/_models/agt-tool-usage.interface.ts +0 -37
- package/src/_modules/messaging/_modules/agent/index.ts +0 -8
- package/src/_modules/messaging/index.ts +0 -28
- package/src/_modules/ngx-models/_collections/angular-placeholders.ts +0 -35
- package/src/_modules/ngx-models/_collections/button-new-style-settings-presets.const.ts +0 -181
- package/src/_modules/ngx-models/_collections/dynamo-global.settings.spec.ts +0 -74
- package/src/_modules/ngx-models/_collections/dynamo-global.settings.ts +0 -103
- package/src/_modules/ngx-models/_enums/button-new/button-new-border-radius.enum.ts +0 -16
- package/src/_modules/ngx-models/_enums/button-new/button-new-icon-style-type.enum.ts +0 -14
- package/src/_modules/ngx-models/_enums/button-new/button-new-size.enum.ts +0 -16
- package/src/_modules/ngx-models/_enums/button-new/button-new-style-type.enum.ts +0 -18
- package/src/_modules/ngx-models/_enums/button-type.enum.ts +0 -36
- package/src/_modules/ngx-models/_enums/checkbox-label-position.enum.ts +0 -8
- package/src/_modules/ngx-models/_enums/container-type.enum.ts +0 -11
- package/src/_modules/ngx-models/_enums/errors/error-level.enum.ts +0 -13
- package/src/_modules/ngx-models/_enums/errors/error-notification-color.enum.ts +0 -13
- package/src/_modules/ngx-models/_enums/errors/error-ui-mode.enum.ts +0 -13
- package/src/_modules/ngx-models/_enums/field-appearance.enum.ts +0 -14
- package/src/_modules/ngx-models/_enums/field-type.enum.ts +0 -55
- package/src/_modules/ngx-models/_enums/file-type.enum.ts +0 -12
- package/src/_modules/ngx-models/_enums/flex/flex-layout-align.enum.ts +0 -21
- package/src/_modules/ngx-models/_enums/flex/flex-layout.enum.ts +0 -5
- package/src/_modules/ngx-models/_enums/form-access.enum.ts +0 -9
- package/src/_modules/ngx-models/_enums/form-reset-data.enum.ts +0 -12
- package/src/_modules/ngx-models/_enums/form-store-on.enum.ts +0 -9
- package/src/_modules/ngx-models/_enums/forms-new/field-new-validator-type.enum.ts +0 -20
- package/src/_modules/ngx-models/_enums/frames/header-item-type.enum.ts +0 -15
- package/src/_modules/ngx-models/_enums/frames/header-position.enum.ts +0 -10
- package/src/_modules/ngx-models/_enums/frames/side-nav-badge-color.enum.ts +0 -13
- package/src/_modules/ngx-models/_enums/html/input-types.enum.ts +0 -27
- package/src/_modules/ngx-models/_enums/material-color.enum.ts +0 -16
- package/src/_modules/ngx-models/_enums/material-tooltip-position.enum.ts +0 -17
- package/src/_modules/ngx-models/_enums/preconfigured-field-type.enum.ts +0 -8
- package/src/_modules/ngx-models/_enums/storage-type.enum.ts +0 -15
- package/src/_modules/ngx-models/_enums/validator-type.enum.ts +0 -9
- package/src/_modules/ngx-models/_enums/voice/audio-mime-type.enum.ts +0 -14
- package/src/_modules/ngx-models/_enums/voice/voice-provider-type.enum.ts +0 -26
- package/src/_modules/ngx-models/_enums/voice/voice-recorder-state.enum.ts +0 -20
- package/src/_modules/ngx-models/_models/control-models/button-new-style-settings.control-model.ts +0 -37
- package/src/_modules/ngx-models/_models/control-models/button-params.control-model.spec.ts +0 -70
- package/src/_modules/ngx-models/_models/control-models/button-params.control-model.ts +0 -332
- package/src/_modules/ngx-models/_models/control-models/chat/chat-column-layout-settings.control-model.ts +0 -28
- package/src/_modules/ngx-models/_models/control-models/data-handler-settings.control-model.spec.ts +0 -91
- package/src/_modules/ngx-models/_models/control-models/data-handler-settings.control-model.ts +0 -135
- package/src/_modules/ngx-models/_models/control-models/data-handler.control-model.ts +0 -529
- package/src/_modules/ngx-models/_models/control-models/errors/error-notification.control-model.ts +0 -52
- package/src/_modules/ngx-models/_models/control-models/errors/error-settings.control-model.ts +0 -34
- package/src/_modules/ngx-models/_models/control-models/errors/errors-pojo.spec.ts +0 -86
- package/src/_modules/ngx-models/_models/control-models/errors/errors-settings.control-model.ts +0 -52
- package/src/_modules/ngx-models/_models/control-models/field-settings.control-model.spec.ts +0 -109
- package/src/_modules/ngx-models/_models/control-models/field-settings.control-model.ts +0 -133
- package/src/_modules/ngx-models/_models/control-models/form-settings.control-model.spec.ts +0 -109
- package/src/_modules/ngx-models/_models/control-models/form-settings.control-model.ts +0 -160
- package/src/_modules/ngx-models/_models/control-models/forms-new/checkbox-field-new-settings.control-model.ts +0 -25
- package/src/_modules/ngx-models/_models/control-models/forms-new/color-picker-field-new-settings.control-model.ts +0 -44
- package/src/_modules/ngx-models/_models/control-models/forms-new/date-field-new-settings.control-model.ts +0 -26
- package/src/_modules/ngx-models/_models/control-models/forms-new/date-range-field-new-settings.control-model.ts +0 -42
- package/src/_modules/ngx-models/_models/control-models/forms-new/datetime-field-new-settings.control-model.ts +0 -35
- package/src/_modules/ngx-models/_models/control-models/forms-new/datetime-range-field-new-settings.control-model.ts +0 -35
- package/src/_modules/ngx-models/_models/control-models/forms-new/emoji-picker-field-new-settings.control-model.ts +0 -24
- package/src/_modules/ngx-models/_models/control-models/forms-new/field-new-settings.control-model.ts +0 -85
- package/src/_modules/ngx-models/_models/control-models/forms-new/field-new-types.ts +0 -48
- package/src/_modules/ngx-models/_models/control-models/forms-new/form-new-settings.control-model.ts +0 -40
- package/src/_modules/ngx-models/_models/control-models/forms-new/forms-new.spec.ts +0 -245
- package/src/_modules/ngx-models/_models/control-models/forms-new/icon-picker-field-new-settings.control-model.ts +0 -52
- package/src/_modules/ngx-models/_models/control-models/forms-new/index.ts +0 -24
- package/src/_modules/ngx-models/_models/control-models/forms-new/multiselect-field-new-settings.control-model.ts +0 -27
- package/src/_modules/ngx-models/_models/control-models/forms-new/number-field-new-settings.control-model.ts +0 -24
- package/src/_modules/ngx-models/_models/control-models/forms-new/password-field-new-settings.control-model.ts +0 -35
- package/src/_modules/ngx-models/_models/control-models/forms-new/picker-field-new-option.interface.ts +0 -9
- package/src/_modules/ngx-models/_models/control-models/forms-new/radio-select-field-new-settings.control-model.ts +0 -35
- package/src/_modules/ngx-models/_models/control-models/forms-new/select-field-new-settings.control-model.ts +0 -46
- package/src/_modules/ngx-models/_models/control-models/forms-new/slider-field-new-settings.control-model.ts +0 -37
- package/src/_modules/ngx-models/_models/control-models/forms-new/slider-range-field-new-settings.control-model.ts +0 -45
- package/src/_modules/ngx-models/_models/control-models/forms-new/text-field-new-settings.control-model.ts +0 -30
- package/src/_modules/ngx-models/_models/control-models/forms-new/textarea-field-new-settings.control-model.ts +0 -22
- package/src/_modules/ngx-models/_models/control-models/frames/frames-pojo.spec.ts +0 -108
- package/src/_modules/ngx-models/_models/control-models/frames/header-item-settings.control-model.ts +0 -52
- package/src/_modules/ngx-models/_models/control-models/frames/main-frame-settings.control-model.ts +0 -40
- package/src/_modules/ngx-models/_models/control-models/frames/side-nav-item-settings.control-model.ts +0 -55
- package/src/_modules/ngx-models/_models/control-models/frames/side-nav-settings.control-model.ts +0 -30
- package/src/_modules/ngx-models/_models/control-models/select.control-model.spec.ts +0 -45
- package/src/_modules/ngx-models/_models/control-models/select.control-model.ts +0 -28
- package/src/_modules/ngx-models/_models/control-models/voice/voice-pojo.spec.ts +0 -111
- package/src/_modules/ngx-models/_models/control-models/voice/voice-providers-settings.control-model.ts +0 -74
- package/src/_modules/ngx-models/_models/control-models/voice/voice-record-button-settings.control-model.ts +0 -42
- package/src/_modules/ngx-models/_models/control-models/voice/voice-recorder-settings.control-model.ts +0 -37
- package/src/_modules/ngx-models/_models/interfaces/button-new-settings.interface.ts +0 -74
- package/src/_modules/ngx-models/_models/interfaces/confirm-settings.interface.ts +0 -20
- package/src/_modules/ngx-models/_models/interfaces/global-settings.interface.ts +0 -67
- package/src/_modules/ngx-models/_models/interfaces/select-options-custom-constructor.interface.ts +0 -40
- package/src/_modules/ngx-models/_models/interfaces/storage.service.spec.ts +0 -18
- package/src/_modules/ngx-models/_models/interfaces/storage.service.ts +0 -41
- package/src/_modules/ngx-models/_models/interfaces/voice/speak-options.interface.ts +0 -19
- package/src/_modules/ngx-models/_models/interfaces/voice/speak-result.interface.ts +0 -14
- package/src/_modules/ngx-models/_models/interfaces/voice/transcribe-options.interface.ts +0 -14
- package/src/_modules/ngx-models/_models/interfaces/voice/transcribe-result.interface.ts +0 -15
- package/src/_modules/ngx-models/_models/interfaces/voice/voice-profile.interface.ts +0 -18
- package/src/_modules/ngx-models/_models/interfaces/voice/voice-provider-init.interface.ts +0 -21
- package/src/_modules/ngx-models/_utils/shared.service.spec.ts +0 -7
- package/src/_modules/ngx-models/_utils/shared.service.ts +0 -541
- package/src/_modules/ngx-models/index.ts +0 -110
- package/src/_modules/pipe/_collections/pip-transforms.const.ts +0 -42
- package/src/_modules/pipe/_collections/utils/pip-country-pipe.util.spec.ts +0 -47
- package/src/_modules/pipe/_collections/utils/pip-country-pipe.util.ts +0 -41
- package/src/_modules/pipe/_collections/utils/pip-custom-pipe.util.spec.ts +0 -39
- package/src/_modules/pipe/_collections/utils/pip-custom-pipe.util.ts +0 -30
- package/src/_modules/pipe/_collections/utils/pip-division-pipe.util.spec.ts +0 -41
- package/src/_modules/pipe/_collections/utils/pip-division-pipe.util.ts +0 -36
- package/src/_modules/pipe/_collections/utils/pip-json-pipe.util.spec.ts +0 -62
- package/src/_modules/pipe/_collections/utils/pip-json-pipe.util.ts +0 -18
- package/src/_modules/pipe/_collections/utils/pip-list-pipe.util.spec.ts +0 -34
- package/src/_modules/pipe/_collections/utils/pip-list-pipe.util.ts +0 -25
- package/src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.spec.ts +0 -67
- package/src/_modules/pipe/_collections/utils/pip-multi-pipe-pipe.util.ts +0 -227
- package/src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.spec.ts +0 -28
- package/src/_modules/pipe/_collections/utils/pip-obj-key-pipe.util.ts +0 -21
- package/src/_modules/pipe/_collections/utils/pip-range-pipe.util.spec.ts +0 -59
- package/src/_modules/pipe/_collections/utils/pip-range-pipe.util.ts +0 -106
- package/src/_modules/pipe/_collections/utils/pip-region-pipe.util.spec.ts +0 -31
- package/src/_modules/pipe/_collections/utils/pip-region-pipe.util.ts +0 -35
- package/src/_modules/pipe/_collections/utils/pip-replace-pipe.util.spec.ts +0 -44
- package/src/_modules/pipe/_collections/utils/pip-replace-pipe.util.ts +0 -23
- package/src/_modules/pipe/_collections/utils/pip-slider-pipe.util.spec.ts +0 -21
- package/src/_modules/pipe/_collections/utils/pip-slider-pipe.util.ts +0 -33
- package/src/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.spec.ts +0 -62
- package/src/_modules/pipe/_collections/utils/pip-smart-replace-pipe.util.ts +0 -80
- package/src/_modules/pipe/_enums/pip-range-pipe-setting.enum.ts +0 -15
- package/src/_modules/pipe/_enums/pip.enum.ts +0 -65
- package/src/_modules/pipe/_models/pip-multi-pipe-settings.type.ts +0 -8
- package/src/_modules/pipe/_models/pip-transforms.interface.ts +0 -30
- package/src/_modules/pipe/index.ts +0 -30
- package/src/_modules/security/_collections/stored-secret.util.spec.ts +0 -81
- package/src/_modules/security/_collections/stored-secret.util.ts +0 -96
- package/src/_modules/security/_models/stored-secret.control-model.ts +0 -55
- package/src/_modules/security/index.ts +0 -9
- package/src/_modules/socket/_enums/sck-event-key.enum.ts +0 -21
- package/src/_modules/socket/_models/sck-client-params.control-model.spec.ts +0 -67
- package/src/_modules/socket/_models/sck-client-params.control-model.ts +0 -50
- package/src/_modules/socket/_models/sck-socket-event.control-model.spec.ts +0 -89
- package/src/_modules/socket/_models/sck-socket-event.control-model.ts +0 -185
- package/src/_modules/socket/_services/sck-client.service-base.spec.ts +0 -99
- package/src/_modules/socket/_services/sck-client.service-base.ts +0 -353
- package/src/_modules/socket/index.ts +0 -14
- package/src/_modules/state-machine/_models/state-machine-config.interface.ts +0 -19
- package/src/_modules/state-machine/_models/state-machine-event.interface.ts +0 -25
- package/src/_modules/state-machine/_models/state-machine.control-model.spec.ts +0 -314
- package/src/_modules/state-machine/_models/state-machine.control-model.ts +0 -298
- package/src/_modules/state-machine/_models/state-transition-result.interface.ts +0 -53
- package/src/_modules/state-machine/_models/state-transition.interface.ts +0 -30
- package/src/_modules/state-machine/index.ts +0 -6
- package/src/_modules/test/_collections/tst-module-settings.const.ts +0 -67
- package/src/_modules/test/index.ts +0 -5
- package/src/_modules/usage/_collections/usg-module-settings.const.ts +0 -33
- package/src/_modules/usage/_models/usg-action.control-model.spec.ts +0 -27
- package/src/_modules/usage/_models/usg-action.control-model.ts +0 -28
- package/src/_modules/usage/_models/usg-daily-usage-data.control-model.spec.ts +0 -36
- package/src/_modules/usage/_models/usg-daily-usage-data.control-model.ts +0 -35
- package/src/_modules/usage/_models/usg-data.control-model.spec.ts +0 -41
- package/src/_modules/usage/_models/usg-data.control-model.ts +0 -35
- package/src/_modules/usage/_models/usg-session.data-model.spec.ts +0 -97
- package/src/_modules/usage/_models/usg-session.data-model.ts +0 -72
- package/src/_modules/usage/index.ts +0 -11
- package/src/index.ts +0 -104
- package/tsconfig.app.json +0 -12
- package/tsconfig.json +0 -32
- package/tsconfig.test.json +0 -16
- package/tslint.json +0 -153
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** ECDSA P-256 publication evidence safe to persist and distribute to browsers. */
|
|
2
|
-
export interface DyFM_ArtifactSignature_Evidence_Interface {
|
|
3
|
-
readonly contractVersion: 'dyfm-artifact-signature/1';
|
|
4
|
-
readonly subjectChecksum: string;
|
|
5
|
-
readonly algorithm: 'ECDSA';
|
|
6
|
-
readonly namedCurve: 'P-256';
|
|
7
|
-
readonly hash: 'SHA-256';
|
|
8
|
-
readonly encoding: 'ieee-p1363';
|
|
9
|
-
readonly keyId: string;
|
|
10
|
-
readonly publicKeyFingerprint: string;
|
|
11
|
-
readonly signedAt: string;
|
|
12
|
-
readonly signature: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/** Server-side signing input. Private PKCS#8 material must originate from FDP Keystore. */
|
|
16
|
-
export interface DyFM_ArtifactSignatureSign_Settings_Interface {
|
|
17
|
-
readonly subjectBytes: Uint8Array;
|
|
18
|
-
readonly subjectChecksum: string;
|
|
19
|
-
readonly privateKeyPkcs8Base64Url: string;
|
|
20
|
-
readonly publicKeyJwk: JsonWebKey;
|
|
21
|
-
readonly keyId: string;
|
|
22
|
-
readonly signedAt: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** Browser/server verification input using public material only. */
|
|
26
|
-
export interface DyFM_ArtifactSignatureVerify_Settings_Interface {
|
|
27
|
-
readonly subjectBytes: Uint8Array;
|
|
28
|
-
readonly evidence: DyFM_ArtifactSignature_Evidence_Interface;
|
|
29
|
-
readonly publicKeyJwk: JsonWebKey;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** Content-free fail-closed verification result. */
|
|
33
|
-
export interface DyFM_ArtifactSignatureVerification_Interface {
|
|
34
|
-
readonly contractVersion: 'dyfm-artifact-signature-verification/1';
|
|
35
|
-
readonly isVerified: boolean;
|
|
36
|
-
readonly code: string;
|
|
37
|
-
readonly subjectChecksum: string;
|
|
38
|
-
readonly keyId: string;
|
|
39
|
-
}
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DyFM_ArtifactSignature_Evidence_Interface,
|
|
3
|
-
DyFM_ArtifactSignatureSign_Settings_Interface,
|
|
4
|
-
DyFM_ArtifactSignatureVerification_Interface
|
|
5
|
-
} from '../_models/artifact-signature.interface';
|
|
6
|
-
import { DyFM_ArtifactSignature_ControlService } from './artifact-signature.control-service';
|
|
7
|
-
|
|
8
|
-
interface DyFM_ArtifactSignatureSpecKeyMaterial {
|
|
9
|
-
readonly privateKeyPkcs8Base64Url: string;
|
|
10
|
-
readonly publicKeyJwk: JsonWebKey;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
describe('| DyFM artifact signature', (): void => {
|
|
14
|
-
const signature_CS: DyFM_ArtifactSignature_ControlService =
|
|
15
|
-
new DyFM_ArtifactSignature_ControlService();
|
|
16
|
-
const subjectBytes: Uint8Array<ArrayBuffer> = new TextEncoder().encode(
|
|
17
|
-
'{"contractVersion":"ctm-artifact-canonical/1","bundleSource":"exact"}'
|
|
18
|
-
);
|
|
19
|
-
let keyMaterial: DyFM_ArtifactSignatureSpecKeyMaterial;
|
|
20
|
-
let subjectChecksum: string;
|
|
21
|
-
|
|
22
|
-
beforeAll(async (): Promise<void> => {
|
|
23
|
-
keyMaterial = await generateKeyMaterial();
|
|
24
|
-
subjectChecksum = await checksum(subjectBytes);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('| signs and verifies exact bytes with fixed P1363 evidence', async (): Promise<void> => {
|
|
28
|
-
const evidence: DyFM_ArtifactSignature_Evidence_Interface = await sign();
|
|
29
|
-
const verification: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
30
|
-
subjectBytes: subjectBytes,
|
|
31
|
-
evidence: evidence,
|
|
32
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
expect(verification.isVerified).toBeTrue();
|
|
36
|
-
expect(verification.code).toBe('DYFM|ARTIFACT_SIGNATURE|VERIFIED');
|
|
37
|
-
expect(evidence.signature).toMatch(/^[A-Za-z0-9_-]{86}$/u);
|
|
38
|
-
expect(evidence.publicKeyFingerprint).toMatch(/^[a-f0-9]{64}$/u);
|
|
39
|
-
expect(Object.keys(evidence)).not.toContain('privateKey');
|
|
40
|
-
expect(Object.keys(evidence)).not.toContain('d');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('| rejects one-byte subject tampering without reflecting content', async (): Promise<void> => {
|
|
44
|
-
const evidence: DyFM_ArtifactSignature_Evidence_Interface = await sign();
|
|
45
|
-
const tamperedBytes: Uint8Array = new Uint8Array(subjectBytes);
|
|
46
|
-
|
|
47
|
-
tamperedBytes[tamperedBytes.length - 1] ^= 1;
|
|
48
|
-
|
|
49
|
-
const verification: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
50
|
-
subjectBytes: tamperedBytes,
|
|
51
|
-
evidence: evidence,
|
|
52
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
expect(verification).toEqual({
|
|
56
|
-
contractVersion: 'dyfm-artifact-signature-verification/1',
|
|
57
|
-
isVerified: false,
|
|
58
|
-
code: 'DYFM|ARTIFACT_SIGNATURE|SUBJECT_CHECKSUM_MISMATCH',
|
|
59
|
-
subjectChecksum: evidence.subjectChecksum,
|
|
60
|
-
keyId: evidence.keyId,
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
it('| rejects a different allowlisted public key before signature verification', async (): Promise<void> => {
|
|
65
|
-
const evidence: DyFM_ArtifactSignature_Evidence_Interface = await sign();
|
|
66
|
-
const otherKey: DyFM_ArtifactSignatureSpecKeyMaterial = await generateKeyMaterial();
|
|
67
|
-
const verification: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
68
|
-
subjectBytes: subjectBytes,
|
|
69
|
-
evidence: evidence,
|
|
70
|
-
publicKeyJwk: otherKey.publicKeyJwk,
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
expect(verification.isVerified).toBeFalse();
|
|
74
|
-
expect(verification.code).toBe('DYFM|ARTIFACT_SIGNATURE|PUBLIC_KEY_FINGERPRINT_MISMATCH');
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('| rejects a mutated fixed-length signature after all metadata checks pass', async (): Promise<void> => {
|
|
78
|
-
const evidence: DyFM_ArtifactSignature_Evidence_Interface = await sign();
|
|
79
|
-
const mutatedEvidence: DyFM_ArtifactSignature_Evidence_Interface = {
|
|
80
|
-
...evidence,
|
|
81
|
-
signature: `${evidence.signature[0] === 'A' ? 'B' : 'A'}${evidence.signature.slice(1)}`,
|
|
82
|
-
};
|
|
83
|
-
const verification: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
84
|
-
subjectBytes: subjectBytes,
|
|
85
|
-
evidence: mutatedEvidence,
|
|
86
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
expect(verification.isVerified).toBeFalse();
|
|
90
|
-
expect(verification.code).toBe('DYFM|ARTIFACT_SIGNATURE|SIGNATURE_MISMATCH');
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('| rejects malformed or extended evidence as a strict contract', async (): Promise<void> => {
|
|
94
|
-
const evidence: DyFM_ArtifactSignature_Evidence_Interface = await sign();
|
|
95
|
-
const malformedEvidence: DyFM_ArtifactSignature_Evidence_Interface = {
|
|
96
|
-
...evidence,
|
|
97
|
-
signature: `${evidence.signature}=`,
|
|
98
|
-
};
|
|
99
|
-
const extendedEvidence = { ...evidence, unexpected: true };
|
|
100
|
-
const malformed: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
101
|
-
subjectBytes: subjectBytes,
|
|
102
|
-
evidence: malformedEvidence,
|
|
103
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
104
|
-
});
|
|
105
|
-
const extended: DyFM_ArtifactSignatureVerification_Interface = await signature_CS.verify({
|
|
106
|
-
subjectBytes: subjectBytes,
|
|
107
|
-
evidence: extendedEvidence,
|
|
108
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
expect(malformed.code).toBe('DYFM|ARTIFACT_SIGNATURE|SIGNATURE_ENCODING_INVALID');
|
|
112
|
-
expect(extended.code).toBe('DYFM|ARTIFACT_SIGNATURE|EVIDENCE_SHAPE_INVALID');
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
it('| refuses signing when the caller checksum does not match exact bytes', async (): Promise<void> => {
|
|
116
|
-
await expectAsync(signature_CS.sign(createSignSettings({
|
|
117
|
-
subjectChecksum: 'f'.repeat(64),
|
|
118
|
-
}))).toBeRejectedWithError(/DYFM\|ARTIFACT_SIGNATURE\|SUBJECT_CHECKSUM_MISMATCH/u);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('| refuses a private/public key mismatch before returning evidence', async (): Promise<void> => {
|
|
122
|
-
const otherKey: DyFM_ArtifactSignatureSpecKeyMaterial = await generateKeyMaterial();
|
|
123
|
-
|
|
124
|
-
await expectAsync(signature_CS.sign(createSignSettings({
|
|
125
|
-
publicKeyJwk: otherKey.publicKeyJwk,
|
|
126
|
-
}))).toBeRejectedWithError(/DYFM\|ARTIFACT_SIGNATURE\|KEY_PAIR_MISMATCH/u);
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it('| accepts only strict unpadded Base64URL PKCS8 material', async (): Promise<void> => {
|
|
130
|
-
await expectAsync(signature_CS.sign(createSignSettings({
|
|
131
|
-
privateKeyPkcs8Base64Url: `${keyMaterial.privateKeyPkcs8Base64Url}=`,
|
|
132
|
-
}))).toBeRejectedWithError(/DYFM\|ARTIFACT_SIGNATURE\|BASE64URL_INVALID/u);
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('| fingerprints only public curve coordinates and ignores JWK metadata', async (): Promise<void> => {
|
|
136
|
-
const first: string = await signature_CS.getPublicKeyFingerprint(keyMaterial.publicKeyJwk);
|
|
137
|
-
const second: string = await signature_CS.getPublicKeyFingerprint({
|
|
138
|
-
...keyMaterial.publicKeyJwk,
|
|
139
|
-
alg: 'arbitrary-metadata',
|
|
140
|
-
key_ops: [ 'verify', 'deriveBits' ],
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
expect(first).toBe(second);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it('| rejects any private coordinate in a purported public JWK', async (): Promise<void> => {
|
|
147
|
-
await expectAsync(signature_CS.getPublicKeyFingerprint({
|
|
148
|
-
...keyMaterial.publicKeyJwk,
|
|
149
|
-
d: '',
|
|
150
|
-
})).toBeRejectedWithError(/DYFM\|ARTIFACT_SIGNATURE\|PUBLIC_KEY_INVALID/u);
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
/** Creates one valid signing request with selected deliberate overrides. */
|
|
154
|
-
function createSignSettings(
|
|
155
|
-
overrides: Partial<DyFM_ArtifactSignatureSign_Settings_Interface> = {}
|
|
156
|
-
): DyFM_ArtifactSignatureSign_Settings_Interface {
|
|
157
|
-
return {
|
|
158
|
-
subjectBytes: subjectBytes,
|
|
159
|
-
subjectChecksum: subjectChecksum,
|
|
160
|
-
privateKeyPkcs8Base64Url: keyMaterial.privateKeyPkcs8Base64Url,
|
|
161
|
-
publicKeyJwk: keyMaterial.publicKeyJwk,
|
|
162
|
-
keyId: 'artifact-signing-2026-08',
|
|
163
|
-
signedAt: '2026-08-21T12:00:00.000Z',
|
|
164
|
-
...overrides,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/** Generates an ephemeral exportable key pair for test-only signing. */
|
|
169
|
-
async function generateKeyMaterial(): Promise<DyFM_ArtifactSignatureSpecKeyMaterial> {
|
|
170
|
-
const keyPair: CryptoKeyPair = await globalThis.crypto.subtle.generateKey(
|
|
171
|
-
{ name: 'ECDSA', namedCurve: 'P-256' },
|
|
172
|
-
true,
|
|
173
|
-
[ 'sign', 'verify' ]
|
|
174
|
-
);
|
|
175
|
-
const privateKeyPkcs8: ArrayBuffer = await globalThis.crypto.subtle.exportKey('pkcs8', keyPair.privateKey);
|
|
176
|
-
const publicKeyJwk: JsonWebKey = await globalThis.crypto.subtle.exportKey('jwk', keyPair.publicKey);
|
|
177
|
-
|
|
178
|
-
return {
|
|
179
|
-
privateKeyPkcs8Base64Url: encodeBase64Url(new Uint8Array(privateKeyPkcs8)),
|
|
180
|
-
publicKeyJwk: publicKeyJwk,
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/** Calculates lowercase SHA-256 through the same platform boundary as production. */
|
|
185
|
-
async function checksum(bytes: Uint8Array<ArrayBuffer>): Promise<string> {
|
|
186
|
-
const digest: ArrayBuffer = await globalThis.crypto.subtle.digest('SHA-256', bytes);
|
|
187
|
-
|
|
188
|
-
return [ ...new Uint8Array(digest) ]
|
|
189
|
-
.map((value: number): string => value.toString(16).padStart(2, '0'))
|
|
190
|
-
.join('');
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/** Encodes test key bytes as strict unpadded Base64URL. */
|
|
194
|
-
function encodeBase64Url(bytes: Uint8Array): string {
|
|
195
|
-
const alphabet: string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
|
|
196
|
-
let encoded: string = '';
|
|
197
|
-
|
|
198
|
-
for (let index: number = 0; index < bytes.length; index += 3) {
|
|
199
|
-
const remaining: number = bytes.length - index;
|
|
200
|
-
const combined: number = (bytes[index] << 16)
|
|
201
|
-
| ((remaining > 1 ? bytes[index + 1] : 0) << 8)
|
|
202
|
-
| (remaining > 2 ? bytes[index + 2] : 0);
|
|
203
|
-
|
|
204
|
-
encoded += alphabet[(combined >>> 18) & 63];
|
|
205
|
-
encoded += alphabet[(combined >>> 12) & 63];
|
|
206
|
-
|
|
207
|
-
if (remaining > 1) {
|
|
208
|
-
encoded += alphabet[(combined >>> 6) & 63];
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (remaining > 2) {
|
|
212
|
-
encoded += alphabet[combined & 63];
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return encoded;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/** Signs the shared exact test subject. */
|
|
220
|
-
async function sign(): Promise<DyFM_ArtifactSignature_Evidence_Interface> {
|
|
221
|
-
return signature_CS.sign(createSignSettings());
|
|
222
|
-
}
|
|
223
|
-
});
|
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DyFM_ArtifactSignature_Evidence_Interface,
|
|
3
|
-
DyFM_ArtifactSignatureSign_Settings_Interface,
|
|
4
|
-
DyFM_ArtifactSignatureVerification_Interface,
|
|
5
|
-
DyFM_ArtifactSignatureVerify_Settings_Interface
|
|
6
|
-
} from '../_models/artifact-signature.interface';
|
|
7
|
-
|
|
8
|
-
const dyfm_base64UrlAlphabet: string =
|
|
9
|
-
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_';
|
|
10
|
-
const dyfm_checksumPattern: RegExp = /^[a-f0-9]{64}$/u;
|
|
11
|
-
const dyfm_keyIdPattern: RegExp = /^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,119}$/u;
|
|
12
|
-
const dyfm_signatureEvidenceKeys: string[] = [
|
|
13
|
-
'algorithm',
|
|
14
|
-
'contractVersion',
|
|
15
|
-
'encoding',
|
|
16
|
-
'hash',
|
|
17
|
-
'keyId',
|
|
18
|
-
'namedCurve',
|
|
19
|
-
'publicKeyFingerprint',
|
|
20
|
-
'signature',
|
|
21
|
-
'signedAt',
|
|
22
|
-
'subjectChecksum',
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
/** Cross-runtime ECDSA artifact signing and verification using the platform Web Crypto implementation. */
|
|
26
|
-
export class DyFM_ArtifactSignature_ControlService {
|
|
27
|
-
/** Signs exact bytes with server-only PKCS#8 material and verifies the configured public/private pair. */
|
|
28
|
-
public async sign(
|
|
29
|
-
set: DyFM_ArtifactSignatureSign_Settings_Interface
|
|
30
|
-
): Promise<DyFM_ArtifactSignature_Evidence_Interface> {
|
|
31
|
-
this.validateSubject(set.subjectBytes);
|
|
32
|
-
this.validateChecksum(set.subjectChecksum, 'SUBJECT_CHECKSUM_INVALID');
|
|
33
|
-
this.validateKeyId(set.keyId);
|
|
34
|
-
this.validateTimestamp(set.signedAt);
|
|
35
|
-
|
|
36
|
-
const subtle: SubtleCrypto = this.getSubtleCrypto();
|
|
37
|
-
const subjectBytes: Uint8Array<ArrayBuffer> = new Uint8Array(set.subjectBytes);
|
|
38
|
-
const actualChecksum: string = await this.checksum(subjectBytes);
|
|
39
|
-
|
|
40
|
-
if (actualChecksum !== set.subjectChecksum) {
|
|
41
|
-
throw this.buildError('SUBJECT_CHECKSUM_MISMATCH');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const privateKeyBytes: Uint8Array<ArrayBuffer> = this.decodeBase64UrlStrict(set.privateKeyPkcs8Base64Url);
|
|
45
|
-
|
|
46
|
-
if (privateKeyBytes.byteLength < 64 || privateKeyBytes.byteLength > 512) {
|
|
47
|
-
throw this.buildError('PRIVATE_KEY_LENGTH_INVALID');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const publicKeyJwk: JsonWebKey = this.validatePublicJwk(set.publicKeyJwk);
|
|
51
|
-
const publicKeyFingerprint: string = await this.getPublicKeyFingerprint(publicKeyJwk);
|
|
52
|
-
let privateKey: CryptoKey;
|
|
53
|
-
let publicKey: CryptoKey;
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
privateKey = await subtle.importKey(
|
|
57
|
-
'pkcs8',
|
|
58
|
-
privateKeyBytes,
|
|
59
|
-
{ name: 'ECDSA', namedCurve: 'P-256' },
|
|
60
|
-
false,
|
|
61
|
-
[ 'sign' ]
|
|
62
|
-
);
|
|
63
|
-
publicKey = await subtle.importKey(
|
|
64
|
-
'jwk',
|
|
65
|
-
publicKeyJwk,
|
|
66
|
-
{ name: 'ECDSA', namedCurve: 'P-256' },
|
|
67
|
-
false,
|
|
68
|
-
[ 'verify' ]
|
|
69
|
-
);
|
|
70
|
-
} catch {
|
|
71
|
-
throw this.buildError('KEY_IMPORT_FAILED');
|
|
72
|
-
} finally {
|
|
73
|
-
privateKeyBytes.fill(0);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
let signatureBytes: Uint8Array<ArrayBuffer>;
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
signatureBytes = new Uint8Array(await subtle.sign(
|
|
80
|
-
{ name: 'ECDSA', hash: 'SHA-256' },
|
|
81
|
-
privateKey,
|
|
82
|
-
subjectBytes
|
|
83
|
-
));
|
|
84
|
-
} catch {
|
|
85
|
-
throw this.buildError('SIGN_FAILED');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (signatureBytes.byteLength !== 64) {
|
|
89
|
-
throw this.buildError('SIGNATURE_ENCODING_INVALID');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const isPairValid: boolean = await subtle.verify(
|
|
93
|
-
{ name: 'ECDSA', hash: 'SHA-256' },
|
|
94
|
-
publicKey,
|
|
95
|
-
signatureBytes,
|
|
96
|
-
subjectBytes
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
if (!isPairValid) {
|
|
100
|
-
throw this.buildError('KEY_PAIR_MISMATCH');
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return Object.freeze({
|
|
104
|
-
contractVersion: 'dyfm-artifact-signature/1',
|
|
105
|
-
subjectChecksum: actualChecksum,
|
|
106
|
-
algorithm: 'ECDSA',
|
|
107
|
-
namedCurve: 'P-256',
|
|
108
|
-
hash: 'SHA-256',
|
|
109
|
-
encoding: 'ieee-p1363',
|
|
110
|
-
keyId: set.keyId,
|
|
111
|
-
publicKeyFingerprint: publicKeyFingerprint,
|
|
112
|
-
signedAt: set.signedAt,
|
|
113
|
-
signature: this.encodeBase64Url(signatureBytes),
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/** Verifies exact bytes and content-free evidence with an allowlisted public JWK. */
|
|
118
|
-
public async verify(
|
|
119
|
-
set: DyFM_ArtifactSignatureVerify_Settings_Interface
|
|
120
|
-
): Promise<DyFM_ArtifactSignatureVerification_Interface> {
|
|
121
|
-
const evidenceCode: string = this.getEvidenceValidationCode(set.evidence);
|
|
122
|
-
|
|
123
|
-
if (evidenceCode) {
|
|
124
|
-
return this.result(set.evidence, false, evidenceCode);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!(set.subjectBytes instanceof Uint8Array) || !set.subjectBytes.byteLength) {
|
|
128
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|SUBJECT_INVALID');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const subjectBytes: Uint8Array<ArrayBuffer> = new Uint8Array(set.subjectBytes);
|
|
132
|
-
const actualChecksum: string = await this.checksum(subjectBytes);
|
|
133
|
-
|
|
134
|
-
if (actualChecksum !== set.evidence.subjectChecksum) {
|
|
135
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|SUBJECT_CHECKSUM_MISMATCH');
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
let publicKeyJwk: JsonWebKey;
|
|
139
|
-
let signatureBytes: Uint8Array<ArrayBuffer>;
|
|
140
|
-
|
|
141
|
-
try {
|
|
142
|
-
publicKeyJwk = this.validatePublicJwk(set.publicKeyJwk);
|
|
143
|
-
signatureBytes = this.decodeBase64UrlStrict(set.evidence.signature);
|
|
144
|
-
} catch {
|
|
145
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|PUBLIC_INPUT_INVALID');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (signatureBytes.byteLength !== 64) {
|
|
149
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|SIGNATURE_ENCODING_INVALID');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const publicKeyFingerprint: string = await this.getPublicKeyFingerprint(publicKeyJwk);
|
|
153
|
-
|
|
154
|
-
if (publicKeyFingerprint !== set.evidence.publicKeyFingerprint) {
|
|
155
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|PUBLIC_KEY_FINGERPRINT_MISMATCH');
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
try {
|
|
159
|
-
const publicKey: CryptoKey = await this.getSubtleCrypto().importKey(
|
|
160
|
-
'jwk',
|
|
161
|
-
publicKeyJwk,
|
|
162
|
-
{ name: 'ECDSA', namedCurve: 'P-256' },
|
|
163
|
-
false,
|
|
164
|
-
[ 'verify' ]
|
|
165
|
-
);
|
|
166
|
-
const isVerified: boolean = await this.getSubtleCrypto().verify(
|
|
167
|
-
{ name: 'ECDSA', hash: 'SHA-256' },
|
|
168
|
-
publicKey,
|
|
169
|
-
signatureBytes,
|
|
170
|
-
subjectBytes
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
return this.result(
|
|
174
|
-
set.evidence,
|
|
175
|
-
isVerified,
|
|
176
|
-
isVerified ? 'DYFM|ARTIFACT_SIGNATURE|VERIFIED' : 'DYFM|ARTIFACT_SIGNATURE|SIGNATURE_MISMATCH'
|
|
177
|
-
);
|
|
178
|
-
} catch {
|
|
179
|
-
return this.result(set.evidence, false, 'DYFM|ARTIFACT_SIGNATURE|VERIFY_FAILED');
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/** Calculates the canonical SHA-256 fingerprint of a public P-256 JWK. */
|
|
184
|
-
public async getPublicKeyFingerprint(publicKeyJwkValue: JsonWebKey): Promise<string> {
|
|
185
|
-
const publicKeyJwk: JsonWebKey = this.validatePublicJwk(publicKeyJwkValue);
|
|
186
|
-
const canonicalJwk: string = JSON.stringify({
|
|
187
|
-
crv: publicKeyJwk.crv,
|
|
188
|
-
kty: publicKeyJwk.kty,
|
|
189
|
-
x: publicKeyJwk.x,
|
|
190
|
-
y: publicKeyJwk.y,
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
return this.checksum(new TextEncoder().encode(canonicalJwk));
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
private async checksum(bytes: Uint8Array<ArrayBuffer>): Promise<string> {
|
|
197
|
-
const digest: ArrayBuffer = await this.getSubtleCrypto().digest('SHA-256', bytes);
|
|
198
|
-
|
|
199
|
-
return [ ...new Uint8Array(digest) ]
|
|
200
|
-
.map((value: number): string => value.toString(16).padStart(2, '0'))
|
|
201
|
-
.join('');
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
private decodeBase64UrlStrict(value: string): Uint8Array<ArrayBuffer> {
|
|
205
|
-
if (!value || !/^[A-Za-z0-9_-]+$/u.test(value) || value.length % 4 === 1) {
|
|
206
|
-
throw this.buildError('BASE64URL_INVALID');
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const bytes: number[] = [];
|
|
210
|
-
|
|
211
|
-
for (let index: number = 0; index < value.length; index += 4) {
|
|
212
|
-
const first: number = dyfm_base64UrlAlphabet.indexOf(value[index]);
|
|
213
|
-
const second: number = dyfm_base64UrlAlphabet.indexOf(value[index + 1]);
|
|
214
|
-
const third: number = index + 2 < value.length
|
|
215
|
-
? dyfm_base64UrlAlphabet.indexOf(value[index + 2])
|
|
216
|
-
: 0;
|
|
217
|
-
const fourth: number = index + 3 < value.length
|
|
218
|
-
? dyfm_base64UrlAlphabet.indexOf(value[index + 3])
|
|
219
|
-
: 0;
|
|
220
|
-
const combined: number = (first << 18) | (second << 12) | (third << 6) | fourth;
|
|
221
|
-
|
|
222
|
-
bytes.push((combined >>> 16) & 255);
|
|
223
|
-
|
|
224
|
-
if (index + 2 < value.length) {
|
|
225
|
-
bytes.push((combined >>> 8) & 255);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
if (index + 3 < value.length) {
|
|
229
|
-
bytes.push(combined & 255);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const decoded: Uint8Array<ArrayBuffer> = new Uint8Array(bytes);
|
|
234
|
-
|
|
235
|
-
if (this.encodeBase64Url(decoded) !== value) {
|
|
236
|
-
throw this.buildError('BASE64URL_NON_CANONICAL');
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return decoded;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
private encodeBase64Url(bytes: Uint8Array): string {
|
|
243
|
-
let encoded: string = '';
|
|
244
|
-
|
|
245
|
-
for (let index: number = 0; index < bytes.length; index += 3) {
|
|
246
|
-
const remaining: number = bytes.length - index;
|
|
247
|
-
const combined: number = (bytes[index] << 16)
|
|
248
|
-
| ((remaining > 1 ? bytes[index + 1] : 0) << 8)
|
|
249
|
-
| (remaining > 2 ? bytes[index + 2] : 0);
|
|
250
|
-
|
|
251
|
-
encoded += dyfm_base64UrlAlphabet[(combined >>> 18) & 63];
|
|
252
|
-
encoded += dyfm_base64UrlAlphabet[(combined >>> 12) & 63];
|
|
253
|
-
|
|
254
|
-
if (remaining > 1) {
|
|
255
|
-
encoded += dyfm_base64UrlAlphabet[(combined >>> 6) & 63];
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (remaining > 2) {
|
|
259
|
-
encoded += dyfm_base64UrlAlphabet[combined & 63];
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
return encoded;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
private getEvidenceValidationCode(evidence: DyFM_ArtifactSignature_Evidence_Interface): string {
|
|
267
|
-
if (!evidence || typeof evidence !== 'object') {
|
|
268
|
-
return 'DYFM|ARTIFACT_SIGNATURE|EVIDENCE_INVALID';
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
const keys: string[] = Object.keys(evidence).sort();
|
|
272
|
-
|
|
273
|
-
if (JSON.stringify(keys) !== JSON.stringify(dyfm_signatureEvidenceKeys)) {
|
|
274
|
-
return 'DYFM|ARTIFACT_SIGNATURE|EVIDENCE_SHAPE_INVALID';
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
if (
|
|
278
|
-
evidence.contractVersion !== 'dyfm-artifact-signature/1'
|
|
279
|
-
|| evidence.algorithm !== 'ECDSA'
|
|
280
|
-
|| evidence.namedCurve !== 'P-256'
|
|
281
|
-
|| evidence.hash !== 'SHA-256'
|
|
282
|
-
|| evidence.encoding !== 'ieee-p1363'
|
|
283
|
-
) {
|
|
284
|
-
return 'DYFM|ARTIFACT_SIGNATURE|EVIDENCE_CONTRACT_INVALID';
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
if (!dyfm_checksumPattern.test(evidence.subjectChecksum)) {
|
|
288
|
-
return 'DYFM|ARTIFACT_SIGNATURE|SUBJECT_CHECKSUM_INVALID';
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (!dyfm_checksumPattern.test(evidence.publicKeyFingerprint)) {
|
|
292
|
-
return 'DYFM|ARTIFACT_SIGNATURE|PUBLIC_KEY_FINGERPRINT_INVALID';
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
if (!dyfm_keyIdPattern.test(evidence.keyId)) {
|
|
296
|
-
return 'DYFM|ARTIFACT_SIGNATURE|KEY_ID_INVALID';
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
if (!this.isCanonicalTimestamp(evidence.signedAt)) {
|
|
300
|
-
return 'DYFM|ARTIFACT_SIGNATURE|SIGNED_AT_INVALID';
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
if (!/^[A-Za-z0-9_-]{86}$/u.test(evidence.signature)) {
|
|
304
|
-
return 'DYFM|ARTIFACT_SIGNATURE|SIGNATURE_ENCODING_INVALID';
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
return '';
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
private getSubtleCrypto(): SubtleCrypto {
|
|
311
|
-
if (!globalThis.crypto?.subtle) {
|
|
312
|
-
throw this.buildError('WEB_CRYPTO_UNAVAILABLE');
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
return globalThis.crypto.subtle;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
private isCanonicalTimestamp(value: string): boolean {
|
|
319
|
-
const timestamp: number = Date.parse(value);
|
|
320
|
-
|
|
321
|
-
return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
private result(
|
|
325
|
-
evidence: DyFM_ArtifactSignature_Evidence_Interface,
|
|
326
|
-
isVerified: boolean,
|
|
327
|
-
code: string
|
|
328
|
-
): DyFM_ArtifactSignatureVerification_Interface {
|
|
329
|
-
return Object.freeze({
|
|
330
|
-
contractVersion: 'dyfm-artifact-signature-verification/1',
|
|
331
|
-
isVerified: isVerified,
|
|
332
|
-
code: code,
|
|
333
|
-
subjectChecksum: typeof evidence?.subjectChecksum === 'string' ? evidence.subjectChecksum : '',
|
|
334
|
-
keyId: typeof evidence?.keyId === 'string' ? evidence.keyId : '',
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
private validateChecksum(value: string, code: string): void {
|
|
339
|
-
if (!dyfm_checksumPattern.test(value)) {
|
|
340
|
-
throw this.buildError(code);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
private validateKeyId(value: string): void {
|
|
345
|
-
if (!dyfm_keyIdPattern.test(value)) {
|
|
346
|
-
throw this.buildError('KEY_ID_INVALID');
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
private validatePublicJwk(value: JsonWebKey): JsonWebKey {
|
|
351
|
-
if (
|
|
352
|
-
!value
|
|
353
|
-
|| typeof value !== 'object'
|
|
354
|
-
|| value.kty !== 'EC'
|
|
355
|
-
|| value.crv !== 'P-256'
|
|
356
|
-
|| typeof value.x !== 'string'
|
|
357
|
-
|| typeof value.y !== 'string'
|
|
358
|
-
|| Object.prototype.hasOwnProperty.call(value, 'd')
|
|
359
|
-
) {
|
|
360
|
-
throw this.buildError('PUBLIC_KEY_INVALID');
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
const xBytes: Uint8Array<ArrayBuffer> = this.decodeBase64UrlStrict(value.x);
|
|
364
|
-
const yBytes: Uint8Array<ArrayBuffer> = this.decodeBase64UrlStrict(value.y);
|
|
365
|
-
|
|
366
|
-
if (xBytes.byteLength !== 32 || yBytes.byteLength !== 32) {
|
|
367
|
-
throw this.buildError('PUBLIC_KEY_COORDINATE_INVALID');
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
return Object.freeze({
|
|
371
|
-
kty: 'EC',
|
|
372
|
-
crv: 'P-256',
|
|
373
|
-
x: value.x,
|
|
374
|
-
y: value.y,
|
|
375
|
-
ext: true,
|
|
376
|
-
key_ops: [ 'verify' ],
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
private validateSubject(value: Uint8Array): void {
|
|
381
|
-
if (!(value instanceof Uint8Array) || !value.byteLength) {
|
|
382
|
-
throw this.buildError('SUBJECT_INVALID');
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
private validateTimestamp(value: string): void {
|
|
387
|
-
if (!this.isCanonicalTimestamp(value)) {
|
|
388
|
-
throw this.buildError('SIGNED_AT_INVALID');
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
private buildError(code: string): TypeError {
|
|
393
|
-
return new TypeError(`DYFM|ARTIFACT_SIGNATURE|${code}`);
|
|
394
|
-
}
|
|
395
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* try {
|
|
5
|
-
//require.resolve('crypto-js');
|
|
6
|
-
import('crypto-js');
|
|
7
|
-
} catch {
|
|
8
|
-
console.log(
|
|
9
|
-
'❌ crypto-js package not found, please install it with: pnpm add crypto-js'
|
|
10
|
-
);
|
|
11
|
-
} */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export * from './_collections/crypto.util';
|
|
15
|
-
export * from './_models/artifact-signature.interface';
|
|
16
|
-
export * from './_services/artifact-signature.control-service';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DyFM_Route_Settings } from '../../../_models/interfaces/route-settings.interface';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Routes available in the Custom Data module.
|
|
6
|
-
*/
|
|
7
|
-
export enum DyFM_CustomRoute {
|
|
8
|
-
getCustomData = 'getCustomData',
|
|
9
|
-
modifyCustomData = 'modifyCustomData',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Default settings for the Custom Data module.
|
|
14
|
-
*/
|
|
15
|
-
export const DyFM_customDataModule_settings: DyFM_Route_Settings<DyFM_CustomRoute> = {
|
|
16
|
-
mainRoute: '/custom',
|
|
17
|
-
endPoints: {
|
|
18
|
-
[DyFM_CustomRoute.getCustomData]: '/get/:customId',
|
|
19
|
-
[DyFM_CustomRoute.modifyCustomData]: '/post',
|
|
20
|
-
},
|
|
21
|
-
};
|