@nmshd/transport 7.0.0-alpha.7 → 7.0.0-alpha.70
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/CoreSynchronizable.d.ts +1 -0
- package/dist/core/CoreSynchronizable.d.ts.map +1 -1
- package/dist/core/CoreSynchronizable.js +1 -0
- package/dist/core/CoreSynchronizable.js.map +1 -1
- package/dist/core/DbCollectionName.d.ts +0 -1
- package/dist/core/DbCollectionName.d.ts.map +1 -1
- package/dist/core/DbCollectionName.js +0 -1
- package/dist/core/DbCollectionName.js.map +1 -1
- package/dist/core/Transport.d.ts +2 -0
- package/dist/core/Transport.d.ts.map +1 -1
- package/dist/core/Transport.js +2 -1
- package/dist/core/Transport.js.map +1 -1
- package/dist/core/TransportController.d.ts +1 -4
- package/dist/core/TransportController.d.ts.map +1 -1
- package/dist/core/TransportController.js +7 -7
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/TransportCoreErrors.d.ts +8 -2
- package/dist/core/TransportCoreErrors.d.ts.map +1 -1
- package/dist/core/TransportCoreErrors.js +18 -6
- package/dist/core/TransportCoreErrors.js.map +1 -1
- package/dist/core/backbone/ClientResult.d.ts +2 -0
- package/dist/core/backbone/ClientResult.d.ts.map +1 -1
- package/dist/core/backbone/ClientResult.js +2 -0
- package/dist/core/backbone/ClientResult.js.map +1 -1
- package/dist/core/backbone/PlatformParameters.d.ts +2 -0
- package/dist/core/backbone/PlatformParameters.d.ts.map +1 -1
- package/dist/core/backbone/RESTClient.d.ts +3 -2
- package/dist/core/backbone/RESTClient.d.ts.map +1 -1
- package/dist/core/backbone/RESTClient.js +43 -36
- package/dist/core/backbone/RESTClient.js.map +1 -1
- package/dist/core/backbone/RESTClientAuthenticate.d.ts +1 -0
- package/dist/core/backbone/RESTClientAuthenticate.d.ts.map +1 -1
- package/dist/core/backbone/RESTClientAuthenticate.js +5 -0
- package/dist/core/backbone/RESTClientAuthenticate.js.map +1 -1
- package/dist/core/backbone/RequestError.d.ts.map +1 -1
- package/dist/core/backbone/RequestError.js +3 -0
- package/dist/core/backbone/RequestError.js.map +1 -1
- package/dist/core/types/PasswordProtection.d.ts +5 -6
- package/dist/core/types/PasswordProtection.d.ts.map +1 -1
- package/dist/core/types/PasswordProtection.js +12 -10
- package/dist/core/types/PasswordProtection.js.map +1 -1
- package/dist/core/types/PasswordProtectionCreationParameters.d.ts +3 -0
- package/dist/core/types/PasswordProtectionCreationParameters.d.ts.map +1 -1
- package/dist/core/types/PasswordProtectionCreationParameters.js +7 -1
- package/dist/core/types/PasswordProtectionCreationParameters.js.map +1 -1
- package/dist/events/FileOwnershipClaimedEvent.d.ts +7 -0
- package/dist/events/FileOwnershipClaimedEvent.d.ts.map +1 -0
- package/dist/events/FileOwnershipClaimedEvent.js +12 -0
- package/dist/events/FileOwnershipClaimedEvent.js.map +1 -0
- package/dist/events/FileOwnershipLockedEvent.d.ts +7 -0
- package/dist/events/FileOwnershipLockedEvent.d.ts.map +1 -0
- package/dist/events/FileOwnershipLockedEvent.js +12 -0
- package/dist/events/FileOwnershipLockedEvent.js.map +1 -0
- package/dist/events/MessageDeliveredEvent.d.ts +1 -1
- package/dist/events/MessageDeliveredEvent.d.ts.map +1 -1
- package/dist/events/MessageReceivedEvent.d.ts +1 -1
- package/dist/events/MessageReceivedEvent.d.ts.map +1 -1
- package/dist/events/MessageSentEvent.d.ts +1 -1
- package/dist/events/MessageSentEvent.d.ts.map +1 -1
- package/dist/events/MessageWasReadAtChangedEvent.d.ts +1 -1
- package/dist/events/MessageWasReadAtChangedEvent.d.ts.map +1 -1
- package/dist/events/PeerRelationshipTemplateLoadedEvent.d.ts +1 -1
- package/dist/events/PeerRelationshipTemplateLoadedEvent.d.ts.map +1 -1
- package/dist/events/RelationshipChangedEvent.d.ts +1 -1
- package/dist/events/RelationshipChangedEvent.d.ts.map +1 -1
- package/dist/events/RelationshipReactivationCompletedEvent.d.ts +1 -1
- package/dist/events/RelationshipReactivationCompletedEvent.d.ts.map +1 -1
- package/dist/events/RelationshipReactivationRequestedEvent.d.ts +1 -1
- package/dist/events/RelationshipReactivationRequestedEvent.d.ts.map +1 -1
- package/dist/events/RelationshipTemplateAllocationsExhaustedEvent.d.ts +7 -0
- package/dist/events/RelationshipTemplateAllocationsExhaustedEvent.d.ts.map +1 -0
- package/dist/events/RelationshipTemplateAllocationsExhaustedEvent.js +12 -0
- package/dist/events/RelationshipTemplateAllocationsExhaustedEvent.js.map +1 -0
- 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 +6 -8
- package/dist/modules/accounts/AccountController.d.ts.map +1 -1
- package/dist/modules/accounts/AccountController.js +40 -26
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts +2 -10
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.js +4 -36
- package/dist/modules/accounts/IdentityDeletionProcessController.js.map +1 -1
- package/dist/modules/accounts/backbone/BackboneIdentityDeletionProcess.d.ts +0 -5
- package/dist/modules/accounts/backbone/BackboneIdentityDeletionProcess.d.ts.map +1 -1
- package/dist/modules/accounts/backbone/IdentityClient.js +2 -2
- package/dist/modules/accounts/backbone/IdentityDeletionProcessClient.d.ts +0 -2
- package/dist/modules/accounts/backbone/IdentityDeletionProcessClient.d.ts.map +1 -1
- package/dist/modules/accounts/backbone/IdentityDeletionProcessClient.js +3 -9
- package/dist/modules/accounts/backbone/IdentityDeletionProcessClient.js.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts +20 -8
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.js +35 -10
- package/dist/modules/accounts/data/IdentityDeletionProcess.js.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcessStatus.d.ts +1 -3
- package/dist/modules/accounts/data/IdentityDeletionProcessStatus.d.ts.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcessStatus.js +1 -3
- package/dist/modules/accounts/data/IdentityDeletionProcessStatus.js.map +1 -1
- package/dist/modules/announcements/AnnouncementController.d.ts +11 -0
- package/dist/modules/announcements/AnnouncementController.d.ts.map +1 -0
- package/dist/modules/announcements/AnnouncementController.js +26 -0
- package/dist/modules/announcements/AnnouncementController.js.map +1 -0
- package/dist/modules/announcements/backbone/AnnouncementClient.d.ts +6 -0
- package/dist/modules/announcements/backbone/AnnouncementClient.d.ts.map +1 -0
- package/dist/modules/announcements/backbone/AnnouncementClient.js +11 -0
- package/dist/modules/announcements/backbone/AnnouncementClient.js.map +1 -0
- package/dist/modules/announcements/backbone/BackboneGetAnnouncements.d.ts +18 -0
- package/dist/modules/announcements/backbone/BackboneGetAnnouncements.d.ts.map +1 -0
- package/dist/modules/announcements/backbone/BackboneGetAnnouncements.js +3 -0
- package/dist/modules/announcements/backbone/BackboneGetAnnouncements.js.map +1 -0
- package/dist/modules/announcements/data/Announcement.d.ts +30 -0
- package/dist/modules/announcements/data/Announcement.d.ts.map +1 -0
- package/dist/modules/{messages/local/CachedMessage.js → announcements/data/Announcement.js} +37 -31
- package/dist/modules/announcements/data/Announcement.js.map +1 -0
- package/dist/modules/announcements/data/AnnouncementAction.d.ts +11 -0
- package/dist/modules/announcements/data/AnnouncementAction.d.ts.map +1 -0
- package/dist/modules/{certificates/data/items/CertificateRoleItem.js → announcements/data/AnnouncementAction.js} +13 -17
- package/dist/modules/announcements/data/AnnouncementAction.js.map +1 -0
- package/dist/modules/backboneCompatibility/backbone/VersionClient.js +1 -1
- package/dist/modules/backboneNotifications/BackboneNotificationsController.d.ts +13 -0
- package/dist/modules/backboneNotifications/BackboneNotificationsController.d.ts.map +1 -0
- package/dist/modules/backboneNotifications/BackboneNotificationsController.js +42 -0
- package/dist/modules/backboneNotifications/BackboneNotificationsController.js.map +1 -0
- package/dist/modules/backboneNotifications/backbone/BackboneNotificationsClient.d.ts +9 -0
- package/dist/modules/backboneNotifications/backbone/BackboneNotificationsClient.d.ts.map +1 -0
- package/dist/modules/backboneNotifications/backbone/BackboneNotificationsClient.js +11 -0
- package/dist/modules/backboneNotifications/backbone/BackboneNotificationsClient.js.map +1 -0
- package/dist/modules/challenges/backbone/ChallengeAuthClient.js +2 -2
- package/dist/modules/challenges/backbone/ChallengeClient.js +1 -1
- package/dist/modules/devices/DeviceController.d.ts +1 -2
- package/dist/modules/devices/DeviceController.d.ts.map +1 -1
- package/dist/modules/devices/DeviceController.js +0 -3
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/DevicesController.d.ts.map +1 -1
- package/dist/modules/devices/DevicesController.js +0 -4
- package/dist/modules/devices/DevicesController.js.map +1 -1
- package/dist/modules/devices/backbone/BackboneGetDevices.d.ts +12 -0
- package/dist/modules/devices/backbone/BackboneGetDevices.d.ts.map +1 -0
- package/dist/modules/devices/backbone/BackboneGetDevices.js +3 -0
- package/dist/modules/devices/backbone/BackboneGetDevices.js.map +1 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.d.ts +2 -0
- package/dist/modules/devices/backbone/DeviceAuthClient.d.ts.map +1 -1
- package/dist/modules/devices/backbone/DeviceAuthClient.js +9 -6
- package/dist/modules/devices/backbone/DeviceAuthClient.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +2 -4
- package/dist/modules/devices/local/Device.d.ts.map +1 -1
- package/dist/modules/devices/local/Device.js +0 -6
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.d.ts +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.d.ts.map +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.js +1 -1
- package/dist/modules/devices/local/SendDeviceParameters.js.map +1 -1
- package/dist/modules/files/FileController.d.ts +8 -10
- package/dist/modules/files/FileController.d.ts.map +1 -1
- package/dist/modules/files/FileController.js +71 -84
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/files/backbone/BackbonePostFiles.d.ts +1 -0
- package/dist/modules/files/backbone/BackbonePostFiles.d.ts.map +1 -1
- package/dist/modules/files/backbone/FileClient.d.ts +9 -0
- package/dist/modules/files/backbone/FileClient.d.ts.map +1 -1
- package/dist/modules/files/backbone/FileClient.js +14 -5
- package/dist/modules/files/backbone/FileClient.js.map +1 -1
- package/dist/modules/files/local/File.d.ts +57 -11
- package/dist/modules/files/local/File.d.ts.map +1 -1
- package/dist/modules/files/local/File.js +171 -18
- package/dist/modules/files/local/File.js.map +1 -1
- package/dist/modules/index.d.ts +6 -23
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +6 -23
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/messages/MessageController.d.ts +3 -8
- package/dist/modules/messages/MessageController.d.ts.map +1 -1
- package/dist/modules/messages/MessageController.js +29 -55
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/backbone/MessageClient.js +5 -5
- package/dist/modules/messages/local/Message.d.ts +28 -7
- package/dist/modules/messages/local/Message.d.ts.map +1 -1
- package/dist/modules/messages/local/Message.js +53 -12
- package/dist/modules/messages/local/Message.js.map +1 -1
- package/dist/modules/messages/local/{CachedMessageRecipient.d.ts → MessageRecipient.d.ts} +4 -4
- package/dist/modules/messages/local/MessageRecipient.d.ts.map +1 -0
- package/dist/modules/messages/local/{CachedMessageRecipient.js → MessageRecipient.js} +12 -12
- package/dist/modules/messages/local/MessageRecipient.js.map +1 -0
- package/dist/modules/messages/transmission/MessageContentWrapper.js +1 -2
- package/dist/modules/messages/transmission/MessageContentWrapper.js.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +3 -11
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +49 -131
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/backbone/RelationshipTemplateClient.js +4 -4
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +26 -10
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +70 -19
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +2 -2
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts +3 -3
- package/dist/modules/relationships/RelationshipSecretController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.js +2 -2
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +0 -10
- package/dist/modules/relationships/RelationshipsController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipsController.js +41 -117
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/backbone/RelationshipClient.js +13 -13
- package/dist/modules/relationships/local/Relationship.d.ts +14 -10
- package/dist/modules/relationships/local/Relationship.d.ts.map +1 -1
- package/dist/modules/relationships/local/Relationship.js +30 -28
- package/dist/modules/relationships/local/Relationship.js.map +1 -1
- package/dist/modules/sync/ChangedItems.d.ts +5 -2
- package/dist/modules/sync/ChangedItems.d.ts.map +1 -1
- package/dist/modules/sync/ChangedItems.js +6 -1
- package/dist/modules/sync/ChangedItems.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.js +3 -3
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +2 -60
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +11 -158
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.d.ts +0 -3
- package/dist/modules/sync/SyncController.d.ts.map +1 -1
- package/dist/modules/sync/SyncController.js +17 -38
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.d.ts.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.js +24 -10
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts +1 -0
- package/dist/modules/sync/backbone/FinalizeSyncRun.d.ts.map +1 -1
- package/dist/modules/sync/backbone/SyncClient.d.ts +0 -1
- package/dist/modules/sync/backbone/SyncClient.d.ts.map +1 -1
- package/dist/modules/sync/backbone/SyncClient.js +7 -7
- package/dist/modules/sync/backbone/SyncClient.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessor.d.ts +2 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessor.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js +6 -0
- package/dist/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js +34 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.d.ts +7 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.js +37 -0
- package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.js.map +1 -0
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.d.ts +6 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.d.ts.map +1 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.js +34 -0
- package/dist/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.js.map +1 -0
- package/dist/modules/sync/local/DatawalletModification.d.ts +2 -2
- package/dist/modules/sync/local/DatawalletModification.d.ts.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.js +1 -1
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/sync/migrations/DeviceMigrations.d.ts +2 -2
- package/dist/modules/sync/migrations/DeviceMigrations.d.ts.map +1 -1
- package/dist/modules/sync/migrations/DeviceMigrations.js +5 -15
- package/dist/modules/sync/migrations/DeviceMigrations.js.map +1 -1
- package/dist/modules/tags/backbone/TagClient.d.ts +1 -1
- package/dist/modules/tags/backbone/TagClient.d.ts.map +1 -1
- package/dist/modules/tags/backbone/TagClient.js +13 -2
- package/dist/modules/tags/backbone/TagClient.js.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.d.ts +4 -1
- package/dist/modules/tokens/AnonymousTokenController.d.ts.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.js +18 -10
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
- package/dist/modules/tokens/TokenController.d.ts +6 -11
- package/dist/modules/tokens/TokenController.d.ts.map +1 -1
- package/dist/modules/tokens/TokenController.js +75 -129
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/modules/tokens/backbone/AnonymousTokenClient.d.ts +2 -0
- package/dist/modules/tokens/backbone/AnonymousTokenClient.d.ts.map +1 -1
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js +4 -1
- package/dist/modules/tokens/backbone/AnonymousTokenClient.js.map +1 -1
- package/dist/modules/tokens/backbone/BackboneGetTokens.d.ts +3 -3
- package/dist/modules/tokens/backbone/BackboneGetTokens.d.ts.map +1 -1
- package/dist/modules/tokens/backbone/BackbonePostTokens.d.ts +10 -0
- package/dist/modules/tokens/backbone/BackbonePostTokens.d.ts.map +1 -1
- package/dist/modules/tokens/backbone/TokenClient.d.ts +2 -1
- package/dist/modules/tokens/backbone/TokenClient.d.ts.map +1 -1
- package/dist/modules/tokens/backbone/TokenClient.js +7 -4
- package/dist/modules/tokens/backbone/TokenClient.js.map +1 -1
- package/dist/modules/tokens/local/EmptyToken.d.ts +20 -0
- package/dist/modules/tokens/local/EmptyToken.d.ts.map +1 -0
- package/dist/modules/{relationships/local/CachedRelationship.js → tokens/local/EmptyToken.js} +26 -28
- package/dist/modules/tokens/local/EmptyToken.js.map +1 -0
- package/dist/modules/tokens/local/Token.d.ts +16 -9
- package/dist/modules/tokens/local/Token.d.ts.map +1 -1
- package/dist/modules/tokens/local/Token.js +40 -18
- package/dist/modules/tokens/local/Token.js.map +1 -1
- package/dist/modules/tokens/local/UpdateTokenContentParameters.d.ts +17 -0
- package/dist/modules/tokens/local/UpdateTokenContentParameters.d.ts.map +1 -0
- package/dist/modules/tokens/local/{CachedToken.js → UpdateTokenContentParameters.js} +15 -24
- package/dist/modules/tokens/local/UpdateTokenContentParameters.js.map +1 -0
- package/package.json +20 -23
- package/dist/core/ICacheable.d.ts +0 -6
- package/dist/core/ICacheable.d.ts.map +0 -1
- package/dist/core/ICacheable.js +0 -17
- package/dist/core/ICacheable.js.map +0 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts +0 -44
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts.map +0 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js +0 -80
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js.map +0 -1
- package/dist/modules/certificates/CertificateController.d.ts +0 -15
- package/dist/modules/certificates/CertificateController.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateController.js +0 -20
- package/dist/modules/certificates/CertificateController.js.map +0 -1
- package/dist/modules/certificates/CertificateIssuer.d.ts +0 -29
- package/dist/modules/certificates/CertificateIssuer.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateIssuer.js +0 -43
- package/dist/modules/certificates/CertificateIssuer.js.map +0 -1
- package/dist/modules/certificates/CertificateValidator.d.ts +0 -15
- package/dist/modules/certificates/CertificateValidator.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateValidator.js +0 -20
- package/dist/modules/certificates/CertificateValidator.js.map +0 -1
- package/dist/modules/certificates/data/Certificate.d.ts +0 -34
- package/dist/modules/certificates/data/Certificate.d.ts.map +0 -1
- package/dist/modules/certificates/data/Certificate.js +0 -61
- package/dist/modules/certificates/data/Certificate.js.map +0 -1
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +0 -10
- package/dist/modules/certificates/data/CertificateConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateConstraint.js +0 -23
- package/dist/modules/certificates/data/CertificateConstraint.js.map +0 -1
- package/dist/modules/certificates/data/CertificateContent.d.ts +0 -29
- package/dist/modules/certificates/data/CertificateContent.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateContent.js +0 -66
- package/dist/modules/certificates/data/CertificateContent.js.map +0 -1
- package/dist/modules/certificates/data/CertificateItem.d.ts +0 -11
- package/dist/modules/certificates/data/CertificateItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateItem.js +0 -24
- package/dist/modules/certificates/data/CertificateItem.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +0 -30
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +0 -56
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +0 -32
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +0 -59
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +0 -10
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +0 -30
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +0 -17
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +0 -40
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +0 -18
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +0 -38
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +0 -19
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +0 -45
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +0 -21
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +0 -41
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +0 -26
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +0 -54
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +0 -15
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +0 -38
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +0 -17
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +0 -1
- package/dist/modules/files/local/CachedFile.d.ts +0 -52
- package/dist/modules/files/local/CachedFile.d.ts.map +0 -1
- package/dist/modules/files/local/CachedFile.js +0 -145
- package/dist/modules/files/local/CachedFile.js.map +0 -1
- package/dist/modules/messages/local/CachedMessage.d.ts +0 -23
- package/dist/modules/messages/local/CachedMessage.d.ts.map +0 -1
- package/dist/modules/messages/local/CachedMessage.js.map +0 -1
- package/dist/modules/messages/local/CachedMessageRecipient.d.ts.map +0 -1
- package/dist/modules/messages/local/CachedMessageRecipient.js.map +0 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +0 -30
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts.map +0 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +0 -80
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +0 -1
- package/dist/modules/relationships/local/CachedRelationship.d.ts +0 -20
- package/dist/modules/relationships/local/CachedRelationship.d.ts.map +0 -1
- package/dist/modules/relationships/local/CachedRelationship.js.map +0 -1
- package/dist/modules/tokens/local/CachedToken.d.ts +0 -20
- package/dist/modules/tokens/local/CachedToken.d.ts.map +0 -1
- package/dist/modules/tokens/local/CachedToken.js.map +0 -1
|
@@ -11,25 +11,25 @@ class SyncClient extends core_1.RESTClientAuthenticate {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
async startSyncRun(request) {
|
|
14
|
-
return await this.post("/api/
|
|
14
|
+
return await this.post("/api/v2/SyncRuns", request);
|
|
15
15
|
}
|
|
16
16
|
async finalizeExternalEventSync(id, request) {
|
|
17
|
-
return await this.put(`/api/
|
|
17
|
+
return await this.put(`/api/v2/SyncRuns/${id}/FinalizeExternalEventSync`, request);
|
|
18
18
|
}
|
|
19
19
|
async finalizeDatawalletVersionUpgrade(id, request) {
|
|
20
|
-
return await this.put(`/api/
|
|
20
|
+
return await this.put(`/api/v2/SyncRuns/${id}/FinalizeDatawalletVersionUpgrade`, request);
|
|
21
21
|
}
|
|
22
22
|
async getExternalEventsOfSyncRun(syncRunId, progessCallback) {
|
|
23
|
-
return await this.getPaged(`/api/
|
|
23
|
+
return await this.getPaged(`/api/v2/SyncRuns/${syncRunId}/ExternalEvents`, {}, undefined, progessCallback);
|
|
24
24
|
}
|
|
25
25
|
async getDatawallet() {
|
|
26
|
-
return await this.get("/api/
|
|
26
|
+
return await this.get("/api/v2/Datawallet");
|
|
27
27
|
}
|
|
28
28
|
async getDatawalletModifications(request, progessCallback) {
|
|
29
|
-
return await this.getPaged("/api/
|
|
29
|
+
return await this.getPaged("/api/v2/Datawallet/Modifications", request, undefined, progessCallback);
|
|
30
30
|
}
|
|
31
31
|
async createDatawalletModifications(request) {
|
|
32
|
-
return await this.post("/api/
|
|
32
|
+
return await this.post("/api/v2/Datawallet/Modifications", request);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
exports.SyncClient = SyncClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncClient.js","sourceRoot":"","sources":["../../../../src/modules/sync/backbone/SyncClient.ts"],"names":[],"mappings":";;;AAAA,wCAA+H;
|
|
1
|
+
{"version":3,"file":"SyncClient.js","sourceRoot":"","sources":["../../../../src/modules/sync/backbone/SyncClient.ts"],"names":[],"mappings":";;;AAAA,wCAA+H;AAmC/H,MAAa,UAAW,SAAQ,6BAAsB;IAClD,YAAmB,MAAkE,EAAE,aAAoC,EAAE,UAAwB;QACjJ,KAAK,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE;YACrC,OAAO,EAAE;gBACL,gCAAgC,EAAE,MAAM,CAAC,0BAA0B,CAAC,QAAQ,EAAE,CAAC,2DAA2D;aAC7I;SACJ,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,OAA6B;QACnD,OAAO,MAAM,IAAI,CAAC,IAAI,CAAuB,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAEM,KAAK,CAAC,yBAAyB,CAAC,EAAU,EAAE,OAAyC;QACxF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAoC,oBAAoB,EAAE,4BAA4B,EAAE,OAAO,CAAC,CAAC;IAC1H,CAAC;IAEM,KAAK,CAAC,gCAAgC,CAAC,EAAU,EAAE,OAAgD;QACtG,OAAO,MAAM,IAAI,CAAC,GAAG,CAA2C,oBAAoB,EAAE,mCAAmC,EAAE,OAAO,CAAC,CAAC;IACxI,CAAC;IAEM,KAAK,CAAC,0BAA0B,CAAC,SAAiB,EAAE,eAA6C;QACpG,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAwB,oBAAoB,SAAS,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACtI,CAAC;IAEM,KAAK,CAAC,aAAa;QACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAwB,oBAAoB,CAAC,CAAC;IACvE,CAAC;IAEM,KAAK,CAAC,0BAA0B,CACnC,OAA0C,EAC1C,eAA6C;QAE7C,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAiC,kCAAkC,EAAE,OAAO,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IACxI,CAAC;IAEM,KAAK,CAAC,6BAA6B,CAAC,OAA6C;QACpF,OAAO,MAAM,IAAI,CAAC,IAAI,CAAwC,kCAAkC,EAAE,OAAO,CAAC,CAAC;IAC/G,CAAC;CACJ;AAvCD,gCAuCC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventBus } from "@js-soft/ts-utils";
|
|
2
2
|
import { AccountController } from "../../accounts/AccountController";
|
|
3
3
|
import { IdentityDeletionProcess } from "../../accounts/data/IdentityDeletionProcess";
|
|
4
|
+
import { File } from "../../files/local/File";
|
|
4
5
|
import { Message } from "../../messages/local/Message";
|
|
5
6
|
import { Relationship } from "../../relationships/local/Relationship";
|
|
6
7
|
import { ExternalEvent } from "../data/ExternalEvent";
|
|
@@ -9,7 +10,7 @@ export declare abstract class ExternalEventProcessor {
|
|
|
9
10
|
protected readonly eventBus: EventBus;
|
|
10
11
|
protected readonly accountController: AccountController;
|
|
11
12
|
constructor(eventBus: EventBus, accountController: AccountController);
|
|
12
|
-
abstract execute(externalEvent: ExternalEvent): Promise<Message | Relationship | IdentityDeletionProcess | undefined>;
|
|
13
|
+
abstract execute(externalEvent: ExternalEvent): Promise<Message | Relationship | IdentityDeletionProcess | File | undefined>;
|
|
13
14
|
protected get ownAddress(): string;
|
|
14
15
|
}
|
|
15
16
|
//# sourceMappingURL=ExternalEventProcessor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventProcessor.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,iCAAiC,GAAG,KAAK,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,KAAK,sBAAsB,CAAC;AAEzI,8BAAsB,sBAAsB;IAEpC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB;gBADpC,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB;aAE3C,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,GAAG,YAAY,GAAG,uBAAuB,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalEventProcessor.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,iCAAiC,GAAG,KAAK,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,iBAAiB,KAAK,sBAAsB,CAAC;AAEzI,8BAAsB,sBAAsB;IAEpC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IACrC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB;gBADpC,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB;aAE3C,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,GAAG,YAAY,GAAG,uBAAuB,GAAG,IAAI,GAAG,SAAS,CAAC;IACnI,SAAS,KAAK,UAAU,IAAI,MAAM,CAEjC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessor.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessor.ts"],"names":[],"mappings":";;;AAUA,MAAsB,sBAAsB;IACxC,YACuB,QAAkB,EAClB,iBAAoC;QADpC,aAAQ,GAAR,QAAQ,CAAU;QAClB,sBAAiB,GAAjB,iBAAiB,CAAmB;IACxD,CAAC;IAEJ,IAAc,UAAU;QACpB,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC9D,CAAC;CACJ;AATD,wDASC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventProcessorRegistry.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExternalEventProcessorRegistry.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAe7E,qBAAa,8BAA8B;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwD;;IAiB5E,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,EAAE,sBAAsB,EAAE,iCAAiC,GAAG,IAAI;IAO7G,0BAA0B,CAAC,iBAAiB,EAAE,MAAM,EAAE,sBAAsB,EAAE,iCAAiC,GAAG,IAAI;IAItH,mBAAmB,CAAC,iBAAiB,EAAE,MAAM,GAAG,iCAAiC;CAO3F"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExternalEventProcessorRegistry = void 0;
|
|
4
4
|
const core_1 = require("../../../core");
|
|
5
|
+
const FileOwnershipClaimedExternalEventProcessor_1 = require("./FileOwnershipClaimedExternalEventProcessor");
|
|
6
|
+
const FileOwnershipLockedExternalEventProcessor_1 = require("./FileOwnershipLockedExternalEventProcessor");
|
|
5
7
|
const IdentityDeletionProcessStartedExternalEventProcessor_1 = require("./IdentityDeletionProcessStartedExternalEventProcessor");
|
|
6
8
|
const IdentityDeletionProcessStatusChangedExternalEventProcessor_1 = require("./IdentityDeletionProcessStatusChangedExternalEventProcessor");
|
|
7
9
|
const MessageDeliveredExternalEventProcessor_1 = require("./MessageDeliveredExternalEventProcessor");
|
|
@@ -12,6 +14,7 @@ const PeerToBeDeletedExternalEventProcessor_1 = require("./PeerToBeDeletedExtern
|
|
|
12
14
|
const RelationshipReactivationCompletedExternalEventProcessor_1 = require("./RelationshipReactivationCompletedExternalEventProcessor");
|
|
13
15
|
const RelationshipReactivationRequestedExternalEventProcessor_1 = require("./RelationshipReactivationRequestedExternalEventProcessor");
|
|
14
16
|
const RelationshipStatusChangedExternalEventProcessor_1 = require("./RelationshipStatusChangedExternalEventProcessor");
|
|
17
|
+
const RelationshipTemplateAllocationsExhaustedProcessor_1 = require("./RelationshipTemplateAllocationsExhaustedProcessor");
|
|
15
18
|
class ExternalEventProcessorRegistry {
|
|
16
19
|
constructor() {
|
|
17
20
|
this.processors = new Map();
|
|
@@ -25,6 +28,9 @@ class ExternalEventProcessorRegistry {
|
|
|
25
28
|
this.registerProcessor("PeerDeleted", PeerDeletedExternalEventProcessor_1.PeerDeletedExternalEventProcessor);
|
|
26
29
|
this.registerProcessor("PeerDeletionCancelled", PeerDeletionCancelledExternalEventProcessor_1.PeerDeletionCancelledExternalEventProcessor);
|
|
27
30
|
this.registerProcessor("PeerToBeDeleted", PeerToBeDeletedExternalEventProcessor_1.PeerToBeDeletedExternalEventProcessor);
|
|
31
|
+
this.registerProcessor("RelationshipTemplateAllocationsExhausted", RelationshipTemplateAllocationsExhaustedProcessor_1.RelationshipTemplateAllocationsExhaustedExternalEventProcessor);
|
|
32
|
+
this.registerProcessor("FileOwnershipLocked", FileOwnershipLockedExternalEventProcessor_1.FileOwnershipLockedExternalEventProcessor);
|
|
33
|
+
this.registerProcessor("FileOwnershipClaimed", FileOwnershipClaimedExternalEventProcessor_1.FileOwnershipClaimedExternalEventProcessor);
|
|
28
34
|
}
|
|
29
35
|
registerProcessor(externalEventName, externalEventProcessor) {
|
|
30
36
|
if (this.processors.has(externalEventName)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalEventProcessorRegistry.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/ExternalEventProcessorRegistry.ts"],"names":[],"mappings":";;;AAAA,wCAA+C;AAE/C,iIAA8H;AAC9H,6IAA0I;AAC1I,qGAAkG;AAClG,mGAAgG;AAChG,2FAAwF;AACxF,+GAA4G;AAC5G,mGAAgG;AAChG,uIAAoI;AACpI,uIAAoI;AACpI,uHAAoH;
|
|
1
|
+
{"version":3,"file":"ExternalEventProcessorRegistry.js","sourceRoot":"","sources":["../../../../src/modules/sync/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B,CAAC,iBAAyB,EAAE,sBAAyD;QACzG,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,qBAAc,CAAC,6DAA6D,iBAAiB,6DAA6D,CAAC,CAAC;QAC1K,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;IACnE,CAAC;IAEM,0BAA0B,CAAC,iBAAyB,EAAE,sBAAyD;QAClH,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,EAAE,sBAAsB,CAAC,CAAC;IACnE,CAAC;IAEM,mBAAmB,CAAC,iBAAyB;QAChD,MAAM,sBAAsB,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACtE,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAC1B,MAAM,IAAI,qBAAc,CAAC,0CAA0C,iBAAiB,IAAI,CAAC,CAAC;QAC9F,CAAC;QACD,OAAO,sBAAsB,CAAC;IAClC,CAAC;CACJ;AApCD,wEAoCC"}
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { File } from "../../files/local/File";
|
|
2
|
+
import { ExternalEvent } from "../data/ExternalEvent";
|
|
3
|
+
import { ExternalEventProcessor } from "./ExternalEventProcessor";
|
|
4
|
+
export declare class FileOwnershipClaimedExternalEventProcessor extends ExternalEventProcessor {
|
|
5
|
+
execute(externalEvent: ExternalEvent): Promise<File | undefined>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=FileOwnershipClaimedExternalEventProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileOwnershipClaimedExternalEventProcessor.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAQlE,qBAAa,0CAA2C,SAAQ,sBAAsB;IAC5D,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;CAWzF"}
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileOwnershipClaimedExternalEventProcessor = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const events_1 = require("../../../events");
|
|
15
|
+
const ExternalEventProcessor_1 = require("./ExternalEventProcessor");
|
|
16
|
+
class FileOwnershipClaimedExternalEventData extends ts_serval_1.Serializable {
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, ts_serval_1.serialize)(),
|
|
20
|
+
(0, ts_serval_1.validate)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], FileOwnershipClaimedExternalEventData.prototype, "fileId", void 0);
|
|
23
|
+
class FileOwnershipClaimedExternalEventProcessor extends ExternalEventProcessor_1.ExternalEventProcessor {
|
|
24
|
+
async execute(externalEvent) {
|
|
25
|
+
const payload = FileOwnershipClaimedExternalEventData.fromAny(externalEvent.payload);
|
|
26
|
+
const file = await this.accountController.files.updateFileFromBackbone(payload.fileId);
|
|
27
|
+
file.clearOwnershipToken();
|
|
28
|
+
const updatedFile = await this.accountController.files.updateFile(file);
|
|
29
|
+
this.eventBus.publish(new events_1.FileOwnershipClaimedEvent(this.ownAddress, updatedFile));
|
|
30
|
+
return updatedFile;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.FileOwnershipClaimedExternalEventProcessor = FileOwnershipClaimedExternalEventProcessor;
|
|
34
|
+
//# sourceMappingURL=FileOwnershipClaimedExternalEventProcessor.js.map
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileOwnershipClaimedExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AACvE,4CAA4D;AAG5D,qEAAkE;AAElE,MAAM,qCAAsC,SAAQ,wBAAY;CAI/D;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;qEACW;AAG1B,MAAa,0CAA2C,SAAQ,+CAAsB;IAClE,KAAK,CAAC,OAAO,CAAC,aAA4B;QACtD,MAAM,OAAO,GAAG,qCAAqC,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAErF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAEvF,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAExE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,kCAAyB,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;QACnF,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AAZD,gGAYC"}
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { File } from "../../files/local/File";
|
|
2
|
+
import { ExternalEvent } from "../data/ExternalEvent";
|
|
3
|
+
import { ExternalEventProcessor } from "./ExternalEventProcessor";
|
|
4
|
+
export declare class FileOwnershipLockedExternalEventProcessor extends ExternalEventProcessor {
|
|
5
|
+
execute(externalEvent: ExternalEvent): Promise<File | undefined>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=FileOwnershipLockedExternalEventProcessor.d.ts.map
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileOwnershipLockedExternalEventProcessor.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAQlE,qBAAa,yCAA0C,SAAQ,sBAAsB;IAC3D,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;CAYzF"}
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FileOwnershipLockedExternalEventProcessor = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const core_types_1 = require("@nmshd/core-types");
|
|
15
|
+
const events_1 = require("../../../events");
|
|
16
|
+
const ExternalEventProcessor_1 = require("./ExternalEventProcessor");
|
|
17
|
+
class FileOwnershipLockedExternalEventData extends ts_serval_1.Serializable {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, ts_serval_1.serialize)(),
|
|
21
|
+
(0, ts_serval_1.validate)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], FileOwnershipLockedExternalEventData.prototype, "fileId", void 0);
|
|
24
|
+
class FileOwnershipLockedExternalEventProcessor extends ExternalEventProcessor_1.ExternalEventProcessor {
|
|
25
|
+
async execute(externalEvent) {
|
|
26
|
+
const payload = FileOwnershipLockedExternalEventData.fromAny(externalEvent.payload);
|
|
27
|
+
const file = await this.accountController.files.getFile(core_types_1.CoreId.from(payload.fileId));
|
|
28
|
+
if (!file)
|
|
29
|
+
return;
|
|
30
|
+
file.setOwnershipIsLocked();
|
|
31
|
+
const updatedFile = await this.accountController.files.updateFile(file);
|
|
32
|
+
this.eventBus.publish(new events_1.FileOwnershipLockedEvent(this.ownAddress, updatedFile));
|
|
33
|
+
return updatedFile;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.FileOwnershipLockedExternalEventProcessor = FileOwnershipLockedExternalEventProcessor;
|
|
37
|
+
//# sourceMappingURL=FileOwnershipLockedExternalEventProcessor.js.map
|
package/dist/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileOwnershipLockedExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/FileOwnershipLockedExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AACvE,kDAA2C;AAC3C,4CAA2D;AAG3D,qEAAkE;AAElE,MAAM,oCAAqC,SAAQ,wBAAY;CAI9D;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;oEACW;AAG1B,MAAa,yCAA0C,SAAQ,+CAAsB;IACjE,KAAK,CAAC,OAAO,CAAC,aAA4B;QACtD,MAAM,OAAO,GAAG,oCAAoC,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACpF,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAErF,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAExE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,iCAAwB,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;QAClF,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AAbD,8FAaC"}
|
|
@@ -22,7 +22,7 @@ __decorate([
|
|
|
22
22
|
class IdentityDeletionProcessStatusChangedExternalEventProcessor extends ExternalEventProcessor_1.ExternalEventProcessor {
|
|
23
23
|
async execute(externalEvent) {
|
|
24
24
|
const messageReceivedPayload = IdentityDeletionProcessStatusChangedEventData.fromAny(externalEvent.payload);
|
|
25
|
-
const newIdentityDeletionProcess = await this.accountController.identityDeletionProcess.
|
|
25
|
+
const newIdentityDeletionProcess = await this.accountController.identityDeletionProcess.updateExistingIdentityDeletionProcessFromBackbone(messageReceivedPayload.deletionProcessId);
|
|
26
26
|
return newIdentityDeletionProcess;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentityDeletionProcessStatusChangedExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AAGvE,qEAAkE;AAElE,MAAM,6CAA8C,SAAQ,wBAAY;CAIvE;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;wFACsB;AAGrC,MAAa,0DAA2D,SAAQ,+CAAsB;IAClF,KAAK,CAAC,OAAO,CAAC,aAAoC;QAC9D,MAAM,sBAAsB,GAAG,6CAA6C,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE5G,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"IdentityDeletionProcessStatusChangedExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AAGvE,qEAAkE;AAElE,MAAM,6CAA8C,SAAQ,wBAAY;CAIvE;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;wFACsB;AAGrC,MAAa,0DAA2D,SAAQ,+CAAsB;IAClF,KAAK,CAAC,OAAO,CAAC,aAAoC;QAC9D,MAAM,sBAAsB,GAAG,6CAA6C,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAE5G,MAAM,0BAA0B,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,iDAAiD,CACrI,sBAAsB,CAAC,iBAAiB,CAC3C,CAAC;QAEF,OAAO,0BAA0B,CAAC;IACtC,CAAC;CACJ;AAVD,gIAUC"}
|
|
@@ -23,7 +23,7 @@ __decorate([
|
|
|
23
23
|
class MessageDeliveredExternalEventProcessor extends ExternalEventProcessor_1.ExternalEventProcessor {
|
|
24
24
|
async execute(externalEvent) {
|
|
25
25
|
const messageReceivedPayload = MessageDeliveredExternalEventData.fromAny(externalEvent.payload);
|
|
26
|
-
const updatedMessages = await this.accountController.messages.
|
|
26
|
+
const updatedMessages = await this.accountController.messages.updateBackboneData([messageReceivedPayload.id]);
|
|
27
27
|
const deliveredMessage = updatedMessages[0];
|
|
28
28
|
this.eventBus.publish(new events_1.MessageDeliveredEvent(this.ownAddress, deliveredMessage));
|
|
29
29
|
return deliveredMessage;
|
package/dist/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageDeliveredExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AACvE,4CAAwD;AAGxD,qEAAkE;AAElE,MAAM,iCAAkC,SAAQ,wBAAY;CAI3D;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;6DACO;AAGtB,MAAa,sCAAuC,SAAQ,+CAAsB;IAC9D,KAAK,CAAC,OAAO,CAAC,aAA4B;QACtD,MAAM,sBAAsB,GAAG,iCAAiC,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAChG,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"MessageDeliveredExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AACvE,4CAAwD;AAGxD,qEAAkE;AAElE,MAAM,iCAAkC,SAAQ,wBAAY;CAI3D;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;;6DACO;AAGtB,MAAa,sCAAuC,SAAQ,+CAAsB;IAC9D,KAAK,CAAC,OAAO,CAAC,aAA4B;QACtD,MAAM,sBAAsB,GAAG,iCAAiC,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAChG,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC;QAE9G,MAAM,gBAAgB,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAE5C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,8BAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACpF,OAAO,gBAAgB,CAAC;IAC5B,CAAC;CACJ;AAVD,wFAUC"}
|
|
@@ -12,7 +12,7 @@ class RelationshipExternalEventProcessor extends ExternalEventProcessor_1.Extern
|
|
|
12
12
|
hasRelationshipChanged(changedRelationship, oldRelationship) {
|
|
13
13
|
if (!oldRelationship)
|
|
14
14
|
return true;
|
|
15
|
-
return oldRelationship.
|
|
15
|
+
return oldRelationship.auditLog.length !== changedRelationship.auditLog.length;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.RelationshipExternalEventProcessor = RelationshipExternalEventProcessor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelationshipExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.ts"],"names":[],"mappings":";;;AAAA,4CAA2D;AAE3D,qEAAkE;AAElE,MAAsB,kCAAmC,SAAQ,+CAAsB;IACzE,+BAA+B,CAAC,mBAAiC,EAAE,eAA8B;QACvG,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,eAAe,CAAC;YAAE,OAAO;QAE/E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,iCAAwB,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC9F,CAAC;IAEO,sBAAsB,CAAC,mBAAiC,EAAE,eAA8B;QAC5F,IAAI,CAAC,eAAe;YAAE,OAAO,IAAI,CAAC;QAElC,OAAO,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"RelationshipExternalEventProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.ts"],"names":[],"mappings":";;;AAAA,4CAA2D;AAE3D,qEAAkE;AAElE,MAAsB,kCAAmC,SAAQ,+CAAsB;IACzE,+BAA+B,CAAC,mBAAiC,EAAE,eAA8B;QACvG,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,eAAe,CAAC;YAAE,OAAO;QAE/E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,iCAAwB,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAC9F,CAAC;IAEO,sBAAsB,CAAC,mBAAiC,EAAE,eAA8B;QAC5F,IAAI,CAAC,eAAe;YAAE,OAAO,IAAI,CAAC;QAElC,OAAO,eAAe,CAAC,QAAQ,CAAC,MAAM,KAAK,mBAAmB,CAAC,QAAQ,CAAC,MAAM,CAAC;IACnF,CAAC;CACJ;AAZD,gFAYC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExternalEvent } from "../data/ExternalEvent";
|
|
2
|
+
import { ExternalEventProcessor } from "./ExternalEventProcessor";
|
|
3
|
+
export declare class RelationshipTemplateAllocationsExhaustedExternalEventProcessor extends ExternalEventProcessor {
|
|
4
|
+
execute(externalEvent: ExternalEvent): Promise<undefined>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=RelationshipTemplateAllocationsExhaustedProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateAllocationsExhaustedProcessor.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAQlE,qBAAa,8DAA+D,SAAQ,sBAAsB;IAChF,OAAO,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC;CAQlF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RelationshipTemplateAllocationsExhaustedExternalEventProcessor = void 0;
|
|
13
|
+
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
+
const core_types_1 = require("@nmshd/core-types");
|
|
15
|
+
const events_1 = require("../../../events");
|
|
16
|
+
const ExternalEventProcessor_1 = require("./ExternalEventProcessor");
|
|
17
|
+
class RelationshipTemplateAllocationsExhaustedExternalEventData extends ts_serval_1.Serializable {
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, ts_serval_1.serialize)(),
|
|
21
|
+
(0, ts_serval_1.validate)(),
|
|
22
|
+
__metadata("design:type", core_types_1.CoreId)
|
|
23
|
+
], RelationshipTemplateAllocationsExhaustedExternalEventData.prototype, "relationshipTemplateId", void 0);
|
|
24
|
+
class RelationshipTemplateAllocationsExhaustedExternalEventProcessor extends ExternalEventProcessor_1.ExternalEventProcessor {
|
|
25
|
+
async execute(externalEvent) {
|
|
26
|
+
const payload = RelationshipTemplateAllocationsExhaustedExternalEventData.fromAny(externalEvent.payload);
|
|
27
|
+
const template = await this.accountController.relationshipTemplates.getRelationshipTemplate(payload.relationshipTemplateId);
|
|
28
|
+
if (!template)
|
|
29
|
+
return;
|
|
30
|
+
this.eventBus.publish(new events_1.RelationshipTemplateAllocationsExhaustedEvent(this.ownAddress, template));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.RelationshipTemplateAllocationsExhaustedExternalEventProcessor = RelationshipTemplateAllocationsExhaustedExternalEventProcessor;
|
|
34
|
+
//# sourceMappingURL=RelationshipTemplateAllocationsExhaustedProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelationshipTemplateAllocationsExhaustedProcessor.js","sourceRoot":"","sources":["../../../../src/modules/sync/externalEventProcessors/RelationshipTemplateAllocationsExhaustedProcessor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAuE;AACvE,kDAA2C;AAC3C,4CAAgF;AAEhF,qEAAkE;AAElE,MAAM,yDAA0D,SAAQ,wBAAY;CAInF;AADU;IAFN,IAAA,qBAAS,GAAE;IACX,IAAA,oBAAQ,GAAE;8BACoB,mBAAM;yGAAC;AAG1C,MAAa,8DAA+D,SAAQ,+CAAsB;IACtF,KAAK,CAAC,OAAO,CAAC,aAA4B;QACtD,MAAM,OAAO,GAAG,yDAAyD,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAEzG,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QAC5H,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,sDAA6C,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IACxG,CAAC;CACJ;AATD,wIASC"}
|
|
@@ -12,11 +12,11 @@ export interface IDatawalletModification extends ISerializable {
|
|
|
12
12
|
export declare enum DatawalletModificationType {
|
|
13
13
|
Create = "Create",
|
|
14
14
|
Update = "Update",
|
|
15
|
-
Delete = "Delete"
|
|
16
|
-
CacheChanged = "CacheChanged"
|
|
15
|
+
Delete = "Delete"
|
|
17
16
|
}
|
|
18
17
|
export declare enum DatawalletModificationCategory {
|
|
19
18
|
TechnicalData = "TechnicalData",
|
|
19
|
+
Content = "Content",
|
|
20
20
|
Userdata = "Userdata",
|
|
21
21
|
Metadata = "Metadata"
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatawalletModification.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/local/DatawalletModification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,8BAA8B,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,oBAAY,0BAA0B;IAClC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;
|
|
1
|
+
{"version":3,"file":"DatawalletModification.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/local/DatawalletModification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,CAAC,EAAE,8BAA8B,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,oBAAY,0BAA0B;IAClC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,oBAAY,8BAA8B;IACtC,aAAa,kBAAkB;IAC/B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACxB;AAED,qBACa,sBAAuB,SAAQ,YAAa,YAAW,uBAAuB;IAGhF,OAAO,EAAE,MAAM,CAAC;IAIhB,gBAAgB,EAAE,MAAM,CAAC;IAIzB,eAAe,CAAC,EAAE,8BAA8B,CAAC;IAIjD,UAAU,EAAE,MAAM,CAAC;IAInB,IAAI,EAAE,0BAA0B,CAAC;IAIjC,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;WAEpB,IAAI,CAAC,KAAK,EAAE,uBAAuB,GAAG,sBAAsB;CAG7E"}
|
|
@@ -17,11 +17,11 @@ var DatawalletModificationType;
|
|
|
17
17
|
DatawalletModificationType["Create"] = "Create";
|
|
18
18
|
DatawalletModificationType["Update"] = "Update";
|
|
19
19
|
DatawalletModificationType["Delete"] = "Delete";
|
|
20
|
-
DatawalletModificationType["CacheChanged"] = "CacheChanged";
|
|
21
20
|
})(DatawalletModificationType || (exports.DatawalletModificationType = DatawalletModificationType = {}));
|
|
22
21
|
var DatawalletModificationCategory;
|
|
23
22
|
(function (DatawalletModificationCategory) {
|
|
24
23
|
DatawalletModificationCategory["TechnicalData"] = "TechnicalData";
|
|
24
|
+
DatawalletModificationCategory["Content"] = "Content";
|
|
25
25
|
DatawalletModificationCategory["Userdata"] = "Userdata";
|
|
26
26
|
DatawalletModificationCategory["Metadata"] = "Metadata";
|
|
27
27
|
})(DatawalletModificationCategory || (exports.DatawalletModificationCategory = DatawalletModificationCategory = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatawalletModification.js","sourceRoot":"","sources":["../../../../src/modules/sync/local/DatawalletModification.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4F;AAC5F,kDAAoD;AAYpD,IAAY,
|
|
1
|
+
{"version":3,"file":"DatawalletModification.js","sourceRoot":"","sources":["../../../../src/modules/sync/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AAC,wBAAwB,CAAC;GAClB,sBAAsB,CAgClC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountController } from "../../accounts/AccountController";
|
|
2
2
|
export declare class DeviceMigrations {
|
|
3
|
-
private readonly
|
|
4
|
-
constructor(
|
|
3
|
+
private readonly _accountController;
|
|
4
|
+
constructor(_accountController: AccountController);
|
|
5
5
|
v1(): Promise<void>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=DeviceMigrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceMigrations.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/migrations/DeviceMigrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeviceMigrations.d.ts","sourceRoot":"","sources":["../../../../src/modules/sync/migrations/DeviceMigrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,qBAAa,gBAAgB;IACN,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,iBAAiB;IAElE,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAI7B"}
|
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeviceMigrations = void 0;
|
|
4
4
|
class DeviceMigrations {
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
5
|
+
constructor(_accountController) {
|
|
6
|
+
this._accountController = _accountController;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const files = await this.accountController.files.getFiles(query);
|
|
12
|
-
await this.accountController.files.updateCache(files.map(synchronizableToId));
|
|
13
|
-
const messages = await this.accountController.messages.getMessages(query);
|
|
14
|
-
await this.accountController.messages.updateCache(messages.map(synchronizableToId));
|
|
15
|
-
const relationships = await this.accountController.relationships.getRelationships(query);
|
|
16
|
-
await this.accountController.relationships.updateCache(relationships.map(synchronizableToId));
|
|
17
|
-
const templates = await this.accountController.relationshipTemplates.getRelationshipTemplates(query);
|
|
18
|
-
await this.accountController.relationshipTemplates.updateCache(templates.map(synchronizableToId));
|
|
19
|
-
const tokens = await this.accountController.tokens.getTokens(query);
|
|
20
|
-
await this.accountController.tokens.updateCache(tokens.map(synchronizableToId));
|
|
8
|
+
v1() {
|
|
9
|
+
// no upgrade steps necessary for v1
|
|
10
|
+
return Promise.resolve();
|
|
21
11
|
}
|
|
22
12
|
}
|
|
23
13
|
exports.DeviceMigrations = DeviceMigrations;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceMigrations.js","sourceRoot":"","sources":["../../../../src/modules/sync/migrations/DeviceMigrations.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DeviceMigrations.js","sourceRoot":"","sources":["../../../../src/modules/sync/migrations/DeviceMigrations.ts"],"names":[],"mappings":";;;AAEA,MAAa,gBAAgB;IACzB,YAAoC,kBAAqC;QAArC,uBAAkB,GAAlB,kBAAkB,CAAmB;IAAG,CAAC;IAEtE,EAAE;QACL,oCAAoC;QACpC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ;AAPD,4CAOC"}
|
|
@@ -2,6 +2,6 @@ import { ClientResult } from "../../../core/backbone/ClientResult";
|
|
|
2
2
|
import { RESTClientAuthenticate } from "../../../core/backbone/RESTClientAuthenticate";
|
|
3
3
|
import { BackboneGetTagCollection } from "./BackboneGetTagCollection";
|
|
4
4
|
export declare class TagClient extends RESTClientAuthenticate {
|
|
5
|
-
getTagCollection(): Promise<ClientResult<BackboneGetTagCollection
|
|
5
|
+
getTagCollection(etag?: string): Promise<ClientResult<BackboneGetTagCollection> | undefined>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=TagClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagClient.d.ts","sourceRoot":"","sources":["../../../../src/modules/tags/backbone/TagClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TagClient.d.ts","sourceRoot":"","sources":["../../../../src/modules/tags/backbone/TagClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,qBAAa,SAAU,SAAQ,sBAAsB;IACpC,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;CAiB5G"}
|
|
@@ -3,8 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TagClient = void 0;
|
|
4
4
|
const RESTClientAuthenticate_1 = require("../../../core/backbone/RESTClientAuthenticate");
|
|
5
5
|
class TagClient extends RESTClientAuthenticate_1.RESTClientAuthenticate {
|
|
6
|
-
async getTagCollection() {
|
|
7
|
-
|
|
6
|
+
async getTagCollection(etag) {
|
|
7
|
+
const headers = {};
|
|
8
|
+
if (etag) {
|
|
9
|
+
headers["if-none-match"] = etag;
|
|
10
|
+
}
|
|
11
|
+
const result = await this.get("/api/v2/Tags", undefined, {
|
|
12
|
+
headers,
|
|
13
|
+
validateStatus: (status) => status === 200 || status === 304
|
|
14
|
+
});
|
|
15
|
+
if (result.responseStatus === 304) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
8
19
|
}
|
|
9
20
|
}
|
|
10
21
|
exports.TagClient = TagClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagClient.js","sourceRoot":"","sources":["../../../../src/modules/tags/backbone/TagClient.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TagClient.js","sourceRoot":"","sources":["../../../../src/modules/tags/backbone/TagClient.ts"],"names":[],"mappings":";;;AAEA,0FAAuF;AAGvF,MAAa,SAAU,SAAQ,+CAAsB;IAC1C,KAAK,CAAC,gBAAgB,CAAC,IAAa;QACvC,MAAM,OAAO,GAAkC,EAAE,CAAC;QAClD,IAAI,IAAI,EAAE,CAAC;YACP,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;QACpC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAA2B,cAAc,EAAE,SAAS,EAAE;YAC/E,OAAO;YACP,cAAc,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG;SAC/D,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,cAAc,KAAK,GAAG,EAAE,CAAC;YAChC,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAlBD,8BAkBC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { IConfig, ICorrelator } from "../../core";
|
|
2
|
+
import { EmptyToken } from "./local/EmptyToken";
|
|
2
3
|
import { Token } from "./local/Token";
|
|
4
|
+
import { TokenReference } from "./transmission/TokenReference";
|
|
3
5
|
export declare class AnonymousTokenController {
|
|
4
6
|
private readonly client;
|
|
5
7
|
constructor(config: IConfig, correlator?: ICorrelator);
|
|
6
|
-
|
|
8
|
+
createEmptyToken(): Promise<EmptyToken>;
|
|
9
|
+
loadPeerTokenByReference(reference: TokenReference, password?: string): Promise<Token>;
|
|
7
10
|
private loadPeerToken;
|
|
8
11
|
}
|
|
9
12
|
//# sourceMappingURL=AnonymousTokenController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnonymousTokenController.d.ts","sourceRoot":"","sources":["../../../src/modules/tokens/AnonymousTokenController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,WAAW,EAAuB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"AnonymousTokenController.d.ts","sourceRoot":"","sources":["../../../src/modules/tokens/AnonymousTokenController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAc,OAAO,EAAE,WAAW,EAAuB,MAAM,YAAY,CAAC;AAGnF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,qBAAa,wBAAwB;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;gBAC3B,MAAM,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,WAAW;IAI/C,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC;IAevC,wBAAwB,CAAC,SAAS,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;YAerF,aAAa;CA+B9B"}
|
|
@@ -7,22 +7,31 @@ const crypto_1 = require("@nmshd/crypto");
|
|
|
7
7
|
const core_1 = require("../../core");
|
|
8
8
|
const PasswordProtection_1 = require("../../core/types/PasswordProtection");
|
|
9
9
|
const AnonymousTokenClient_1 = require("./backbone/AnonymousTokenClient");
|
|
10
|
-
const
|
|
10
|
+
const EmptyToken_1 = require("./local/EmptyToken");
|
|
11
11
|
const Token_1 = require("./local/Token");
|
|
12
|
-
const TokenReference_1 = require("./transmission/TokenReference");
|
|
13
12
|
class AnonymousTokenController {
|
|
14
13
|
constructor(config, correlator) {
|
|
15
14
|
this.client = new AnonymousTokenClient_1.AnonymousTokenClient(config, correlator);
|
|
16
15
|
}
|
|
17
|
-
async
|
|
18
|
-
const
|
|
19
|
-
|
|
16
|
+
async createEmptyToken() {
|
|
17
|
+
const secretKey = await core_1.CoreCrypto.generateSecretKey();
|
|
18
|
+
const password = await core_types_1.Random.string(16, core_types_1.RandomCharacterRange.Alphanumeric + core_types_1.RandomCharacterRange.SpecialCharacters);
|
|
19
|
+
const salt = await core_1.CoreCrypto.random(16);
|
|
20
|
+
const passwordProtection = PasswordProtection_1.PasswordProtection.from({ password, passwordType: "pw", salt });
|
|
21
|
+
const expiresAt = core_types_1.CoreDate.utc().add({ minutes: 2 });
|
|
22
|
+
const hashedPassword = (await core_1.CoreCrypto.deriveHashOutOfPassword(password, salt)).toBase64();
|
|
23
|
+
const response = (await this.client.createToken({ password: hashedPassword, expiresAt: expiresAt.toISOString() })).value;
|
|
24
|
+
return EmptyToken_1.EmptyToken.from({ id: core_types_1.CoreId.from(response.id), secretKey: secretKey, expiresAt, passwordProtection });
|
|
25
|
+
}
|
|
26
|
+
async loadPeerTokenByReference(reference, password) {
|
|
27
|
+
if (reference.passwordProtection && !reference.passwordProtection.password && !password)
|
|
20
28
|
throw core_1.TransportCoreErrors.general.noPasswordProvided();
|
|
21
29
|
const passwordProtection = reference.passwordProtection
|
|
22
30
|
? PasswordProtection_1.PasswordProtection.from({
|
|
23
31
|
salt: reference.passwordProtection.salt,
|
|
24
32
|
passwordType: reference.passwordProtection.passwordType,
|
|
25
|
-
password: password
|
|
33
|
+
password: (password ?? reference.passwordProtection.password),
|
|
34
|
+
passwordLocationIndicator: reference.passwordProtection.passwordLocationIndicator
|
|
26
35
|
})
|
|
27
36
|
: undefined;
|
|
28
37
|
return await this.loadPeerToken(reference.id, reference.key, reference.forIdentityTruncated, passwordProtection);
|
|
@@ -33,6 +42,8 @@ class AnonymousTokenController {
|
|
|
33
42
|
}
|
|
34
43
|
const hashedPassword = passwordProtection ? (await core_1.CoreCrypto.deriveHashOutOfPassword(passwordProtection.password, passwordProtection.salt)).toBase64() : undefined;
|
|
35
44
|
const response = (await this.client.getToken(id.toString(), hashedPassword)).value;
|
|
45
|
+
if (!response.content || !response.createdBy || !response.createdByDevice)
|
|
46
|
+
throw core_1.TransportCoreErrors.tokens.emptyToken(id.toString());
|
|
36
47
|
const cipher = crypto_1.CryptoCipher.fromBase64(response.content);
|
|
37
48
|
const plaintextTokenBuffer = await core_1.CoreCrypto.decrypt(cipher, secretKey);
|
|
38
49
|
const plaintextTokenContent = ts_serval_1.Serializable.deserializeUnknown(plaintextTokenBuffer.toUtf8());
|
|
@@ -43,16 +54,13 @@ class AnonymousTokenController {
|
|
|
43
54
|
id: id,
|
|
44
55
|
secretKey: secretKey,
|
|
45
56
|
isOwn: false,
|
|
46
|
-
passwordProtection
|
|
47
|
-
});
|
|
48
|
-
const cachedToken = CachedToken_1.CachedToken.from({
|
|
57
|
+
passwordProtection,
|
|
49
58
|
createdAt: core_types_1.CoreDate.from(response.createdAt),
|
|
50
59
|
expiresAt: core_types_1.CoreDate.from(response.expiresAt),
|
|
51
60
|
createdBy: core_types_1.CoreAddress.from(response.createdBy),
|
|
52
61
|
createdByDevice: core_types_1.CoreId.from(response.createdByDevice),
|
|
53
62
|
content: plaintextTokenContent
|
|
54
63
|
});
|
|
55
|
-
token.setCache(cachedToken);
|
|
56
64
|
return token;
|
|
57
65
|
}
|
|
58
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnonymousTokenController.js","sourceRoot":"","sources":["../../../src/modules/tokens/AnonymousTokenController.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"AnonymousTokenController.js","sourceRoot":"","sources":["../../../src/modules/tokens/AnonymousTokenController.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAClD,kDAAgG;AAChG,0CAA8D;AAC9D,qCAAmF;AACnF,4EAAyE;AACzE,0EAAuE;AACvE,mDAAgD;AAChD,yCAAsC;AAGtC,MAAa,wBAAwB;IAEjC,YAAmB,MAAe,EAAE,UAAwB;QACxD,IAAI,CAAC,MAAM,GAAG,IAAI,2CAAoB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;IAEM,KAAK,CAAC,gBAAgB;QACzB,MAAM,SAAS,GAAG,MAAM,iBAAU,CAAC,iBAAiB,EAAE,CAAC;QACvD,MAAM,QAAQ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