@nmshd/transport 5.2.0 → 5.3.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/dist/buildInformation.js +5 -5
- package/dist/core/CoreCrypto.js +2 -2
- package/dist/core/CoreCrypto.js.map +1 -1
- package/dist/core/CoreIdHelper.d.ts +2 -1
- package/dist/core/CoreIdHelper.d.ts.map +1 -1
- package/dist/core/CoreIdHelper.js +11 -6
- package/dist/core/CoreIdHelper.js.map +1 -1
- package/dist/core/CoreSynchronizable.d.ts +4 -4
- package/dist/core/CoreSynchronizable.d.ts.map +1 -1
- package/dist/core/CoreSynchronizable.js +3 -4
- package/dist/core/CoreSynchronizable.js.map +1 -1
- package/dist/core/Reference.d.ts +1 -1
- package/dist/core/Reference.d.ts.map +1 -1
- package/dist/core/Reference.js +7 -7
- package/dist/core/Reference.js.map +1 -1
- package/dist/core/Transport.js +4 -4
- package/dist/core/Transport.js.map +1 -1
- package/dist/core/TransportController.d.ts +2 -2
- package/dist/core/TransportController.d.ts.map +1 -1
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/{CoreErrors.d.ts → TransportCoreErrors.d.ts} +3 -3
- package/dist/core/TransportCoreErrors.d.ts.map +1 -0
- package/dist/core/TransportCoreErrors.js +147 -0
- package/dist/core/TransportCoreErrors.js.map +1 -0
- package/dist/core/backbone/AuthClient.d.ts +1 -1
- package/dist/core/backbone/AuthClient.d.ts.map +1 -1
- package/dist/core/backbone/AuthClient.js +2 -2
- package/dist/core/backbone/AuthClient.js.map +1 -1
- package/dist/core/backbone/Authenticator.d.ts.map +1 -1
- package/dist/core/backbone/ClientResult.d.ts +1 -1
- package/dist/core/backbone/ClientResult.d.ts.map +1 -1
- package/dist/core/backbone/ClientResult.js +3 -3
- package/dist/core/backbone/ClientResult.js.map +1 -1
- package/dist/core/backbone/RESTClient.js +2 -2
- package/dist/core/backbone/RESTClient.js.map +1 -1
- package/dist/core/backbone/RequestError.d.ts.map +1 -1
- package/dist/core/backbone/RequestError.js +2 -2
- package/dist/core/backbone/RequestError.js.map +1 -1
- package/dist/core/index.d.ts +1 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/types/CoreHash.d.ts +5 -3
- package/dist/core/types/CoreHash.d.ts.map +1 -1
- package/dist/core/types/CoreHash.js +9 -2
- package/dist/core/types/CoreHash.js.map +1 -1
- package/dist/core/types/index.d.ts +0 -3
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/core/types/index.js +0 -3
- package/dist/core/types/index.js.map +1 -1
- package/dist/events/PeerDeletedEvent.d.ts +7 -0
- package/dist/events/PeerDeletedEvent.d.ts.map +1 -0
- package/dist/events/PeerDeletedEvent.js +12 -0
- package/dist/events/PeerDeletedEvent.js.map +1 -0
- package/dist/events/PeerDeletionCancelledEvent.d.ts +7 -0
- package/dist/events/PeerDeletionCancelledEvent.d.ts.map +1 -0
- package/dist/events/PeerDeletionCancelledEvent.js +12 -0
- package/dist/events/PeerDeletionCancelledEvent.js.map +1 -0
- package/dist/events/PeerToBeDeletedEvent.d.ts +7 -0
- package/dist/events/PeerToBeDeletedEvent.d.ts.map +1 -0
- package/dist/events/PeerToBeDeletedEvent.js +12 -0
- package/dist/events/PeerToBeDeletedEvent.js.map +1 -0
- package/dist/events/RelationshipDecomposedBySelfEvent.d.ts +1 -1
- package/dist/events/RelationshipDecomposedBySelfEvent.d.ts.map +1 -1
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -0
- package/dist/events/index.js.map +1 -1
- package/dist/modules/accounts/AccountController.d.ts +2 -1
- package/dist/modules/accounts/AccountController.d.ts.map +1 -1
- package/dist/modules/accounts/AccountController.js +8 -7
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityController.d.ts +2 -1
- package/dist/modules/accounts/IdentityController.d.ts.map +1 -1
- package/dist/modules/accounts/IdentityController.js +1 -1
- package/dist/modules/accounts/IdentityController.js.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts +2 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.js +2 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.js.map +1 -1
- package/dist/modules/accounts/IdentityUtil.d.ts +1 -1
- package/dist/modules/accounts/IdentityUtil.d.ts.map +1 -1
- package/dist/modules/accounts/IdentityUtil.js +2 -2
- package/dist/modules/accounts/IdentityUtil.js.map +1 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts +3 -2
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts.map +1 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js +12 -12
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js.map +1 -1
- package/dist/modules/accounts/data/Identity.d.ts +4 -3
- package/dist/modules/accounts/data/Identity.d.ts.map +1 -1
- package/dist/modules/accounts/data/Identity.js +3 -3
- package/dist/modules/accounts/data/Identity.js.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts +2 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.js +3 -2
- package/dist/modules/accounts/data/IdentityDeletionProcess.js.map +1 -1
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +3 -3
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts.map +1 -1
- package/dist/modules/accounts/data/IdentitySecretCredentials.js +1 -2
- package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -1
- package/dist/modules/certificates/CertificateIssuer.d.ts +2 -1
- package/dist/modules/certificates/CertificateIssuer.d.ts.map +1 -1
- package/dist/modules/certificates/CertificateIssuer.js +2 -1
- package/dist/modules/certificates/CertificateIssuer.js.map +1 -1
- package/dist/modules/certificates/data/Certificate.d.ts +3 -3
- package/dist/modules/certificates/data/Certificate.d.ts.map +1 -1
- package/dist/modules/certificates/data/Certificate.js +1 -1
- package/dist/modules/certificates/data/Certificate.js.map +1 -1
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +3 -3
- package/dist/modules/certificates/data/CertificateConstraint.d.ts.map +1 -1
- package/dist/modules/certificates/data/CertificateConstraint.js +1 -2
- package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -1
- package/dist/modules/certificates/data/CertificateContent.d.ts +6 -5
- package/dist/modules/certificates/data/CertificateContent.d.ts.map +1 -1
- package/dist/modules/certificates/data/CertificateContent.js +6 -6
- package/dist/modules/certificates/data/CertificateContent.js.map +1 -1
- package/dist/modules/certificates/data/CertificateItem.d.ts +3 -3
- package/dist/modules/certificates/data/CertificateItem.d.ts.map +1 -1
- package/dist/modules/certificates/data/CertificateItem.js +1 -2
- package/dist/modules/certificates/data/CertificateItem.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +2 -2
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts.map +1 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +3 -3
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +2 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +2 -2
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts.map +1 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +2 -2
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -1
- package/dist/modules/challenges/ChallengeController.d.ts.map +1 -1
- package/dist/modules/challenges/ChallengeController.js +10 -9
- package/dist/modules/challenges/ChallengeController.js.map +1 -1
- package/dist/modules/challenges/data/Challenge.d.ts +4 -3
- package/dist/modules/challenges/data/Challenge.d.ts.map +1 -1
- package/dist/modules/challenges/data/Challenge.js +6 -6
- package/dist/modules/challenges/data/Challenge.js.map +1 -1
- package/dist/modules/challenges/data/ChallengeSigned.d.ts +3 -4
- package/dist/modules/challenges/data/ChallengeSigned.d.ts.map +1 -1
- package/dist/modules/challenges/data/ChallengeSigned.js +1 -2
- package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -1
- package/dist/modules/devices/DeviceController.d.ts +2 -1
- package/dist/modules/devices/DeviceController.d.ts.map +1 -1
- package/dist/modules/devices/DeviceController.js +4 -4
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/DeviceSecretController.d.ts.map +1 -1
- package/dist/modules/devices/DeviceSecretController.js +10 -9
- package/dist/modules/devices/DeviceSecretController.js.map +1 -1
- package/dist/modules/devices/DevicesController.d.ts +1 -1
- package/dist/modules/devices/DevicesController.d.ts.map +1 -1
- package/dist/modules/devices/DevicesController.js +9 -8
- package/dist/modules/devices/DevicesController.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +1 -2
- package/dist/modules/devices/local/Device.d.ts.map +1 -1
- package/dist/modules/devices/local/Device.js +4 -5
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +4 -3
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts.map +1 -1
- package/dist/modules/devices/local/DeviceSecretCredentials.js +3 -3
- package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +3 -3
- package/dist/modules/devices/local/SendDeviceParameters.d.ts.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.js +1 -2
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +4 -3
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts.map +1 -1
- package/dist/modules/devices/transmission/DeviceSharedSecret.js +5 -5
- package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -1
- package/dist/modules/files/FileController.d.ts +1 -1
- package/dist/modules/files/FileController.d.ts.map +1 -1
- package/dist/modules/files/FileController.js +16 -15
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/files/local/CachedFile.d.ts +6 -4
- package/dist/modules/files/local/CachedFile.d.ts.map +1 -1
- package/dist/modules/files/local/CachedFile.js +19 -18
- package/dist/modules/files/local/CachedFile.js.map +1 -1
- package/dist/modules/files/local/File.d.ts +2 -1
- package/dist/modules/files/local/File.d.ts.map +1 -1
- package/dist/modules/files/local/File.js +5 -4
- package/dist/modules/files/local/File.js.map +1 -1
- package/dist/modules/files/local/SendFileParameters.d.ts +4 -4
- package/dist/modules/files/local/SendFileParameters.d.ts.map +1 -1
- package/dist/modules/files/local/SendFileParameters.js +4 -5
- package/dist/modules/files/local/SendFileParameters.js.map +1 -1
- package/dist/modules/files/transmission/FileMetadata.d.ts +5 -3
- package/dist/modules/files/transmission/FileMetadata.d.ts.map +1 -1
- package/dist/modules/files/transmission/FileMetadata.js +3 -2
- package/dist/modules/files/transmission/FileMetadata.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/messages/MessageController.d.ts +1 -1
- package/dist/modules/messages/MessageController.d.ts.map +1 -1
- package/dist/modules/messages/MessageController.js +31 -30
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/local/CachedMessage.d.ts +3 -4
- package/dist/modules/messages/local/CachedMessage.d.ts.map +1 -1
- package/dist/modules/messages/local/CachedMessage.js +6 -7
- package/dist/modules/messages/local/CachedMessage.js.map +1 -1
- package/dist/modules/messages/local/CachedMessageRecipient.d.ts +4 -4
- package/dist/modules/messages/local/CachedMessageRecipient.d.ts.map +1 -1
- package/dist/modules/messages/local/CachedMessageRecipient.js +6 -7
- package/dist/modules/messages/local/CachedMessageRecipient.js.map +1 -1
- package/dist/modules/messages/local/Message.d.ts +2 -1
- package/dist/modules/messages/local/Message.d.ts.map +1 -1
- package/dist/modules/messages/local/Message.js +6 -5
- package/dist/modules/messages/local/Message.js.map +1 -1
- package/dist/modules/messages/local/SendMessageParameters.d.ts +3 -3
- package/dist/modules/messages/local/SendMessageParameters.d.ts.map +1 -1
- package/dist/modules/messages/local/SendMessageParameters.js +3 -3
- package/dist/modules/messages/local/SendMessageParameters.js.map +1 -1
- package/dist/modules/messages/transmission/MessageContentWrapper.d.ts +3 -5
- package/dist/modules/messages/transmission/MessageContentWrapper.d.ts.map +1 -1
- package/dist/modules/messages/transmission/MessageContentWrapper.js +4 -6
- package/dist/modules/messages/transmission/MessageContentWrapper.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts +4 -3
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelope.js +8 -8
- package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +4 -4
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts.map +1 -1
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +5 -6
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSignature.d.ts +4 -3
- package/dist/modules/messages/transmission/MessageSignature.d.ts.map +1 -1
- package/dist/modules/messages/transmission/MessageSignature.js +3 -3
- package/dist/modules/messages/transmission/MessageSignature.js.map +1 -1
- package/dist/modules/messages/transmission/MessageSigned.d.ts +3 -3
- package/dist/modules/messages/transmission/MessageSigned.d.ts.map +1 -1
- package/dist/modules/messages/transmission/MessageSigned.js +1 -2
- package/dist/modules/messages/transmission/MessageSigned.js.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +13 -12
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +3 -4
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +6 -7
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +5 -5
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +4 -4
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +3 -3
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.d.ts +2 -3
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js +1 -2
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContentWrapper.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +2 -2
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +3 -3
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +1 -2
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.js +25 -24
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +8 -2
- package/dist/modules/relationships/RelationshipsController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipsController.js +52 -40
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/local/CachedRelationship.d.ts +3 -3
- package/dist/modules/relationships/local/CachedRelationship.d.ts.map +1 -1
- package/dist/modules/relationships/local/CachedRelationship.js +4 -4
- package/dist/modules/relationships/local/CachedRelationship.js.map +1 -1
- package/dist/modules/relationships/local/PeerDeletionInfo.d.ts +16 -0
- package/dist/modules/relationships/local/PeerDeletionInfo.d.ts.map +1 -0
- package/dist/{core/types/CoreAddress.js → modules/relationships/local/PeerDeletionInfo.js} +14 -32
- package/dist/modules/relationships/local/PeerDeletionInfo.js.map +1 -0
- package/dist/modules/relationships/local/Relationship.d.ts +5 -1
- package/dist/modules/relationships/local/Relationship.d.ts.map +1 -1
- package/dist/modules/relationships/local/Relationship.js +16 -8
- package/dist/modules/relationships/local/Relationship.js.map +1 -1
- package/dist/modules/relationships/local/RelationshipAuditLog.js +4 -4
- package/dist/modules/relationships/local/RelationshipAuditLog.js.map +1 -1
- package/dist/modules/relationships/local/RelationshipAuditLogEntry.d.ts +4 -3
- package/dist/modules/relationships/local/RelationshipAuditLogEntry.d.ts.map +1 -1
- package/dist/modules/relationships/local/RelationshipAuditLogEntry.js +5 -5
- package/dist/modules/relationships/local/RelationshipAuditLogEntry.js.map +1 -1
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +2 -3
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts.map +1 -1
- package/dist/modules/relationships/local/SendRelationshipParameters.js +1 -2
- package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.d.ts +5 -3
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.js +10 -3
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.d.ts +3 -3
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.js +1 -2
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentSigned.js.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.d.ts +3 -3
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.js +3 -3
- package/dist/modules/relationships/transmission/requests/RelationshipCreationContentWrapper.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.d.ts +4 -3
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.js +6 -3
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentCipher.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.d.ts +3 -3
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.js +1 -2
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentSigned.js.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.d.ts +4 -3
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.d.ts.map +1 -1
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.js +3 -3
- package/dist/modules/relationships/transmission/responses/RelationshipCreationResponseContentWrapper.js.map +1 -1
- package/dist/modules/secrets/SecretController.d.ts +1 -1
- package/dist/modules/secrets/SecretController.d.ts.map +1 -1
- package/dist/modules/secrets/SecretController.js +6 -5
- package/dist/modules/secrets/SecretController.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts.map +1 -1
- package/dist/modules/secrets/data/SecretContainerCipher.js +4 -4
- package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -1
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts +5 -5
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts.map +1 -1
- package/dist/modules/secrets/data/SecretContainerPlain.js +6 -6
- package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.d.ts.map +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.js +2 -1
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +7 -5
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.d.ts +2 -1
- package/dist/modules/sync/SyncController.d.ts.map +1 -1
- package/dist/modules/sync/SyncController.js +12 -21
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.js +2 -2
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js +10 -4
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/{IdentityDeletionProcessStartedEventProcessor.d.ts → IdentityDeletionProcessChangedExternalEventProcessor.d.ts} +2 -2
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessChangedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/{IdentityDeletionProcessChangedEventProcessor.js → IdentityDeletionProcessChangedExternalEventProcessor.js} +4 -4
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessChangedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/{IdentityDeletionProcessChangedEventProcessor.d.ts → IdentityDeletionProcessStartedExternalEventProcessor.d.ts} +2 -2
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStartedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/{IdentityDeletionProcessStartedEventProcessor.js → IdentityDeletionProcessStartedExternalEventProcessor.js} +4 -4
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStartedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/MessageReceivedExternalEventProcessor.js +2 -2
- package/dist/modules/sync/externalEventProcessors/MessageReceivedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.js +35 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.js +33 -0
- package/dist/modules/sync/externalEventProcessors/PeerDeletionCancelledExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.js +35 -0
- package/dist/modules/sync/externalEventProcessors/PeerToBeDeletedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js +19 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationCompletedExternalEventProcessor.d.ts +2 -2
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationCompletedExternalEventProcessor.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationCompletedExternalEventProcessor.js +7 -6
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationCompletedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationRequestedExternalEventProcessor.d.ts +2 -2
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationRequestedExternalEventProcessor.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationRequestedExternalEventProcessor.js +7 -6
- package/dist/modules/sync/externalEventProcessors/RelationshipReactivationRequestedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipStatusChangedExternalEventProcessor.d.ts +2 -2
- package/dist/modules/sync/externalEventProcessors/RelationshipStatusChangedExternalEventProcessor.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipStatusChangedExternalEventProcessor.js +6 -6
- package/dist/modules/sync/externalEventProcessors/RelationshipStatusChangedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/index.d.ts +0 -6
- package/dist/modules/sync/externalEventProcessors/index.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/index.js +0 -6
- package/dist/modules/sync/externalEventProcessors/index.js.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.d.ts +4 -3
- package/dist/modules/sync/local/DatawalletModification.d.ts.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.js +4 -4
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.d.ts +2 -1
- package/dist/modules/tokens/AnonymousTokenController.d.ts.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.js +7 -6
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
- package/dist/modules/tokens/TokenController.d.ts +1 -1
- package/dist/modules/tokens/TokenController.d.ts.map +1 -1
- package/dist/modules/tokens/TokenController.js +14 -13
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/modules/tokens/local/CachedToken.d.ts +3 -3
- package/dist/modules/tokens/local/CachedToken.d.ts.map +1 -1
- package/dist/modules/tokens/local/CachedToken.js +6 -6
- package/dist/modules/tokens/local/CachedToken.js.map +1 -1
- package/dist/modules/tokens/local/SendTokenParameters.d.ts +3 -3
- package/dist/modules/tokens/local/SendTokenParameters.d.ts.map +1 -1
- package/dist/modules/tokens/local/SendTokenParameters.js +3 -3
- package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -1
- package/dist/modules/tokens/local/Token.d.ts +2 -1
- package/dist/modules/tokens/local/Token.d.ts.map +1 -1
- package/dist/modules/tokens/local/Token.js +5 -4
- package/dist/modules/tokens/local/Token.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +3 -3
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +1 -2
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts +4 -3
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentFile.js +3 -3
- package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +4 -3
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts.map +1 -1
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +3 -3
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -1
- package/dist/util/PasswordGenerator.d.ts.map +1 -1
- package/dist/util/PasswordGenerator.js +1 -2
- package/dist/util/PasswordGenerator.js.map +1 -1
- package/dist/util/Random.d.ts.map +1 -1
- package/dist/util/Random.js +7 -8
- package/dist/util/Random.js.map +1 -1
- package/package.json +9 -9
- package/dist/core/CoreError.d.ts +0 -19
- package/dist/core/CoreError.d.ts.map +0 -1
- package/dist/core/CoreError.js +0 -63
- package/dist/core/CoreError.js.map +0 -1
- package/dist/core/CoreErrors.d.ts.map +0 -1
- package/dist/core/CoreErrors.js +0 -147
- package/dist/core/CoreErrors.js.map +0 -1
- package/dist/core/CoreSerializable.d.ts +0 -17
- package/dist/core/CoreSerializable.d.ts.map +0 -1
- package/dist/core/CoreSerializable.js +0 -37
- package/dist/core/CoreSerializable.js.map +0 -1
- package/dist/core/CoreSerializableAsync.d.ts +0 -17
- package/dist/core/CoreSerializableAsync.d.ts.map +0 -1
- package/dist/core/CoreSerializableAsync.js +0 -38
- package/dist/core/CoreSerializableAsync.js.map +0 -1
- package/dist/core/types/CoreAddress.d.ts +0 -16
- package/dist/core/types/CoreAddress.d.ts.map +0 -1
- package/dist/core/types/CoreAddress.js.map +0 -1
- package/dist/core/types/CoreDate.d.ts +0 -40
- package/dist/core/types/CoreDate.d.ts.map +0 -1
- package/dist/core/types/CoreDate.js +0 -152
- package/dist/core/types/CoreDate.js.map +0 -1
- package/dist/core/types/CoreId.d.ts +0 -17
- package/dist/core/types/CoreId.d.ts.map +0 -1
- package/dist/core/types/CoreId.js +0 -57
- package/dist/core/types/CoreId.js.map +0 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessChangedEventProcessor.d.ts.map +0 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessChangedEventProcessor.js.map +0 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStartedEventProcessor.d.ts.map +0 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStartedEventProcessor.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenContentRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TokenContentRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE,MAAM,WAAW,iCAAkC,SAAQ,aAAa;IACpE,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,gBAAgB,CAAC;CAC/B;AAED,qBACa,gCAAiC,SAAQ,YAAa,YAAW,iCAAiC;IAGpG,UAAU,EAAE,MAAM,CAAC;IAInB,SAAS,EAAE,eAAe,CAAC;WAEpB,IAAI,CAAC,KAAK,EAAE,iCAAiC,GAAG,gCAAgC;CAGjG"}
|
|
@@ -11,9 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TokenContentRelationshipTemplate = void 0;
|
|
13
13
|
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const core_types_1 = require("@nmshd/core-types");
|
|
14
15
|
const crypto_1 = require("@nmshd/crypto");
|
|
15
|
-
|
|
16
|
-
let TokenContentRelationshipTemplate = class TokenContentRelationshipTemplate extends core_1.CoreSerializable {
|
|
16
|
+
let TokenContentRelationshipTemplate = class TokenContentRelationshipTemplate extends ts_serval_1.Serializable {
|
|
17
17
|
static from(value) {
|
|
18
18
|
return this.fromAny(value);
|
|
19
19
|
}
|
|
@@ -22,7 +22,7 @@ exports.TokenContentRelationshipTemplate = TokenContentRelationshipTemplate;
|
|
|
22
22
|
__decorate([
|
|
23
23
|
(0, ts_serval_1.validate)(),
|
|
24
24
|
(0, ts_serval_1.serialize)(),
|
|
25
|
-
__metadata("design:type",
|
|
25
|
+
__metadata("design:type", core_types_1.CoreId)
|
|
26
26
|
], TokenContentRelationshipTemplate.prototype, "templateId", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, ts_serval_1.validate)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"TokenContentRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/modules/tokens/transmission/TokenContentRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4F;AAC5F,kDAAoD;AACpD,0CAAkE;AAQ3D,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,wBAAY;IASvD,MAAM,CAAC,IAAI,CAAC,KAAwC;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;CACJ,CAAA;AAZY,4EAAgC;AAGlC;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACO,mBAAM;oEAAC;AAInB;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;mEAAC;2CAPzB,gCAAgC;IAD5C,IAAA,gBAAI,EAAC,kCAAkC,CAAC;GAC5B,gCAAgC,CAY5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordGenerator.d.ts","sourceRoot":"","sources":["../../src/util/PasswordGenerator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PasswordGenerator.d.ts","sourceRoot":"","sources":["../../src/util/PasswordGenerator.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,kBAAkB;CAAG;AAEtC,MAAM,WAAW,wBAAwB;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;IAC/B,QAAQ,kBAAkB,CAAC;IAC3B,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9G,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC5C;AAED,qBAAa,iBAAkB,YAAW,kBAAkB;IACxD,gBAAuB,cAAc,EAAE,MAAM,EAAE,CA+B7C;IAEF,gBAAuB,WAAW,EAAE,MAAM,EAAE,CAuE1C;WAEkB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,SAAI,EAAE,iBAAiB,GAAE,MAAM,GAAG,MAAM,EAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAOlJ;;;;;;;;;OASG;WACiB,oBAAoB,CAAC,SAAS,SAAI,EAAE,SAAS,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC;WAuBpE,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;WAYrC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;CAK/D"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PasswordGenerator = void 0;
|
|
4
|
-
const TransportError_1 = require("../core/TransportError");
|
|
5
4
|
const Random_1 = require("./Random");
|
|
6
5
|
const defaultPasswordRange = Random_1.RandomCharacterRange.AlphanumericEase + Random_1.RandomCharacterRange.SpecialCharacters;
|
|
7
6
|
class PasswordGenerator {
|
|
@@ -129,7 +128,7 @@ class PasswordGenerator {
|
|
|
129
128
|
if (minLength > maxLength)
|
|
130
129
|
maxLength = minLength;
|
|
131
130
|
if (minLength < 8) {
|
|
132
|
-
throw new
|
|
131
|
+
throw new Error("Minimum password length for a strong password should be 8 characters.");
|
|
133
132
|
}
|
|
134
133
|
const specialCharacterBucket = {
|
|
135
134
|
minLength: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordGenerator.js","sourceRoot":"","sources":["../../src/util/PasswordGenerator.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"PasswordGenerator.js","sourceRoot":"","sources":["../../src/util/PasswordGenerator.ts"],"names":[],"mappings":";;;AAAA,qCAAwD;AAExD,MAAM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,cAAc,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,6BAAoB,CAAC,KAAK,CAAC,CAAC;QAC3E,OAAO,GAAG,OAAO,IAAI,MAAM,EAAE,CAAC;IAClC,CAAC;;AAnKL,8CAoKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Random.d.ts","sourceRoot":"","sources":["../../src/util/Random.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Random.d.ts","sourceRoot":"","sources":["../../src/util/Random.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,eAAe,CAAC;AAG1D,oBAAY,oBAAoB;IAC5B,KAAK,eAAe;IACpB,SAAS,cAAc;IACvB,GAAG,qBAAqB;IACxB,SAAS,+BAA+B;IACxC,aAAa,6BAA6B;IAC1C,SAAS,+BAA+B;IACxC,aAAa,6BAA6B;IAC1C,QAAQ,yDAAyD;IACjE,YAAY,mEAAmE;IAE/E,gBAAgB,8DAA8D;IAC9E,yBAAyB,uCAAuC;IAChE,YAAY,yCAAW;IACvB,iBAAiB,eAAe;CACnC;AAED,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,OAAO;CAAG;AAE3B,MAAM,WAAW,aAAa;IAC1B,QAAQ,OAAO,CAAC;IAChB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5C,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC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,OAAO,CAAC,MAAM,CAAC;WAOtE,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;WAKtE,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;WAQpE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,GAAE,MAAM,GAAG,MAAM,EAAsC,GAAG,OAAO,CAAC,MAAM,CAAC;WAyB5G,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAYlI"}
|
package/dist/util/Random.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Random = exports.RandomCharacterRange = void 0;
|
|
4
4
|
const crypto_1 = require("@nmshd/crypto");
|
|
5
5
|
const uuid_1 = require("uuid");
|
|
6
|
-
const TransportError_1 = require("../core/TransportError");
|
|
7
6
|
var RandomCharacterRange;
|
|
8
7
|
(function (RandomCharacterRange) {
|
|
9
8
|
RandomCharacterRange["Digit"] = "0123456789";
|
|
@@ -27,7 +26,7 @@ class Random {
|
|
|
27
26
|
}
|
|
28
27
|
static async int(length) {
|
|
29
28
|
if (length > 21 || length <= 0) {
|
|
30
|
-
throw new
|
|
29
|
+
throw new Error("Length must be between 1 and 21.");
|
|
31
30
|
}
|
|
32
31
|
return parseInt(await this.string(length, RandomCharacterRange.Digit));
|
|
33
32
|
}
|
|
@@ -50,12 +49,12 @@ class Random {
|
|
|
50
49
|
}
|
|
51
50
|
static async intBetween(min, max) {
|
|
52
51
|
if (max <= min) {
|
|
53
|
-
throw new
|
|
52
|
+
throw new Error("Max must be larger than min.");
|
|
54
53
|
}
|
|
55
54
|
const diff = max - min + 1;
|
|
56
55
|
const bitLength = Math.abs(Math.ceil(Math.log2(diff)));
|
|
57
56
|
if (bitLength > 32) {
|
|
58
|
-
throw new
|
|
57
|
+
throw new Error("The range between the numbers is too big, 32 bit is the maximum -> 4294967296");
|
|
59
58
|
}
|
|
60
59
|
const byteLength = Math.ceil(bitLength / 8);
|
|
61
60
|
const bitMask = Math.pow(2, bitLength) - 1;
|
|
@@ -74,7 +73,7 @@ class Random {
|
|
|
74
73
|
}
|
|
75
74
|
static async intRandomLength(minLength, maxLength) {
|
|
76
75
|
if (maxLength > 21) {
|
|
77
|
-
throw new
|
|
76
|
+
throw new Error("Max must be below 22.");
|
|
78
77
|
}
|
|
79
78
|
return parseInt(await this.stringRandomLength(minLength, maxLength, RandomCharacterRange.Digit));
|
|
80
79
|
}
|
|
@@ -93,7 +92,7 @@ class Random {
|
|
|
93
92
|
if (length <= 0)
|
|
94
93
|
return "";
|
|
95
94
|
if (allowedChars.length > 256) {
|
|
96
|
-
throw new
|
|
95
|
+
throw new Error("Input exceeds maximum length of 256.");
|
|
97
96
|
}
|
|
98
97
|
const ar = [];
|
|
99
98
|
const inputLength = allowedChars.length;
|
|
@@ -116,10 +115,10 @@ class Random {
|
|
|
116
115
|
}
|
|
117
116
|
static async stringRandomLength(minLength, maxLength, allowedChars) {
|
|
118
117
|
if (minLength > maxLength) {
|
|
119
|
-
throw new
|
|
118
|
+
throw new Error("maxLength must be larger than minLength.");
|
|
120
119
|
}
|
|
121
120
|
if (minLength < 0) {
|
|
122
|
-
throw new
|
|
121
|
+
throw new Error("minlength must not be less than zero.");
|
|
123
122
|
}
|
|
124
123
|
const length = maxLength > minLength ? await this.intBetween(minLength, maxLength) : maxLength;
|
|
125
124
|
return await this.string(length, allowedChars);
|
package/dist/util/Random.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Random.js","sourceRoot":"","sources":["../../src/util/Random.ts"],"names":[],"mappings":";;;AAAA,0CAA0D;AAC1D,+BAAoC;
|
|
1
|
+
{"version":3,"file":"Random.js","sourceRoot":"","sources":["../../src/util/Random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ACtE,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,SAAiB,EAAE,SAAiB,EAAE,YAAgC;QACzG,IAAI,SAAS,GAAG,SAAS,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC7D,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/F,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACnD,CAAC;CACJ;AAjHD,wBAiHC"}
|
package/package.json
CHANGED
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"test:performance:kube:stop": "kubectl delete -f ./test/performance/k8s.yaml"
|
|
36
36
|
},
|
|
37
37
|
"jest": {
|
|
38
|
-
"
|
|
39
|
-
|
|
38
|
+
"collectCoverageFrom": [
|
|
39
|
+
"./src/**"
|
|
40
|
+
],
|
|
40
41
|
"coverageProvider": "v8",
|
|
41
42
|
"coverageReporters": [
|
|
42
43
|
"text-summary",
|
|
43
44
|
"cobertura",
|
|
44
45
|
"lcov"
|
|
45
46
|
],
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
],
|
|
47
|
+
"maxWorkers": 5,
|
|
48
|
+
"preset": "ts-jest",
|
|
49
49
|
"setupFilesAfterEnv": [
|
|
50
50
|
"./test/customMatchers.ts",
|
|
51
51
|
"jest-expect-message"
|
|
@@ -70,7 +70,9 @@
|
|
|
70
70
|
"@js-soft/logging-abstractions": "^1.0.1",
|
|
71
71
|
"@js-soft/simple-logger": "1.0.5",
|
|
72
72
|
"@js-soft/ts-utils": "^2.3.3",
|
|
73
|
-
"
|
|
73
|
+
"@nmshd/core-types": "5.3.0",
|
|
74
|
+
"@nmshd/crypto": "2.0.6",
|
|
75
|
+
"axios": "^1.7.5",
|
|
74
76
|
"fast-json-patch": "^3.1.1",
|
|
75
77
|
"form-data": "^4.0.0",
|
|
76
78
|
"https-proxy-agent": "^7.0.5",
|
|
@@ -87,8 +89,6 @@
|
|
|
87
89
|
"@js-soft/docdb-access-mongo": "1.1.8",
|
|
88
90
|
"@js-soft/node-logger": "1.2.0",
|
|
89
91
|
"@js-soft/ts-serval": "2.0.10",
|
|
90
|
-
"@js-soft/web-logger": "^1.0.4",
|
|
91
|
-
"@nmshd/crypto": "2.0.6",
|
|
92
92
|
"@types/json-stringify-safe": "^5.0.3",
|
|
93
93
|
"@types/lodash": "^4.17.7",
|
|
94
94
|
"@types/luxon": "^3.4.2",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"access": "public",
|
|
102
102
|
"provenance": true
|
|
103
103
|
},
|
|
104
|
-
"version": "5.
|
|
104
|
+
"version": "5.3.0"
|
|
105
105
|
}
|
package/dist/core/CoreError.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ILogger } from "@js-soft/logging-abstractions";
|
|
2
|
-
export declare class CoreError extends Error {
|
|
3
|
-
private readonly _code;
|
|
4
|
-
get code(): string;
|
|
5
|
-
private readonly _reason;
|
|
6
|
-
get reason(): string;
|
|
7
|
-
private readonly _data;
|
|
8
|
-
get data(): string;
|
|
9
|
-
private readonly _time;
|
|
10
|
-
get time(): Date;
|
|
11
|
-
private readonly _rootError?;
|
|
12
|
-
get rootError(): Error | undefined;
|
|
13
|
-
private readonly _context?;
|
|
14
|
-
get context(): Function | undefined;
|
|
15
|
-
constructor(code?: string, reason?: string, data?: any, time?: Date, rootError?: Error, context?: Function);
|
|
16
|
-
equals(error: CoreError): boolean;
|
|
17
|
-
logWith(logger: ILogger): this;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=CoreError.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreError.d.ts","sourceRoot":"","sources":["../../src/core/CoreError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAGxD,qBAAa,SAAU,SAAQ,KAAK;IAChC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,IAAW,IAAI,IAAI,MAAM,CAExB;IAGD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAO;IAC7B,IAAW,IAAI,IAAI,IAAI,CAEtB;IAED,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAQ;IACpC,IAAW,SAAS,IAAI,KAAK,GAAG,SAAS,CAExC;IAED,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAW;IACrC,IAAW,OAAO,IAAI,QAAQ,GAAG,SAAS,CAEzC;gBAEkB,IAAI,SAAkB,EAAE,MAAM,SAAmC,EAAE,IAAI,GAAE,GAAU,EAAE,IAAI,GAAE,IAAiB,EAAE,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,QAAQ;IA8B/J,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAIjC,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;CAIxC"}
|
package/dist/core/CoreError.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CoreError = void 0;
|
|
7
|
-
const json_stringify_safe_1 = __importDefault(require("json-stringify-safe"));
|
|
8
|
-
class CoreError extends Error {
|
|
9
|
-
get code() {
|
|
10
|
-
return this._code;
|
|
11
|
-
}
|
|
12
|
-
get reason() {
|
|
13
|
-
return this._reason;
|
|
14
|
-
}
|
|
15
|
-
get data() {
|
|
16
|
-
return this._data;
|
|
17
|
-
}
|
|
18
|
-
get time() {
|
|
19
|
-
return this._time;
|
|
20
|
-
}
|
|
21
|
-
get rootError() {
|
|
22
|
-
return this._rootError;
|
|
23
|
-
}
|
|
24
|
-
get context() {
|
|
25
|
-
return this._context;
|
|
26
|
-
}
|
|
27
|
-
constructor(code = "error.unknown", reason = "Operation failed unexpectedly.", data = null, time = new Date(), rootError, context) {
|
|
28
|
-
const message = [];
|
|
29
|
-
message.push(code);
|
|
30
|
-
if (reason) {
|
|
31
|
-
message.push(": '", reason, "'");
|
|
32
|
-
}
|
|
33
|
-
message.push(" at ", time.toISOString());
|
|
34
|
-
if (data) {
|
|
35
|
-
if (typeof data["toJSON"] === "function") {
|
|
36
|
-
message.push(` with data ${data.toJSON(false)}`);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
message.push(` with data ${(0, json_stringify_safe_1.default)(data)}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
super(message.join(""));
|
|
43
|
-
this._code = code;
|
|
44
|
-
this._reason = reason;
|
|
45
|
-
this._time = time;
|
|
46
|
-
this._data = data;
|
|
47
|
-
this.name = "CoreError";
|
|
48
|
-
this._rootError = rootError;
|
|
49
|
-
this._context = context;
|
|
50
|
-
if (typeof Error.captureStackTrace !== "undefined") {
|
|
51
|
-
Error.captureStackTrace(this, context ?? CoreError);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
equals(error) {
|
|
55
|
-
return this.code === error.code;
|
|
56
|
-
}
|
|
57
|
-
logWith(logger) {
|
|
58
|
-
logger.error(this);
|
|
59
|
-
return this;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.CoreError = CoreError;
|
|
63
|
-
//# sourceMappingURL=CoreError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreError.js","sourceRoot":"","sources":["../../src/core/CoreError.ts"],"names":[],"mappings":";;;;;;AACA,8EAA4C;AAE5C,MAAa,SAAU,SAAQ,KAAK;IAEhC,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAGD,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAGD,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAID,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAGD,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAGD,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,YAAmB,IAAI,GAAG,eAAe,EAAE,MAAM,GAAG,gCAAgC,EAAE,OAAY,IAAI,EAAE,OAAa,IAAI,IAAI,EAAE,EAAE,SAAiB,EAAE,OAAkB;QAClK,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,IAAI,MAAM,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACrC,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAEzC,IAAI,IAAI,EAAE,CAAC;YACP,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,UAAU,EAAE,CAAC;gBACvC,OAAO,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACrD,CAA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BAAyB;CAGnC;AAED,qBAAa,UAAU;IACnB,gBAAuB,aAAa,gBAAuB;IAC3D,gBAAuB,OAAO,UAAiB;IAC/C,gBAAuB,QAAQ,WAAkB;IACjD,gBAAuB,OAAO,UAAiB;IAC/C,gBAAuB,MAAM,SAAgB;IAC7C,gBAAuB,KAAK,QAAe;IAC3C,gBAAuB,UAAU,aAAoB;IACrD,gBAAuB,UAAU,aAAoB;IACrD,gBAAuB,MAAM,SAAgB;CAChD"}
|
package/dist/core/CoreErrors.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CoreErrors = void 0;
|
|
7
|
-
const json_stringify_safe_1 = __importDefault(require("json-stringify-safe"));
|
|
8
|
-
const CoreError_1 = require("./CoreError");
|
|
9
|
-
class Relationships {
|
|
10
|
-
operationOnlyAllowedForPeer(message) {
|
|
11
|
-
return new CoreError_1.CoreError("error.transport.relationships.operationOnlyAllowedForPeer", message);
|
|
12
|
-
}
|
|
13
|
-
wrongRelationshipStatus(relationshipId, status) {
|
|
14
|
-
return new CoreError_1.CoreError("error.transport.relationships.wrongRelationshipStatus", `The Relationship '${relationshipId}' has the wrong status '${status}' to run this operation.`);
|
|
15
|
-
}
|
|
16
|
-
relationshipCurrentlyExists(status) {
|
|
17
|
-
return new CoreError_1.CoreError("error.transport.relationships.relationshipCurrentlyExists", `No new Relationship to the peer can be created as a Relationship in status '${status}' currently exists.`);
|
|
18
|
-
}
|
|
19
|
-
relationshipNotYetDecomposedByPeer() {
|
|
20
|
-
return new CoreError_1.CoreError("error.transport.relationships.relationshipNotYetDecomposedByPeer", "No new Relationship can be created as the former Relationship is not yet decomposed by the peer.");
|
|
21
|
-
}
|
|
22
|
-
reactivationNotRequested(relationshipId) {
|
|
23
|
-
return new CoreError_1.CoreError("error.transport.relationships.reactivationNotRequested", `The Relationship '${relationshipId}' has no reactivation Request to respond to.`);
|
|
24
|
-
}
|
|
25
|
-
reactivationAlreadyRequested(message) {
|
|
26
|
-
return new CoreError_1.CoreError("error.transport.relationships.reactivationAlreadyRequested", message);
|
|
27
|
-
}
|
|
28
|
-
activeIdentityDeletionProcessOfOwnerOfRelationshipTemplate() {
|
|
29
|
-
return new CoreError_1.CoreError("error.transport.relationships.activeIdentityDeletionProcessOfOwnerOfRelationshipTemplate", "The Identity who created the RelationshipTemplate is currently in the process of deleting itself. Thus, it is not possible to establish a Relationship to it.");
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
class Device {
|
|
33
|
-
alreadyOnboarded() {
|
|
34
|
-
return new CoreError_1.CoreError("error.transport.devices.alreadyOnboarded", "The device has already been onboarded.");
|
|
35
|
-
}
|
|
36
|
-
couldNotDeleteDevice(reason, rootCause) {
|
|
37
|
-
return new CoreError_1.CoreError("error.transport.devices.couldNotDeleteDevice", `Could not delete device: '${reason}'`, rootCause);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
class Messages {
|
|
41
|
-
plaintextMismatch(ownAddress) {
|
|
42
|
-
return new CoreError_1.CoreError("error.transport.messages.plaintextMismatch", `The own address '${ownAddress}' was not named as a recipient within the signed MessagePlaintext. A replay attack might be the cause of this.`);
|
|
43
|
-
}
|
|
44
|
-
signatureListMismatch(address) {
|
|
45
|
-
return new CoreError_1.CoreError("error.transport.messages.signatureListMismatch", `The signature list didn't contain an entry for address '${address}'.`);
|
|
46
|
-
}
|
|
47
|
-
signatureNotValid() {
|
|
48
|
-
return new CoreError_1.CoreError("error.transport.messages.signatureNotValid", "The digital signature on this Message for peer key is invalid. An impersonation attack might be the cause of this.");
|
|
49
|
-
}
|
|
50
|
-
ownAddressNotInList(messageId) {
|
|
51
|
-
return new CoreError_1.CoreError("error.transport.messages.ownAddressNotInList", `The recipients list of Message ${messageId} didn't contain an entry for the own address. This Message should not have been received.`);
|
|
52
|
-
}
|
|
53
|
-
missingOrInactiveRelationship(address) {
|
|
54
|
-
return new CoreError_1.CoreError("error.transport.messages.missingOrInactiveRelationship", `An active Relationship with the given address '${address}' does not exist.`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
class Secrets {
|
|
58
|
-
wrongSecretType(secretId) {
|
|
59
|
-
return new CoreError_1.CoreError("error.transport.secrets.wrongSecretType", "The given secret type is not supported!", {
|
|
60
|
-
secretId: secretId
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
secretNotFound(type) {
|
|
64
|
-
return new CoreError_1.CoreError("error.transport.secrets.secretNotFound", `Secret '${type}' not found.`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
class Challenges {
|
|
68
|
-
challengeTypeRequiresActiveRelationship() {
|
|
69
|
-
return new CoreError_1.CoreError("error.transport.challenges.challengeTypeRequiresActiveRelationship", "The challenge type Relationship requires an active Relationship.");
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
class Datawallet {
|
|
73
|
-
unsupportedModification(type, data) {
|
|
74
|
-
const errorCode = "error.transport.datawallet.unsupportedModification";
|
|
75
|
-
const formattedData = data ? (0, json_stringify_safe_1.default)(data) : "";
|
|
76
|
-
switch (type) {
|
|
77
|
-
case "unsupportedCacheChangedModificationCollection":
|
|
78
|
-
return new CoreError_1.CoreError(errorCode, `The following collections were received in CacheChanged datawallet modifications but are not supported by the current version of this library: '${formattedData}'.`);
|
|
79
|
-
default:
|
|
80
|
-
throw new Error(`Given type '${type}' is not supported.`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
insufficientSupportedDatawalletVersion(supportedVersion, requiredVersion) {
|
|
84
|
-
return new CoreError_1.CoreError("error.transport.datawallet.insufficientSupportedDatawalletVersion", `The SupportedDatawalletVersion '${supportedVersion}' is too low. A minimum version of '${requiredVersion}' is required.`);
|
|
85
|
-
}
|
|
86
|
-
currentBiggerThanTarget(current, target) {
|
|
87
|
-
return new CoreError_1.CoreError("error.transport.datawallet.currentBiggerThanTarget", `The current datawallet version '${current}' is bigger than the target version '${target}'.`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
class Files {
|
|
91
|
-
plaintextHashMismatch() {
|
|
92
|
-
return new CoreError_1.CoreError("error.transport.files.plaintextHashMismatch", "The actual hash of the plaintext does not match the given plaintextHash. Something went wrong while encrypting/decrypting the file.");
|
|
93
|
-
}
|
|
94
|
-
cipherMismatch() {
|
|
95
|
-
return new CoreError_1.CoreError("error.transport.files.cipherMismatch", "The actual hash of the cipher does not match the given cipherHash. Something went wrong while storing/transmitting the file.");
|
|
96
|
-
}
|
|
97
|
-
invalidMetadata(id) {
|
|
98
|
-
return new CoreError_1.CoreError("error.transport.files.invalidMetadata", `The metadata of the File with id '${id}' is invalid.`);
|
|
99
|
-
}
|
|
100
|
-
maxFileSizeExceeded(fileSize, platformMaxFileSize) {
|
|
101
|
-
return new CoreError_1.CoreError("error.transport.files.maxFileSizeExceeded", `The given File content size (${fileSize}) exceeds the max File size the Backbone accepts (${platformMaxFileSize}).`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
class Tokens {
|
|
105
|
-
invalidTokenContent(id) {
|
|
106
|
-
return new CoreError_1.CoreError("error.transport.tokens.invalidTokenContent", `The content of Token '${id}' is not of type TokenContent.`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
class General {
|
|
110
|
-
baseUrlNotSet() {
|
|
111
|
-
return new CoreError_1.CoreError("error.transport.general.baseUrlNotSet", "The baseUrl was not set.");
|
|
112
|
-
}
|
|
113
|
-
platformClientSecretNotSet() {
|
|
114
|
-
return new CoreError_1.CoreError("error.transport.general.platformClientSecretNotSet", "The platform clientSecret was not set.");
|
|
115
|
-
}
|
|
116
|
-
platformClientIdNotSet() {
|
|
117
|
-
return new CoreError_1.CoreError("error.transport.general.platformClientIdNotSet", "The platform clientId was not set.");
|
|
118
|
-
}
|
|
119
|
-
platformClientInvalid() {
|
|
120
|
-
return new CoreError_1.CoreError("error.transport.general.platformClientInvalid", "The combination of platform clientId and clientSecret is invalid.");
|
|
121
|
-
}
|
|
122
|
-
signatureNotValid(type) {
|
|
123
|
-
return new CoreError_1.CoreError("error.transport.signatureNotValid", `The ${type ? `${type}-` : ""}signature is not valid.`);
|
|
124
|
-
}
|
|
125
|
-
recordNotFound(entityName, entityId) {
|
|
126
|
-
return new CoreError_1.CoreError("error.transport.recordNotFound", `'${entityName instanceof Function ? entityName.name : entityName}' not found.`, entityId);
|
|
127
|
-
}
|
|
128
|
-
notSupported() {
|
|
129
|
-
return new CoreError_1.CoreError("error.transport.notSupported", "The method is not yet supported.");
|
|
130
|
-
}
|
|
131
|
-
invalidTruncatedReference() {
|
|
132
|
-
return new CoreError_1.CoreError("error.transport.files.invalidTruncatedReference", "invalid truncated reference");
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
class CoreErrors {
|
|
136
|
-
static { this.relationships = new Relationships(); }
|
|
137
|
-
static { this.general = new General(); }
|
|
138
|
-
static { this.messages = new Messages(); }
|
|
139
|
-
static { this.secrets = new Secrets(); }
|
|
140
|
-
static { this.device = new Device(); }
|
|
141
|
-
static { this.files = new Files(); }
|
|
142
|
-
static { this.challenges = new Challenges(); }
|
|
143
|
-
static { this.datawallet = new Datawallet(); }
|
|
144
|
-
static { this.tokens = new Tokens(); }
|
|
145
|
-
}
|
|
146
|
-
exports.CoreErrors = CoreErrors;
|
|
147
|
-
//# sourceMappingURL=CoreErrors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreErrors.js","sourceRoot":"","sources":["../../src/core/CoreErrors.ts"],"names":[],"mappings":";;;;;;AAAA,8EAA4C;AAE5C,2CAAwC;AAExC,MAAM,aAAa;IACR,2BAA2B,CAAC,OAAe;QAC9C,OAAO,IAAI,qBAAS,CAAC,2DAA2D,EAAE,OAAO,CAAC,CAAC;IAC/F,CAAC;IAEM,u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S,CAAC,mCAAmC,EAAE,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,yBAAyB,CAAC,CAAC;IACtH,CAAC;IAEM,cAAc,CAAC,UAA6B,EAAE,QAAgB;QACjE,OAAO,IAAI,qBAAS,CAAC,gCAAgC,EAAE,IAAI,UAAU,YAAY,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,cAAc,EAAE,QAAQ,CAAC,CAAC;IACtJ,CAAC;IAEM,YAAY;QACf,OAAO,IAAI,qBAAS,CAAC,8BAA8B,EAAE,kCAAkC,CAAC,CAAC;IAC7F,CAAC;IAEM,yBAAyB;QAC5B,OAAO,IAAI,qBAAS,CAAC,iDAAiD,EAAE,6BAA6B,CAAC,CAAC;IAC3G,CAAC;CACJ;AAED,MAAa,UAAU;aACI,kBAAa,GAAG,IAAI,aAAa,EAAE,CAAC;aACpC,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,aAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;aAC1B,YAAO,GAAG,IAAI,OAAO,EAAE,CAAC;aACxB,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;aACtB,UAAK,GAAG,IAAI,KAAK,EAAE,CAAC;aACpB,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;aAC9B,eAAU,GAAG,IAAI,UAAU,EAAE,CAAC;aAC9B,WAAM,GAAG,IAAI,MAAM,EAAE,CAAC;;AATjD,gCAUC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
-
export interface ICoreSerializable extends ISerializable {
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* CoreSerializable is the local pendant of the Serializable class which
|
|
6
|
-
* automatically validates, serializes, deserializes and validates again.
|
|
7
|
-
*
|
|
8
|
-
* With the synchronous class, the deserialize methods (from and deserialize)
|
|
9
|
-
* are called synchronous. Please be aware, that CoreSerializable classes should
|
|
10
|
-
* have no CoreSerializableAsync properties.
|
|
11
|
-
*/
|
|
12
|
-
export declare class CoreSerializable extends Serializable implements ISerializable {
|
|
13
|
-
toBase64(): string;
|
|
14
|
-
static fromBase64T<T>(value: string): T;
|
|
15
|
-
static fromBase64Unknown(value: string): Serializable;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=CoreSerializable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreSerializable.d.ts","sourceRoot":"","sources":["../../src/core/CoreSerializable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAQ,MAAM,oBAAoB,CAAC;AAGvE,MAAM,WAAW,iBAAkB,SAAQ,aAAa;CAAG;AAE3D;;;;;;;GAOG;AAEH,qBACa,gBAAiB,SAAQ,YAAa,YAAW,aAAa;IAChE,QAAQ,IAAI,MAAM;WAIX,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;WAKhC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;CAI/D"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CoreSerializable = void 0;
|
|
10
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
11
|
-
const crypto_1 = require("@nmshd/crypto");
|
|
12
|
-
/**
|
|
13
|
-
* CoreSerializable is the local pendant of the Serializable class which
|
|
14
|
-
* automatically validates, serializes, deserializes and validates again.
|
|
15
|
-
*
|
|
16
|
-
* With the synchronous class, the deserialize methods (from and deserialize)
|
|
17
|
-
* are called synchronous. Please be aware, that CoreSerializable classes should
|
|
18
|
-
* have no CoreSerializableAsync properties.
|
|
19
|
-
*/
|
|
20
|
-
let CoreSerializable = class CoreSerializable extends ts_serval_1.Serializable {
|
|
21
|
-
toBase64() {
|
|
22
|
-
return crypto_1.CoreBuffer.fromUtf8(this.serialize()).toBase64URL();
|
|
23
|
-
}
|
|
24
|
-
static fromBase64T(value) {
|
|
25
|
-
const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
|
|
26
|
-
return this.deserialize(serialized);
|
|
27
|
-
}
|
|
28
|
-
static fromBase64Unknown(value) {
|
|
29
|
-
const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
|
|
30
|
-
return ts_serval_1.Serializable.deserializeUnknown(serialized);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.CoreSerializable = CoreSerializable;
|
|
34
|
-
exports.CoreSerializable = CoreSerializable = __decorate([
|
|
35
|
-
(0, ts_serval_1.type)("CoreSerializable")
|
|
36
|
-
], CoreSerializable);
|
|
37
|
-
//# sourceMappingURL=CoreSerializable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreSerializable.js","sourceRoot":"","sources":["../../src/core/CoreSerializable.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kDAAuE;AACvE,0CAA2C;AAI3C;;;;;;;GAOG;AAGI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,wBAAY;IACvC,QAAQ;QACX,OAAO,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,WAAW,CAAI,KAAa;QACtC,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAQ,IAAY,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;IAEM,MAAM,CAAC,iBAAiB,CAAC,KAAa;QACzC,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,wBAAY,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC;CACJ,CAAA;AAdY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,gBAAI,EAAC,kBAAkB,CAAC;GACZ,gBAAgB,CAc5B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ISerializableAsync, SerializableAsync } from "@js-soft/ts-serval";
|
|
2
|
-
export interface ICoreSerializableAsync extends ISerializableAsync {
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* CoreSerializableAsync is the local pendant of the SerializableAsync class which
|
|
6
|
-
* automatically validates, serializes, deserializes and validates again.
|
|
7
|
-
*
|
|
8
|
-
* With the asynchronous class, the deserialize methods (from and deserialize)
|
|
9
|
-
* are called asynchronous (returning a Promise). You should only use CoreSerializableAsync
|
|
10
|
-
* classes if properties with CoreSerializableAsync types are used.
|
|
11
|
-
*/
|
|
12
|
-
export declare class CoreSerializableAsync extends SerializableAsync implements ISerializableAsync {
|
|
13
|
-
toBase64(): string;
|
|
14
|
-
static fromBase64T<T>(value: string): Promise<T>;
|
|
15
|
-
static fromBase64Unknown(value: string): Promise<SerializableAsync>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=CoreSerializableAsync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreSerializableAsync.d.ts","sourceRoot":"","sources":["../../src/core/CoreSerializableAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAQ,MAAM,oBAAoB,CAAC;AAGjF,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;CAAG;AAErE;;;;;;;GAOG;AACH,qBACa,qBAAsB,SAAQ,iBAAkB,YAAW,kBAAkB;IAC/E,QAAQ,IAAI,MAAM;WAIL,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;WAMzC,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAInF"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CoreSerializableAsync = void 0;
|
|
10
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
11
|
-
const crypto_1 = require("@nmshd/crypto");
|
|
12
|
-
/**
|
|
13
|
-
* CoreSerializableAsync is the local pendant of the SerializableAsync class which
|
|
14
|
-
* automatically validates, serializes, deserializes and validates again.
|
|
15
|
-
*
|
|
16
|
-
* With the asynchronous class, the deserialize methods (from and deserialize)
|
|
17
|
-
* are called asynchronous (returning a Promise). You should only use CoreSerializableAsync
|
|
18
|
-
* classes if properties with CoreSerializableAsync types are used.
|
|
19
|
-
*/
|
|
20
|
-
let CoreSerializableAsync = class CoreSerializableAsync extends ts_serval_1.SerializableAsync {
|
|
21
|
-
toBase64() {
|
|
22
|
-
return crypto_1.CoreBuffer.fromUtf8(this.serialize()).toBase64URL();
|
|
23
|
-
}
|
|
24
|
-
static async fromBase64T(value) {
|
|
25
|
-
const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
|
|
26
|
-
const deserializePromise = this.deserialize(serialized);
|
|
27
|
-
return await deserializePromise;
|
|
28
|
-
}
|
|
29
|
-
static async fromBase64Unknown(value) {
|
|
30
|
-
const serialized = crypto_1.CoreBuffer.fromBase64URL(value).toUtf8();
|
|
31
|
-
return await ts_serval_1.SerializableAsync.deserializeUnknown(serialized);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
exports.CoreSerializableAsync = CoreSerializableAsync;
|
|
35
|
-
exports.CoreSerializableAsync = CoreSerializableAsync = __decorate([
|
|
36
|
-
(0, ts_serval_1.type)("CoreSerializableAsync")
|
|
37
|
-
], CoreSerializableAsync);
|
|
38
|
-
//# sourceMappingURL=CoreSerializableAsync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CoreSerializableAsync.js","sourceRoot":"","sources":["../../src/core/CoreSerializableAsync.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kDAAiF;AACjF,0CAA2C;AAI3C;;;;;;;GAOG;AAEI,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,6BAAiB;IACjD,QAAQ;QACX,OAAO,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAI,KAAa;QAC5C,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,MAAM,kBAAkB,GAAI,IAAY,CAAC,WAAW,CAAC,UAAU,CAAe,CAAC;QAC/E,OAAO,MAAM,kBAAkB,CAAC;IACpC,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAa;QAC/C,MAAM,UAAU,GAAG,mBAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5D,OAAO,MAAM,6BAAiB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AAfY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,gBAAI,EAAC,uBAAuB,CAAC;GACjB,qBAAqB,CAejC"}
|