@parmana/shared 0.0.0-stage → 2.0.0
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 +202 -0
- package/NOTICE +8 -0
- package/README.md +16 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/config/ApiKeyEntry.d.ts +97 -0
- package/dist/config/ApiKeyEntry.d.ts.map +1 -0
- package/dist/config/ApiKeyEntry.js +2 -0
- package/dist/config/ApiKeyEntry.js.map +1 -0
- package/dist/config/Config.d.ts +227 -0
- package/dist/config/Config.d.ts.map +1 -0
- package/dist/config/Config.js +172 -0
- package/dist/config/Config.js.map +1 -0
- package/dist/config/ConfigLoader.d.ts +5 -0
- package/dist/config/ConfigLoader.d.ts.map +1 -0
- package/dist/config/ConfigLoader.js +8 -0
- package/dist/config/ConfigLoader.js.map +1 -0
- package/dist/config/ConfigUtils.d.ts +6 -0
- package/dist/config/ConfigUtils.d.ts.map +1 -0
- package/dist/config/ConfigUtils.js +8 -0
- package/dist/config/ConfigUtils.js.map +1 -0
- package/dist/config/ConfigValidation.d.ts +30 -0
- package/dist/config/ConfigValidation.d.ts.map +1 -0
- package/dist/config/ConfigValidation.js +191 -0
- package/dist/config/ConfigValidation.js.map +1 -0
- package/dist/config/CryptoAlgorithms.d.ts +38 -0
- package/dist/config/CryptoAlgorithms.d.ts.map +1 -0
- package/dist/config/CryptoAlgorithms.js +38 -0
- package/dist/config/CryptoAlgorithms.js.map +1 -0
- package/dist/config/Doctor.d.ts +46 -0
- package/dist/config/Doctor.d.ts.map +1 -0
- package/dist/config/Doctor.js +781 -0
- package/dist/config/Doctor.js.map +1 -0
- package/dist/config/KeyProviders.d.ts +9 -0
- package/dist/config/KeyProviders.d.ts.map +1 -0
- package/dist/config/KeyProviders.js +8 -0
- package/dist/config/KeyProviders.js.map +1 -0
- package/dist/config/SecretsProviders.d.ts +6 -0
- package/dist/config/SecretsProviders.d.ts.map +1 -0
- package/dist/config/SecretsProviders.js +5 -0
- package/dist/config/SecretsProviders.js.map +1 -0
- package/dist/config/StorageProviders.d.ts +18 -0
- package/dist/config/StorageProviders.d.ts.map +1 -0
- package/dist/config/StorageProviders.js +20 -0
- package/dist/config/StorageProviders.js.map +1 -0
- package/dist/config/TrustProfiles.d.ts +5 -0
- package/dist/config/TrustProfiles.d.ts.map +1 -0
- package/dist/config/TrustProfiles.js +4 -0
- package/dist/config/TrustProfiles.js.map +1 -0
- package/dist/config/index.d.ts +12 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +12 -0
- package/dist/config/index.js.map +1 -0
- package/dist/domain/approval-artifact.d.ts +136 -0
- package/dist/domain/approval-artifact.d.ts.map +1 -0
- package/dist/domain/approval-artifact.js +2 -0
- package/dist/domain/approval-artifact.js.map +1 -0
- package/dist/domain/approval-issuer.d.ts +52 -0
- package/dist/domain/approval-issuer.d.ts.map +1 -0
- package/dist/domain/approval-issuer.js +2 -0
- package/dist/domain/approval-issuer.js.map +1 -0
- package/dist/domain/authority-grant.d.ts +54 -0
- package/dist/domain/authority-grant.d.ts.map +1 -0
- package/dist/domain/authority-grant.js +2 -0
- package/dist/domain/authority-grant.js.map +1 -0
- package/dist/domain/authority.d.ts +42 -0
- package/dist/domain/authority.d.ts.map +1 -0
- package/dist/domain/authority.js +11 -0
- package/dist/domain/authority.js.map +1 -0
- package/dist/domain/authorization.d.ts +54 -0
- package/dist/domain/authorization.d.ts.map +1 -0
- package/dist/domain/authorization.js +2 -0
- package/dist/domain/authorization.js.map +1 -0
- package/dist/domain/business-signal-source.d.ts +52 -0
- package/dist/domain/business-signal-source.d.ts.map +1 -0
- package/dist/domain/business-signal-source.js +2 -0
- package/dist/domain/business-signal-source.js.map +1 -0
- package/dist/domain/business-transaction.d.ts +99 -0
- package/dist/domain/business-transaction.d.ts.map +1 -0
- package/dist/domain/business-transaction.js +16 -0
- package/dist/domain/business-transaction.js.map +1 -0
- package/dist/domain/business-validation.d.ts +177 -0
- package/dist/domain/business-validation.d.ts.map +1 -0
- package/dist/domain/business-validation.js +60 -0
- package/dist/domain/business-validation.js.map +1 -0
- package/dist/domain/challenge-record.d.ts +181 -0
- package/dist/domain/challenge-record.d.ts.map +1 -0
- package/dist/domain/challenge-record.js +2 -0
- package/dist/domain/challenge-record.js.map +1 -0
- package/dist/domain/decision.d.ts +97 -0
- package/dist/domain/decision.d.ts.map +1 -0
- package/dist/domain/decision.js +9 -0
- package/dist/domain/decision.js.map +1 -0
- package/dist/domain/evidence-anchor.d.ts +54 -0
- package/dist/domain/evidence-anchor.d.ts.map +1 -0
- package/dist/domain/evidence-anchor.js +2 -0
- package/dist/domain/evidence-anchor.js.map +1 -0
- package/dist/domain/executable-content.d.ts +45 -0
- package/dist/domain/executable-content.d.ts.map +1 -0
- package/dist/domain/executable-content.js +39 -0
- package/dist/domain/executable-content.js.map +1 -0
- package/dist/domain/execution-audit-event.d.ts +65 -0
- package/dist/domain/execution-audit-event.d.ts.map +1 -0
- package/dist/domain/execution-audit-event.js +2 -0
- package/dist/domain/execution-audit-event.js.map +1 -0
- package/dist/domain/execution-authorization.d.ts +224 -0
- package/dist/domain/execution-authorization.d.ts.map +1 -0
- package/dist/domain/execution-authorization.js +2 -0
- package/dist/domain/execution-authorization.js.map +1 -0
- package/dist/domain/execution-evidence.d.ts +38 -0
- package/dist/domain/execution-evidence.d.ts.map +1 -0
- package/dist/domain/execution-evidence.js +2 -0
- package/dist/domain/execution-evidence.js.map +1 -0
- package/dist/domain/execution-intent.d.ts +92 -0
- package/dist/domain/execution-intent.d.ts.map +1 -0
- package/dist/domain/execution-intent.js +2 -0
- package/dist/domain/execution-intent.js.map +1 -0
- package/dist/domain/execution-metadata.d.ts +8 -0
- package/dist/domain/execution-metadata.d.ts.map +1 -0
- package/dist/domain/execution-metadata.js +2 -0
- package/dist/domain/execution-metadata.js.map +1 -0
- package/dist/domain/execution-outcome-store.d.ts +49 -0
- package/dist/domain/execution-outcome-store.d.ts.map +1 -0
- package/dist/domain/execution-outcome-store.js +10 -0
- package/dist/domain/execution-outcome-store.js.map +1 -0
- package/dist/domain/execution-result.d.ts +49 -0
- package/dist/domain/execution-result.d.ts.map +1 -0
- package/dist/domain/execution-result.js +2 -0
- package/dist/domain/execution-result.js.map +1 -0
- package/dist/domain/execution-trust-record.d.ts +142 -0
- package/dist/domain/execution-trust-record.d.ts.map +1 -0
- package/dist/domain/execution-trust-record.js +2 -0
- package/dist/domain/execution-trust-record.js.map +1 -0
- package/dist/domain/execution.d.ts +108 -0
- package/dist/domain/execution.d.ts.map +1 -0
- package/dist/domain/execution.js +18 -0
- package/dist/domain/execution.js.map +1 -0
- package/dist/domain/external-connector.d.ts +68 -0
- package/dist/domain/external-connector.d.ts.map +1 -0
- package/dist/domain/external-connector.js +2 -0
- package/dist/domain/external-connector.js.map +1 -0
- package/dist/domain/index.d.ts +37 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +37 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/intent.d.ts +66 -0
- package/dist/domain/intent.d.ts.map +1 -0
- package/dist/domain/intent.js +2 -0
- package/dist/domain/intent.js.map +1 -0
- package/dist/domain/metadata.d.ts +53 -0
- package/dist/domain/metadata.d.ts.map +1 -0
- package/dist/domain/metadata.js +11 -0
- package/dist/domain/metadata.js.map +1 -0
- package/dist/domain/override.d.ts +39 -0
- package/dist/domain/override.d.ts.map +1 -0
- package/dist/domain/override.js +2 -0
- package/dist/domain/override.js.map +1 -0
- package/dist/domain/pending-policy-change.d.ts +109 -0
- package/dist/domain/pending-policy-change.d.ts.map +1 -0
- package/dist/domain/pending-policy-change.js +12 -0
- package/dist/domain/pending-policy-change.js.map +1 -0
- package/dist/domain/policy-change-approval-record.d.ts +81 -0
- package/dist/domain/policy-change-approval-record.d.ts.map +1 -0
- package/dist/domain/policy-change-approval-record.js +2 -0
- package/dist/domain/policy-change-approval-record.js.map +1 -0
- package/dist/domain/policy-change-step-up-authorization.d.ts +97 -0
- package/dist/domain/policy-change-step-up-authorization.d.ts.map +1 -0
- package/dist/domain/policy-change-step-up-authorization.js +2 -0
- package/dist/domain/policy-change-step-up-authorization.js.map +1 -0
- package/dist/domain/policy-reference.d.ts +58 -0
- package/dist/domain/policy-reference.d.ts.map +1 -0
- package/dist/domain/policy-reference.js +2 -0
- package/dist/domain/policy-reference.js.map +1 -0
- package/dist/domain/receipt.d.ts +72 -0
- package/dist/domain/receipt.d.ts.map +1 -0
- package/dist/domain/receipt.js +2 -0
- package/dist/domain/receipt.js.map +1 -0
- package/dist/domain/refusal-record.d.ts +110 -0
- package/dist/domain/refusal-record.d.ts.map +1 -0
- package/dist/domain/refusal-record.js +2 -0
- package/dist/domain/refusal-record.js.map +1 -0
- package/dist/domain/release-approval.d.ts +14 -0
- package/dist/domain/release-approval.d.ts.map +1 -0
- package/dist/domain/release-approval.js +2 -0
- package/dist/domain/release-approval.js.map +1 -0
- package/dist/domain/signals.d.ts +10 -0
- package/dist/domain/signals.d.ts.map +1 -0
- package/dist/domain/signals.js +2 -0
- package/dist/domain/signals.js.map +1 -0
- package/dist/domain/signature-entry.d.ts +23 -0
- package/dist/domain/signature-entry.d.ts.map +1 -0
- package/dist/domain/signature-entry.js +2 -0
- package/dist/domain/signature-entry.js.map +1 -0
- package/dist/domain/signature.d.ts +26 -0
- package/dist/domain/signature.d.ts.map +1 -0
- package/dist/domain/signature.js +2 -0
- package/dist/domain/signature.js.map +1 -0
- package/dist/domain/unsigned-execution-trust-record.d.ts +7 -0
- package/dist/domain/unsigned-execution-trust-record.d.ts.map +1 -0
- package/dist/domain/unsigned-execution-trust-record.js +2 -0
- package/dist/domain/unsigned-execution-trust-record.js.map +1 -0
- package/dist/domain/verification.d.ts +48 -0
- package/dist/domain/verification.d.ts.map +1 -0
- package/dist/domain/verification.js +9 -0
- package/dist/domain/verification.js.map +1 -0
- package/dist/errors/approval-issuer-change-not-found-error.d.ts +9 -0
- package/dist/errors/approval-issuer-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/approval-issuer-change-not-found-error.js +11 -0
- package/dist/errors/approval-issuer-change-not-found-error.js.map +1 -0
- package/dist/errors/authority-grant-change-not-found-error.d.ts +9 -0
- package/dist/errors/authority-grant-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/authority-grant-change-not-found-error.js +11 -0
- package/dist/errors/authority-grant-change-not-found-error.js.map +1 -0
- package/dist/errors/authority-required-error.d.ts +5 -0
- package/dist/errors/authority-required-error.d.ts.map +1 -0
- package/dist/errors/authority-required-error.js +7 -0
- package/dist/errors/authority-required-error.js.map +1 -0
- package/dist/errors/authorization-no-longer-valid-error.d.ts +19 -0
- package/dist/errors/authorization-no-longer-valid-error.d.ts.map +1 -0
- package/dist/errors/authorization-no-longer-valid-error.js +23 -0
- package/dist/errors/authorization-no-longer-valid-error.js.map +1 -0
- package/dist/errors/authorization-required-error.d.ts +5 -0
- package/dist/errors/authorization-required-error.d.ts.map +1 -0
- package/dist/errors/authorization-required-error.js +7 -0
- package/dist/errors/authorization-required-error.js.map +1 -0
- package/dist/errors/business-signal-source-change-not-found-error.d.ts +9 -0
- package/dist/errors/business-signal-source-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/business-signal-source-change-not-found-error.js +11 -0
- package/dist/errors/business-signal-source-change-not-found-error.js.map +1 -0
- package/dist/errors/business-transaction-not-found-error.d.ts +5 -0
- package/dist/errors/business-transaction-not-found-error.d.ts.map +1 -0
- package/dist/errors/business-transaction-not-found-error.js +7 -0
- package/dist/errors/business-transaction-not-found-error.js.map +1 -0
- package/dist/errors/challenge-record-not-found-error.d.ts +9 -0
- package/dist/errors/challenge-record-not-found-error.d.ts.map +1 -0
- package/dist/errors/challenge-record-not-found-error.js +11 -0
- package/dist/errors/challenge-record-not-found-error.js.map +1 -0
- package/dist/errors/conflict-error.d.ts +5 -0
- package/dist/errors/conflict-error.d.ts.map +1 -0
- package/dist/errors/conflict-error.js +7 -0
- package/dist/errors/conflict-error.js.map +1 -0
- package/dist/errors/connector-not-registered-error.d.ts +21 -0
- package/dist/errors/connector-not-registered-error.d.ts.map +1 -0
- package/dist/errors/connector-not-registered-error.js +24 -0
- package/dist/errors/connector-not-registered-error.js.map +1 -0
- package/dist/errors/decision-not-approved-error.d.ts +5 -0
- package/dist/errors/decision-not-approved-error.d.ts.map +1 -0
- package/dist/errors/decision-not-approved-error.js +7 -0
- package/dist/errors/decision-not-approved-error.js.map +1 -0
- package/dist/errors/duplicate-business-transaction-error.d.ts +26 -0
- package/dist/errors/duplicate-business-transaction-error.d.ts.map +1 -0
- package/dist/errors/duplicate-business-transaction-error.js +28 -0
- package/dist/errors/duplicate-business-transaction-error.js.map +1 -0
- package/dist/errors/external-connector-change-not-found-error.d.ts +9 -0
- package/dist/errors/external-connector-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/external-connector-change-not-found-error.js +11 -0
- package/dist/errors/external-connector-change-not-found-error.js.map +1 -0
- package/dist/errors/forbidden-error.d.ts +5 -0
- package/dist/errors/forbidden-error.d.ts.map +1 -0
- package/dist/errors/forbidden-error.js +7 -0
- package/dist/errors/forbidden-error.js.map +1 -0
- package/dist/errors/index.d.ts +30 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +30 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/intent-required-error.d.ts +5 -0
- package/dist/errors/intent-required-error.d.ts.map +1 -0
- package/dist/errors/intent-required-error.js +7 -0
- package/dist/errors/intent-required-error.js.map +1 -0
- package/dist/errors/non-human-caller-denied-error.d.ts +10 -0
- package/dist/errors/non-human-caller-denied-error.d.ts.map +1 -0
- package/dist/errors/non-human-caller-denied-error.js +12 -0
- package/dist/errors/non-human-caller-denied-error.js.map +1 -0
- package/dist/errors/nonce-already-consumed-error.d.ts +26 -0
- package/dist/errors/nonce-already-consumed-error.d.ts.map +1 -0
- package/dist/errors/nonce-already-consumed-error.js +29 -0
- package/dist/errors/nonce-already-consumed-error.js.map +1 -0
- package/dist/errors/outcome-unknown-error.d.ts +15 -0
- package/dist/errors/outcome-unknown-error.d.ts.map +1 -0
- package/dist/errors/outcome-unknown-error.js +19 -0
- package/dist/errors/outcome-unknown-error.js.map +1 -0
- package/dist/errors/override-not-allowed-error.d.ts +5 -0
- package/dist/errors/override-not-allowed-error.d.ts.map +1 -0
- package/dist/errors/override-not-allowed-error.js +7 -0
- package/dist/errors/override-not-allowed-error.js.map +1 -0
- package/dist/errors/parmana-error.d.ts +15 -0
- package/dist/errors/parmana-error.d.ts.map +1 -0
- package/dist/errors/parmana-error.js +21 -0
- package/dist/errors/parmana-error.js.map +1 -0
- package/dist/errors/pending-policy-change-not-found-error.d.ts +9 -0
- package/dist/errors/pending-policy-change-not-found-error.d.ts.map +1 -0
- package/dist/errors/pending-policy-change-not-found-error.js +11 -0
- package/dist/errors/pending-policy-change-not-found-error.js.map +1 -0
- package/dist/errors/policy-not-found-error.d.ts +5 -0
- package/dist/errors/policy-not-found-error.d.ts.map +1 -0
- package/dist/errors/policy-not-found-error.js +7 -0
- package/dist/errors/policy-not-found-error.js.map +1 -0
- package/dist/errors/receipt-generation-error.d.ts +5 -0
- package/dist/errors/receipt-generation-error.d.ts.map +1 -0
- package/dist/errors/receipt-generation-error.js +7 -0
- package/dist/errors/receipt-generation-error.js.map +1 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts +12 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.d.ts.map +1 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.js +15 -0
- package/dist/errors/same-actor-cannot-approve-own-change-error.js.map +1 -0
- package/dist/errors/step-up-authorization-invalid-error.d.ts +25 -0
- package/dist/errors/step-up-authorization-invalid-error.d.ts.map +1 -0
- package/dist/errors/step-up-authorization-invalid-error.js +28 -0
- package/dist/errors/step-up-authorization-invalid-error.js.map +1 -0
- package/dist/errors/trust-chain-validation-error.d.ts +5 -0
- package/dist/errors/trust-chain-validation-error.d.ts.map +1 -0
- package/dist/errors/trust-chain-validation-error.js +7 -0
- package/dist/errors/trust-chain-validation-error.js.map +1 -0
- package/dist/errors/unauthorized-error.d.ts +5 -0
- package/dist/errors/unauthorized-error.d.ts.map +1 -0
- package/dist/errors/unauthorized-error.js +7 -0
- package/dist/errors/unauthorized-error.js.map +1 -0
- package/dist/errors/validation-error.d.ts +5 -0
- package/dist/errors/validation-error.d.ts.map +1 -0
- package/dist/errors/validation-error.js +7 -0
- package/dist/errors/validation-error.js.map +1 -0
- package/dist/errors/verification-failed-error.d.ts +5 -0
- package/dist/errors/verification-failed-error.d.ts.map +1 -0
- package/dist/errors/verification-failed-error.js +7 -0
- package/dist/errors/verification-failed-error.js.map +1 -0
- package/dist/gateway/GatewayAuthentication.d.ts +8 -0
- package/dist/gateway/GatewayAuthentication.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthentication.js +2 -0
- package/dist/gateway/GatewayAuthentication.js.map +1 -0
- package/dist/gateway/GatewayAuthenticationClaims.d.ts +10 -0
- package/dist/gateway/GatewayAuthenticationClaims.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthenticationClaims.js +2 -0
- package/dist/gateway/GatewayAuthenticationClaims.js.map +1 -0
- package/dist/gateway/GatewayAuthenticationPayload.d.ts +15 -0
- package/dist/gateway/GatewayAuthenticationPayload.d.ts.map +1 -0
- package/dist/gateway/GatewayAuthenticationPayload.js +2 -0
- package/dist/gateway/GatewayAuthenticationPayload.js.map +1 -0
- package/dist/gateway/SignedGatewayAuthentication.d.ts +9 -0
- package/dist/gateway/SignedGatewayAuthentication.d.ts.map +1 -0
- package/dist/gateway/SignedGatewayAuthentication.js +2 -0
- package/dist/gateway/SignedGatewayAuthentication.js.map +1 -0
- package/dist/gateway/index.d.ts +4 -0
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +4 -0
- package/dist/gateway/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/Logger.d.ts +65 -0
- package/dist/logging/Logger.d.ts.map +1 -0
- package/dist/logging/Logger.js +97 -0
- package/dist/logging/Logger.js.map +1 -0
- package/dist/network/externalEndpointAddress.d.ts +48 -0
- package/dist/network/externalEndpointAddress.d.ts.map +1 -0
- package/dist/network/externalEndpointAddress.js +147 -0
- package/dist/network/externalEndpointAddress.js.map +1 -0
- package/dist/repositories/approval-issuer-repository.d.ts +31 -0
- package/dist/repositories/approval-issuer-repository.d.ts.map +1 -0
- package/dist/repositories/approval-issuer-repository.js +2 -0
- package/dist/repositories/approval-issuer-repository.js.map +1 -0
- package/dist/repositories/authority-grant-repository.d.ts +22 -0
- package/dist/repositories/authority-grant-repository.d.ts.map +1 -0
- package/dist/repositories/authority-grant-repository.js +2 -0
- package/dist/repositories/authority-grant-repository.js.map +1 -0
- package/dist/repositories/business-signal-source-repository.d.ts +17 -0
- package/dist/repositories/business-signal-source-repository.d.ts.map +1 -0
- package/dist/repositories/business-signal-source-repository.js +2 -0
- package/dist/repositories/business-signal-source-repository.js.map +1 -0
- package/dist/repositories/business-transaction-repository.d.ts +34 -0
- package/dist/repositories/business-transaction-repository.d.ts.map +1 -0
- package/dist/repositories/business-transaction-repository.js +2 -0
- package/dist/repositories/business-transaction-repository.js.map +1 -0
- package/dist/repositories/caller-key-revocation-repository.d.ts +26 -0
- package/dist/repositories/caller-key-revocation-repository.d.ts.map +1 -0
- package/dist/repositories/caller-key-revocation-repository.js +2 -0
- package/dist/repositories/caller-key-revocation-repository.js.map +1 -0
- package/dist/repositories/challenge-record-repository.d.ts +67 -0
- package/dist/repositories/challenge-record-repository.d.ts.map +1 -0
- package/dist/repositories/challenge-record-repository.js +76 -0
- package/dist/repositories/challenge-record-repository.js.map +1 -0
- package/dist/repositories/execution-intent-repository.d.ts +38 -0
- package/dist/repositories/execution-intent-repository.d.ts.map +1 -0
- package/dist/repositories/execution-intent-repository.js +2 -0
- package/dist/repositories/execution-intent-repository.js.map +1 -0
- package/dist/repositories/execution-trust-record-repository.d.ts +62 -0
- package/dist/repositories/execution-trust-record-repository.d.ts.map +1 -0
- package/dist/repositories/execution-trust-record-repository.js +2 -0
- package/dist/repositories/execution-trust-record-repository.js.map +1 -0
- package/dist/repositories/external-connector-repository.d.ts +37 -0
- package/dist/repositories/external-connector-repository.d.ts.map +1 -0
- package/dist/repositories/external-connector-repository.js +2 -0
- package/dist/repositories/external-connector-repository.js.map +1 -0
- package/dist/repositories/handbook-download-lead-repository.d.ts +18 -0
- package/dist/repositories/handbook-download-lead-repository.d.ts.map +1 -0
- package/dist/repositories/handbook-download-lead-repository.js +2 -0
- package/dist/repositories/handbook-download-lead-repository.js.map +1 -0
- package/dist/repositories/inbound-decision-repository.d.ts +72 -0
- package/dist/repositories/inbound-decision-repository.d.ts.map +1 -0
- package/dist/repositories/inbound-decision-repository.js +10 -0
- package/dist/repositories/inbound-decision-repository.js.map +1 -0
- package/dist/repositories/inbound-outcome-repository.d.ts +23 -0
- package/dist/repositories/inbound-outcome-repository.d.ts.map +1 -0
- package/dist/repositories/inbound-outcome-repository.js +2 -0
- package/dist/repositories/inbound-outcome-repository.js.map +1 -0
- package/dist/repositories/index.d.ts +17 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +17 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/pending-policy-change-repository.d.ts +72 -0
- package/dist/repositories/pending-policy-change-repository.d.ts.map +1 -0
- package/dist/repositories/pending-policy-change-repository.js +46 -0
- package/dist/repositories/pending-policy-change-repository.js.map +1 -0
- package/dist/repositories/policy-change-approval-record-repository.d.ts +39 -0
- package/dist/repositories/policy-change-approval-record-repository.d.ts.map +1 -0
- package/dist/repositories/policy-change-approval-record-repository.js +2 -0
- package/dist/repositories/policy-change-approval-record-repository.js.map +1 -0
- package/dist/repositories/policy-repository.d.ts +15 -0
- package/dist/repositories/policy-repository.d.ts.map +1 -0
- package/dist/repositories/policy-repository.js +2 -0
- package/dist/repositories/policy-repository.js.map +1 -0
- package/dist/repositories/refusal-record-repository.d.ts +13 -0
- package/dist/repositories/refusal-record-repository.d.ts.map +1 -0
- package/dist/repositories/refusal-record-repository.js +2 -0
- package/dist/repositories/refusal-record-repository.js.map +1 -0
- package/dist/types/Json.d.ts +7 -0
- package/dist/types/Json.d.ts.map +1 -0
- package/dist/types/Json.js +2 -0
- package/dist/types/Json.js.map +1 -0
- package/dist/utils/normalize-policy.d.ts +16 -0
- package/dist/utils/normalize-policy.d.ts.map +1 -0
- package/dist/utils/normalize-policy.js +10 -0
- package/dist/utils/normalize-policy.js.map +1 -0
- package/package.json +39 -4
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { CryptoModes, HashAlgorithms, SignatureAlgorithms, } from "./CryptoAlgorithms.js";
|
|
2
|
+
import { StorageProviders } from "./StorageProviders.js";
|
|
3
|
+
import { KeyProviders } from "./KeyProviders.js";
|
|
4
|
+
import { SecretsProviders } from "./SecretsProviders.js";
|
|
5
|
+
import { TrustProfiles } from "./TrustProfiles.js";
|
|
6
|
+
import { createPublicKey } from "node:crypto";
|
|
7
|
+
import { AuthorityType } from "../domain/authority.js";
|
|
8
|
+
function parse(value, values, name, defaultValue) {
|
|
9
|
+
const resolved = value ?? defaultValue;
|
|
10
|
+
if (Object.values(values).includes(resolved)) {
|
|
11
|
+
return resolved;
|
|
12
|
+
}
|
|
13
|
+
throw new Error(`Invalid ${name}: ${resolved}`);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A value can be a documented name that no runtime implements yet. Refuse it
|
|
17
|
+
* at startup, naming what works, rather than accepting it and failing later
|
|
18
|
+
* or quietly using a different provider (#222). Called after parse(), so the
|
|
19
|
+
* value is already a known name and is safe to echo.
|
|
20
|
+
*/
|
|
21
|
+
function requireImplemented(name, value, implemented) {
|
|
22
|
+
if (implemented.includes(value)) {
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
throw new Error(`${name}=${value} is not implemented in this build. Use one of: ${implemented.join(", ")}.`);
|
|
26
|
+
}
|
|
27
|
+
const IMPLEMENTED_CRYPTO_MODES = [CryptoModes.SINGLE, CryptoModes.HYBRID];
|
|
28
|
+
const IMPLEMENTED_HASH_ALGORITHMS = [HashAlgorithms.SHA256];
|
|
29
|
+
const IMPLEMENTED_SIGNATURE_ALGORITHMS = [
|
|
30
|
+
SignatureAlgorithms.ED25519,
|
|
31
|
+
SignatureAlgorithms.DILITHIUM3,
|
|
32
|
+
];
|
|
33
|
+
const IMPLEMENTED_KEY_PROVIDERS = [KeyProviders.LOCAL, KeyProviders.AWS_KMS];
|
|
34
|
+
export const parseStorageProvider = (value) => {
|
|
35
|
+
if (process.env.DATABASE_PROVIDER !== undefined) {
|
|
36
|
+
throw new Error("DATABASE_PROVIDER is no longer read; set PARMANA_STORAGE instead.");
|
|
37
|
+
}
|
|
38
|
+
return parse(value, StorageProviders, "PARMANA_STORAGE", StorageProviders.MEMORY);
|
|
39
|
+
};
|
|
40
|
+
export const parseCryptoMode = (value) => requireImplemented("CRYPTO_MODE", parse(value, CryptoModes, "CRYPTO_MODE", CryptoModes.SINGLE), IMPLEMENTED_CRYPTO_MODES);
|
|
41
|
+
export const parseHashAlgorithm = (value) => requireImplemented("HASH_PROVIDER", parse(value, HashAlgorithms, "HASH_PROVIDER", HashAlgorithms.SHA256), IMPLEMENTED_HASH_ALGORITHMS);
|
|
42
|
+
/**
|
|
43
|
+
* Accepted input aliases for a SignatureAlgorithm config value, resolved
|
|
44
|
+
* to the canonical internal identifier before validation. Additive only:
|
|
45
|
+
* the canonical identifiers themselves (SignatureAlgorithms' own values,
|
|
46
|
+
* e.g. "dilithium3") are never renamed, so an existing
|
|
47
|
+
* PRIMARY_SIGNATURE_PROVIDER=dilithium3 deployment is unaffected. Lets a
|
|
48
|
+
* new deployment use "ml-dsa-65" (the NIST/FIPS 204 standard name this
|
|
49
|
+
* codebase's own docs already use when describing "dilithium3" to
|
|
50
|
+
* readers) without a breaking rename of the internal identifier itself.
|
|
51
|
+
*/
|
|
52
|
+
const SIGNATURE_ALGORITHM_ALIASES = {
|
|
53
|
+
"ml-dsa-65": SignatureAlgorithms.DILITHIUM3,
|
|
54
|
+
};
|
|
55
|
+
export const parseSignatureAlgorithm = (value, variable = "PRIMARY_SIGNATURE_PROVIDER") => requireImplemented(variable, parse(value !== undefined
|
|
56
|
+
? (SIGNATURE_ALGORITHM_ALIASES[value] ?? value)
|
|
57
|
+
: value, SignatureAlgorithms, "SIGNATURE_PROVIDER", SignatureAlgorithms.ED25519), IMPLEMENTED_SIGNATURE_ALGORITHMS);
|
|
58
|
+
export const parseKeyProvider = (value) => requireImplemented("KEY_PROVIDER", parse(value, KeyProviders, "KEY_PROVIDER", KeyProviders.LOCAL), IMPLEMENTED_KEY_PROVIDERS);
|
|
59
|
+
/**
|
|
60
|
+
* Unlike the other settings, an invalid value is not echoed: a value set
|
|
61
|
+
* in the wrong variable can be a real secret (a token pasted into
|
|
62
|
+
* PARMANA_SECRETS_PROVIDER, say), and this message reaches logs. Kept
|
|
63
|
+
* separate from parse() so the value never reaches its message.
|
|
64
|
+
*/
|
|
65
|
+
export const parseSecretsProvider = (value) => {
|
|
66
|
+
const accepted = Object.values(SecretsProviders);
|
|
67
|
+
const match = accepted.find((provider) => provider === value);
|
|
68
|
+
if (value === undefined) {
|
|
69
|
+
return SecretsProviders.ENV;
|
|
70
|
+
}
|
|
71
|
+
if (match === undefined) {
|
|
72
|
+
throw new Error(`Invalid PARMANA_SECRETS_PROVIDER: expected one of ${accepted.join(", ")}`);
|
|
73
|
+
}
|
|
74
|
+
return match;
|
|
75
|
+
};
|
|
76
|
+
export const parseTrustProfile = (value) => parse(value, TrustProfiles, "TRUST_PROFILE", TrustProfiles.V1);
|
|
77
|
+
const API_KEY_HASH_PATTERN = /^[0-9a-f]{64}$/;
|
|
78
|
+
/**
|
|
79
|
+
* Parses PARMANA_API_KEYS: a JSON array of
|
|
80
|
+
* { "callerId": string, "keyHash": string } entries.
|
|
81
|
+
*
|
|
82
|
+
* Returns an empty array when unset — callers of this
|
|
83
|
+
* function decide what an empty result means (the
|
|
84
|
+
* caller-authenticator bootstrap treats it as "refuse to
|
|
85
|
+
* start unless auth is explicitly disabled").
|
|
86
|
+
*/
|
|
87
|
+
export function parseApiKeys(value) {
|
|
88
|
+
if (value === undefined || value.trim() === "") {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
let parsed;
|
|
92
|
+
try {
|
|
93
|
+
parsed = JSON.parse(value);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
throw new Error("PARMANA_API_KEYS is not valid JSON. Expected an array of " +
|
|
97
|
+
'{ "callerId": string, "keyHash": string } entries.');
|
|
98
|
+
}
|
|
99
|
+
if (!Array.isArray(parsed)) {
|
|
100
|
+
throw new Error("PARMANA_API_KEYS must be a JSON array of " +
|
|
101
|
+
'{ "callerId": string, "keyHash": string } entries.');
|
|
102
|
+
}
|
|
103
|
+
return parsed.map((entry, index) => {
|
|
104
|
+
const record = entry;
|
|
105
|
+
const validEntry = typeof entry === "object" &&
|
|
106
|
+
entry !== null &&
|
|
107
|
+
typeof record.callerId === "string" &&
|
|
108
|
+
record.callerId !== "" &&
|
|
109
|
+
typeof record.keyHash === "string" &&
|
|
110
|
+
API_KEY_HASH_PATTERN.test(record.keyHash);
|
|
111
|
+
if (!validEntry) {
|
|
112
|
+
throw new Error(`PARMANA_API_KEYS[${index}] is invalid. Each entry must be ` +
|
|
113
|
+
'{ "callerId": non-empty string, "keyHash": 64-character lowercase hex }.');
|
|
114
|
+
}
|
|
115
|
+
const allowedPrincipalIds = record.allowedPrincipalIds;
|
|
116
|
+
if (allowedPrincipalIds !== undefined) {
|
|
117
|
+
const validAllowedPrincipalIds = Array.isArray(allowedPrincipalIds) &&
|
|
118
|
+
allowedPrincipalIds.every((id) => typeof id === "string" && id !== "");
|
|
119
|
+
if (!validAllowedPrincipalIds) {
|
|
120
|
+
throw new Error(`PARMANA_API_KEYS[${index}].allowedPrincipalIds must be an array ` +
|
|
121
|
+
"of non-empty strings when present.");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const allowedCapabilities = record.allowedCapabilities;
|
|
125
|
+
if (allowedCapabilities !== undefined) {
|
|
126
|
+
const validAllowedCapabilities = Array.isArray(allowedCapabilities) &&
|
|
127
|
+
allowedCapabilities.every((capability) => typeof capability === "string" && capability !== "");
|
|
128
|
+
if (!validAllowedCapabilities) {
|
|
129
|
+
throw new Error(`PARMANA_API_KEYS[${index}].allowedCapabilities must be an array ` +
|
|
130
|
+
'of non-empty strings when present. Use "*" as an entry to ' +
|
|
131
|
+
"grant every capability.");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const allowedTenantIds = record.allowedTenantIds;
|
|
135
|
+
if (allowedTenantIds !== undefined) {
|
|
136
|
+
const validAllowedTenantIds = Array.isArray(allowedTenantIds) &&
|
|
137
|
+
allowedTenantIds.every((id) => typeof id === "string" && id !== "");
|
|
138
|
+
if (!validAllowedTenantIds) {
|
|
139
|
+
throw new Error(`PARMANA_API_KEYS[${index}].allowedTenantIds must be an array ` +
|
|
140
|
+
"of non-empty strings when present.");
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const credentialHolderType = record.credentialHolderType;
|
|
144
|
+
if (credentialHolderType !== undefined) {
|
|
145
|
+
const validCredentialHolderType = typeof credentialHolderType === "string" &&
|
|
146
|
+
Object.values(AuthorityType).includes(credentialHolderType);
|
|
147
|
+
if (!validCredentialHolderType) {
|
|
148
|
+
throw new Error(`PARMANA_API_KEYS[${index}].credentialHolderType must be one of ` +
|
|
149
|
+
`${Object.values(AuthorityType).join(", ")} when present.`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const stepUpPublicKey = record.stepUpPublicKey;
|
|
153
|
+
if (stepUpPublicKey !== undefined) {
|
|
154
|
+
const validShape = typeof stepUpPublicKey === "string" && stepUpPublicKey.trim() !== "";
|
|
155
|
+
let validKey = false;
|
|
156
|
+
if (validShape) {
|
|
157
|
+
try {
|
|
158
|
+
const keyObject = createPublicKey(stepUpPublicKey);
|
|
159
|
+
validKey = keyObject.asymmetricKeyType === "ed25519";
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
validKey = false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (!validShape || !validKey) {
|
|
166
|
+
throw new Error(`PARMANA_API_KEYS[${index}].stepUpPublicKey must be a PEM-encoded ` +
|
|
167
|
+
"Ed25519 public key when present.");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
callerId: record.callerId,
|
|
172
|
+
keyHash: record.keyHash,
|
|
173
|
+
...(allowedPrincipalIds !== undefined
|
|
174
|
+
? { allowedPrincipalIds: allowedPrincipalIds }
|
|
175
|
+
: {}),
|
|
176
|
+
...(allowedCapabilities !== undefined
|
|
177
|
+
? { allowedCapabilities: allowedCapabilities }
|
|
178
|
+
: {}),
|
|
179
|
+
...(allowedTenantIds !== undefined
|
|
180
|
+
? { allowedTenantIds: allowedTenantIds }
|
|
181
|
+
: {}),
|
|
182
|
+
...(credentialHolderType !== undefined
|
|
183
|
+
? { credentialHolderType: credentialHolderType }
|
|
184
|
+
: {}),
|
|
185
|
+
...(stepUpPublicKey !== undefined
|
|
186
|
+
? { stepUpPublicKey: stepUpPublicKey }
|
|
187
|
+
: {}),
|
|
188
|
+
};
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=ConfigValidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigValidation.js","sourceRoot":"","sources":["../../src/config/ConfigValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,cAAc,EAEd,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAE/E,O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|
+
* Canonical hash algorithms supported by Parmana.
|
|
3
|
+
*
|
|
4
|
+
* New algorithms are additive.
|
|
5
|
+
*/
|
|
6
|
+
export declare const HashAlgorithms: {
|
|
7
|
+
readonly SHA256: "sha256";
|
|
8
|
+
readonly SHA3512: "sha3-512";
|
|
9
|
+
readonly BLAKE3: "blake3";
|
|
10
|
+
};
|
|
11
|
+
export type HashAlgorithm = (typeof HashAlgorithms)[keyof typeof HashAlgorithms];
|
|
12
|
+
/**
|
|
13
|
+
* Canonical signature algorithms.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SignatureAlgorithms: {
|
|
16
|
+
readonly ED25519: "ed25519";
|
|
17
|
+
readonly ECDSA_P256: "ecdsa-p256";
|
|
18
|
+
readonly DILITHIUM3: "dilithium3";
|
|
19
|
+
readonly DILITHIUM5: "dilithium5";
|
|
20
|
+
readonly SPHINCS_PLUS: "sphincs-plus";
|
|
21
|
+
};
|
|
22
|
+
export type SignatureAlgorithm = (typeof SignatureAlgorithms)[keyof typeof SignatureAlgorithms];
|
|
23
|
+
/**
|
|
24
|
+
* Crypto signing modes.
|
|
25
|
+
*
|
|
26
|
+
* single: exactly one SignatureProvider (PRIMARY_SIGNATURE_PROVIDER)
|
|
27
|
+
* signs and verifies everything -- today's behavior, unchanged.
|
|
28
|
+
*
|
|
29
|
+
* hybrid: PRIMARY_SIGNATURE_PROVIDER and SECONDARY_SIGNATURE_PROVIDER
|
|
30
|
+
* both sign Execution Trust Records and Receipts; verification
|
|
31
|
+
* requires both to pass. See HybridSignatureProvider (@parmana/crypto).
|
|
32
|
+
*/
|
|
33
|
+
export declare const CryptoModes: {
|
|
34
|
+
readonly SINGLE: "single";
|
|
35
|
+
readonly HYBRID: "hybrid";
|
|
36
|
+
};
|
|
37
|
+
export type CryptoMode = (typeof CryptoModes)[keyof typeof CryptoModes];
|
|
38
|
+
//# sourceMappingURL=CryptoAlgorithms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoAlgorithms.d.ts","sourceRoot":"","sources":["../../src/config/CryptoAlgorithms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,cAAc;aACzB,MAAM,EAAE,QAAQ;aAChB,OAAO,EAAE,UAAU;aACnB,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,MAAM,aAAa,GACvB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,mBAAmB;aAC9B,OAAO,EAAE,SAAS;aAClB,UAAU,EAAE,YAAY;aAKxB,UAAU,EAAE,YAAY;aACxB,UAAU,EAAE,YAAY;aACxB,YAAY,EAAE,cAAc;CACpB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAC5B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW;aACtB,MAAM,EAAE,QAAQ;aAChB,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical hash algorithms supported by Parmana.
|
|
3
|
+
*
|
|
4
|
+
* New algorithms are additive.
|
|
5
|
+
*/
|
|
6
|
+
export const HashAlgorithms = {
|
|
7
|
+
SHA256: "sha256",
|
|
8
|
+
SHA3512: "sha3-512",
|
|
9
|
+
BLAKE3: "blake3",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Canonical signature algorithms.
|
|
13
|
+
*/
|
|
14
|
+
export const SignatureAlgorithms = {
|
|
15
|
+
ED25519: "ed25519",
|
|
16
|
+
ECDSA_P256: "ecdsa-p256",
|
|
17
|
+
//
|
|
18
|
+
// Post-Quantum Ready
|
|
19
|
+
//
|
|
20
|
+
DILITHIUM3: "dilithium3",
|
|
21
|
+
DILITHIUM5: "dilithium5",
|
|
22
|
+
SPHINCS_PLUS: "sphincs-plus",
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Crypto signing modes.
|
|
26
|
+
*
|
|
27
|
+
* single: exactly one SignatureProvider (PRIMARY_SIGNATURE_PROVIDER)
|
|
28
|
+
* signs and verifies everything -- today's behavior, unchanged.
|
|
29
|
+
*
|
|
30
|
+
* hybrid: PRIMARY_SIGNATURE_PROVIDER and SECONDARY_SIGNATURE_PROVIDER
|
|
31
|
+
* both sign Execution Trust Records and Receipts; verification
|
|
32
|
+
* requires both to pass. See HybridSignatureProvider (@parmana/crypto).
|
|
33
|
+
*/
|
|
34
|
+
export const CryptoModes = {
|
|
35
|
+
SINGLE: "single",
|
|
36
|
+
HYBRID: "hybrid",
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=CryptoAlgorithms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CryptoAlgorithms.js","sourceRoot":"","sources":["../../src/config/CryptoAlgorithms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,QAAQ;CACR,CAAC;AAKX;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IAExB,EAAE;IACF,qBAAqB;IACrB,EAAE;IACF,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,cAAc;CACpB,CAAC;AAKX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One check from the configuration doctor. "pass" means the setting is valid,
|
|
3
|
+
* "warn" means it works but needs attention, and "fail" means the server would
|
|
4
|
+
* refuse to start, or would refuse requests. A fail always carries a fix.
|
|
5
|
+
*/
|
|
6
|
+
export interface DoctorCheck {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly level: "pass" | "warn" | "fail";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
readonly fix?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DoctorReaders {
|
|
13
|
+
readonly directoryExists: (path: string) => boolean;
|
|
14
|
+
/** Names of the entries in a folder. Empty when the folder cannot be read. */
|
|
15
|
+
readonly listDirectory: (path: string) => string[];
|
|
16
|
+
readonly readFile: (path: string) => string;
|
|
17
|
+
}
|
|
18
|
+
export interface DoctorOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Apply the production rules as well. The server refuses several settings
|
|
21
|
+
* when NODE_ENV=production, and some storage and key choices are only valid
|
|
22
|
+
* in production. Without this, the local rules apply.
|
|
23
|
+
*/
|
|
24
|
+
readonly production: boolean;
|
|
25
|
+
}
|
|
26
|
+
type Env = Readonly<Record<string, string | undefined>>;
|
|
27
|
+
/**
|
|
28
|
+
* Every PARMANA_ name read by this repository. A name outside this list is
|
|
29
|
+
* reported as a probable typo, because the server ignores it without a word.
|
|
30
|
+
*/
|
|
31
|
+
export declare const KNOWN_PARMANA_SETTINGS: readonly string[];
|
|
32
|
+
/**
|
|
33
|
+
* Runs the configuration checks and returns every result, not just the first
|
|
34
|
+
* failure. With `production: true`, the production rules are added and the
|
|
35
|
+
* stage 1 "not yet checked" warnings are replaced by real checks.
|
|
36
|
+
*
|
|
37
|
+
* Each setting is checked with the same parser the server uses, so a check
|
|
38
|
+
* cannot pass here and fail at startup. Parser error messages are never shown,
|
|
39
|
+
* because some of them echo the value they rejected. Messages name the setting
|
|
40
|
+
* and the allowed values only.
|
|
41
|
+
*/
|
|
42
|
+
export declare function diagnoseConfiguration(env: Env, readers: DoctorReaders, options?: DoctorOptions): DoctorCheck[];
|
|
43
|
+
/** The known setting within two edits of the given name, if there is one. */
|
|
44
|
+
export declare function closestSetting(name: string): string | undefined;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=Doctor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Doctor.d.ts","sourceRoot":"","sources":["../../src/config/Doctor.ts"],"names":[],"mappings":"AAqBA;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACnD,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,KAAK,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAYxD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EA0BnD,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,aAAqC,GAC7C,WAAW,EAAE,CAsBf;AAoyBD,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW/D"}
|