@nmshd/runtime 7.0.0-alpha.4 → 7.0.0-alpha.41
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/README.md +2 -2
- package/dist/ConfigHolder.d.ts +7 -0
- package/dist/ConfigHolder.d.ts.map +1 -0
- package/dist/ConfigHolder.js +14 -0
- package/dist/ConfigHolder.js.map +1 -0
- package/dist/Runtime.d.ts +2 -2
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +30 -17
- package/dist/Runtime.js.map +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.d.ts +2 -0
- package/dist/dataViews/DataViewExpander.d.ts.map +1 -1
- package/dist/dataViews/DataViewExpander.js +171 -145
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/dataViews/consumption/LocalRequestDVO.d.ts +1 -0
- package/dist/dataViews/consumption/LocalRequestDVO.d.ts.map +1 -1
- package/dist/dataViews/consumption/index.d.ts +0 -1
- package/dist/dataViews/consumption/index.d.ts.map +1 -1
- package/dist/dataViews/consumption/index.js +0 -1
- package/dist/dataViews/consumption/index.js.map +1 -1
- package/dist/dataViews/content/RequestItemDVOs.d.ts +13 -3
- package/dist/dataViews/content/RequestItemDVOs.d.ts.map +1 -1
- package/dist/dataViews/content/ResponseItemDVOs.d.ts +15 -6
- package/dist/dataViews/content/ResponseItemDVOs.d.ts.map +1 -1
- package/dist/dataViews/transport/FileDVO.d.ts +4 -1
- package/dist/dataViews/transport/FileDVO.d.ts.map +1 -1
- package/dist/dataViews/transport/MessageDVO.d.ts +2 -2
- package/dist/dataViews/transport/RelationshipDVO.d.ts +1 -0
- package/dist/dataViews/transport/RelationshipDVO.d.ts.map +1 -1
- package/dist/events/EventProxy.d.ts.map +1 -1
- package/dist/events/EventProxy.js +9 -1
- package/dist/events/EventProxy.js.map +1 -1
- package/dist/events/consumption/index.d.ts +0 -1
- package/dist/events/consumption/index.d.ts.map +1 -1
- package/dist/events/consumption/index.js +0 -1
- package/dist/events/consumption/index.js.map +1 -1
- package/dist/events/transport/FileOwnershipClaimedEvent.d.ts +7 -0
- package/dist/events/transport/FileOwnershipClaimedEvent.d.ts.map +1 -0
- package/dist/events/transport/FileOwnershipClaimedEvent.js +12 -0
- package/dist/events/transport/FileOwnershipClaimedEvent.js.map +1 -0
- package/dist/events/transport/FileOwnershipLockedEvent.d.ts +7 -0
- package/dist/events/transport/FileOwnershipLockedEvent.d.ts.map +1 -0
- package/dist/events/transport/FileOwnershipLockedEvent.js +12 -0
- package/dist/events/transport/FileOwnershipLockedEvent.js.map +1 -0
- package/dist/events/transport/MessageDeliveredEvent.js +1 -1
- package/dist/events/transport/RelationshipTemplateAllocationsExhaustedEvent.d.ts +7 -0
- package/dist/events/transport/RelationshipTemplateAllocationsExhaustedEvent.d.ts.map +1 -0
- package/dist/events/transport/RelationshipTemplateAllocationsExhaustedEvent.js +12 -0
- package/dist/events/transport/RelationshipTemplateAllocationsExhaustedEvent.js.map +1 -0
- package/dist/events/transport/index.d.ts +3 -0
- package/dist/events/transport/index.d.ts.map +1 -1
- package/dist/events/transport/index.js +3 -0
- package/dist/events/transport/index.js.map +1 -1
- package/dist/extensibility/TransportServices.d.ts +3 -2
- package/dist/extensibility/TransportServices.d.ts.map +1 -1
- package/dist/extensibility/TransportServices.js +4 -1
- package/dist/extensibility/TransportServices.js.map +1 -1
- package/dist/extensibility/facades/consumption/AttributesFacade.d.ts +4 -6
- package/dist/extensibility/facades/consumption/AttributesFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/consumption/AttributesFacade.js +8 -8
- package/dist/extensibility/facades/consumption/AttributesFacade.js.map +1 -1
- package/dist/extensibility/facades/transport/AccountFacade.d.ts +4 -4
- package/dist/extensibility/facades/transport/AccountFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/AccountFacade.js +5 -5
- package/dist/extensibility/facades/transport/AccountFacade.js.map +1 -1
- package/dist/extensibility/facades/transport/AnnouncementsFacade.d.ts +9 -0
- package/dist/extensibility/facades/transport/AnnouncementsFacade.d.ts.map +1 -0
- package/dist/extensibility/facades/transport/AnnouncementsFacade.js +31 -0
- package/dist/extensibility/facades/transport/AnnouncementsFacade.js.map +1 -0
- package/dist/extensibility/facades/transport/FilesFacade.d.ts +4 -6
- package/dist/extensibility/facades/transport/FilesFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/FilesFacade.js +5 -11
- package/dist/extensibility/facades/transport/FilesFacade.js.map +1 -1
- package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.d.ts +4 -8
- package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.js +5 -17
- package/dist/extensibility/facades/transport/RelationshipTemplatesFacade.js.map +1 -1
- package/dist/extensibility/facades/transport/TokensFacade.d.ts +2 -4
- package/dist/extensibility/facades/transport/TokensFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/TokensFacade.js +2 -8
- package/dist/extensibility/facades/transport/TokensFacade.js.map +1 -1
- package/dist/extensibility/facades/transport/index.d.ts +1 -0
- package/dist/extensibility/facades/transport/index.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/index.js +1 -0
- package/dist/extensibility/facades/transport/index.js.map +1 -1
- package/dist/extensibility/modules/RuntimeModule.d.ts +2 -3
- package/dist/extensibility/modules/RuntimeModule.d.ts.map +1 -1
- package/dist/extensibility/modules/RuntimeModule.js +2 -4
- package/dist/extensibility/modules/RuntimeModule.js.map +1 -1
- package/dist/extensibility/modules/RuntimeModuleRegistry.d.ts +0 -1
- package/dist/extensibility/modules/RuntimeModuleRegistry.d.ts.map +1 -1
- package/dist/extensibility/modules/RuntimeModuleRegistry.js +0 -3
- package/dist/extensibility/modules/RuntimeModuleRegistry.js.map +1 -1
- package/dist/modules/DeciderModule.d.ts +2 -0
- package/dist/modules/DeciderModule.d.ts.map +1 -1
- package/dist/modules/DeciderModule.js +36 -22
- package/dist/modules/DeciderModule.js.map +1 -1
- package/dist/modules/RequestModule.d.ts.map +1 -1
- package/dist/modules/RequestModule.js +16 -11
- package/dist/modules/RequestModule.js.map +1 -1
- package/dist/modules/decide/RequestConfig.d.ts +5 -6
- package/dist/modules/decide/RequestConfig.d.ts.map +1 -1
- package/dist/modules/decide/RequestConfig.js.map +1 -1
- package/dist/modules/decide/ResponseConfig.d.ts +1 -5
- package/dist/modules/decide/ResponseConfig.d.ts.map +1 -1
- package/dist/modules/decide/ResponseConfig.js +0 -4
- package/dist/modules/decide/ResponseConfig.js.map +1 -1
- package/dist/types/consumption/LocalRequestDTO.d.ts +1 -0
- package/dist/types/consumption/LocalRequestDTO.d.ts.map +1 -1
- package/dist/types/transport/AnnouncementDTO.d.ts +14 -0
- package/dist/types/transport/AnnouncementDTO.d.ts.map +1 -0
- package/dist/types/transport/AnnouncementDTO.js +10 -0
- package/dist/types/transport/AnnouncementDTO.js.map +1 -0
- package/dist/types/transport/FileDTO.d.ts +7 -2
- package/dist/types/transport/FileDTO.d.ts.map +1 -1
- package/dist/types/transport/MessageDTO.d.ts +1 -1
- package/dist/types/transport/MessageDTO.d.ts.map +1 -1
- package/dist/types/transport/MessageWithAttachmentsDTO.d.ts +1 -1
- package/dist/types/transport/MessageWithAttachmentsDTO.d.ts.map +1 -1
- package/dist/types/transport/PasswordProtectionDTO.d.ts +2 -0
- package/dist/types/transport/PasswordProtectionDTO.d.ts.map +1 -1
- package/dist/types/transport/RelationshipTemplateDTO.d.ts +4 -1
- package/dist/types/transport/RelationshipTemplateDTO.d.ts.map +1 -1
- package/dist/types/transport/TokenDTO.d.ts +5 -1
- package/dist/types/transport/TokenDTO.d.ts.map +1 -1
- package/dist/types/transport/index.d.ts +1 -0
- package/dist/types/transport/index.d.ts.map +1 -1
- package/dist/types/transport/index.js +1 -0
- package/dist/types/transport/index.js.map +1 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymous.d.ts.map +1 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymous.js +1 -1
- package/dist/useCases/anonymous/tokens/LoadPeerTokenAnonymous.js.map +1 -1
- package/dist/useCases/common/PasswordProtectionMapper.d.ts +16 -0
- package/dist/useCases/common/PasswordProtectionMapper.d.ts.map +1 -0
- package/dist/useCases/common/PasswordProtectionMapper.js +57 -0
- package/dist/useCases/common/PasswordProtectionMapper.js.map +1 -0
- package/dist/useCases/common/RuntimeErrors.d.ts +1 -1
- package/dist/useCases/common/RuntimeErrors.d.ts.map +1 -1
- package/dist/useCases/common/RuntimeErrors.js +8 -8
- package/dist/useCases/common/RuntimeErrors.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +12 -14
- package/dist/useCases/common/Schemas.d.ts.map +1 -1
- package/dist/useCases/common/Schemas.js +2039 -1180
- package/dist/useCases/common/Schemas.js.map +1 -1
- package/dist/useCases/common/index.d.ts +1 -1
- package/dist/useCases/common/index.d.ts.map +1 -1
- package/dist/useCases/common/index.js +1 -1
- package/dist/useCases/common/index.js.map +1 -1
- package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.d.ts +2 -0
- package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.d.ts.map +1 -1
- package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.js +17 -0
- package/dist/useCases/common/validation/TokenAndTemplateCreationValidator.js.map +1 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts +3 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.js +10 -1
- package/dist/useCases/consumption/attributes/CanCreateRepositoryAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.d.ts +0 -1
- package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/CreateAndShareRelationshipAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/SetAttributeDeletionInfoOfDeletionProposedRelationship.d.ts +18 -0
- package/dist/useCases/consumption/attributes/SetAttributeDeletionInfoOfDeletionProposedRelationship.d.ts.map +1 -0
- package/dist/useCases/{transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.js → consumption/attributes/SetAttributeDeletionInfoOfDeletionProposedRelationship.js} +17 -19
- package/dist/useCases/consumption/attributes/SetAttributeDeletionInfoOfDeletionProposedRelationship.js.map +1 -0
- package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.d.ts +0 -1
- package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/ShareRepositoryAttribute.js.map +1 -1
- package/dist/useCases/consumption/attributes/index.d.ts +1 -0
- package/dist/useCases/consumption/attributes/index.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/index.js +1 -0
- package/dist/useCases/consumption/attributes/index.js.map +1 -1
- package/dist/useCases/consumption/requests/GetIncomingRequests.d.ts +1 -0
- package/dist/useCases/consumption/requests/GetIncomingRequests.d.ts.map +1 -1
- package/dist/useCases/consumption/requests/GetIncomingRequests.js +4 -0
- package/dist/useCases/consumption/requests/GetIncomingRequests.js.map +1 -1
- package/dist/useCases/consumption/requests/RequestMapper.d.ts.map +1 -1
- package/dist/useCases/consumption/requests/RequestMapper.js +2 -1
- package/dist/useCases/consumption/requests/RequestMapper.js.map +1 -1
- package/dist/useCases/index.d.ts +1 -0
- package/dist/useCases/index.d.ts.map +1 -1
- package/dist/useCases/index.js +1 -0
- package/dist/useCases/index.js.map +1 -1
- package/dist/useCases/transport/account/{LoadItemFromTruncatedReference.d.ts → LoadItemFromReference.d.ts} +6 -6
- package/dist/useCases/transport/account/LoadItemFromReference.d.ts.map +1 -0
- package/dist/useCases/transport/account/{LoadItemFromTruncatedReference.js → LoadItemFromReference.js} +11 -10
- package/dist/useCases/transport/account/LoadItemFromReference.js.map +1 -0
- package/dist/useCases/transport/account/SyncEverything.d.ts +3 -4
- package/dist/useCases/transport/account/SyncEverything.d.ts.map +1 -1
- package/dist/useCases/transport/account/SyncEverything.js +8 -10
- package/dist/useCases/transport/account/SyncEverything.js.map +1 -1
- package/dist/useCases/transport/account/index.d.ts +1 -1
- package/dist/useCases/transport/account/index.d.ts.map +1 -1
- package/dist/useCases/transport/account/index.js +1 -1
- package/dist/useCases/transport/account/index.js.map +1 -1
- package/dist/useCases/transport/announcements/AnnouncementMapper.d.ts +6 -0
- package/dist/useCases/transport/announcements/AnnouncementMapper.d.ts.map +1 -0
- package/dist/useCases/transport/announcements/AnnouncementMapper.js +17 -0
- package/dist/useCases/transport/announcements/AnnouncementMapper.js.map +1 -0
- package/dist/useCases/transport/announcements/GetAnnouncements.d.ts +18 -0
- package/dist/useCases/transport/announcements/GetAnnouncements.d.ts.map +1 -0
- package/dist/useCases/transport/{tokens/GetQRCodeForToken.js → announcements/GetAnnouncements.js} +13 -17
- package/dist/useCases/transport/announcements/GetAnnouncements.js.map +1 -0
- package/dist/useCases/transport/announcements/index.d.ts +3 -0
- package/dist/useCases/transport/announcements/index.d.ts.map +1 -0
- package/dist/useCases/transport/announcements/index.js +19 -0
- package/dist/useCases/transport/announcements/index.js.map +1 -0
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.d.ts +11 -1
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.d.ts.map +1 -1
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js +2 -2
- package/dist/useCases/transport/devices/CreateDeviceOnboardingToken.js.map +1 -1
- package/dist/useCases/transport/devices/SetCommunicationLanguage.d.ts +1 -1
- package/dist/useCases/transport/devices/SetCommunicationLanguage.d.ts.map +1 -1
- package/dist/useCases/transport/files/CreateTokenForFile.d.ts +8 -1
- package/dist/useCases/transport/files/CreateTokenForFile.d.ts.map +1 -1
- package/dist/useCases/transport/files/CreateTokenForFile.js +2 -2
- package/dist/useCases/transport/files/CreateTokenForFile.js.map +1 -1
- package/dist/useCases/transport/files/FileMapper.d.ts.map +1 -1
- package/dist/useCases/transport/files/FileMapper.js +11 -2
- package/dist/useCases/transport/files/FileMapper.js.map +1 -1
- package/dist/useCases/transport/files/GetOrLoadFile.d.ts.map +1 -1
- package/dist/useCases/transport/files/GetOrLoadFile.js +5 -4
- package/dist/useCases/transport/files/GetOrLoadFile.js.map +1 -1
- package/dist/useCases/transport/files/RegenerateFileOwnershipToken.d.ts +18 -0
- package/dist/useCases/transport/files/RegenerateFileOwnershipToken.d.ts.map +1 -0
- package/dist/useCases/transport/files/{CreateQRCodeForFile.js → RegenerateFileOwnershipToken.js} +19 -13
- package/dist/useCases/transport/files/RegenerateFileOwnershipToken.js.map +1 -0
- package/dist/useCases/transport/files/UploadOwnFile.d.ts +6 -1
- package/dist/useCases/transport/files/UploadOwnFile.d.ts.map +1 -1
- package/dist/useCases/transport/files/UploadOwnFile.js +10 -1
- package/dist/useCases/transport/files/UploadOwnFile.js.map +1 -1
- package/dist/useCases/transport/files/index.d.ts +1 -2
- package/dist/useCases/transport/files/index.d.ts.map +1 -1
- package/dist/useCases/transport/files/index.js +1 -2
- package/dist/useCases/transport/files/index.js.map +1 -1
- package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.d.ts.map +1 -1
- package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.js +4 -1
- package/dist/useCases/transport/identityRecoveryKits/CreateIdentityRecoveryKit.js.map +1 -1
- package/dist/useCases/transport/index.d.ts +1 -0
- package/dist/useCases/transport/index.d.ts.map +1 -1
- package/dist/useCases/transport/index.js +1 -0
- package/dist/useCases/transport/index.js.map +1 -1
- package/dist/useCases/transport/messages/MessageMapper.js +2 -2
- package/dist/useCases/transport/messages/MessageMapper.js.map +1 -1
- package/dist/useCases/transport/messages/SendMessage.d.ts +5 -0
- package/dist/useCases/transport/messages/SendMessage.d.ts.map +1 -1
- package/dist/useCases/transport/messages/SendMessage.js +25 -0
- package/dist/useCases/transport/messages/SendMessage.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts +8 -1
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateOwnRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.d.ts +11 -4
- package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.js +11 -10
- package/dist/useCases/transport/relationshipTemplates/CreateTokenForOwnRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.d.ts +1 -0
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js +6 -1
- package/dist/useCases/transport/relationshipTemplates/GetRelationshipTemplates.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js +3 -3
- package/dist/useCases/transport/relationshipTemplates/LoadPeerRelationshipTemplate.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js +9 -7
- package/dist/useCases/transport/relationshipTemplates/RelationshipTemplateMapper.js.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/index.d.ts +0 -2
- package/dist/useCases/transport/relationshipTemplates/index.d.ts.map +1 -1
- package/dist/useCases/transport/relationshipTemplates/index.js +0 -2
- package/dist/useCases/transport/relationshipTemplates/index.js.map +1 -1
- package/dist/useCases/transport/relationships/DecomposeRelationship.js +1 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.d.ts +8 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.d.ts.map +1 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.js +1 -1
- package/dist/useCases/transport/tokens/CreateOwnToken.js.map +1 -1
- package/dist/useCases/transport/tokens/GetTokens.d.ts +2 -0
- package/dist/useCases/transport/tokens/GetTokens.d.ts.map +1 -1
- package/dist/useCases/transport/tokens/GetTokens.js +8 -1
- package/dist/useCases/transport/tokens/GetTokens.js.map +1 -1
- package/dist/useCases/transport/tokens/LoadPeerToken.d.ts.map +1 -1
- package/dist/useCases/transport/tokens/LoadPeerToken.js +1 -1
- package/dist/useCases/transport/tokens/LoadPeerToken.js.map +1 -1
- package/dist/useCases/transport/tokens/TokenMapper.d.ts.map +1 -1
- package/dist/useCases/transport/tokens/TokenMapper.js +12 -10
- package/dist/useCases/transport/tokens/TokenMapper.js.map +1 -1
- package/dist/useCases/transport/tokens/index.d.ts +0 -1
- package/dist/useCases/transport/tokens/index.d.ts.map +1 -1
- package/dist/useCases/transport/tokens/index.js +0 -1
- package/dist/useCases/transport/tokens/index.js.map +1 -1
- package/package.json +12 -14
- package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts +0 -48
- package/dist/dataViews/consumption/DecidableRequestItemDVOs.d.ts.map +0 -1
- package/dist/dataViews/consumption/DecidableRequestItemDVOs.js +0 -3
- package/dist/dataViews/consumption/DecidableRequestItemDVOs.js.map +0 -1
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts +0 -10
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.d.ts.map +0 -1
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js +0 -15
- package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map +0 -1
- package/dist/useCases/common/QRCode.d.ts +0 -10
- package/dist/useCases/common/QRCode.d.ts.map +0 -1
- package/dist/useCases/common/QRCode.js +0 -55
- package/dist/useCases/common/QRCode.js.map +0 -1
- package/dist/useCases/transport/account/LoadItemFromTruncatedReference.d.ts.map +0 -1
- package/dist/useCases/transport/account/LoadItemFromTruncatedReference.js.map +0 -1
- package/dist/useCases/transport/files/CreateQRCodeForFile.d.ts +0 -19
- package/dist/useCases/transport/files/CreateQRCodeForFile.d.ts.map +0 -1
- package/dist/useCases/transport/files/CreateQRCodeForFile.js.map +0 -1
- package/dist/useCases/transport/files/CreateTokenQRCodeForFile.d.ts +0 -29
- package/dist/useCases/transport/files/CreateTokenQRCodeForFile.d.ts.map +0 -1
- package/dist/useCases/transport/files/CreateTokenQRCodeForFile.js +0 -67
- package/dist/useCases/transport/files/CreateTokenQRCodeForFile.js.map +0 -1
- package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.d.ts +0 -19
- package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.d.ts.map +0 -1
- package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.js.map +0 -1
- package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.d.ts +0 -29
- package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.d.ts.map +0 -1
- package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.js +0 -79
- package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.js.map +0 -1
- package/dist/useCases/transport/tokens/GetQRCodeForToken.d.ts +0 -19
- package/dist/useCases/transport/tokens/GetQRCodeForToken.d.ts.map +0 -1
- package/dist/useCases/transport/tokens/GetQRCodeForToken.js.map +0 -1
|
@@ -12,8 +12,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.LoadItemFromReferenceUseCase = void 0;
|
|
16
16
|
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
+
const core_types_1 = require("@nmshd/core-types");
|
|
17
18
|
const transport_1 = require("@nmshd/transport");
|
|
18
19
|
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
19
20
|
const common_1 = require("../../common");
|
|
@@ -23,14 +24,14 @@ const RelationshipTemplateMapper_1 = require("../relationshipTemplates/Relations
|
|
|
23
24
|
const TokenMapper_1 = require("../tokens/TokenMapper");
|
|
24
25
|
let Validator = class Validator extends common_1.SchemaValidator {
|
|
25
26
|
constructor(schemaRepository) {
|
|
26
|
-
super(schemaRepository.getSchema("
|
|
27
|
+
super(schemaRepository.getSchema("LoadItemFromReferenceRequest"));
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
Validator = __decorate([
|
|
30
31
|
__param(0, typescript_ioc_1.Inject),
|
|
31
32
|
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
32
33
|
], Validator);
|
|
33
|
-
let
|
|
34
|
+
let LoadItemFromReferenceUseCase = class LoadItemFromReferenceUseCase extends common_1.UseCase {
|
|
34
35
|
constructor(fileController, templateController, tokenController, accountController, validator) {
|
|
35
36
|
super(validator);
|
|
36
37
|
this.fileController = fileController;
|
|
@@ -49,14 +50,14 @@ let LoadItemFromTruncatedReferenceUseCase = class LoadItemFromTruncatedReference
|
|
|
49
50
|
async _executeInternal(request) {
|
|
50
51
|
const reference = request.reference;
|
|
51
52
|
if (reference.startsWith(common_1.Base64ForIdPrefix.RelationshipTemplate)) {
|
|
52
|
-
const template = await this.templateController.
|
|
53
|
+
const template = await this.templateController.loadPeerRelationshipTemplateByReference(transport_1.RelationshipTemplateReference.from(reference), request.password);
|
|
53
54
|
return ts_utils_1.Result.ok({
|
|
54
55
|
type: "RelationshipTemplate",
|
|
55
56
|
value: RelationshipTemplateMapper_1.RelationshipTemplateMapper.toRelationshipTemplateDTO(template)
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
if (reference.startsWith(common_1.Base64ForIdPrefix.File)) {
|
|
59
|
-
const file = await this.fileController.
|
|
60
|
+
const file = await this.fileController.getOrLoadFileByReference(core_types_1.FileReference.from(reference));
|
|
60
61
|
return ts_utils_1.Result.ok({
|
|
61
62
|
type: "File",
|
|
62
63
|
value: FileMapper_1.FileMapper.toFileDTO(file)
|
|
@@ -65,7 +66,7 @@ let LoadItemFromTruncatedReferenceUseCase = class LoadItemFromTruncatedReference
|
|
|
65
66
|
return await this.handleTokenReference(reference, request.password);
|
|
66
67
|
}
|
|
67
68
|
async handleTokenReference(tokenReference, password) {
|
|
68
|
-
const token = await this.tokenController.
|
|
69
|
+
const token = await this.tokenController.loadPeerTokenByReference(transport_1.TokenReference.from(tokenReference), true, password);
|
|
69
70
|
if (!token.cache) {
|
|
70
71
|
throw common_1.RuntimeErrors.general.cacheEmpty(transport_1.Token, token.id.toString());
|
|
71
72
|
}
|
|
@@ -96,8 +97,8 @@ let LoadItemFromTruncatedReferenceUseCase = class LoadItemFromTruncatedReference
|
|
|
96
97
|
});
|
|
97
98
|
}
|
|
98
99
|
};
|
|
99
|
-
exports.
|
|
100
|
-
exports.
|
|
100
|
+
exports.LoadItemFromReferenceUseCase = LoadItemFromReferenceUseCase;
|
|
101
|
+
exports.LoadItemFromReferenceUseCase = LoadItemFromReferenceUseCase = __decorate([
|
|
101
102
|
__param(0, typescript_ioc_1.Inject),
|
|
102
103
|
__param(1, typescript_ioc_1.Inject),
|
|
103
104
|
__param(2, typescript_ioc_1.Inject),
|
|
@@ -108,5 +109,5 @@ exports.LoadItemFromTruncatedReferenceUseCase = LoadItemFromTruncatedReferenceUs
|
|
|
108
109
|
transport_1.TokenController,
|
|
109
110
|
transport_1.AccountController,
|
|
110
111
|
Validator])
|
|
111
|
-
],
|
|
112
|
-
//# sourceMappingURL=
|
|
112
|
+
], LoadItemFromReferenceUseCase);
|
|
113
|
+
//# sourceMappingURL=LoadItemFromReference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadItemFromReference.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/LoadItemFromReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAAkD;AAClD,gDAW0B;AAC1B,0DAA+C;AAE/C,yCASsB;AACtB,0DAAuD;AACvD,oDAAiD;AACjD,oGAAiG;AACjG,uDAAoD;AAOpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAA6C;IACjE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC,CAAC;IACtE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAQD,IAAa,4BAA4B,GAAzC,MAAa,4BAA6B,SAAQ,gBAAoE;IAClH,YAC6B,cAA8B,EAC9B,kBAAkD,EAClD,eAAgC,EAChC,iBAAoC,EACrD,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QANQ,mBAAc,GAAd,cAAc,CAAgB;QAC9B,uBAAkB,GAAlB,kBAAkB,CAAgC;QAClD,oBAAe,GAAf,eAAe,CAAiB;QAChC,sBAAiB,GAAjB,iBAAiB,CAAmB;IAIjE,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAqC;QACjE,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAChD,CAAC;gBAAS,CAAC;YACP,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QAClD,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,OAAqC;QAChE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAEpC,IAAI,SAAS,CAAC,UAAU,CAAC,0BAAiB,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAC/D,MAAM,QA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|
2
2
|
import { AccountController } from "@nmshd/transport";
|
|
3
|
-
import {
|
|
4
|
-
import { IdentityDeletionProcessDTO, MessageDTO, RelationshipDTO } from "../../../types";
|
|
3
|
+
import { FileDTO, IdentityDeletionProcessDTO, MessageDTO, RelationshipDTO } from "../../../types";
|
|
5
4
|
import { UseCase } from "../../common";
|
|
6
5
|
export interface SyncEverythingResponse {
|
|
7
6
|
relationships: RelationshipDTO[];
|
|
8
7
|
messages: MessageDTO[];
|
|
9
8
|
identityDeletionProcesses: IdentityDeletionProcessDTO[];
|
|
9
|
+
files: FileDTO[];
|
|
10
10
|
}
|
|
11
11
|
export declare class SyncEverythingUseCase extends UseCase<void, SyncEverythingResponse> {
|
|
12
12
|
private readonly accountController;
|
|
13
|
-
|
|
14
|
-
constructor(accountController: AccountController, loggerFactory: RuntimeLoggerFactory);
|
|
13
|
+
constructor(accountController: AccountController);
|
|
15
14
|
private currentSync?;
|
|
16
15
|
protected executeInternal(): Promise<Result<SyncEverythingResponse>>;
|
|
17
16
|
private _executeInternal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncEverything.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/account/SyncEverything.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SyncEverything.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/account/SyncEverything.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAMvC,MAAM,WAAW,sBAAsB;IACnC,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,yBAAyB,EAAE,0BAA0B,EAAE,CAAC;IACxD,KAAK,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACjD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAIhF,OAAO,CAAC,WAAW,CAAC,CAA0C;cAE9C,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;YAc5D,gBAAgB;CAejC"}
|
|
@@ -11,22 +11,20 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var SyncEverythingUseCase_1;
|
|
15
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
15
|
exports.SyncEverythingUseCase = void 0;
|
|
17
16
|
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
18
17
|
const transport_1 = require("@nmshd/transport");
|
|
19
18
|
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
20
|
-
const RuntimeLoggerFactory_1 = require("../../../RuntimeLoggerFactory");
|
|
21
19
|
const common_1 = require("../../common");
|
|
20
|
+
const files_1 = require("../files");
|
|
22
21
|
const identityDeletionProcesses_1 = require("../identityDeletionProcesses");
|
|
23
22
|
const MessageMapper_1 = require("../messages/MessageMapper");
|
|
24
23
|
const RelationshipMapper_1 = require("../relationships/RelationshipMapper");
|
|
25
|
-
let SyncEverythingUseCase =
|
|
26
|
-
constructor(accountController
|
|
24
|
+
let SyncEverythingUseCase = class SyncEverythingUseCase extends common_1.UseCase {
|
|
25
|
+
constructor(accountController) {
|
|
27
26
|
super();
|
|
28
27
|
this.accountController = accountController;
|
|
29
|
-
this.logger = loggerFactory.getLogger(SyncEverythingUseCase_1);
|
|
30
28
|
}
|
|
31
29
|
async executeInternal() {
|
|
32
30
|
if (this.currentSync) {
|
|
@@ -45,18 +43,18 @@ let SyncEverythingUseCase = SyncEverythingUseCase_1 = class SyncEverythingUseCas
|
|
|
45
43
|
const messageDTOs = MessageMapper_1.MessageMapper.toMessageDTOList(changedItems.messages);
|
|
46
44
|
const relationshipDTOs = RelationshipMapper_1.RelationshipMapper.toRelationshipDTOList(changedItems.relationships);
|
|
47
45
|
const identityDeletionProcessDTOs = identityDeletionProcesses_1.IdentityDeletionProcessMapper.toIdentityDeletionProcessDTOList(changedItems.identityDeletionProcesses);
|
|
46
|
+
const fileDTOs = files_1.FileMapper.toFileDTOList(changedItems.files);
|
|
48
47
|
return ts_utils_1.Result.ok({
|
|
49
48
|
messages: messageDTOs,
|
|
50
49
|
relationships: relationshipDTOs,
|
|
51
|
-
identityDeletionProcesses: identityDeletionProcessDTOs
|
|
50
|
+
identityDeletionProcesses: identityDeletionProcessDTOs,
|
|
51
|
+
files: fileDTOs
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
exports.SyncEverythingUseCase = SyncEverythingUseCase;
|
|
56
|
-
exports.SyncEverythingUseCase = SyncEverythingUseCase =
|
|
56
|
+
exports.SyncEverythingUseCase = SyncEverythingUseCase = __decorate([
|
|
57
57
|
__param(0, typescript_ioc_1.Inject),
|
|
58
|
-
|
|
59
|
-
__metadata("design:paramtypes", [transport_1.AccountController,
|
|
60
|
-
RuntimeLoggerFactory_1.RuntimeLoggerFactory])
|
|
58
|
+
__metadata("design:paramtypes", [transport_1.AccountController])
|
|
61
59
|
], SyncEverythingUseCase);
|
|
62
60
|
//# sourceMappingURL=SyncEverything.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SyncEverything.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/SyncEverything.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SyncEverything.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/SyncEverything.ts"],"names":[],"mappings":";;;;;;;;;;;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ACJ,CAAA;AApCY,sDAAqB;gCAArB,qBAAqB;IACV,WAAA,uBAAM,CAAA;qCAAqC,6BAAiB;GADvE,qBAAqB,CAoCjC"}
|
|
@@ -4,7 +4,7 @@ export * from "./EnableAutoSync";
|
|
|
4
4
|
export * from "./GetDeviceInfo";
|
|
5
5
|
export * from "./GetIdentityInfo";
|
|
6
6
|
export * from "./GetSyncInfo";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./LoadItemFromReference";
|
|
8
8
|
export * from "./RegisterPushNotificationToken";
|
|
9
9
|
export * from "./SyncDatawallet";
|
|
10
10
|
export * from "./SyncEverything";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/account/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/account/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC"}
|
|
@@ -20,7 +20,7 @@ __exportStar(require("./EnableAutoSync"), exports);
|
|
|
20
20
|
__exportStar(require("./GetDeviceInfo"), exports);
|
|
21
21
|
__exportStar(require("./GetIdentityInfo"), exports);
|
|
22
22
|
__exportStar(require("./GetSyncInfo"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./LoadItemFromReference"), exports);
|
|
24
24
|
__exportStar(require("./RegisterPushNotificationToken"), exports);
|
|
25
25
|
__exportStar(require("./SyncDatawallet"), exports);
|
|
26
26
|
__exportStar(require("./SyncEverything"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,oDAAkC;AAClC,gDAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,oDAAkC;AAClC,gDAA8B;AAC9B,0DAAwC;AACxC,kEAAgD;AAChD,mDAAiC;AACjC,mDAAiC;AACjC,oEAAkD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Announcement } from "@nmshd/transport";
|
|
2
|
+
import { AnnouncementDTO } from "../../../types";
|
|
3
|
+
export declare class AnnouncementMapper {
|
|
4
|
+
static toAnnouncementDTO(announcement: Announcement): AnnouncementDTO;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=AnnouncementMapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnouncementMapper.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/AnnouncementMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,qBAAa,kBAAkB;WACb,iBAAiB,CAAC,YAAY,EAAE,YAAY,GAAG,eAAe;CAU/E"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnnouncementMapper = void 0;
|
|
4
|
+
class AnnouncementMapper {
|
|
5
|
+
static toAnnouncementDTO(announcement) {
|
|
6
|
+
return {
|
|
7
|
+
id: announcement.id.toString(),
|
|
8
|
+
createdAt: announcement.createdAt.toString(),
|
|
9
|
+
expiresAt: announcement.expiresAt?.toString(),
|
|
10
|
+
severity: announcement.severity,
|
|
11
|
+
title: announcement.title,
|
|
12
|
+
body: announcement.body
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.AnnouncementMapper = AnnouncementMapper;
|
|
17
|
+
//# sourceMappingURL=AnnouncementMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnouncementMapper.js","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/AnnouncementMapper.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IACpB,MAAM,CAAC,iBAAiB,CAAC,YAA0B;QACtD,OAAO;YACH,EAAE,EAAE,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE;YAC9B,SAAS,EAAE,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC5C,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,QAAQ,EAAE;YAC7C,QAAQ,EAAE,YAAY,CAAC,QAAQ;YAC/B,KAAK,EAAE,YAAY,CAAC,KAAK;YACzB,IAAI,EAAE,YAAY,CAAC,IAAI;SAC1B,CAAC;IACN,CAAC;CACJ;AAXD,gDAWC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Result } from "@js-soft/ts-utils";
|
|
2
|
+
import { LanguageISO639 } from "@nmshd/core-types";
|
|
3
|
+
import { AnnouncementController } from "@nmshd/transport";
|
|
4
|
+
import { AnnouncementDTO } from "../../../types";
|
|
5
|
+
import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
|
|
6
|
+
export interface GetAnnouncementsRequest {
|
|
7
|
+
language: LanguageISO639;
|
|
8
|
+
}
|
|
9
|
+
declare class Validator extends SchemaValidator<GetAnnouncementsRequest> {
|
|
10
|
+
constructor(schemaRepository: SchemaRepository);
|
|
11
|
+
}
|
|
12
|
+
export declare class GetAnnouncementsUseCase extends UseCase<GetAnnouncementsRequest, AnnouncementDTO[]> {
|
|
13
|
+
private readonly announcementController;
|
|
14
|
+
constructor(announcementController: AnnouncementController, validator: Validator);
|
|
15
|
+
protected executeInternal(request: GetAnnouncementsRequest): Promise<Result<AnnouncementDTO[]>>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=GetAnnouncements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetAnnouncements.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/GetAnnouncements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG1E,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,cAAc,CAAC;CAC5B;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,uBAAuB,CAAC;gBACjC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,uBAAwB,SAAQ,OAAO,CAAC,uBAAuB,EAAE,eAAe,EAAE,CAAC;IAEhF,OAAO,CAAC,QAAQ,CAAC,sBAAsB;gBAAtB,sBAAsB,EAAE,sBAAsB,EAC/D,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;CAKxG"}
|
package/dist/useCases/transport/{tokens/GetQRCodeForToken.js → announcements/GetAnnouncements.js}
RENAMED
|
@@ -12,40 +12,36 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.GetAnnouncementsUseCase = void 0;
|
|
16
16
|
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
18
17
|
const transport_1 = require("@nmshd/transport");
|
|
19
18
|
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
20
19
|
const common_1 = require("../../common");
|
|
20
|
+
const AnnouncementMapper_1 = require("./AnnouncementMapper");
|
|
21
21
|
let Validator = class Validator extends common_1.SchemaValidator {
|
|
22
22
|
constructor(schemaRepository) {
|
|
23
|
-
super(schemaRepository.getSchema("
|
|
23
|
+
super(schemaRepository.getSchema("GetAnnouncementsRequest"));
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
Validator = __decorate([
|
|
27
27
|
__param(0, typescript_ioc_1.Inject),
|
|
28
28
|
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
29
29
|
], Validator);
|
|
30
|
-
let
|
|
31
|
-
constructor(
|
|
30
|
+
let GetAnnouncementsUseCase = class GetAnnouncementsUseCase extends common_1.UseCase {
|
|
31
|
+
constructor(announcementController, validator) {
|
|
32
32
|
super(validator);
|
|
33
|
-
this.
|
|
33
|
+
this.announcementController = announcementController;
|
|
34
34
|
}
|
|
35
35
|
async executeInternal(request) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.Token));
|
|
39
|
-
}
|
|
40
|
-
const qrCode = await common_1.QRCode.forTruncateable(token);
|
|
41
|
-
return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
|
|
36
|
+
const announcements = await this.announcementController.getAnnouncements(request.language);
|
|
37
|
+
return ts_utils_1.Result.ok(announcements.map((a) => AnnouncementMapper_1.AnnouncementMapper.toAnnouncementDTO(a)));
|
|
42
38
|
}
|
|
43
39
|
};
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
40
|
+
exports.GetAnnouncementsUseCase = GetAnnouncementsUseCase;
|
|
41
|
+
exports.GetAnnouncementsUseCase = GetAnnouncementsUseCase = __decorate([
|
|
46
42
|
__param(0, typescript_ioc_1.Inject),
|
|
47
43
|
__param(1, typescript_ioc_1.Inject),
|
|
48
|
-
__metadata("design:paramtypes", [transport_1.
|
|
44
|
+
__metadata("design:paramtypes", [transport_1.AnnouncementController,
|
|
49
45
|
Validator])
|
|
50
|
-
],
|
|
51
|
-
//# sourceMappingURL=
|
|
46
|
+
], GetAnnouncementsUseCase);
|
|
47
|
+
//# sourceMappingURL=GetAnnouncements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetAnnouncements.js","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/GetAnnouncements.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAE3C,gDAA0D;AAC1D,0DAA+C;AAE/C,yCAA0E;AAC1E,6DAA0D;AAM1D,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAwC;IAC5D,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACjE,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAED,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,gBAAmD;IAC5F,YAC6B,sBAA8C,EAC/D,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,2BAAsB,GAAtB,sBAAsB,CAAwB;IAI3E,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAAgC;QAC5D,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE3F,OAAO,iBAAM,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,uCAAkB,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACxF,CAAC;CACJ,CAAA;AAbY,0DAAuB;kCAAvB,uBAAuB;IAE3B,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAD0C,kCAAsB;QACpD,SAAS;GAHvB,uBAAuB,CAanC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AnnouncementMapper"), exports);
|
|
18
|
+
__exportStar(require("./GetAnnouncements"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/useCases/transport/announcements/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { Result } from "@js-soft/ts-utils";
|
|
2
|
+
import { PasswordLocationIndicator } from "@nmshd/core-types";
|
|
2
3
|
import { DevicesController, TokenController } from "@nmshd/transport";
|
|
3
4
|
import { TokenDTO } from "../../../types";
|
|
4
5
|
import { DeviceIdString, ISO8601DateTimeString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
|
|
5
|
-
export interface
|
|
6
|
+
export interface SchemaValidatableCreateDeviceOnboardingTokenRequest {
|
|
6
7
|
id: DeviceIdString;
|
|
7
8
|
expiresAt?: ISO8601DateTimeString;
|
|
8
9
|
profileName?: string;
|
|
9
10
|
passwordProtection?: {
|
|
11
|
+
/**
|
|
12
|
+
* @minLength 1
|
|
13
|
+
*/
|
|
10
14
|
password: string;
|
|
11
15
|
passwordIsPin?: true;
|
|
16
|
+
passwordLocationIndicator?: unknown;
|
|
12
17
|
};
|
|
13
18
|
}
|
|
19
|
+
export type CreateDeviceOnboardingTokenRequest = SchemaValidatableCreateDeviceOnboardingTokenRequest & {
|
|
20
|
+
passwordProtection?: {
|
|
21
|
+
passwordLocationIndicator?: PasswordLocationIndicator;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
14
24
|
declare class Validator extends TokenAndTemplateCreationValidator<CreateDeviceOnboardingTokenRequest> {
|
|
15
25
|
constructor(schemaRepository: SchemaRepository);
|
|
16
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateDeviceOnboardingToken.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/CreateDeviceOnboardingToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateDeviceOnboardingToken.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/CreateDeviceOnboardingToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAoB,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAkC,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtG,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAA4B,gBAAgB,EAAE,iCAAiC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG7J,MAAM,WAAW,mDAAmD;IAChE,EAAE,EAAE,cAAc,CAAC;IACnB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;QACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;KACvC,CAAC;CACL;AAED,MAAM,MAAM,kCAAkC,GAAG,mDAAmD,GAAG;IACnG,kBAAkB,CAAC,EAAE;QAAE,yBAAyB,CAAC,EAAE,yBAAyB,CAAA;KAAE,CAAC;CAClF,CAAC;AAEF,cAAM,SAAU,SAAQ,iCAAiC,CAAC,kCAAkC,CAAC;gBAC9D,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,kCAAmC,SAAQ,OAAO,CAAC,kCAAkC,EAAE,QAAQ,CAAC;IAE7F,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,iBAAiB,EAAE,iBAAiB,EACpC,eAAe,EAAE,eAAe,EACjD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,kCAAkC,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAe1G"}
|
|
@@ -36,13 +36,13 @@ let CreateDeviceOnboardingTokenUseCase = class CreateDeviceOnboardingTokenUseCas
|
|
|
36
36
|
}
|
|
37
37
|
async executeInternal(request) {
|
|
38
38
|
const sharedSecret = await this.devicesController.getSharedSecret(core_types_1.CoreId.from(request.id), request.profileName);
|
|
39
|
-
const expiresAt = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : core_types_1.CoreDate.utc().add({ minutes: 5 });
|
|
40
39
|
const tokenContent = transport_1.TokenContentDeviceSharedSecret.from({ sharedSecret });
|
|
40
|
+
const expiresAt = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : core_types_1.CoreDate.utc().add({ minutes: 5 });
|
|
41
41
|
const token = await this.tokenController.sendToken({
|
|
42
42
|
content: tokenContent,
|
|
43
43
|
expiresAt: expiresAt,
|
|
44
44
|
ephemeral: true,
|
|
45
|
-
passwordProtection:
|
|
45
|
+
passwordProtection: common_1.PasswordProtectionMapper.toPasswordProtectionCreationParameters(request.passwordProtection)
|
|
46
46
|
});
|
|
47
47
|
return ts_utils_1.Result.ok(TokenMapper_1.TokenMapper.toTokenDTO(token, true));
|
|
48
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateDeviceOnboardingToken.js","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/CreateDeviceOnboardingToken.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"CreateDeviceOnboardingToken.js","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/CreateDeviceOnboardingTo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AAkB,EAAE,iCAAwB,CAAC,sCAAsC,CAAC,OAAO,CAAC,kBAAkB,CAAC;SAClH,CAAC,CAAC;QAEH,OAAO,iBAAM,CAAC,EAAE,CAAC,yBAAW,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;CACJ,CAAA;AAxBY,gFAAkC;6CAAlC,kCAAkC;IAEtC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFqC,6BAAiB;QACnB,2BAAe;QACtC,SAAS;GAJvB,kCAAkC,CAwB9C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { LanguageISO639 } from "@nmshd/
|
|
2
|
+
import { LanguageISO639 } from "@nmshd/core-types";
|
|
3
3
|
import { DeviceController } from "@nmshd/transport";
|
|
4
4
|
import { SchemaRepository, SchemaValidator, UseCase } from "../../common";
|
|
5
5
|
export interface SetCommunicationLanguageRequest {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetCommunicationLanguage.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/SetCommunicationLanguage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SetCommunicationLanguage.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/devices/SetCommunicationLanguage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,+BAA+B;IAC5C,qBAAqB,EAAE,cAAc,CAAC;CACzC;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,+BAA+B,CAAC;gBACzC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,+BAA+B,EAAE,IAAI,CAAC;IAEnF,OAAO,CAAC,QAAQ,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,gBAAgB,EACnD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;CAKnG"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Result } from "@js-soft/ts-utils";
|
|
2
|
+
import { PasswordLocationIndicator } from "@nmshd/core-types";
|
|
2
3
|
import { AccountController, FileController, TokenController } from "@nmshd/transport";
|
|
3
4
|
import { TokenDTO } from "../../../types";
|
|
4
5
|
import { AddressString, FileIdString, ISO8601DateTimeString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
|
|
5
|
-
export interface
|
|
6
|
+
export interface SchemaValidatableCreateTokenForFileRequest {
|
|
6
7
|
fileId: FileIdString;
|
|
7
8
|
expiresAt?: ISO8601DateTimeString;
|
|
8
9
|
ephemeral?: boolean;
|
|
@@ -13,8 +14,14 @@ export interface CreateTokenForFileRequest {
|
|
|
13
14
|
*/
|
|
14
15
|
password: string;
|
|
15
16
|
passwordIsPin?: true;
|
|
17
|
+
passwordLocationIndicator?: unknown;
|
|
16
18
|
};
|
|
17
19
|
}
|
|
20
|
+
export type CreateTokenForFileRequest = SchemaValidatableCreateTokenForFileRequest & {
|
|
21
|
+
passwordProtection?: {
|
|
22
|
+
passwordLocationIndicator?: PasswordLocationIndicator;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
18
25
|
declare class Validator extends TokenAndTemplateCreationValidator<CreateTokenForFileRequest> {
|
|
19
26
|
constructor(schemaRepository: SchemaRepository);
|
|
20
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"CreateTokenForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAiC,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAQ,cAAc,EAAoB,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9G,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EACH,aAAa,EACb,YAAY,EACZ,qBAAqB,EAGrB,gBAAgB,EAChB,iCAAiC,EACjC,OAAO,EACV,MAAM,cAAc,CAAC;AAGtB,MAAM,WAAW,0CAA0C;IACvD,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;QACrB,yBAAyB,CAAC,EAAE,OAAO,CAAC;KACvC,CAAC;CACL;AAED,MAAM,MAAM,yBAAyB,GAAG,0CAA0C,GAAG;IACjF,kBAAkB,CAAC,EAAE;QAAE,yBAAyB,CAAC,EAAE,yBAAyB,CAAA;KAAE,CAAC;CAClF,CAAC;AAEF,cAAM,SAAU,SAAQ,iCAAiC,CAAC,yBAAyB,CAAC;gBACrD,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,yBAA0B,SAAQ,OAAO,CAAC,yBAAyB,EAAE,QAAQ,CAAC;IAE3E,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACrD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CA+BjG"}
|
|
@@ -44,15 +44,15 @@ let CreateTokenForFileUseCase = class CreateTokenForFileUseCase extends common_1
|
|
|
44
44
|
fileId: file.id,
|
|
45
45
|
secretKey: file.secretKey
|
|
46
46
|
});
|
|
47
|
-
const ephemeral = request.ephemeral ?? true;
|
|
48
47
|
const defaultTokenExpiry = file.cache?.expiresAt ?? core_types_1.CoreDate.utc().add({ days: 12 });
|
|
49
48
|
const tokenExpiry = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : defaultTokenExpiry;
|
|
49
|
+
const ephemeral = request.ephemeral ?? true;
|
|
50
50
|
const token = await this.tokenController.sendToken({
|
|
51
51
|
content: tokenContent,
|
|
52
52
|
expiresAt: tokenExpiry,
|
|
53
53
|
ephemeral,
|
|
54
54
|
forIdentity: request.forIdentity ? core_types_1.CoreAddress.from(request.forIdentity) : undefined,
|
|
55
|
-
passwordProtection:
|
|
55
|
+
passwordProtection: common_1.PasswordProtectionMapper.toPasswordProtectionCreationParameters(request.passwordProtection)
|
|
56
56
|
});
|
|
57
57
|
if (!ephemeral) {
|
|
58
58
|
await this.accountController.syncDatawallet();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenForFile.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenForFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,
|
|
1
|
+
{"version":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;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FileMapper.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/FileMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,qBAAa,UAAU;WACL,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,GAAG,oBAAoB;WAY5E,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO;WA8B9B,aAAa,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE;CAGxD"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FileMapper = void 0;
|
|
4
4
|
const transport_1 = require("@nmshd/transport");
|
|
5
|
+
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
6
|
+
const ConfigHolder_1 = require("../../../ConfigHolder");
|
|
5
7
|
const common_1 = require("../../common");
|
|
6
8
|
class FileMapper {
|
|
7
9
|
static toDownloadFileResponse(buffer, file) {
|
|
@@ -18,8 +20,11 @@ class FileMapper {
|
|
|
18
20
|
if (!file.cache) {
|
|
19
21
|
throw common_1.RuntimeErrors.general.cacheEmpty(transport_1.File, file.id.toString());
|
|
20
22
|
}
|
|
23
|
+
const backboneBaseUrl = typescript_ioc_1.Container.get(ConfigHolder_1.ConfigHolder).getConfig().transportLibrary.baseUrl;
|
|
24
|
+
const reference = file.toFileReference(backboneBaseUrl);
|
|
21
25
|
return {
|
|
22
26
|
id: file.id.toString(),
|
|
27
|
+
isOwn: file.isOwn,
|
|
23
28
|
filename: file.cache.filename,
|
|
24
29
|
tags: file.cache.tags,
|
|
25
30
|
filesize: file.cache.filesize,
|
|
@@ -28,10 +33,14 @@ class FileMapper {
|
|
|
28
33
|
createdByDevice: file.cache.createdByDevice.toString(),
|
|
29
34
|
expiresAt: file.cache.expiresAt.toString(),
|
|
30
35
|
mimetype: file.cache.mimetype,
|
|
31
|
-
isOwn: file.isOwn,
|
|
32
36
|
title: file.cache.title,
|
|
33
37
|
description: file.cache.description,
|
|
34
|
-
|
|
38
|
+
reference: {
|
|
39
|
+
truncated: reference.truncate(),
|
|
40
|
+
url: reference.toUrl()
|
|
41
|
+
},
|
|
42
|
+
ownershipToken: file.ownershipToken,
|
|
43
|
+
ownershipIsLocked: file.ownershipIsLocked
|
|
35
44
|
};
|
|
36
45
|
}
|
|
37
46
|
static toFileDTOList(files) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileMapper.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/FileMapper.ts"],"names":[],"mappings":";;;AACA,gDAAwC;
|
|
1
|
+
{"version":3,"file":"FileMapper.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/FileMapper.ts"],"names":[],"mappings":";;;AACA,gDAAwC;AACxC,0DAAkD;AAClD,wDAAqD;AAErD,yCAA6C;AAG7C,MAAa,UAAU;IACZ,MAAM,CAAC,sBAAsB,CAAC,MAAkB,EAAE,IAAU;QAC/D,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACd,MAAM,sBAAa,CAAC,OAAO,CAAC,UAAU,CAAC,gBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,OAAO;YACH,OAAO,EAAE,MAAM,CAAC,MAAM;YACtB,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,EA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KAAK,EAAE;aACzB;YACD,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SAC5C,CAAC;IACN,CAAC;IAEM,MAAM,CAAC,aAAa,CAAC,KAAa;QACrC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;CACJ;AA9CD,gCA8CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetOrLoadFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/GetOrLoadFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAA2B,eAAe,
|
|
1
|
+
{"version":3,"file":"GetOrLoadFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/GetOrLoadFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAA2B,eAAe,EAAkB,MAAM,kBAAkB,CAAC;AAE/H,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAqB,mBAAmB,EAAiB,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvJ;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,SAAS,EAAE,oBAAoB,GAAG,mBAAmB,CAAC;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,oBAAoB,CAAC;gBAC9B,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAEhE,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACrD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAQ1E,qBAAqB;YAYrB,yBAAyB;YAKzB,0BAA0B;YAe1B,QAAQ;CAIzB"}
|
|
@@ -14,6 +14,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GetOrLoadFileUseCase = void 0;
|
|
16
16
|
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
+
const core_types_1 = require("@nmshd/core-types");
|
|
17
18
|
const transport_1 = require("@nmshd/transport");
|
|
18
19
|
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
19
20
|
const common_1 = require("../../common");
|
|
@@ -48,12 +49,12 @@ let GetOrLoadFileUseCase = class GetOrLoadFileUseCase extends common_1.UseCase {
|
|
|
48
49
|
}
|
|
49
50
|
throw common_1.RuntimeErrors.files.invalidReference(reference);
|
|
50
51
|
}
|
|
51
|
-
async loadFileFromFileReference(
|
|
52
|
-
const file = await this.fileController.
|
|
52
|
+
async loadFileFromFileReference(reference) {
|
|
53
|
+
const file = await this.fileController.getOrLoadFileByReference(core_types_1.FileReference.from(reference));
|
|
53
54
|
return ts_utils_1.Result.ok(FileMapper_1.FileMapper.toFileDTO(file));
|
|
54
55
|
}
|
|
55
|
-
async loadFileFromTokenReference(
|
|
56
|
-
const token = await this.tokenController.
|
|
56
|
+
async loadFileFromTokenReference(reference, password) {
|
|
57
|
+
const token = await this.tokenController.loadPeerTokenByReference(transport_1.TokenReference.from(reference), true, password);
|
|
57
58
|
if (!token.cache) {
|
|
58
59
|
throw common_1.RuntimeErrors.general.cacheEmpty(transport_1.Token, token.id.toString());
|
|
59
60
|
}
|