@nmshd/transport 1.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 +1 -0
- package/README.md +18 -0
- package/dist/TransportBuildInformation.d.ts +13 -0
- package/dist/TransportBuildInformation.js +25 -0
- package/dist/TransportBuildInformation.js.map +1 -0
- package/dist/core/CoreCrypto.d.ts +108 -0
- package/dist/core/CoreCrypto.js +205 -0
- package/dist/core/CoreCrypto.js.map +1 -0
- package/dist/core/CoreError.d.ts +18 -0
- package/dist/core/CoreError.js +63 -0
- package/dist/core/CoreError.js.map +1 -0
- package/dist/core/CoreIdHelper.d.ts +9 -0
- package/dist/core/CoreIdHelper.js +23 -0
- package/dist/core/CoreIdHelper.js.map +1 -0
- package/dist/core/CoreIds.d.ts +9 -0
- package/dist/core/CoreIds.js +14 -0
- package/dist/core/CoreIds.js.map +1 -0
- package/dist/core/CoreSerializable.d.ts +18 -0
- package/dist/core/CoreSerializable.js +44 -0
- package/dist/core/CoreSerializable.js.map +1 -0
- package/dist/core/CoreSerializableAsync.d.ts +18 -0
- package/dist/core/CoreSerializableAsync.js +44 -0
- package/dist/core/CoreSerializableAsync.js.map +1 -0
- package/dist/core/CoreSynchronizable.d.ts +11 -0
- package/dist/core/CoreSynchronizable.js +30 -0
- package/dist/core/CoreSynchronizable.js.map +1 -0
- package/dist/core/CoreUtil.d.ts +6 -0
- package/dist/core/CoreUtil.js +38 -0
- package/dist/core/CoreUtil.js.map +1 -0
- package/dist/core/DbCollectionNames.d.ts +11 -0
- package/dist/core/DbCollectionNames.js +16 -0
- package/dist/core/DbCollectionNames.js.map +1 -0
- package/dist/core/ICacheable.d.ts +4 -0
- package/dist/core/ICacheable.js +14 -0
- package/dist/core/ICacheable.js.map +1 -0
- package/dist/core/Transport.d.ts +47 -0
- package/dist/core/Transport.js +71 -0
- package/dist/core/Transport.js.map +1 -0
- package/dist/core/TransportContext.d.ts +8 -0
- package/dist/core/TransportContext.js +29 -0
- package/dist/core/TransportContext.js.map +1 -0
- package/dist/core/TransportController.d.ts +51 -0
- package/dist/core/TransportController.js +99 -0
- package/dist/core/TransportController.js.map +1 -0
- package/dist/core/TransportErrors.d.ts +125 -0
- package/dist/core/TransportErrors.js +255 -0
- package/dist/core/TransportErrors.js.map +1 -0
- package/dist/core/TransportLoggerFactory.d.ts +7 -0
- package/dist/core/TransportLoggerFactory.js +23 -0
- package/dist/core/TransportLoggerFactory.js.map +1 -0
- package/dist/core/backbone/AuthClient.d.ts +17 -0
- package/dist/core/backbone/AuthClient.js +47 -0
- package/dist/core/backbone/AuthClient.js.map +1 -0
- package/dist/core/backbone/Authenticator.d.ts +16 -0
- package/dist/core/backbone/Authenticator.js +62 -0
- package/dist/core/backbone/Authenticator.js.map +1 -0
- package/dist/core/backbone/BackboneIds.d.ts +11 -0
- package/dist/core/backbone/BackboneIds.js +16 -0
- package/dist/core/backbone/BackboneIds.js.map +1 -0
- package/dist/core/backbone/ClientResult.d.ts +19 -0
- package/dist/core/backbone/ClientResult.js +58 -0
- package/dist/core/backbone/ClientResult.js.map +1 -0
- package/dist/core/backbone/Paginator.d.ts +17 -0
- package/dist/core/backbone/Paginator.js +44 -0
- package/dist/core/backbone/Paginator.js.map +1 -0
- package/dist/core/backbone/PlatformError.d.ts +9 -0
- package/dist/core/backbone/PlatformError.js +3 -0
- package/dist/core/backbone/PlatformError.js.map +1 -0
- package/dist/core/backbone/PlatformParameters.d.ts +6 -0
- package/dist/core/backbone/PlatformParameters.js +3 -0
- package/dist/core/backbone/PlatformParameters.js.map +1 -0
- package/dist/core/backbone/PlatformResponse.d.ts +16 -0
- package/dist/core/backbone/PlatformResponse.js +3 -0
- package/dist/core/backbone/PlatformResponse.js.map +1 -0
- package/dist/core/backbone/RESTClient.d.ts +46 -0
- package/dist/core/backbone/RESTClient.js +425 -0
- package/dist/core/backbone/RESTClient.js.map +1 -0
- package/dist/core/backbone/RESTClientAuthenticate.d.ts +23 -0
- package/dist/core/backbone/RESTClientAuthenticate.js +72 -0
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -0
- package/dist/core/backbone/RequestError.d.ts +24 -0
- package/dist/core/backbone/RequestError.js +101 -0
- package/dist/core/backbone/RequestError.js.map +1 -0
- package/dist/core/backbone/index.d.ts +6 -0
- package/dist/core/backbone/index.js +19 -0
- package/dist/core/backbone/index.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.js +29 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logging/logExecutionTime.d.ts +26 -0
- package/dist/core/logging/logExecutionTime.js +58 -0
- package/dist/core/logging/logExecutionTime.js.map +1 -0
- package/dist/core/types/CoreAddress.d.ts +15 -0
- package/dist/core/types/CoreAddress.js +56 -0
- package/dist/core/types/CoreAddress.js.map +1 -0
- package/dist/core/types/CoreDate.d.ts +37 -0
- package/dist/core/types/CoreDate.js +156 -0
- package/dist/core/types/CoreDate.js.map +1 -0
- package/dist/core/types/CoreHash.d.ts +37 -0
- package/dist/core/types/CoreHash.js +75 -0
- package/dist/core/types/CoreHash.js.map +1 -0
- package/dist/core/types/CoreId.d.ts +16 -0
- package/dist/core/types/CoreId.js +57 -0
- package/dist/core/types/CoreId.js.map +1 -0
- package/dist/core/types/TransportVersion.d.ts +4 -0
- package/dist/core/types/TransportVersion.js +9 -0
- package/dist/core/types/TransportVersion.js.map +1 -0
- package/dist/core/types/index.d.ts +5 -0
- package/dist/core/types/index.js +18 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/accounts/AccountController.d.ts +77 -0
- package/dist/modules/accounts/AccountController.js +337 -0
- package/dist/modules/accounts/AccountController.js.map +1 -0
- package/dist/modules/accounts/IdentityController.d.ts +21 -0
- package/dist/modules/accounts/IdentityController.js +67 -0
- package/dist/modules/accounts/IdentityController.js.map +1 -0
- package/dist/modules/accounts/IdentityUtil.d.ts +6 -0
- package/dist/modules/accounts/IdentityUtil.js +56 -0
- package/dist/modules/accounts/IdentityUtil.js.map +1 -0
- package/dist/modules/accounts/backbone/IdentityClient.d.ts +23 -0
- package/dist/modules/accounts/backbone/IdentityClient.js +15 -0
- package/dist/modules/accounts/backbone/IdentityClient.js.map +1 -0
- package/dist/modules/accounts/data/Identity.d.ts +34 -0
- package/dist/modules/accounts/data/Identity.js +69 -0
- package/dist/modules/accounts/data/Identity.js.map +1 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.d.ts +16 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.js +47 -0
- package/dist/modules/accounts/data/IdentitySecretCredentials.js.map +1 -0
- package/dist/modules/certificates/CertificateController.d.ts +14 -0
- package/dist/modules/certificates/CertificateController.js +20 -0
- package/dist/modules/certificates/CertificateController.js.map +1 -0
- package/dist/modules/certificates/CertificateIssuer.d.ts +27 -0
- package/dist/modules/certificates/CertificateIssuer.js +42 -0
- package/dist/modules/certificates/CertificateIssuer.js.map +1 -0
- package/dist/modules/certificates/CertificateValidator.d.ts +14 -0
- package/dist/modules/certificates/CertificateValidator.js +20 -0
- package/dist/modules/certificates/CertificateValidator.js.map +1 -0
- package/dist/modules/certificates/data/Certificate.d.ts +34 -0
- package/dist/modules/certificates/data/Certificate.js +65 -0
- package/dist/modules/certificates/data/Certificate.js.map +1 -0
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +10 -0
- package/dist/modules/certificates/data/CertificateConstraint.js +28 -0
- package/dist/modules/certificates/data/CertificateConstraint.js.map +1 -0
- package/dist/modules/certificates/data/CertificateContent.d.ts +28 -0
- package/dist/modules/certificates/data/CertificateContent.js +70 -0
- package/dist/modules/certificates/data/CertificateContent.js.map +1 -0
- package/dist/modules/certificates/data/CertificateItem.d.ts +11 -0
- package/dist/modules/certificates/data/CertificateItem.js +29 -0
- package/dist/modules/certificates/data/CertificateItem.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +29 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +57 -0
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +31 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +60 -0
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +9 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +31 -0
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +1 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +16 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +41 -0
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +17 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +39 -0
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +18 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +46 -0
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +19 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +42 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +25 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +55 -0
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +14 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +39 -0
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +1 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +16 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.js +38 -0
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +1 -0
- package/dist/modules/challenges/ChallengeController.d.ts +16 -0
- package/dist/modules/challenges/ChallengeController.js +123 -0
- package/dist/modules/challenges/ChallengeController.js.map +1 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.d.ts +18 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.js +14 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.js.map +1 -0
- package/dist/modules/challenges/backbone/ChallengeClient.d.ts +6 -0
- package/dist/modules/challenges/backbone/ChallengeClient.js +11 -0
- package/dist/modules/challenges/backbone/ChallengeClient.js.map +1 -0
- package/dist/modules/challenges/data/Challenge.d.ts +22 -0
- package/dist/modules/challenges/data/Challenge.js +59 -0
- package/dist/modules/challenges/data/Challenge.js.map +1 -0
- package/dist/modules/challenges/data/ChallengeSigned.d.ts +18 -0
- package/dist/modules/challenges/data/ChallengeSigned.js +50 -0
- package/dist/modules/challenges/data/ChallengeSigned.js.map +1 -0
- package/dist/modules/devices/DeviceController.d.ts +27 -0
- package/dist/modules/devices/DeviceController.js +120 -0
- package/dist/modules/devices/DeviceController.js.map +1 -0
- package/dist/modules/devices/DeviceSecretController.d.ts +36 -0
- package/dist/modules/devices/DeviceSecretController.js +163 -0
- package/dist/modules/devices/DeviceSecretController.js.map +1 -0
- package/dist/modules/devices/DevicesController.d.ts +20 -0
- package/dist/modules/devices/DevicesController.js +96 -0
- package/dist/modules/devices/DevicesController.js.map +1 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.d.ts +11 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.js +3 -0
- package/dist/modules/devices/backbone/BackbonePostDevices.js.map +1 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.d.ts +18 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.js +21 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -0
- package/dist/modules/devices/backbone/DeviceClient.d.ts +7 -0
- package/dist/modules/devices/backbone/DeviceClient.js +15 -0
- package/dist/modules/devices/backbone/DeviceClient.js.map +1 -0
- package/dist/modules/devices/local/Device.d.ts +46 -0
- package/dist/modules/devices/local/Device.js +115 -0
- package/dist/modules/devices/local/Device.js.map +1 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.d.ts +12 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.js +40 -0
- package/dist/modules/devices/local/DeviceSecretCredentials.js.map +1 -0
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +13 -0
- package/dist/modules/devices/local/SendDeviceParameters.js +43 -0
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.d.ts +33 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.js +90 -0
- package/dist/modules/devices/transmission/DeviceSharedSecret.js.map +1 -0
- package/dist/modules/files/FileController.d.ts +25 -0
- package/dist/modules/files/FileController.js +196 -0
- package/dist/modules/files/FileController.js.map +1 -0
- package/dist/modules/files/backbone/BackboneGetFiles.d.ts +21 -0
- package/dist/modules/files/backbone/BackboneGetFiles.js +3 -0
- package/dist/modules/files/backbone/BackboneGetFiles.js.map +1 -0
- package/dist/modules/files/backbone/BackbonePostFiles.d.ts +25 -0
- package/dist/modules/files/backbone/BackbonePostFiles.js +3 -0
- package/dist/modules/files/backbone/BackbonePostFiles.js.map +1 -0
- package/dist/modules/files/backbone/FileClient.d.ts +12 -0
- package/dist/modules/files/backbone/FileClient.js +23 -0
- package/dist/modules/files/backbone/FileClient.js.map +1 -0
- package/dist/modules/files/local/CachedFile.d.ts +47 -0
- package/dist/modules/files/local/CachedFile.js +140 -0
- package/dist/modules/files/local/CachedFile.js.map +1 -0
- package/dist/modules/files/local/File.d.ts +27 -0
- package/dist/modules/files/local/File.js +88 -0
- package/dist/modules/files/local/File.js.map +1 -0
- package/dist/modules/files/local/SendFileParameters.d.ts +23 -0
- package/dist/modules/files/local/SendFileParameters.js +65 -0
- package/dist/modules/files/local/SendFileParameters.js.map +1 -0
- package/dist/modules/files/transmission/FileMetadata.d.ts +24 -0
- package/dist/modules/files/transmission/FileMetadata.js +69 -0
- package/dist/modules/files/transmission/FileMetadata.js.map +1 -0
- package/dist/modules/files/transmission/FileReference.d.ts +15 -0
- package/dist/modules/files/transmission/FileReference.js +66 -0
- package/dist/modules/files/transmission/FileReference.js.map +1 -0
- package/dist/modules/index.d.ts +110 -0
- package/dist/modules/index.js +123 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/messages/MessageController.d.ts +29 -0
- package/dist/modules/messages/MessageController.js +316 -0
- package/dist/modules/messages/MessageController.js.map +1 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.d.ts +25 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.js +3 -0
- package/dist/modules/messages/backbone/BackboneGetMessages.js.map +1 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.d.ts +16 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.js +3 -0
- package/dist/modules/messages/backbone/BackbonePostMessages.js.map +1 -0
- package/dist/modules/messages/backbone/MessageClient.d.ts +12 -0
- package/dist/modules/messages/backbone/MessageClient.js +23 -0
- package/dist/modules/messages/backbone/MessageClient.js.map +1 -0
- package/dist/modules/messages/local/CachedMessage.d.ts +23 -0
- package/dist/modules/messages/local/CachedMessage.js +67 -0
- package/dist/modules/messages/local/CachedMessage.js.map +1 -0
- package/dist/modules/messages/local/Message.d.ts +26 -0
- package/dist/modules/messages/local/Message.js +87 -0
- package/dist/modules/messages/local/Message.js.map +1 -0
- package/dist/modules/messages/local/SendMessageParameters.d.ts +15 -0
- package/dist/modules/messages/local/SendMessageParameters.js +44 -0
- package/dist/modules/messages/local/SendMessageParameters.js.map +1 -0
- package/dist/modules/messages/transmission/MessageEnvelope.d.ts +24 -0
- package/dist/modules/messages/transmission/MessageEnvelope.js +81 -0
- package/dist/modules/messages/transmission/MessageEnvelope.js.map +1 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.d.ts +16 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js +47 -0
- package/dist/modules/messages/transmission/MessageEnvelopeRecipient.js.map +1 -0
- package/dist/modules/messages/transmission/MessagePlain.d.ts +29 -0
- package/dist/modules/messages/transmission/MessagePlain.js +68 -0
- package/dist/modules/messages/transmission/MessagePlain.js.map +1 -0
- package/dist/modules/messages/transmission/MessageSignature.d.ts +11 -0
- package/dist/modules/messages/transmission/MessageSignature.js +36 -0
- package/dist/modules/messages/transmission/MessageSignature.js.map +1 -0
- package/dist/modules/messages/transmission/MessageSigned.d.ts +15 -0
- package/dist/modules/messages/transmission/MessageSigned.js +43 -0
- package/dist/modules/messages/transmission/MessageSigned.js.map +1 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +26 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +156 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.d.ts +17 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.js +3 -0
- package/dist/modules/relationshipTemplates/backbone/BackboneGetRelationshipTemplates.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.d.ts +9 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.js +3 -0
- package/dist/modules/relationshipTemplates/backbone/BackbonePostRelationshipTemplates.js.map +1 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.d.ts +11 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.js +20 -0
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +29 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +80 -0
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +26 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +85 -0
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.d.ts +14 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +44 -0
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.d.ts +16 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js +45 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateContent.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.d.ts +19 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js +61 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplatePublicKey.js.map +1 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.d.ts +12 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js +39 -0
- package/dist/modules/relationshipTemplates/transmission/RelationshipTemplateSigned.js.map +1 -0
- package/dist/modules/relationships/RelationshipSecretController.d.ts +31 -0
- package/dist/modules/relationships/RelationshipSecretController.js +161 -0
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -0
- package/dist/modules/relationships/RelationshipsController.d.ts +47 -0
- package/dist/modules/relationships/RelationshipsController.js +472 -0
- package/dist/modules/relationships/RelationshipsController.js.map +1 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.d.ts +18 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.js +3 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationships.js.map +1 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.d.ts +23 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.js +3 -0
- package/dist/modules/relationships/backbone/BackboneGetRelationshipsChanges.js.map +1 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.d.ts +8 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.js +3 -0
- package/dist/modules/relationships/backbone/BackbonePostRelationshipsChanges.js.map +1 -0
- package/dist/modules/relationships/backbone/RelationshipClient.d.ts +17 -0
- package/dist/modules/relationships/backbone/RelationshipClient.js +42 -0
- package/dist/modules/relationships/backbone/RelationshipClient.js.map +1 -0
- package/dist/modules/relationships/local/CachedRelationship.d.ts +18 -0
- package/dist/modules/relationships/local/CachedRelationship.js +53 -0
- package/dist/modules/relationships/local/CachedRelationship.js.map +1 -0
- package/dist/modules/relationships/local/Relationship.d.ts +37 -0
- package/dist/modules/relationships/local/Relationship.js +140 -0
- package/dist/modules/relationships/local/Relationship.js.map +1 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.d.ts +13 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.js +39 -0
- package/dist/modules/relationships/local/SendRelationshipParameters.js.map +1 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.d.ts +8 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.js +13 -0
- package/dist/modules/relationships/transmission/RelationshipStatus.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.d.ts +27 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js +72 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChange.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.d.ts +20 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js +53 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeRequest.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.d.ts +20 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js +53 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeResponse.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.d.ts +6 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.js +11 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeStatus.js.map +1 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.d.ts +5 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.js +10 -0
- package/dist/modules/relationships/transmission/changes/RelationshipChangeType.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.d.ts +13 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js +42 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestCipher.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.d.ts +15 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js +44 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestContent.js.map +1 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.d.ts +14 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js +44 -0
- package/dist/modules/relationships/transmission/requests/RelationshipCreationChangeRequestSigned.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.d.ts +13 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js +42 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseCipher.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.d.ts +12 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js +38 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseContent.js.map +1 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.d.ts +14 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js +44 -0
- package/dist/modules/relationships/transmission/responses/RelationshipCreationChangeResponseSigned.js.map +1 -0
- package/dist/modules/secrets/SecretController.d.ts +39 -0
- package/dist/modules/secrets/SecretController.js +168 -0
- package/dist/modules/secrets/SecretController.js.map +1 -0
- package/dist/modules/secrets/data/SecretContainerCipher.d.ts +25 -0
- package/dist/modules/secrets/data/SecretContainerCipher.js +87 -0
- package/dist/modules/secrets/data/SecretContainerCipher.js.map +1 -0
- package/dist/modules/secrets/data/SecretContainerPlain.d.ts +25 -0
- package/dist/modules/secrets/data/SecretContainerPlain.js +76 -0
- package/dist/modules/secrets/data/SecretContainerPlain.js.map +1 -0
- package/dist/modules/sync/ChangedItems.d.ts +9 -0
- package/dist/modules/sync/ChangedItems.js +17 -0
- package/dist/modules/sync/ChangedItems.js.map +1 -0
- package/dist/modules/sync/DatawalletModificationMapper.d.ts +7 -0
- package/dist/modules/sync/DatawalletModificationMapper.js +62 -0
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +21 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.js +111 -0
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -0
- package/dist/modules/sync/ExternalEventsProcessor.d.ts +19 -0
- package/dist/modules/sync/ExternalEventsProcessor.js +83 -0
- package/dist/modules/sync/ExternalEventsProcessor.js.map +1 -0
- package/dist/modules/sync/SyncController.d.ts +37 -0
- package/dist/modules/sync/SyncController.js +214 -0
- package/dist/modules/sync/SyncController.js.map +1 -0
- package/dist/modules/sync/SynchronizedCollection.d.ts +18 -0
- package/dist/modules/sync/SynchronizedCollection.js +163 -0
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -0
- package/dist/modules/sync/WhatToSync.d.ts +1 -0
- package/dist/modules/sync/WhatToSync.js +3 -0
- package/dist/modules/sync/WhatToSync.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.d.ts +11 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.js +3 -0
- package/dist/modules/sync/backbone/BackboneDatawalletModification.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.d.ts +8 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.js +3 -0
- package/dist/modules/sync/backbone/BackboneExternalEvent.js.map +1 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.d.ts +9 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.js +3 -0
- package/dist/modules/sync/backbone/BackboneSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.d.ts +19 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.js +3 -0
- package/dist/modules/sync/backbone/CreateDatawalletModifications.js.map +1 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts +23 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.js +3 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.d.ts +3 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.js +3 -0
- package/dist/modules/sync/backbone/GetDatawalletModifications.js.map +1 -0
- package/dist/modules/sync/backbone/StartSyncRun.d.ts +9 -0
- package/dist/modules/sync/backbone/StartSyncRun.js +9 -0
- package/dist/modules/sync/backbone/StartSyncRun.js.map +1 -0
- package/dist/modules/sync/backbone/SyncClient.d.ts +15 -0
- package/dist/modules/sync/backbone/SyncClient.js +23 -0
- package/dist/modules/sync/backbone/SyncClient.js.map +1 -0
- package/dist/modules/sync/local/DatawalletModification.d.ts +30 -0
- package/dist/modules/sync/local/DatawalletModification.js +71 -0
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -0
- package/dist/modules/tokens/AnonymousTokenController.d.ts +11 -0
- package/dist/modules/tokens/AnonymousTokenController.js +47 -0
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -0
- package/dist/modules/tokens/TokenController.d.ts +24 -0
- package/dist/modules/tokens/TokenController.js +137 -0
- package/dist/modules/tokens/TokenController.js.map +1 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.d.ts +6 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js +11 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js.map +1 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.d.ts +11 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.js +3 -0
- package/dist/modules/tokens/backbone/BackboneGetTokens.js.map +1 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.d.ts +9 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.js +3 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.js.map +1 -0
- package/dist/modules/tokens/backbone/TokenClient.d.ts +11 -0
- package/dist/modules/tokens/backbone/TokenClient.js +20 -0
- package/dist/modules/tokens/backbone/TokenClient.js.map +1 -0
- package/dist/modules/tokens/local/CachedToken.d.ts +18 -0
- package/dist/modules/tokens/local/CachedToken.js +53 -0
- package/dist/modules/tokens/local/CachedToken.js.map +1 -0
- package/dist/modules/tokens/local/SendTokenParameters.d.ts +14 -0
- package/dist/modules/tokens/local/SendTokenParameters.js +43 -0
- package/dist/modules/tokens/local/SendTokenParameters.js.map +1 -0
- package/dist/modules/tokens/local/Token.d.ts +28 -0
- package/dist/modules/tokens/local/Token.js +91 -0
- package/dist/modules/tokens/local/Token.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.d.ts +10 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js +34 -0
- package/dist/modules/tokens/transmission/TokenContentDeviceSharedSecret.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentFile.d.ts +12 -0
- package/dist/modules/tokens/transmission/TokenContentFile.js +39 -0
- package/dist/modules/tokens/transmission/TokenContentFile.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.d.ts +12 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js +39 -0
- package/dist/modules/tokens/transmission/TokenContentRelationshipTemplate.js.map +1 -0
- package/dist/modules/tokens/transmission/TokenReference.d.ts +14 -0
- package/dist/modules/tokens/transmission/TokenReference.js +71 -0
- package/dist/modules/tokens/transmission/TokenReference.js.map +1 -0
- package/dist/util/PasswordGenerator.d.ts +28 -0
- package/dist/util/PasswordGenerator.js +179 -0
- package/dist/util/PasswordGenerator.js.map +1 -0
- package/dist/util/Random.d.ts +50 -0
- package/dist/util/Random.js +129 -0
- package/dist/util/Random.js.map +1 -0
- package/dist/util/index.d.ts +2 -0
- package/dist/util/index.js +15 -0
- package/dist/util/index.js.map +1 -0
- package/lib-web/nmshd.transport.js +54733 -0
- package/lib-web/nmshd.transport.js.map +1 -0
- package/lib-web/nmshd.transport.min.js +3 -0
- package/lib-web/nmshd.transport.min.js.map +1 -0
- package/package.json +109 -0
- package/ui5.yaml +9 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
export * from "./accounts/AccountController";
|
|
2
|
+
export * from "./accounts/backbone/IdentityClient";
|
|
3
|
+
export * from "./accounts/data/Identity";
|
|
4
|
+
export * from "./accounts/IdentityController";
|
|
5
|
+
export * from "./accounts/IdentityUtil";
|
|
6
|
+
export * from "./certificates/CertificateController";
|
|
7
|
+
export * from "./certificates/CertificateIssuer";
|
|
8
|
+
export * from "./certificates/CertificateValidator";
|
|
9
|
+
export * from "./certificates/data/Certificate";
|
|
10
|
+
export * from "./certificates/data/CertificateConstraint";
|
|
11
|
+
export * from "./certificates/data/CertificateContent";
|
|
12
|
+
export * from "./certificates/data/CertificateItem";
|
|
13
|
+
export * from "./certificates/data/constraints/CertificateBorderConstraint";
|
|
14
|
+
export * from "./certificates/data/constraints/CertificateCityConstraint";
|
|
15
|
+
export * from "./certificates/data/constraints/CertificateIdentityConstraint";
|
|
16
|
+
export * from "./certificates/data/constraints/CertificateTimeConstraint";
|
|
17
|
+
export * from "./certificates/data/items/CertificateAuthorizationItem";
|
|
18
|
+
export * from "./certificates/data/items/CertificateDelegateItem";
|
|
19
|
+
export * from "./certificates/data/items/CertificatePrivateAttributeItem";
|
|
20
|
+
export * from "./certificates/data/items/CertificatePrivateAttributeItemSource";
|
|
21
|
+
export * from "./certificates/data/items/CertificatePublicAttributeItem";
|
|
22
|
+
export * from "./certificates/data/items/CertificateRoleItem";
|
|
23
|
+
export * from "./challenges/backbone/ChallengeAuthClient";
|
|
24
|
+
export * from "./challenges/backbone/ChallengeClient";
|
|
25
|
+
export * from "./challenges/ChallengeController";
|
|
26
|
+
export * from "./challenges/data/Challenge";
|
|
27
|
+
export * from "./challenges/data/ChallengeSigned";
|
|
28
|
+
export * from "./devices/backbone/BackbonePostDevices";
|
|
29
|
+
export * from "./devices/backbone/DeviceAuthClient";
|
|
30
|
+
export * from "./devices/backbone/DeviceClient";
|
|
31
|
+
export * from "./devices/DeviceController";
|
|
32
|
+
export * from "./devices/DevicesController";
|
|
33
|
+
export * from "./devices/DeviceSecretController";
|
|
34
|
+
export * from "./devices/local/Device";
|
|
35
|
+
export * from "./devices/local/DeviceSecretCredentials";
|
|
36
|
+
export * from "./devices/local/SendDeviceParameters";
|
|
37
|
+
export * from "./devices/transmission/DeviceSharedSecret";
|
|
38
|
+
export * from "./files/backbone/BackboneGetFiles";
|
|
39
|
+
export * from "./files/backbone/BackbonePostFiles";
|
|
40
|
+
export * from "./files/backbone/FileClient";
|
|
41
|
+
export * from "./files/FileController";
|
|
42
|
+
export * from "./files/local/CachedFile";
|
|
43
|
+
export * from "./files/local/File";
|
|
44
|
+
export * from "./files/local/SendFileParameters";
|
|
45
|
+
export * from "./files/transmission/FileMetadata";
|
|
46
|
+
export * from "./files/transmission/FileReference";
|
|
47
|
+
export * from "./messages/backbone/BackboneGetMessages";
|
|
48
|
+
export * from "./messages/backbone/BackbonePostMessages";
|
|
49
|
+
export * from "./messages/backbone/MessageClient";
|
|
50
|
+
export * from "./messages/local/CachedMessage";
|
|
51
|
+
export * from "./messages/local/Message";
|
|
52
|
+
export * from "./messages/local/SendMessageParameters";
|
|
53
|
+
export * from "./messages/MessageController";
|
|
54
|
+
export * from "./messages/transmission/MessageEnvelope";
|
|
55
|
+
export * from "./messages/transmission/MessageEnvelopeRecipient";
|
|
56
|
+
export * from "./messages/transmission/MessagePlain";
|
|
57
|
+
export * from "./messages/transmission/MessageSignature";
|
|
58
|
+
export * from "./messages/transmission/MessageSigned";
|
|
59
|
+
export * from "./relationships/backbone/BackboneGetRelationships";
|
|
60
|
+
export * from "./relationships/backbone/BackboneGetRelationshipsChanges";
|
|
61
|
+
export * from "./relationships/backbone/BackbonePostRelationshipsChanges";
|
|
62
|
+
export * from "./relationships/backbone/RelationshipClient";
|
|
63
|
+
export * from "./relationships/local/CachedRelationship";
|
|
64
|
+
export * from "./relationships/local/Relationship";
|
|
65
|
+
export * from "./relationships/local/SendRelationshipParameters";
|
|
66
|
+
export * from "./relationships/RelationshipsController";
|
|
67
|
+
export * from "./relationships/RelationshipSecretController";
|
|
68
|
+
export * from "./relationships/transmission/changes/RelationshipChange";
|
|
69
|
+
export * from "./relationships/transmission/changes/RelationshipChangeRequest";
|
|
70
|
+
export * from "./relationships/transmission/changes/RelationshipChangeResponse";
|
|
71
|
+
export * from "./relationships/transmission/changes/RelationshipChangeStatus";
|
|
72
|
+
export * from "./relationships/transmission/changes/RelationshipChangeType";
|
|
73
|
+
export * from "./relationships/transmission/RelationshipStatus";
|
|
74
|
+
export * from "./relationships/transmission/requests/RelationshipCreationChangeRequestCipher";
|
|
75
|
+
export * from "./relationships/transmission/requests/RelationshipCreationChangeRequestContent";
|
|
76
|
+
export * from "./relationships/transmission/requests/RelationshipCreationChangeRequestSigned";
|
|
77
|
+
export * from "./relationships/transmission/responses/RelationshipCreationChangeResponseCipher";
|
|
78
|
+
export * from "./relationships/transmission/responses/RelationshipCreationChangeResponseContent";
|
|
79
|
+
export * from "./relationships/transmission/responses/RelationshipCreationChangeResponseSigned";
|
|
80
|
+
export * from "./relationshipTemplates/backbone/BackboneGetRelationshipTemplates";
|
|
81
|
+
export * from "./relationshipTemplates/backbone/BackbonePostRelationshipTemplates";
|
|
82
|
+
export * from "./relationshipTemplates/backbone/RelationshipTemplateClient";
|
|
83
|
+
export * from "./relationshipTemplates/local/CachedRelationshipTemplate";
|
|
84
|
+
export * from "./relationshipTemplates/local/RelationshipTemplate";
|
|
85
|
+
export * from "./relationshipTemplates/local/SendRelationshipTemplateParameters";
|
|
86
|
+
export * from "./relationshipTemplates/RelationshipTemplateController";
|
|
87
|
+
export * from "./relationshipTemplates/transmission/RelationshipTemplateContent";
|
|
88
|
+
export * from "./relationshipTemplates/transmission/RelationshipTemplatePublicKey";
|
|
89
|
+
export * from "./relationshipTemplates/transmission/RelationshipTemplateSigned";
|
|
90
|
+
export * from "./secrets/data/SecretContainerCipher";
|
|
91
|
+
export * from "./secrets/data/SecretContainerPlain";
|
|
92
|
+
export * from "./secrets/SecretController";
|
|
93
|
+
export * from "./sync/ChangedItems";
|
|
94
|
+
export * from "./sync/DatawalletModificationsProcessor";
|
|
95
|
+
export * from "./sync/ExternalEventsProcessor";
|
|
96
|
+
export * from "./sync/local/DatawalletModification";
|
|
97
|
+
export * from "./sync/SyncController";
|
|
98
|
+
export * from "./sync/SynchronizedCollection";
|
|
99
|
+
export * from "./tokens/AnonymousTokenController";
|
|
100
|
+
export * from "./tokens/backbone/BackboneGetTokens";
|
|
101
|
+
export * from "./tokens/backbone/BackbonePostTokens";
|
|
102
|
+
export * from "./tokens/backbone/TokenClient";
|
|
103
|
+
export * from "./tokens/local/CachedToken";
|
|
104
|
+
export * from "./tokens/local/SendTokenParameters";
|
|
105
|
+
export * from "./tokens/local/Token";
|
|
106
|
+
export * from "./tokens/TokenController";
|
|
107
|
+
export * from "./tokens/transmission/TokenContentDeviceSharedSecret";
|
|
108
|
+
export * from "./tokens/transmission/TokenContentFile";
|
|
109
|
+
export * from "./tokens/transmission/TokenContentRelationshipTemplate";
|
|
110
|
+
export * from "./tokens/transmission/TokenReference";
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./accounts/AccountController"), exports);
|
|
14
|
+
__exportStar(require("./accounts/backbone/IdentityClient"), exports);
|
|
15
|
+
__exportStar(require("./accounts/data/Identity"), exports);
|
|
16
|
+
__exportStar(require("./accounts/IdentityController"), exports);
|
|
17
|
+
__exportStar(require("./accounts/IdentityUtil"), exports);
|
|
18
|
+
__exportStar(require("./certificates/CertificateController"), exports);
|
|
19
|
+
__exportStar(require("./certificates/CertificateIssuer"), exports);
|
|
20
|
+
__exportStar(require("./certificates/CertificateValidator"), exports);
|
|
21
|
+
__exportStar(require("./certificates/data/Certificate"), exports);
|
|
22
|
+
__exportStar(require("./certificates/data/CertificateConstraint"), exports);
|
|
23
|
+
__exportStar(require("./certificates/data/CertificateContent"), exports);
|
|
24
|
+
__exportStar(require("./certificates/data/CertificateItem"), exports);
|
|
25
|
+
__exportStar(require("./certificates/data/constraints/CertificateBorderConstraint"), exports);
|
|
26
|
+
__exportStar(require("./certificates/data/constraints/CertificateCityConstraint"), exports);
|
|
27
|
+
__exportStar(require("./certificates/data/constraints/CertificateIdentityConstraint"), exports);
|
|
28
|
+
__exportStar(require("./certificates/data/constraints/CertificateTimeConstraint"), exports);
|
|
29
|
+
__exportStar(require("./certificates/data/items/CertificateAuthorizationItem"), exports);
|
|
30
|
+
__exportStar(require("./certificates/data/items/CertificateDelegateItem"), exports);
|
|
31
|
+
__exportStar(require("./certificates/data/items/CertificatePrivateAttributeItem"), exports);
|
|
32
|
+
__exportStar(require("./certificates/data/items/CertificatePrivateAttributeItemSource"), exports);
|
|
33
|
+
__exportStar(require("./certificates/data/items/CertificatePublicAttributeItem"), exports);
|
|
34
|
+
__exportStar(require("./certificates/data/items/CertificateRoleItem"), exports);
|
|
35
|
+
__exportStar(require("./challenges/backbone/ChallengeAuthClient"), exports);
|
|
36
|
+
__exportStar(require("./challenges/backbone/ChallengeClient"), exports);
|
|
37
|
+
__exportStar(require("./challenges/ChallengeController"), exports);
|
|
38
|
+
__exportStar(require("./challenges/data/Challenge"), exports);
|
|
39
|
+
__exportStar(require("./challenges/data/ChallengeSigned"), exports);
|
|
40
|
+
__exportStar(require("./devices/backbone/BackbonePostDevices"), exports);
|
|
41
|
+
__exportStar(require("./devices/backbone/DeviceAuthClient"), exports);
|
|
42
|
+
__exportStar(require("./devices/backbone/DeviceClient"), exports);
|
|
43
|
+
__exportStar(require("./devices/DeviceController"), exports);
|
|
44
|
+
__exportStar(require("./devices/DevicesController"), exports);
|
|
45
|
+
__exportStar(require("./devices/DeviceSecretController"), exports);
|
|
46
|
+
__exportStar(require("./devices/local/Device"), exports);
|
|
47
|
+
__exportStar(require("./devices/local/DeviceSecretCredentials"), exports);
|
|
48
|
+
__exportStar(require("./devices/local/SendDeviceParameters"), exports);
|
|
49
|
+
__exportStar(require("./devices/transmission/DeviceSharedSecret"), exports);
|
|
50
|
+
__exportStar(require("./files/backbone/BackboneGetFiles"), exports);
|
|
51
|
+
__exportStar(require("./files/backbone/BackbonePostFiles"), exports);
|
|
52
|
+
__exportStar(require("./files/backbone/FileClient"), exports);
|
|
53
|
+
__exportStar(require("./files/FileController"), exports);
|
|
54
|
+
__exportStar(require("./files/local/CachedFile"), exports);
|
|
55
|
+
__exportStar(require("./files/local/File"), exports);
|
|
56
|
+
__exportStar(require("./files/local/SendFileParameters"), exports);
|
|
57
|
+
__exportStar(require("./files/transmission/FileMetadata"), exports);
|
|
58
|
+
__exportStar(require("./files/transmission/FileReference"), exports);
|
|
59
|
+
__exportStar(require("./messages/backbone/BackboneGetMessages"), exports);
|
|
60
|
+
__exportStar(require("./messages/backbone/BackbonePostMessages"), exports);
|
|
61
|
+
__exportStar(require("./messages/backbone/MessageClient"), exports);
|
|
62
|
+
__exportStar(require("./messages/local/CachedMessage"), exports);
|
|
63
|
+
__exportStar(require("./messages/local/Message"), exports);
|
|
64
|
+
__exportStar(require("./messages/local/SendMessageParameters"), exports);
|
|
65
|
+
__exportStar(require("./messages/MessageController"), exports);
|
|
66
|
+
__exportStar(require("./messages/transmission/MessageEnvelope"), exports);
|
|
67
|
+
__exportStar(require("./messages/transmission/MessageEnvelopeRecipient"), exports);
|
|
68
|
+
__exportStar(require("./messages/transmission/MessagePlain"), exports);
|
|
69
|
+
__exportStar(require("./messages/transmission/MessageSignature"), exports);
|
|
70
|
+
__exportStar(require("./messages/transmission/MessageSigned"), exports);
|
|
71
|
+
__exportStar(require("./relationships/backbone/BackboneGetRelationships"), exports);
|
|
72
|
+
__exportStar(require("./relationships/backbone/BackboneGetRelationshipsChanges"), exports);
|
|
73
|
+
__exportStar(require("./relationships/backbone/BackbonePostRelationshipsChanges"), exports);
|
|
74
|
+
__exportStar(require("./relationships/backbone/RelationshipClient"), exports);
|
|
75
|
+
__exportStar(require("./relationships/local/CachedRelationship"), exports);
|
|
76
|
+
__exportStar(require("./relationships/local/Relationship"), exports);
|
|
77
|
+
__exportStar(require("./relationships/local/SendRelationshipParameters"), exports);
|
|
78
|
+
__exportStar(require("./relationships/RelationshipsController"), exports);
|
|
79
|
+
__exportStar(require("./relationships/RelationshipSecretController"), exports);
|
|
80
|
+
__exportStar(require("./relationships/transmission/changes/RelationshipChange"), exports);
|
|
81
|
+
__exportStar(require("./relationships/transmission/changes/RelationshipChangeRequest"), exports);
|
|
82
|
+
__exportStar(require("./relationships/transmission/changes/RelationshipChangeResponse"), exports);
|
|
83
|
+
__exportStar(require("./relationships/transmission/changes/RelationshipChangeStatus"), exports);
|
|
84
|
+
__exportStar(require("./relationships/transmission/changes/RelationshipChangeType"), exports);
|
|
85
|
+
__exportStar(require("./relationships/transmission/RelationshipStatus"), exports);
|
|
86
|
+
__exportStar(require("./relationships/transmission/requests/RelationshipCreationChangeRequestCipher"), exports);
|
|
87
|
+
__exportStar(require("./relationships/transmission/requests/RelationshipCreationChangeRequestContent"), exports);
|
|
88
|
+
__exportStar(require("./relationships/transmission/requests/RelationshipCreationChangeRequestSigned"), exports);
|
|
89
|
+
__exportStar(require("./relationships/transmission/responses/RelationshipCreationChangeResponseCipher"), exports);
|
|
90
|
+
__exportStar(require("./relationships/transmission/responses/RelationshipCreationChangeResponseContent"), exports);
|
|
91
|
+
__exportStar(require("./relationships/transmission/responses/RelationshipCreationChangeResponseSigned"), exports);
|
|
92
|
+
__exportStar(require("./relationshipTemplates/backbone/BackboneGetRelationshipTemplates"), exports);
|
|
93
|
+
__exportStar(require("./relationshipTemplates/backbone/BackbonePostRelationshipTemplates"), exports);
|
|
94
|
+
__exportStar(require("./relationshipTemplates/backbone/RelationshipTemplateClient"), exports);
|
|
95
|
+
__exportStar(require("./relationshipTemplates/local/CachedRelationshipTemplate"), exports);
|
|
96
|
+
__exportStar(require("./relationshipTemplates/local/RelationshipTemplate"), exports);
|
|
97
|
+
__exportStar(require("./relationshipTemplates/local/SendRelationshipTemplateParameters"), exports);
|
|
98
|
+
__exportStar(require("./relationshipTemplates/RelationshipTemplateController"), exports);
|
|
99
|
+
__exportStar(require("./relationshipTemplates/transmission/RelationshipTemplateContent"), exports);
|
|
100
|
+
__exportStar(require("./relationshipTemplates/transmission/RelationshipTemplatePublicKey"), exports);
|
|
101
|
+
__exportStar(require("./relationshipTemplates/transmission/RelationshipTemplateSigned"), exports);
|
|
102
|
+
__exportStar(require("./secrets/data/SecretContainerCipher"), exports);
|
|
103
|
+
__exportStar(require("./secrets/data/SecretContainerPlain"), exports);
|
|
104
|
+
__exportStar(require("./secrets/SecretController"), exports);
|
|
105
|
+
__exportStar(require("./sync/ChangedItems"), exports);
|
|
106
|
+
__exportStar(require("./sync/DatawalletModificationsProcessor"), exports);
|
|
107
|
+
__exportStar(require("./sync/ExternalEventsProcessor"), exports);
|
|
108
|
+
__exportStar(require("./sync/local/DatawalletModification"), exports);
|
|
109
|
+
__exportStar(require("./sync/SyncController"), exports);
|
|
110
|
+
__exportStar(require("./sync/SynchronizedCollection"), exports);
|
|
111
|
+
__exportStar(require("./tokens/AnonymousTokenController"), exports);
|
|
112
|
+
__exportStar(require("./tokens/backbone/BackboneGetTokens"), exports);
|
|
113
|
+
__exportStar(require("./tokens/backbone/BackbonePostTokens"), exports);
|
|
114
|
+
__exportStar(require("./tokens/backbone/TokenClient"), exports);
|
|
115
|
+
__exportStar(require("./tokens/local/CachedToken"), exports);
|
|
116
|
+
__exportStar(require("./tokens/local/SendTokenParameters"), exports);
|
|
117
|
+
__exportStar(require("./tokens/local/Token"), exports);
|
|
118
|
+
__exportStar(require("./tokens/TokenController"), exports);
|
|
119
|
+
__exportStar(require("./tokens/transmission/TokenContentDeviceSharedSecret"), exports);
|
|
120
|
+
__exportStar(require("./tokens/transmission/TokenContentFile"), exports);
|
|
121
|
+
__exportStar(require("./tokens/transmission/TokenContentRelationshipTemplate"), exports);
|
|
122
|
+
__exportStar(require("./tokens/transmission/TokenReference"), exports);
|
|
123
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAA4C;AAC5C,qEAAkD;AAClD,2DAAwC;AACxC,gEAA6C;AAC7C,0DAAuC;AACvC,uEAAoD;AACpD,mEAAgD;AAChD,sEAAmD;AACnD,kEAA+C;AAC/C,4EAAyD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ACnC,0EAAuD;AACvD,iEAA8C;AAC9C,sEAAmD;AACnD,wDAAqC;AACrC,gEAA6C;AAC7C,oEAAiD;AACjD,sEAAmD;AACnD,uEAAoD;AACpD,gEAA6C;AAC7C,6DAA0C;AAC1C,qEAAkD;AAClD,uDAAoC;AACpC,2DAAwC;AACxC,uFAAoE;AACpE,yEAAsD;AACtD,yFAAsE;AACtE,uEAAoD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ISerializableAsync } from "@js-soft/ts-serval";
|
|
2
|
+
import { CoreAddress, CoreId } from "../../core";
|
|
3
|
+
import { TransportController } from "../../core/TransportController";
|
|
4
|
+
import { AccountController } from "../accounts/AccountController";
|
|
5
|
+
import { Message } from "./local/Message";
|
|
6
|
+
import { ISendMessageParameters } from "./local/SendMessageParameters";
|
|
7
|
+
export declare class MessageController extends TransportController {
|
|
8
|
+
private client;
|
|
9
|
+
private messages;
|
|
10
|
+
private readonly relationships;
|
|
11
|
+
private secrets;
|
|
12
|
+
constructor(parent: AccountController);
|
|
13
|
+
init(): Promise<this>;
|
|
14
|
+
getMessages(query?: any): Promise<Message[]>;
|
|
15
|
+
getMessagesByRelationshipId(id: CoreId): Promise<Message[]>;
|
|
16
|
+
getMessagesByAddress(address: CoreAddress): Promise<Message[]>;
|
|
17
|
+
getReceivedMessages(): Promise<Message[]>;
|
|
18
|
+
getMessage(id: CoreId): Promise<Message | undefined>;
|
|
19
|
+
updateCache(ids: string[]): Promise<Message[]>;
|
|
20
|
+
private updateCacheOfExistingMessageInDb;
|
|
21
|
+
private updateCacheOfMessage;
|
|
22
|
+
loadPeerMessage(id: CoreId): Promise<Message>;
|
|
23
|
+
private getEnvelopeFromBackboneGetMessagesResponse;
|
|
24
|
+
setMessageMetadata(idOrMessage: CoreId | Message, metadata: ISerializableAsync): Promise<Message>;
|
|
25
|
+
sendMessage(parameters: ISendMessageParameters): Promise<Message>;
|
|
26
|
+
private decryptOwnEnvelope;
|
|
27
|
+
private decryptPeerEnvelope;
|
|
28
|
+
private decryptSealedEnvelope;
|
|
29
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageController = void 0;
|
|
4
|
+
const crypto_1 = require("@nmshd/crypto");
|
|
5
|
+
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
6
|
+
const core_1 = require("../../core");
|
|
7
|
+
const DbCollectionNames_1 = require("../../core/DbCollectionNames");
|
|
8
|
+
const TransportController_1 = require("../../core/TransportController");
|
|
9
|
+
const File_1 = require("../files/local/File");
|
|
10
|
+
const Relationship_1 = require("../relationships/local/Relationship");
|
|
11
|
+
const RelationshipSecretController_1 = require("../relationships/RelationshipSecretController");
|
|
12
|
+
const MessageClient_1 = require("./backbone/MessageClient");
|
|
13
|
+
const CachedMessage_1 = require("./local/CachedMessage");
|
|
14
|
+
const Message_1 = require("./local/Message");
|
|
15
|
+
const SendMessageParameters_1 = require("./local/SendMessageParameters");
|
|
16
|
+
const MessageEnvelope_1 = require("./transmission/MessageEnvelope");
|
|
17
|
+
const MessageEnvelopeRecipient_1 = require("./transmission/MessageEnvelopeRecipient");
|
|
18
|
+
const MessagePlain_1 = require("./transmission/MessagePlain");
|
|
19
|
+
const MessageSignature_1 = require("./transmission/MessageSignature");
|
|
20
|
+
const MessageSigned_1 = require("./transmission/MessageSigned");
|
|
21
|
+
class MessageController extends TransportController_1.TransportController {
|
|
22
|
+
constructor(parent) {
|
|
23
|
+
super(TransportController_1.ControllerName.Message, parent);
|
|
24
|
+
this.relationships = parent.relationships;
|
|
25
|
+
}
|
|
26
|
+
async init() {
|
|
27
|
+
await super.init();
|
|
28
|
+
this.secrets = new RelationshipSecretController_1.RelationshipSecretController(this.parent);
|
|
29
|
+
await this.secrets.init();
|
|
30
|
+
this.client = new MessageClient_1.MessageClient(this.config, this.parent.authenticator);
|
|
31
|
+
this.messages = await this.parent.getSynchronizedCollection(DbCollectionNames_1.DbCollectionNames.Messages);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
async getMessages(query) {
|
|
35
|
+
const messages = await this.messages.find(query);
|
|
36
|
+
return await this.parseArray(messages, Message_1.Message);
|
|
37
|
+
}
|
|
38
|
+
async getMessagesByRelationshipId(id) {
|
|
39
|
+
return await this.getMessages({
|
|
40
|
+
[(0, ts_simple_nameof_1.nameof)((m) => m.relationshipIds)]: {
|
|
41
|
+
$contains: id.toString()
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async getMessagesByAddress(address) {
|
|
46
|
+
const relationship = await this.parent.relationships.getActiveRelationshipToIdentity(address);
|
|
47
|
+
if (!relationship) {
|
|
48
|
+
throw core_1.TransportErrors.messages.noMatchingRelationship(address.toString()).logWith(this._log);
|
|
49
|
+
}
|
|
50
|
+
return await this.getMessagesByRelationshipId(relationship.id);
|
|
51
|
+
}
|
|
52
|
+
async getReceivedMessages() {
|
|
53
|
+
return await this.getMessages({
|
|
54
|
+
[(0, ts_simple_nameof_1.nameof)((m) => m.isOwn)]: false
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async getMessage(id) {
|
|
58
|
+
const messageDoc = await this.messages.read(id.toString());
|
|
59
|
+
return messageDoc ? await Message_1.Message.from(messageDoc) : undefined;
|
|
60
|
+
}
|
|
61
|
+
async updateCache(ids) {
|
|
62
|
+
const paginator = (await this.client.getMessages({ ids })).value;
|
|
63
|
+
const promises = [];
|
|
64
|
+
for await (const resultItem of paginator) {
|
|
65
|
+
promises.push(this.updateCacheOfExistingMessageInDb(resultItem.id, resultItem));
|
|
66
|
+
}
|
|
67
|
+
return await Promise.all(promises);
|
|
68
|
+
}
|
|
69
|
+
async updateCacheOfExistingMessageInDb(id, response) {
|
|
70
|
+
const messageDoc = await this.messages.read(id);
|
|
71
|
+
if (!messageDoc) {
|
|
72
|
+
throw core_1.TransportErrors.general.recordNotFound(Message_1.Message, id).logWith(this._log);
|
|
73
|
+
}
|
|
74
|
+
const message = await Message_1.Message.from(messageDoc);
|
|
75
|
+
await this.updateCacheOfMessage(message, response);
|
|
76
|
+
await this.messages.update(messageDoc, message);
|
|
77
|
+
return message;
|
|
78
|
+
}
|
|
79
|
+
async updateCacheOfMessage(message, response) {
|
|
80
|
+
const messageId = message.id.toString();
|
|
81
|
+
if (!response) {
|
|
82
|
+
response = (await this.client.getMessage(messageId)).value;
|
|
83
|
+
}
|
|
84
|
+
const envelope = await this.getEnvelopeFromBackboneGetMessagesResponse(response);
|
|
85
|
+
const [cachedMessage, messageKey] = await this.decryptSealedEnvelope(envelope, message.secretKey);
|
|
86
|
+
message.secretKey = messageKey;
|
|
87
|
+
message.setCache(cachedMessage);
|
|
88
|
+
}
|
|
89
|
+
async loadPeerMessage(id) {
|
|
90
|
+
const response = (await this.client.getMessage(id.toString())).value;
|
|
91
|
+
const envelope = await this.getEnvelopeFromBackboneGetMessagesResponse(response);
|
|
92
|
+
const [cachedMessage, messageKey, relationship] = await this.decryptSealedEnvelope(envelope);
|
|
93
|
+
if (!relationship) {
|
|
94
|
+
throw core_1.TransportErrors.general.recordNotFound(Relationship_1.Relationship, envelope.id.toString()).logWith(this._log);
|
|
95
|
+
}
|
|
96
|
+
const message = await Message_1.Message.from({
|
|
97
|
+
id: envelope.id,
|
|
98
|
+
isOwn: false,
|
|
99
|
+
secretKey: messageKey,
|
|
100
|
+
relationshipIds: [relationship.id]
|
|
101
|
+
});
|
|
102
|
+
message.setCache(cachedMessage);
|
|
103
|
+
await this.messages.create(message);
|
|
104
|
+
return message;
|
|
105
|
+
}
|
|
106
|
+
async getEnvelopeFromBackboneGetMessagesResponse(response) {
|
|
107
|
+
const recipients = [];
|
|
108
|
+
for (const recipient of response.recipients) {
|
|
109
|
+
const sealedRecipient = await MessageEnvelopeRecipient_1.MessageEnvelopeRecipient.from({
|
|
110
|
+
encryptedKey: await crypto_1.CryptoCipher.fromBase64(recipient.encryptedKey),
|
|
111
|
+
address: core_1.CoreAddress.from(recipient.address),
|
|
112
|
+
receivedAt: recipient.receivedAt ? core_1.CoreDate.from(recipient.receivedAt) : undefined,
|
|
113
|
+
receivedByDevice: recipient.receivedByDevice ? core_1.CoreId.from(recipient.receivedByDevice) : undefined
|
|
114
|
+
});
|
|
115
|
+
recipients.push(sealedRecipient);
|
|
116
|
+
}
|
|
117
|
+
const envelope = await MessageEnvelope_1.MessageEnvelope.from({
|
|
118
|
+
id: core_1.CoreId.from(response.id),
|
|
119
|
+
createdAt: core_1.CoreDate.from(response.createdAt),
|
|
120
|
+
createdBy: core_1.CoreAddress.from(response.createdBy),
|
|
121
|
+
createdByDevice: core_1.CoreId.from(response.createdByDevice),
|
|
122
|
+
cipher: await crypto_1.CryptoCipher.fromBase64(response.body),
|
|
123
|
+
attachments: response.attachments,
|
|
124
|
+
recipients: recipients
|
|
125
|
+
});
|
|
126
|
+
return envelope;
|
|
127
|
+
}
|
|
128
|
+
async setMessageMetadata(idOrMessage, metadata) {
|
|
129
|
+
const id = idOrMessage instanceof core_1.CoreId ? idOrMessage.toString() : idOrMessage.id.toString();
|
|
130
|
+
const messageDoc = await this.messages.read(id);
|
|
131
|
+
if (!messageDoc) {
|
|
132
|
+
throw core_1.TransportErrors.general.recordNotFound(Message_1.Message, id.toString()).logWith(this._log);
|
|
133
|
+
}
|
|
134
|
+
const message = await Message_1.Message.from(messageDoc);
|
|
135
|
+
message.setMetadata(metadata);
|
|
136
|
+
await this.messages.update(messageDoc, message);
|
|
137
|
+
return message;
|
|
138
|
+
}
|
|
139
|
+
async sendMessage(parameters) {
|
|
140
|
+
parameters = await SendMessageParameters_1.SendMessageParameters.from(parameters);
|
|
141
|
+
if (!parameters.attachments)
|
|
142
|
+
parameters.attachments = [];
|
|
143
|
+
const secret = await core_1.CoreCrypto.generateSecretKey();
|
|
144
|
+
const serializedSecret = secret.serialize(false);
|
|
145
|
+
const addressArray = [];
|
|
146
|
+
const envelopeRecipients = [];
|
|
147
|
+
for (const recipient of parameters.recipients) {
|
|
148
|
+
const relationship = await this.relationships.getActiveRelationshipToIdentity(core_1.CoreAddress.from(recipient));
|
|
149
|
+
if (!relationship) {
|
|
150
|
+
throw core_1.TransportErrors.general.recordNotFound(Relationship_1.Relationship, recipient.toString()).logWith(this._log);
|
|
151
|
+
}
|
|
152
|
+
const cipherForRecipient = await this.secrets.encrypt(relationship.relationshipSecretId, serializedSecret);
|
|
153
|
+
envelopeRecipients.push(await MessageEnvelopeRecipient_1.MessageEnvelopeRecipient.from({
|
|
154
|
+
address: recipient,
|
|
155
|
+
encryptedKey: cipherForRecipient
|
|
156
|
+
}));
|
|
157
|
+
addressArray.push(recipient);
|
|
158
|
+
}
|
|
159
|
+
const publicAttachmentArray = [];
|
|
160
|
+
const fileReferences = [];
|
|
161
|
+
for (const fileObject of parameters.attachments) {
|
|
162
|
+
const file = await File_1.File.from(fileObject);
|
|
163
|
+
fileReferences.push(await file.toFileReference());
|
|
164
|
+
publicAttachmentArray.push(file.id);
|
|
165
|
+
}
|
|
166
|
+
const plaintext = await MessagePlain_1.MessagePlain.from({
|
|
167
|
+
content: parameters.content,
|
|
168
|
+
recipients: addressArray,
|
|
169
|
+
createdAt: core_1.CoreDate.utc(),
|
|
170
|
+
attachments: fileReferences
|
|
171
|
+
});
|
|
172
|
+
const serializedPlaintext = plaintext.serialize();
|
|
173
|
+
const plaintextBuffer = crypto_1.CoreBuffer.fromUtf8(serializedPlaintext);
|
|
174
|
+
const messageSignatures = [];
|
|
175
|
+
const relationshipIds = [];
|
|
176
|
+
for (const recipient of parameters.recipients) {
|
|
177
|
+
const relationship = await this.relationships.getActiveRelationshipToIdentity(core_1.CoreAddress.from(recipient));
|
|
178
|
+
if (!relationship) {
|
|
179
|
+
throw core_1.TransportErrors.general.recordNotFound(Relationship_1.Relationship, recipient.toString()).logWith(this._log);
|
|
180
|
+
}
|
|
181
|
+
const signature = await this.secrets.sign(relationship.relationshipSecretId, plaintextBuffer);
|
|
182
|
+
const messageSignature = await MessageSignature_1.MessageSignature.from({
|
|
183
|
+
recipient: recipient,
|
|
184
|
+
signature: signature
|
|
185
|
+
});
|
|
186
|
+
messageSignatures.push(messageSignature);
|
|
187
|
+
relationshipIds.push(relationship.id);
|
|
188
|
+
}
|
|
189
|
+
const signed = await MessageSigned_1.MessageSigned.from({
|
|
190
|
+
message: serializedPlaintext,
|
|
191
|
+
signatures: messageSignatures
|
|
192
|
+
});
|
|
193
|
+
const serializedSigned = signed.serialize();
|
|
194
|
+
const cipher = await core_1.CoreCrypto.encrypt(crypto_1.CoreBuffer.fromUtf8(serializedSigned), secret);
|
|
195
|
+
const platformRecipients = envelopeRecipients.map((recipient) => {
|
|
196
|
+
return {
|
|
197
|
+
address: recipient.address.toString(),
|
|
198
|
+
encryptedKey: recipient.encryptedKey.toBase64()
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
const fileIds = publicAttachmentArray.map((attachment) => {
|
|
202
|
+
return {
|
|
203
|
+
id: attachment.id
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
const response = (await this.client.createMessage({
|
|
207
|
+
attachments: fileIds,
|
|
208
|
+
body: cipher.toBase64(),
|
|
209
|
+
recipients: platformRecipients
|
|
210
|
+
})).value;
|
|
211
|
+
const cachedMessage = await CachedMessage_1.CachedMessage.from({
|
|
212
|
+
content: parameters.content,
|
|
213
|
+
createdAt: core_1.CoreDate.from(response.createdAt),
|
|
214
|
+
createdBy: this.parent.identity.identity.address,
|
|
215
|
+
createdByDevice: this.parent.activeDevice.id,
|
|
216
|
+
recipients: envelopeRecipients,
|
|
217
|
+
attachments: publicAttachmentArray,
|
|
218
|
+
receivedByEveryone: false
|
|
219
|
+
});
|
|
220
|
+
const message = await Message_1.Message.from({
|
|
221
|
+
id: core_1.CoreId.from(response.id),
|
|
222
|
+
secretKey: secret,
|
|
223
|
+
cache: cachedMessage,
|
|
224
|
+
cachedAt: core_1.CoreDate.utc(),
|
|
225
|
+
isOwn: true,
|
|
226
|
+
relationshipIds: relationshipIds
|
|
227
|
+
});
|
|
228
|
+
await this.messages.create(message);
|
|
229
|
+
return message;
|
|
230
|
+
}
|
|
231
|
+
async decryptOwnEnvelope(envelope, secretKey) {
|
|
232
|
+
this.log.trace(`Decrypting own envelope with id ${envelope.id.toString()}...`);
|
|
233
|
+
const plaintextMessageBuffer = await core_1.CoreCrypto.decrypt(envelope.cipher, secretKey);
|
|
234
|
+
const signedMessage = await MessageSigned_1.MessageSigned.deserialize(plaintextMessageBuffer.toUtf8());
|
|
235
|
+
const messagePlain = await MessagePlain_1.MessagePlain.from(JSON.parse(signedMessage.message));
|
|
236
|
+
return messagePlain;
|
|
237
|
+
}
|
|
238
|
+
async decryptPeerEnvelope(envelope, relationship) {
|
|
239
|
+
var _a, _b;
|
|
240
|
+
const ownKeyCipher = (_a = envelope.recipients.find((r) => this.parent.identity.isMe(r.address))) === null || _a === void 0 ? void 0 : _a.encryptedKey;
|
|
241
|
+
if (!ownKeyCipher) {
|
|
242
|
+
throw core_1.TransportErrors.messages.ownAddressNotInList(envelope.id.toString()).logWith(this._log);
|
|
243
|
+
}
|
|
244
|
+
const plaintextKeyBuffer = await this.secrets.decryptPeer(relationship.relationshipSecretId, ownKeyCipher, true);
|
|
245
|
+
const plaintextKey = await crypto_1.CryptoSecretKey.deserialize(plaintextKeyBuffer.toUtf8());
|
|
246
|
+
const plaintextMessageBuffer = await core_1.CoreCrypto.decrypt(envelope.cipher, plaintextKey);
|
|
247
|
+
const signedMessage = await MessageSigned_1.MessageSigned.deserialize(plaintextMessageBuffer.toUtf8());
|
|
248
|
+
const signature = (_b = signedMessage.signatures.find((s) => this.parent.identity.isMe(s.recipient))) === null || _b === void 0 ? void 0 : _b.signature;
|
|
249
|
+
if (!signature) {
|
|
250
|
+
throw core_1.TransportErrors.messages.signatureListMismatch(envelope.id.toString()).logWith(this._log);
|
|
251
|
+
}
|
|
252
|
+
const messagePlain = await MessagePlain_1.MessagePlain.from(JSON.parse(signedMessage.message));
|
|
253
|
+
if (signedMessage.signatures.length !== messagePlain.recipients.length) {
|
|
254
|
+
this.log.debug(`Number of signatures does not match number of recipients from envelope ${envelope.id}.`);
|
|
255
|
+
}
|
|
256
|
+
const plainMessageBuffer = crypto_1.CoreBuffer.fromUtf8(signedMessage.message);
|
|
257
|
+
const validSignature = await this.secrets.verifyPeer(relationship.relationshipSecretId, plainMessageBuffer, signature);
|
|
258
|
+
if (!validSignature) {
|
|
259
|
+
throw core_1.TransportErrors.messages.signatureNotValid().logWith(this._log);
|
|
260
|
+
}
|
|
261
|
+
if (messagePlain.recipients.length !== envelope.recipients.length) {
|
|
262
|
+
this.log.debug(`Number of signed recipients within the message does not match number of recipients from envelope ${envelope.id}.`);
|
|
263
|
+
}
|
|
264
|
+
if (messagePlain.recipients.length !== signedMessage.signatures.length) {
|
|
265
|
+
this.log.debug(`Number of signed recipients within the message does not match number of signatures from envelope ${envelope.id}.`);
|
|
266
|
+
}
|
|
267
|
+
const recipientFound = messagePlain.recipients.some((r) => this.parent.identity.isMe(r));
|
|
268
|
+
if (!recipientFound) {
|
|
269
|
+
throw core_1.TransportErrors.messages.plaintextMismatch(envelope.id.toString()).logWith(this._log);
|
|
270
|
+
}
|
|
271
|
+
return [messagePlain, plaintextKey];
|
|
272
|
+
}
|
|
273
|
+
async decryptSealedEnvelope(envelope, secretKey) {
|
|
274
|
+
this.log.trace(`Decrypting MessageEnvelope with id ${envelope.id}...`);
|
|
275
|
+
let plainMessage;
|
|
276
|
+
let messageKey;
|
|
277
|
+
let relationship;
|
|
278
|
+
if (this.parent.identity.isMe(envelope.createdBy)) {
|
|
279
|
+
if (!secretKey) {
|
|
280
|
+
throw core_1.TransportErrors.messages.noSecretKeyForOwnMessage(envelope.id.toString()).logWith(this._log);
|
|
281
|
+
}
|
|
282
|
+
messageKey = secretKey;
|
|
283
|
+
plainMessage = await this.decryptOwnEnvelope(envelope, secretKey);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
relationship = await this.relationships.getActiveRelationshipToIdentity(envelope.createdBy);
|
|
287
|
+
if (!relationship) {
|
|
288
|
+
throw core_1.TransportErrors.messages.noMatchingRelationship(envelope.createdBy.toString()).logWith(this._log);
|
|
289
|
+
}
|
|
290
|
+
const [peerMessage, peerKey] = await this.decryptPeerEnvelope(envelope, relationship);
|
|
291
|
+
plainMessage = peerMessage;
|
|
292
|
+
messageKey = peerKey;
|
|
293
|
+
}
|
|
294
|
+
this.log.trace("Message is valid. Fetching attachments for message...");
|
|
295
|
+
const fileArray = [];
|
|
296
|
+
const promises = [];
|
|
297
|
+
for (const fileReference of plainMessage.attachments) {
|
|
298
|
+
promises.push(this.parent.files.loadPeerFileByReference(fileReference));
|
|
299
|
+
fileArray.push(fileReference.id);
|
|
300
|
+
}
|
|
301
|
+
await Promise.all(promises);
|
|
302
|
+
this.log.trace("Attachments fetched. Creating message...");
|
|
303
|
+
const cachedMessage = await CachedMessage_1.CachedMessage.from({
|
|
304
|
+
createdBy: envelope.createdBy,
|
|
305
|
+
createdByDevice: envelope.createdByDevice,
|
|
306
|
+
recipients: envelope.recipients,
|
|
307
|
+
attachments: fileArray,
|
|
308
|
+
content: plainMessage.content,
|
|
309
|
+
createdAt: envelope.createdAt,
|
|
310
|
+
receivedByEveryone: false
|
|
311
|
+
});
|
|
312
|
+
return [cachedMessage, messageKey, relationship];
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
exports.MessageController = MessageController;
|
|
316
|
+
//# sourceMappingURL=MessageController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageController.js","sourceRoot":"","sources":["../../../src/modules/messages/MessageController.ts"],"names":[],"mappings":";;;AACA,0CAA2F;AAC3F,uDAAyC;AACzC,qCAAqG;AACrG,oEAAgE;AAChE,wEAAoF;AAEpF,8CAA0C;AAE1C,sEAAkE;AAElE,gGAA4F;AAI5F,4DAAwD;AACxD,yDAAqD;AACrD,6CAAyC;AACzC,yEAA6F;AAC7F,oEAAgE;AAChE,sFAAkF;AAClF,8DAA0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AAA;SACvB;QAED,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAA;QACvE,MAAM,SAAS,GAAa,EAAE,CAAA;QAC9B,MAAM,QAAQ,GAAG,EAAE,CAAA;QACnB,KAAK,MAAM,aAAa,IAAI,YAAY,CAAC,WAAW,EAAE;YAClD,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAA;YACvE,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;SACnC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAE3B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAA;QAE1D,MAAM,aAAa,GAAkB,MAAM,6BAAa,CAAC,IAAI,CAAC;YAC1D,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,eAAe,EAAE,QAAQ,CAAC,eAAe;YACzC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,WAAW,EAAE,SAAS;YACtB,OAAO,EAAE,YAAY,CAAC,OAAO;YAC7B,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,kBAAkB,EAAE,KAAK;SAC5B,CAAC,CAAA;QAEF,OAAO,CAAC,aAAa,EAAE,UAAU,EAAE,YAAY,CAAC,CAAA;IACpD,CAAC;CACJ;AArYD,8CAqYC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface BackboneGetMessagesRequest {
|
|
2
|
+
ids: string[];
|
|
3
|
+
}
|
|
4
|
+
export interface BackboneGetMessagesDateRange<T> {
|
|
5
|
+
from?: T;
|
|
6
|
+
to?: T;
|
|
7
|
+
}
|
|
8
|
+
export interface BackboneGetMessagesResponse {
|
|
9
|
+
id: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
createdBy: string;
|
|
12
|
+
createdByDevice: string;
|
|
13
|
+
body: string;
|
|
14
|
+
attachments: BackboneGetMessagesAttachmentResponse[];
|
|
15
|
+
recipients: BackboneGetMessagesRecipientResponse[];
|
|
16
|
+
}
|
|
17
|
+
export interface BackboneGetMessagesAttachmentResponse {
|
|
18
|
+
id: string;
|
|
19
|
+
}
|
|
20
|
+
export interface BackboneGetMessagesRecipientResponse {
|
|
21
|
+
address: string;
|
|
22
|
+
encryptedKey: string;
|
|
23
|
+
receivedAt: string | null;
|
|
24
|
+
receivedByDevice: string | null;
|
|
25
|
+
}
|