@nmshd/runtime 7.0.0-alpha.3 → 7.0.0-alpha.30
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 +1 -0
- package/dist/dataViews/DataViewExpander.d.ts.map +1 -1
- package/dist/dataViews/DataViewExpander.js +162 -146
- package/dist/dataViews/DataViewExpander.js.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 +12 -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 +3 -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/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 +1 -0
- package/dist/events/transport/index.d.ts.map +1 -1
- package/dist/events/transport/index.js +1 -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 +2 -6
- package/dist/extensibility/facades/transport/FilesFacade.d.ts.map +1 -1
- package/dist/extensibility/facades/transport/FilesFacade.js +2 -14
- 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.map +1 -1
- package/dist/modules/DeciderModule.js +2 -4
- 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/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 +5 -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 +0 -1
- package/dist/useCases/common/RuntimeErrors.d.ts.map +1 -1
- package/dist/useCases/common/RuntimeErrors.js +5 -8
- package/dist/useCases/common/RuntimeErrors.js.map +1 -1
- package/dist/useCases/common/Schemas.d.ts +4 -7
- package/dist/useCases/common/Schemas.d.ts.map +1 -1
- package/dist/useCases/common/Schemas.js +1406 -602
- 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/GetAttributes.d.ts +0 -1
- package/dist/useCases/consumption/attributes/GetAttributes.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/GetAttributes.js +1 -1
- package/dist/useCases/consumption/attributes/GetAttributes.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts +0 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js +1 -1
- package/dist/useCases/consumption/attributes/GetOwnSharedAttributes.js.map +1 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts +0 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.d.ts.map +1 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.js +1 -1
- package/dist/useCases/consumption/attributes/GetPeerSharedAttributes.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/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 +1 -3
- package/dist/useCases/transport/account/SyncEverything.d.ts.map +1 -1
- package/dist/useCases/transport/account/SyncEverything.js +4 -9
- 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 +9 -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/UploadOwnFile.d.ts +3 -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 +0 -2
- package/dist/useCases/transport/files/index.d.ts.map +1 -1
- package/dist/useCases/transport/files/index.js +0 -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 +1 -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 +11 -13
- 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 +0 -51
- 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
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = void 0;
|
|
4
|
-
const DataEvent_1 = require("../DataEvent");
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated Use ThirdPartyRelationshipAttributeDeletedByPeerEvent instead.
|
|
7
|
-
*/
|
|
8
|
-
class ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent extends DataEvent_1.DataEvent {
|
|
9
|
-
static { this.namespace = "consumption.thirdPartyOwnedRelationshipAttributeDeletedByPeer"; }
|
|
10
|
-
constructor(eventTargetAddress, data) {
|
|
11
|
-
super(ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.namespace, eventTargetAddress, data);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent = ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent;
|
|
15
|
-
//# sourceMappingURL=ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map
|
package/dist/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.js","sourceRoot":"","sources":["../../../src/events/consumption/ThirdPartyOwnedRelationshipAttributeDeletedByPeerEvent.ts"],"names":[],"mappings":";;;AACA,4CAAyC;AAEzC;;GAEG;AACH,MAAa,sDAAuD,SAAQ,qBAA4B;aAC7E,cAAS,GAAG,+DAA+D,CAAC;IAEnG,YAAmB,kBAA0B,EAAE,IAAuB;QAClE,KAAK,CAAC,sDAAsD,CAAC,SAAS,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACtG,CAAC;;AALL,wHAMC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class QRCode {
|
|
2
|
-
private readonly base64;
|
|
3
|
-
private constructor();
|
|
4
|
-
asBase64(): string;
|
|
5
|
-
static from(content: string, prefix: string): Promise<QRCode>;
|
|
6
|
-
static forTruncateable(truncateable: {
|
|
7
|
-
truncate(): string;
|
|
8
|
-
}): Promise<QRCode>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=QRCode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QRCode.d.ts","sourceRoot":"","sources":["../../../src/useCases/common/QRCode.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IACK,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA3C,OAAO;IAEA,QAAQ,IAAI,MAAM;WAIL,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;WAOtD,eAAe,CAAC,YAAY,EAAE;QAAE,QAAQ,IAAI,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CAG7F"}
|
|
@@ -1,55 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.QRCode = void 0;
|
|
37
|
-
const qrcodeLibrary = __importStar(require("qrcode"));
|
|
38
|
-
class QRCode {
|
|
39
|
-
constructor(base64) {
|
|
40
|
-
this.base64 = base64;
|
|
41
|
-
}
|
|
42
|
-
asBase64() {
|
|
43
|
-
return this.base64;
|
|
44
|
-
}
|
|
45
|
-
static async from(content, prefix) {
|
|
46
|
-
const dataUrl = await qrcodeLibrary.toDataURL(`nmshd://${prefix}#${content}`);
|
|
47
|
-
const base64 = dataUrl.split(",")[1];
|
|
48
|
-
return new QRCode(base64);
|
|
49
|
-
}
|
|
50
|
-
static async forTruncateable(truncateable) {
|
|
51
|
-
return await this.from(truncateable.truncate(), "tr");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.QRCode = QRCode;
|
|
55
|
-
//# sourceMappingURL=QRCode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QRCode.js","sourceRoot":"","sources":["../../../src/useCases/common/QRCode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AAExC,MAAa,MAAM;IACf,YAAqC,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEhD,QAAQ;QACX,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAe,EAAE,MAAc;QACpD,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,SAAS,CAAC,WAAW,MAAM,IAAI,OAAO,EAAE,CAAC,CAAC;QAC9E,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAErC,OAAO,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,YAAoC;QACpE,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;CACJ;AAjBD,wBAiBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoadItemFromTruncatedReference.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/account/LoadItemFromTruncatedReference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACH,iBAAiB,EACjB,cAAc,EACd,8BAA8B,EAK9B,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAEH,mBAAmB,EACnB,mCAAmC,EAEnC,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,OAAO,EACV,MAAM,cAAc,CAAC;AAMtB,MAAM,WAAW,qCAAqC;IAClD,SAAS,EAAE,oBAAoB,GAAG,mBAAmB,GAAG,mCAAmC,CAAC;IAC5F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,qCAAqC,CAAC;gBAC/C,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,MAAM,MAAM,sCAAsC,GAC5C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,KAAK,EAAE,uBAAuB,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,KAAK,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAEvE,qBAAa,qCAAsC,SAAQ,OAAO,CAAC,qCAAqC,EAAE,sCAAsC,CAAC;IAEjI,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAHjB,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,8BAA8B,EAClD,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,iBAAiB,EACrD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,qCAAqC,GAAG,OAAO,CAAC,MAAM,CAAC,sCAAsC,CAAC,CAAC;YAQ1H,gBAAgB;YAsBhB,oBAAoB;CAqCrC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LoadItemFromTruncatedReference.js","sourceRoot":"","sources":["../../../../src/useCases/transport/account/LoadItemFromTruncatedReference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,gDAS0B;AAC1B,0DAA+C;AAE/C,yCASsB;AACtB,0DAAuD;AACvD,oDAAiD;AACjD,oGAAiG;AACjG,uDAAoD;AAOpD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAsD;IAC1E,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAQD,IAAa,qCAAqC,GAAlD,MAAa,qCAAsC,SAAQ,gBAAsF;IAC7I,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,OAA8C;QAC1E,IAAI,CAAC;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AA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAJkC,0BAAc;QACV,0CAA8B;QACjC,2BAAe;QACb,6BAAiB;QAC1C,SAAS;GANvB,qCAAqC,CA8EjD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { FileController } from "@nmshd/transport";
|
|
3
|
-
import { FileIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
|
|
4
|
-
export interface CreateQRCodeForFileRequest {
|
|
5
|
-
fileId: FileIdString;
|
|
6
|
-
}
|
|
7
|
-
export interface CreateQRCodeForFileResponse {
|
|
8
|
-
qrCodeBytes: string;
|
|
9
|
-
}
|
|
10
|
-
declare class Validator extends SchemaValidator<CreateQRCodeForFileRequest> {
|
|
11
|
-
constructor(schemaRepository: SchemaRepository);
|
|
12
|
-
}
|
|
13
|
-
export declare class CreateQRCodeForFileUseCase extends UseCase<CreateQRCodeForFileRequest, CreateQRCodeForFileResponse> {
|
|
14
|
-
private readonly fileController;
|
|
15
|
-
constructor(fileController: FileController, validator: Validator);
|
|
16
|
-
protected executeInternal(request: CreateQRCodeForFileRequest): Promise<Result<CreateQRCodeForFileResponse>>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=CreateQRCodeForFile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateQRCodeForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateQRCodeForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAQ,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAyB,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/G,MAAM,WAAW,0BAA0B;IACvC,MAAM,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IACxC,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,0BAA0B,CAAC;gBACpC,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,0BAA2B,SAAQ,OAAO,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IAEhG,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc,EAC/C,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;CAUrH"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateQRCodeForFileUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
let Validator = class Validator extends common_1.SchemaValidator {
|
|
22
|
-
constructor(schemaRepository) {
|
|
23
|
-
super(schemaRepository.getSchema("CreateQRCodeForFileRequest"));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
Validator = __decorate([
|
|
27
|
-
__param(0, typescript_ioc_1.Inject),
|
|
28
|
-
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
29
|
-
], Validator);
|
|
30
|
-
let CreateQRCodeForFileUseCase = class CreateQRCodeForFileUseCase extends common_1.UseCase {
|
|
31
|
-
constructor(fileController, validator) {
|
|
32
|
-
super(validator);
|
|
33
|
-
this.fileController = fileController;
|
|
34
|
-
}
|
|
35
|
-
async executeInternal(request) {
|
|
36
|
-
const file = await this.fileController.getFile(core_types_1.CoreId.from(request.fileId));
|
|
37
|
-
if (!file) {
|
|
38
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.File));
|
|
39
|
-
}
|
|
40
|
-
const qrCode = await common_1.QRCode.forTruncateable(file);
|
|
41
|
-
return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.CreateQRCodeForFileUseCase = CreateQRCodeForFileUseCase;
|
|
45
|
-
exports.CreateQRCodeForFileUseCase = CreateQRCodeForFileUseCase = __decorate([
|
|
46
|
-
__param(0, typescript_ioc_1.Inject),
|
|
47
|
-
__param(1, typescript_ioc_1.Inject),
|
|
48
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
49
|
-
Validator])
|
|
50
|
-
], CreateQRCodeForFileUseCase);
|
|
51
|
-
//# sourceMappingURL=CreateQRCodeForFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateQRC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|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { FileController, TokenController } from "@nmshd/transport";
|
|
3
|
-
import { AddressString, FileIdString, ISO8601DateTimeString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
|
|
4
|
-
export interface CreateTokenQRCodeForFileRequest {
|
|
5
|
-
fileId: FileIdString;
|
|
6
|
-
expiresAt?: ISO8601DateTimeString;
|
|
7
|
-
forIdentity?: AddressString;
|
|
8
|
-
passwordProtection?: {
|
|
9
|
-
/**
|
|
10
|
-
* @minLength 1
|
|
11
|
-
*/
|
|
12
|
-
password: string;
|
|
13
|
-
passwordIsPin?: true;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export interface CreateTokenQRCodeForFileResponse {
|
|
17
|
-
qrCodeBytes: string;
|
|
18
|
-
}
|
|
19
|
-
declare class Validator extends TokenAndTemplateCreationValidator<CreateTokenQRCodeForFileRequest> {
|
|
20
|
-
constructor(schemaRepository: SchemaRepository);
|
|
21
|
-
}
|
|
22
|
-
export declare class CreateTokenQRCodeForFileUseCase extends UseCase<CreateTokenQRCodeForFileRequest, CreateTokenQRCodeForFileResponse> {
|
|
23
|
-
private readonly fileController;
|
|
24
|
-
private readonly tokenController;
|
|
25
|
-
constructor(fileController: FileController, tokenController: TokenController, validator: Validator);
|
|
26
|
-
protected executeInternal(request: CreateTokenQRCodeForFileRequest): Promise<Result<CreateTokenQRCodeForFileResponse>>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=CreateTokenQRCodeForFile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenQRCodeForFile.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenQRCodeForFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAQ,cAAc,EAA0D,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjI,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAyB,gBAAgB,EAAE,iCAAiC,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvK,MAAM,WAAW,+BAA+B;IAC5C,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;KACxB,CAAC;CACL;AAED,MAAM,WAAW,gCAAgC;IAC7C,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,cAAM,SAAU,SAAQ,iCAAiC,CAAC,+BAA+B,CAAC;gBAC3D,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,qBAAa,+BAAgC,SAAQ,OAAO,CAAC,+BAA+B,EAAE,gCAAgC,CAAC;IAE/G,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EACjD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,+BAA+B,GAAG,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAAC,CAAC;CAyB/H"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateTokenQRCodeForFileUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
let Validator = class Validator extends common_1.TokenAndTemplateCreationValidator {
|
|
22
|
-
constructor(schemaRepository) {
|
|
23
|
-
super(schemaRepository.getSchema("CreateTokenQRCodeForFileRequest"));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
Validator = __decorate([
|
|
27
|
-
__param(0, typescript_ioc_1.Inject),
|
|
28
|
-
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
29
|
-
], Validator);
|
|
30
|
-
let CreateTokenQRCodeForFileUseCase = class CreateTokenQRCodeForFileUseCase extends common_1.UseCase {
|
|
31
|
-
constructor(fileController, tokenController, validator) {
|
|
32
|
-
super(validator);
|
|
33
|
-
this.fileController = fileController;
|
|
34
|
-
this.tokenController = tokenController;
|
|
35
|
-
}
|
|
36
|
-
async executeInternal(request) {
|
|
37
|
-
const file = await this.fileController.getFile(core_types_1.CoreId.from(request.fileId));
|
|
38
|
-
if (!file) {
|
|
39
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.File));
|
|
40
|
-
}
|
|
41
|
-
const tokenContent = transport_1.TokenContentFile.from({
|
|
42
|
-
fileId: file.id,
|
|
43
|
-
secretKey: file.secretKey
|
|
44
|
-
});
|
|
45
|
-
const defaultTokenExpiry = file.cache?.expiresAt ?? core_types_1.CoreDate.utc().add({ days: 12 });
|
|
46
|
-
const tokenExpiry = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : defaultTokenExpiry;
|
|
47
|
-
const token = await this.tokenController.sendToken({
|
|
48
|
-
content: tokenContent,
|
|
49
|
-
expiresAt: tokenExpiry,
|
|
50
|
-
ephemeral: true,
|
|
51
|
-
forIdentity: request.forIdentity ? core_types_1.CoreAddress.from(request.forIdentity) : undefined,
|
|
52
|
-
passwordProtection: transport_1.PasswordProtectionCreationParameters.create(request.passwordProtection)
|
|
53
|
-
});
|
|
54
|
-
const qrCode = await common_1.QRCode.forTruncateable(token);
|
|
55
|
-
return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.CreateTokenQRCodeForFileUseCase = CreateTokenQRCodeForFileUseCase;
|
|
59
|
-
exports.CreateTokenQRCodeForFileUseCase = CreateTokenQRCodeForFileUseCase = __decorate([
|
|
60
|
-
__param(0, typescript_ioc_1.Inject),
|
|
61
|
-
__param(1, typescript_ioc_1.Inject),
|
|
62
|
-
__param(2, typescript_ioc_1.Inject),
|
|
63
|
-
__metadata("design:paramtypes", [transport_1.FileController,
|
|
64
|
-
transport_1.TokenController,
|
|
65
|
-
Validator])
|
|
66
|
-
], CreateTokenQRCodeForFileUseCase);
|
|
67
|
-
//# sourceMappingURL=CreateTokenQRCodeForFile.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenQRCodeForFile.js","sourceRoot":"","sources":["../../../../src/useCases/transport/files/CreateTokenQRCodeForFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAAkE;AAClE,gDAAiI;AACjI,0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QAC9F,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC;YAC/C,OAAO,EAAE,YAAY;YACrB,SAAS,EAAE,WAAW;YACtB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,wBAAW,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;YACpF,kBAAkB,EAAE,gDAAoC,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC;SAC9F,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACnD,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAlCY,0EAA+B;0CAA/B,+BAA+B;IAEnC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFkC,0BAAc;QACb,2BAAe;QACtC,SAAS;GAJvB,+BAA+B,CAkC3C"}
|
package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipTemplateController } from "@nmshd/transport";
|
|
3
|
-
import { RelationshipTemplateIdString, SchemaRepository, SchemaValidator, UseCase } from "../../common";
|
|
4
|
-
export interface CreateQRCodeForOwnTemplateRequest {
|
|
5
|
-
templateId: RelationshipTemplateIdString;
|
|
6
|
-
}
|
|
7
|
-
declare class Validator extends SchemaValidator<CreateQRCodeForOwnTemplateRequest> {
|
|
8
|
-
constructor(schemaRepository: SchemaRepository);
|
|
9
|
-
}
|
|
10
|
-
export interface CreateQRCodeForOwnTemplateResponse {
|
|
11
|
-
qrCodeBytes: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class CreateQRCodeForOwnTemplateUseCase extends UseCase<CreateQRCodeForOwnTemplateRequest, CreateQRCodeForOwnTemplateResponse> {
|
|
14
|
-
private readonly templateController;
|
|
15
|
-
constructor(templateController: RelationshipTemplateController, validator: Validator);
|
|
16
|
-
protected executeInternal(request: CreateQRCodeForOwnTemplateRequest): Promise<Result<CreateQRCodeForOwnTemplateResponse>>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=CreateQRCodeForOwnRelationshipTemplate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateQRCodeForOwnRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAwB,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAExF,OAAO,EAAU,4BAA4B,EAAiB,gBAAgB,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE/H,MAAM,WAAW,iCAAiC;IAC9C,UAAU,EAAE,4BAA4B,CAAC;CAC5C;AAED,cAAM,SAAU,SAAQ,eAAe,CAAC,iCAAiC,CAAC;gBAC3C,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,MAAM,WAAW,kCAAkC;IAC/C,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,iCAAkC,SAAQ,OAAO,CAAC,iCAAiC,EAAE,kCAAkC,CAAC;IAErH,OAAO,CAAC,QAAQ,CAAC,kBAAkB;gBAAlB,kBAAkB,EAAE,8BAA8B,EACnE,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,iCAAiC,GAAG,OAAO,CAAC,MAAM,CAAC,kCAAkC,CAAC,CAAC;CAcnI"}
|
package/dist/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateQRCodeForOwnRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAA2C;AAC3C,gDAAwF;AACxF,0DAA+C;AAC/C,yCAA+H;AAM/H,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAkD;IACtE,YAA2B,gBAAkC;QACzD,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAC3E,CAAC;CACJ,CAAA;AAJK,SAAS;IACS,WAAA,uBAAM,CAAA;qCAAmB,yBAAgB;GAD3D,SAAS,CAId;AAMD,IAAa,iCAAiC,GAA9C,MAAa,iCAAkC,SAAQ,gBAA8E;IACjI,YAC6B,kBAAkD,EACnE,SAAoB;QAE5B,KAAK,CAAC,SAAS,CAAC,CAAC;QAHQ,uBAAkB,GAAlB,kBAAkB,CAAgC;IAI/E,CAAC;IAES,KAAK,CAAC,eAAe,CAAC,OAA0C;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,mBAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QAExG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,OAAO,CAAC,cAAc,CAAC,gCAAoB,CAAC,CAAC,CAAC;QACnF,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YAClB,OAAO,iBAAM,CAAC,IAAI,CAAC,sBAAa,CAAC,qBAAqB,CAAC,iCAAiC,EAAE,CAAC,CAAC;QAChG,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,eAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACtD,OAAO,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAtBY,8EAAiC;4CAAjC,iCAAiC;IAErC,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCADsC,0CAA8B;QACxD,SAAS;GAHvB,iCAAiC,CAsB7C"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { RelationshipTemplateController, TokenController } from "@nmshd/transport";
|
|
3
|
-
import { AddressString, ISO8601DateTimeString, RelationshipTemplateIdString, SchemaRepository, TokenAndTemplateCreationValidator, UseCase } from "../../common";
|
|
4
|
-
export interface CreateTokenQRCodeForOwnTemplateRequest {
|
|
5
|
-
templateId: RelationshipTemplateIdString;
|
|
6
|
-
expiresAt?: ISO8601DateTimeString;
|
|
7
|
-
forIdentity?: AddressString;
|
|
8
|
-
passwordProtection?: {
|
|
9
|
-
/**
|
|
10
|
-
* @minLength 1
|
|
11
|
-
*/
|
|
12
|
-
password: string;
|
|
13
|
-
passwordIsPin?: true;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
declare class Validator extends TokenAndTemplateCreationValidator<CreateTokenQRCodeForOwnTemplateRequest> {
|
|
17
|
-
constructor(schemaRepository: SchemaRepository);
|
|
18
|
-
}
|
|
19
|
-
export interface CreateTokenQRCodeForOwnTemplateResponse {
|
|
20
|
-
qrCodeBytes: string;
|
|
21
|
-
}
|
|
22
|
-
export declare class CreateTokenQRCodeForOwnTemplateUseCase extends UseCase<CreateTokenQRCodeForOwnTemplateRequest, CreateTokenQRCodeForOwnTemplateResponse> {
|
|
23
|
-
private readonly templateController;
|
|
24
|
-
private readonly tokenController;
|
|
25
|
-
constructor(templateController: RelationshipTemplateController, tokenController: TokenController, validator: Validator);
|
|
26
|
-
protected executeInternal(request: CreateTokenQRCodeForOwnTemplateRequest): Promise<Result<CreateTokenQRCodeForOwnTemplateResponse>>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
29
|
-
//# sourceMappingURL=CreateTokenQRCodeForOwnRelationshipTemplate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenQRCodeForOwnRelationshipTemplate.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAGH,8BAA8B,EAG9B,eAAe,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACH,aAAa,EACb,qBAAqB,EAErB,4BAA4B,EAE5B,gBAAgB,EAChB,iCAAiC,EACjC,OAAO,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,sCAAsC;IACnD,UAAU,EAAE,4BAA4B,CAAC;IACzC,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,kBAAkB,CAAC,EAAE;QACjB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,IAAI,CAAC;KACxB,CAAC;CACL;AAED,cAAM,SAAU,SAAQ,iCAAiC,CAAC,sCAAsC,CAAC;gBAClE,gBAAgB,EAAE,gBAAgB;CAGhE;AAED,MAAM,WAAW,uCAAuC;IACpD,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,sCAAuC,SAAQ,OAAO,CAAC,sCAAsC,EAAE,uCAAuC,CAAC;IAEpI,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,kBAAkB,EAAE,8BAA8B,EAClD,eAAe,EAAE,eAAe,EACjD,SAAS,EAAE,SAAS;cAKhB,eAAe,CAAC,OAAO,EAAE,sCAAsC,GAAG,OAAO,CAAC,MAAM,CAAC,uCAAuC,CAAC,CAAC;CAyC7I"}
|
package/dist/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.CreateTokenQRCodeForOwnTemplateUseCase = void 0;
|
|
16
|
-
const ts_utils_1 = require("@js-soft/ts-utils");
|
|
17
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
18
|
-
const transport_1 = require("@nmshd/transport");
|
|
19
|
-
const typescript_ioc_1 = require("@nmshd/typescript-ioc");
|
|
20
|
-
const common_1 = require("../../common");
|
|
21
|
-
let Validator = class Validator extends common_1.TokenAndTemplateCreationValidator {
|
|
22
|
-
constructor(schemaRepository) {
|
|
23
|
-
super(schemaRepository.getSchema("CreateTokenQRCodeForOwnTemplateRequest"));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
Validator = __decorate([
|
|
27
|
-
__param(0, typescript_ioc_1.Inject),
|
|
28
|
-
__metadata("design:paramtypes", [common_1.SchemaRepository])
|
|
29
|
-
], Validator);
|
|
30
|
-
let CreateTokenQRCodeForOwnTemplateUseCase = class CreateTokenQRCodeForOwnTemplateUseCase extends common_1.UseCase {
|
|
31
|
-
constructor(templateController, tokenController, validator) {
|
|
32
|
-
super(validator);
|
|
33
|
-
this.templateController = templateController;
|
|
34
|
-
this.tokenController = tokenController;
|
|
35
|
-
}
|
|
36
|
-
async executeInternal(request) {
|
|
37
|
-
const template = await this.templateController.getRelationshipTemplate(core_types_1.CoreId.from(request.templateId));
|
|
38
|
-
if (!template) {
|
|
39
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.general.recordNotFound(transport_1.RelationshipTemplate));
|
|
40
|
-
}
|
|
41
|
-
if (!template.isOwn) {
|
|
42
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipTemplates.cannotCreateTokenForPeerTemplate());
|
|
43
|
-
}
|
|
44
|
-
if (template.cache?.forIdentity && request.forIdentity !== template.cache.forIdentity.toString()) {
|
|
45
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipTemplates.personalizationMustBeInherited());
|
|
46
|
-
}
|
|
47
|
-
if (template.passwordProtection && !template.passwordProtection.matchesInputForNewPasswordProtection(request.passwordProtection)) {
|
|
48
|
-
return ts_utils_1.Result.fail(common_1.RuntimeErrors.relationshipTemplates.passwordProtectionMustBeInherited());
|
|
49
|
-
}
|
|
50
|
-
const passwordProtection = template.passwordProtection ? transport_1.SharedPasswordProtection.from(template.passwordProtection) : undefined;
|
|
51
|
-
const tokenContent = transport_1.TokenContentRelationshipTemplate.from({
|
|
52
|
-
templateId: template.id,
|
|
53
|
-
secretKey: template.secretKey,
|
|
54
|
-
forIdentity: template.cache.forIdentity,
|
|
55
|
-
passwordProtection
|
|
56
|
-
});
|
|
57
|
-
const defaultTokenExpiry = template.cache?.expiresAt ?? core_types_1.CoreDate.utc().add({ days: 12 });
|
|
58
|
-
const tokenExpiry = request.expiresAt ? core_types_1.CoreDate.from(request.expiresAt) : defaultTokenExpiry;
|
|
59
|
-
const token = await this.tokenController.sendToken({
|
|
60
|
-
content: tokenContent,
|
|
61
|
-
expiresAt: tokenExpiry,
|
|
62
|
-
ephemeral: true,
|
|
63
|
-
forIdentity: request.forIdentity ? core_types_1.CoreAddress.from(request.forIdentity) : undefined,
|
|
64
|
-
passwordProtection: transport_1.PasswordProtectionCreationParameters.create(request.passwordProtection)
|
|
65
|
-
});
|
|
66
|
-
const qrCode = await common_1.QRCode.forTruncateable(token);
|
|
67
|
-
return ts_utils_1.Result.ok({ qrCodeBytes: qrCode.asBase64() });
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
exports.CreateTokenQRCodeForOwnTemplateUseCase = CreateTokenQRCodeForOwnTemplateUseCase;
|
|
71
|
-
exports.CreateTokenQRCodeForOwnTemplateUseCase = CreateTokenQRCodeForOwnTemplateUseCase = __decorate([
|
|
72
|
-
__param(0, typescript_ioc_1.Inject),
|
|
73
|
-
__param(1, typescript_ioc_1.Inject),
|
|
74
|
-
__param(2, typescript_ioc_1.Inject),
|
|
75
|
-
__metadata("design:paramtypes", [transport_1.RelationshipTemplateController,
|
|
76
|
-
transport_1.TokenController,
|
|
77
|
-
Validator])
|
|
78
|
-
], CreateTokenQRCodeForOwnTemplateUseCase);
|
|
79
|
-
//# sourceMappingURL=CreateTokenQRCodeForOwnRelationshipTemplate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTokenQRCodeForOwnRelationshipTemplate.js","sourceRoot":"","sources":["../../../../src/useCases/transport/relationshipTemplates/CreateTokenQRCodeForOwnRelationshipTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA2C;AAC3C,kDAAkE;AAClE,gDAO0B;AAC1B,0DAA+C;AAC/C,yCASsB;AAetB,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,0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,iBAAM,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ,CAAA;AAlDY,wFAAsC;iDAAtC,sCAAsC;IAE1C,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;IACN,WAAA,uBAAM,CAAA;qCAFsC,0CAA8B;QACjC,2BAAe;QACtC,SAAS;GAJvB,sCAAsC,CAkDlD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Result } from "@js-soft/ts-utils";
|
|
2
|
-
import { TokenController } from "@nmshd/transport";
|
|
3
|
-
import { SchemaRepository, SchemaValidator, TokenIdString, UseCase } from "../../common";
|
|
4
|
-
export interface GetQRCodeForTokenRequest {
|
|
5
|
-
id: TokenIdString;
|
|
6
|
-
}
|
|
7
|
-
declare class Validator extends SchemaValidator<GetQRCodeForTokenRequest> {
|
|
8
|
-
constructor(schemaRepository: SchemaRepository);
|
|
9
|
-
}
|
|
10
|
-
export interface GetQRCodeForTokenResponse {
|
|
11
|
-
qrCodeBytes: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class GetQRCodeForTokenUseCase extends UseCase<GetQRCodeForTokenRequest, GetQRCodeForTokenResponse> {
|
|
14
|
-
private readonly tokenController;
|
|
15
|
-
constructor(tokenController: TokenController, validator: Validator);
|
|
16
|
-
protected executeInternal(request: GetQRCodeForTokenRequest): Promise<Result<GetQRCodeForTokenResponse>>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=GetQRCodeForToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetQRCodeForToken.d.ts","sourceRoot":"","sources":["../../../../src/useCases/transport/tokens/GetQRCodeForToken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAS,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE1D,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