@brightchain/brightchain-lib 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/brightchain-lib/BROWSER_COMPAT.md +54 -0
- package/package.json +15 -4
- package/src/lib/blocks/cblBase.d.ts +16 -1
- package/src/lib/blocks/cblBase.d.ts.map +1 -1
- package/src/lib/blocks/cblBase.js +33 -4
- package/src/lib/blocks/cblBase.js.map +1 -1
- package/src/lib/blocks/extendedCbl.d.ts.map +1 -1
- package/src/lib/blocks/extendedCbl.js +2 -1
- package/src/lib/blocks/extendedCbl.js.map +1 -1
- package/src/lib/blocks/handle.d.ts +5 -0
- package/src/lib/blocks/handle.d.ts.map +1 -1
- package/src/lib/blocks/handle.js.map +1 -1
- package/src/lib/blocks/handleTuple.d.ts +9 -1
- package/src/lib/blocks/handleTuple.d.ts.map +1 -1
- package/src/lib/blocks/handleTuple.js +23 -1
- package/src/lib/blocks/handleTuple.js.map +1 -1
- package/src/lib/blocks/index.d.ts +1 -0
- package/src/lib/blocks/index.d.ts.map +1 -1
- package/src/lib/blocks/index.js +1 -0
- package/src/lib/blocks/index.js.map +1 -1
- package/src/lib/blocks/memoryTuple.d.ts +9 -2
- package/src/lib/blocks/memoryTuple.d.ts.map +1 -1
- package/src/lib/blocks/memoryTuple.js +12 -3
- package/src/lib/blocks/memoryTuple.js.map +1 -1
- package/src/lib/blocks/vcbl.d.ts +27 -0
- package/src/lib/blocks/vcbl.d.ts.map +1 -0
- package/src/lib/blocks/vcbl.js +107 -0
- package/src/lib/blocks/vcbl.js.map +1 -0
- package/src/lib/constants.d.ts +5 -1
- package/src/lib/constants.d.ts.map +1 -1
- package/src/lib/constants.js +4 -0
- package/src/lib/constants.js.map +1 -1
- package/src/lib/crypto/index.d.ts +12 -0
- package/src/lib/crypto/index.d.ts.map +1 -0
- package/src/lib/crypto/index.js +23 -0
- package/src/lib/crypto/index.js.map +1 -0
- package/src/lib/crypto/platformCrypto.d.ts +132 -0
- package/src/lib/crypto/platformCrypto.d.ts.map +1 -0
- package/src/lib/crypto/platformCrypto.js +181 -0
- package/src/lib/crypto/platformCrypto.js.map +1 -0
- package/src/lib/enumeration-translations/blockType.d.ts.map +1 -1
- package/src/lib/enumeration-translations/blockType.js +16 -0
- package/src/lib/enumeration-translations/blockType.js.map +1 -1
- package/src/lib/enumerations/blockType.d.ts +12 -0
- package/src/lib/enumerations/blockType.d.ts.map +1 -1
- package/src/lib/enumerations/blockType.js +14 -0
- package/src/lib/enumerations/blockType.js.map +1 -1
- package/src/lib/enumerations/brightChainStrings.d.ts +4 -0
- package/src/lib/enumerations/brightChainStrings.d.ts.map +1 -1
- package/src/lib/enumerations/brightChainStrings.js +4 -0
- package/src/lib/enumerations/brightChainStrings.js.map +1 -1
- package/src/lib/enumerations/cblErrorType.d.ts +2 -1
- package/src/lib/enumerations/cblErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/cblErrorType.js +1 -0
- package/src/lib/enumerations/cblErrorType.js.map +1 -1
- package/src/lib/enumerations/communication.d.ts +57 -0
- package/src/lib/enumerations/communication.d.ts.map +1 -0
- package/src/lib/enumerations/communication.js +89 -0
- package/src/lib/enumerations/communication.js.map +1 -0
- package/src/lib/enumerations/deviceType.d.ts +15 -0
- package/src/lib/enumerations/deviceType.d.ts.map +1 -0
- package/src/lib/enumerations/deviceType.js +19 -0
- package/src/lib/enumerations/deviceType.js.map +1 -0
- package/src/lib/enumerations/handleTupleErrorType.d.ts +2 -1
- package/src/lib/enumerations/handleTupleErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/handleTupleErrorType.js +1 -0
- package/src/lib/enumerations/handleTupleErrorType.js.map +1 -1
- package/src/lib/enumerations/index.d.ts +6 -0
- package/src/lib/enumerations/index.d.ts.map +1 -1
- package/src/lib/enumerations/index.js +11 -0
- package/src/lib/enumerations/index.js.map +1 -1
- package/src/lib/enumerations/paperKeyPurpose.d.ts +15 -0
- package/src/lib/enumerations/paperKeyPurpose.d.ts.map +1 -0
- package/src/lib/enumerations/paperKeyPurpose.js +19 -0
- package/src/lib/enumerations/paperKeyPurpose.js.map +1 -0
- package/src/lib/enumerations/proofPlatform.d.ts +24 -0
- package/src/lib/enumerations/proofPlatform.d.ts.map +1 -0
- package/src/lib/enumerations/proofPlatform.js +28 -0
- package/src/lib/enumerations/proofPlatform.js.map +1 -0
- package/src/lib/enumerations/readConcern.d.ts +22 -0
- package/src/lib/enumerations/readConcern.d.ts.map +1 -0
- package/src/lib/enumerations/readConcern.js +26 -0
- package/src/lib/enumerations/readConcern.js.map +1 -0
- package/src/lib/enumerations/tupleErrorType.d.ts +2 -1
- package/src/lib/enumerations/tupleErrorType.d.ts.map +1 -1
- package/src/lib/enumerations/tupleErrorType.js +1 -0
- package/src/lib/enumerations/tupleErrorType.js.map +1 -1
- package/src/lib/enumerations/verificationStatus.d.ts +17 -0
- package/src/lib/enumerations/verificationStatus.d.ts.map +1 -0
- package/src/lib/enumerations/verificationStatus.js +21 -0
- package/src/lib/enumerations/verificationStatus.js.map +1 -0
- package/src/lib/errors/blockFetchError.d.ts +51 -0
- package/src/lib/errors/blockFetchError.d.ts.map +1 -0
- package/src/lib/errors/blockFetchError.js +63 -0
- package/src/lib/errors/blockFetchError.js.map +1 -0
- package/src/lib/errors/cblError.d.ts.map +1 -1
- package/src/lib/errors/cblError.js +1 -0
- package/src/lib/errors/cblError.js.map +1 -1
- package/src/lib/errors/handleTupleError.d.ts +10 -1
- package/src/lib/errors/handleTupleError.d.ts.map +1 -1
- package/src/lib/errors/handleTupleError.js +10 -1
- package/src/lib/errors/handleTupleError.js.map +1 -1
- package/src/lib/errors/index.d.ts +16 -0
- package/src/lib/errors/index.d.ts.map +1 -1
- package/src/lib/errors/index.js +22 -0
- package/src/lib/errors/index.js.map +1 -1
- package/src/lib/errors/poolDeletionError.d.ts +10 -0
- package/src/lib/errors/poolDeletionError.d.ts.map +1 -0
- package/src/lib/errors/poolDeletionError.js +16 -0
- package/src/lib/errors/poolDeletionError.js.map +1 -0
- package/src/lib/errors/poolDeletionTombstoneError.d.ts +12 -0
- package/src/lib/errors/poolDeletionTombstoneError.d.ts.map +1 -0
- package/src/lib/errors/poolDeletionTombstoneError.js +18 -0
- package/src/lib/errors/poolDeletionTombstoneError.js.map +1 -0
- package/src/lib/errors/tupleError.d.ts.map +1 -1
- package/src/lib/errors/tupleError.js +1 -0
- package/src/lib/errors/tupleError.js.map +1 -1
- package/src/lib/i18n/i18n-setup.d.ts +1 -1
- package/src/lib/i18n/strings/englishUs.d.ts.map +1 -1
- package/src/lib/i18n/strings/englishUs.js +4 -0
- package/src/lib/i18n/strings/englishUs.js.map +1 -1
- package/src/lib/i18n/strings/french.d.ts.map +1 -1
- package/src/lib/i18n/strings/french.js +4 -0
- package/src/lib/i18n/strings/french.js.map +1 -1
- package/src/lib/i18n/strings/german.d.ts.map +1 -1
- package/src/lib/i18n/strings/german.js +4 -0
- package/src/lib/i18n/strings/german.js.map +1 -1
- package/src/lib/i18n/strings/japanese.d.ts.map +1 -1
- package/src/lib/i18n/strings/japanese.js +4 -0
- package/src/lib/i18n/strings/japanese.js.map +1 -1
- package/src/lib/i18n/strings/mandarin.d.ts.map +1 -1
- package/src/lib/i18n/strings/mandarin.js +4 -0
- package/src/lib/i18n/strings/mandarin.js.map +1 -1
- package/src/lib/i18n/strings/spanish.d.ts.map +1 -1
- package/src/lib/i18n/strings/spanish.js +4 -0
- package/src/lib/i18n/strings/spanish.js.map +1 -1
- package/src/lib/i18n/strings/ukrainian.d.ts.map +1 -1
- package/src/lib/i18n/strings/ukrainian.js +4 -0
- package/src/lib/i18n/strings/ukrainian.js.map +1 -1
- package/src/lib/index.d.ts +4 -0
- package/src/lib/index.d.ts.map +1 -1
- package/src/lib/index.js +4 -0
- package/src/lib/index.js.map +1 -1
- package/src/lib/interfaces/auth/index.d.ts +4 -0
- package/src/lib/interfaces/auth/index.d.ts.map +1 -0
- package/src/lib/interfaces/auth/index.js +8 -0
- package/src/lib/interfaces/auth/index.js.map +1 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.d.ts +19 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.d.ts.map +1 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.js +3 -0
- package/src/lib/interfaces/auth/nodeAuthenticator.js.map +1 -0
- package/src/lib/interfaces/auth/poolAcl.d.ts +65 -0
- package/src/lib/interfaces/auth/poolAcl.d.ts.map +1 -0
- package/src/lib/interfaces/auth/poolAcl.js +52 -0
- package/src/lib/interfaces/auth/poolAcl.js.map +1 -0
- package/src/lib/interfaces/availability/availabilityService.d.ts +5 -3
- package/src/lib/interfaces/availability/availabilityService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/availabilityService.js.map +1 -1
- package/src/lib/interfaces/availability/blockRegistry.d.ts +52 -3
- package/src/lib/interfaces/availability/blockRegistry.d.ts.map +1 -1
- package/src/lib/interfaces/availability/blockRegistry.js +1 -1
- package/src/lib/interfaces/availability/discoveryProtocol.d.ts +81 -3
- package/src/lib/interfaces/availability/discoveryProtocol.d.ts.map +1 -1
- package/src/lib/interfaces/availability/discoveryProtocol.js.map +1 -1
- package/src/lib/interfaces/availability/gossipService.d.ts +110 -6
- package/src/lib/interfaces/availability/gossipService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/gossipService.js +94 -1
- package/src/lib/interfaces/availability/gossipService.js.map +1 -1
- package/src/lib/interfaces/availability/index.d.ts +1 -0
- package/src/lib/interfaces/availability/index.d.ts.map +1 -1
- package/src/lib/interfaces/availability/index.js +1 -0
- package/src/lib/interfaces/availability/index.js.map +1 -1
- package/src/lib/interfaces/availability/locationRecord.d.ts +6 -0
- package/src/lib/interfaces/availability/locationRecord.d.ts.map +1 -1
- package/src/lib/interfaces/availability/locationRecord.js +12 -0
- package/src/lib/interfaces/availability/locationRecord.js.map +1 -1
- package/src/lib/interfaces/availability/poolDeletionTombstone.d.ts +40 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.d.ts.map +1 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.js +19 -0
- package/src/lib/interfaces/availability/poolDeletionTombstone.js.map +1 -0
- package/src/lib/interfaces/availability/reconciliationService.d.ts +52 -0
- package/src/lib/interfaces/availability/reconciliationService.d.ts.map +1 -1
- package/src/lib/interfaces/availability/reconciliationService.js.map +1 -1
- package/src/lib/interfaces/blockCapacity.d.ts +9 -0
- package/src/lib/interfaces/blockCapacity.d.ts.map +1 -1
- package/src/lib/interfaces/blockEncryption.d.ts +4 -2
- package/src/lib/interfaces/blockEncryption.d.ts.map +1 -1
- package/src/lib/interfaces/blockFetch/blockFetchTransport.d.ts +26 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.js +12 -0
- package/src/lib/interfaces/blockFetch/blockFetchTransport.js.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.d.ts +71 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.js +22 -0
- package/src/lib/interfaces/blockFetch/blockFetcher.js.map +1 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.d.ts +43 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.js +13 -0
- package/src/lib/interfaces/blockFetch/enrichedQueryResult.js.map +1 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.d.ts +70 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.js +18 -0
- package/src/lib/interfaces/blockFetch/fetchQueue.js.map +1 -0
- package/src/lib/interfaces/blockFetch/index.d.ts +10 -0
- package/src/lib/interfaces/blockFetch/index.d.ts.map +1 -0
- package/src/lib/interfaces/blockFetch/index.js +13 -0
- package/src/lib/interfaces/blockFetch/index.js.map +1 -0
- package/src/lib/interfaces/blocks/index.d.ts +1 -0
- package/src/lib/interfaces/blocks/index.d.ts.map +1 -1
- package/src/lib/interfaces/blocks/vcbl.d.ts +16 -0
- package/src/lib/interfaces/blocks/vcbl.d.ts.map +1 -0
- package/src/lib/interfaces/blocks/vcbl.js +3 -0
- package/src/lib/interfaces/blocks/vcbl.js.map +1 -0
- package/src/lib/interfaces/brightpass/auditLog.d.ts +25 -0
- package/src/lib/interfaces/brightpass/auditLog.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/auditLog.js +21 -0
- package/src/lib/interfaces/brightpass/auditLog.js.map +1 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.d.ts +11 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.js +3 -0
- package/src/lib/interfaces/brightpass/emergencyAccess.js.map +1 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.d.ts +11 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.js +3 -0
- package/src/lib/interfaces/brightpass/entryPropertyRecord.js.map +1 -0
- package/src/lib/interfaces/brightpass/importTypes.d.ts +10 -0
- package/src/lib/interfaces/brightpass/importTypes.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/importTypes.js +3 -0
- package/src/lib/interfaces/brightpass/importTypes.js.map +1 -0
- package/src/lib/interfaces/brightpass/index.d.ts +7 -0
- package/src/lib/interfaces/brightpass/index.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/index.js +10 -0
- package/src/lib/interfaces/brightpass/index.js.map +1 -0
- package/src/lib/interfaces/brightpass/vaultEntry.d.ts +48 -0
- package/src/lib/interfaces/brightpass/vaultEntry.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/vaultEntry.js +3 -0
- package/src/lib/interfaces/brightpass/vaultEntry.js.map +1 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.d.ts +34 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.d.ts.map +1 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.js +3 -0
- package/src/lib/interfaces/brightpass/vaultMetadata.js.map +1 -0
- package/src/lib/interfaces/clusterKeys.d.ts +4 -2
- package/src/lib/interfaces/clusterKeys.d.ts.map +1 -1
- package/src/lib/interfaces/communication.d.ts +173 -0
- package/src/lib/interfaces/communication.d.ts.map +1 -0
- package/src/lib/interfaces/communication.js +17 -0
- package/src/lib/interfaces/communication.js.map +1 -0
- package/src/lib/interfaces/communicationEvents.d.ts +168 -0
- package/src/lib/interfaces/communicationEvents.d.ts.map +1 -0
- package/src/lib/interfaces/communicationEvents.js +12 -0
- package/src/lib/interfaces/communicationEvents.js.map +1 -0
- package/src/lib/interfaces/crypto/ethereumWallet.d.ts +72 -0
- package/src/lib/interfaces/crypto/ethereumWallet.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/ethereumWallet.js +12 -0
- package/src/lib/interfaces/crypto/ethereumWallet.js.map +1 -0
- package/src/lib/interfaces/crypto/gitSignature.d.ts +95 -0
- package/src/lib/interfaces/crypto/gitSignature.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/gitSignature.js +12 -0
- package/src/lib/interfaces/crypto/gitSignature.js.map +1 -0
- package/src/lib/interfaces/crypto/index.d.ts +3 -0
- package/src/lib/interfaces/crypto/index.d.ts.map +1 -0
- package/src/lib/interfaces/crypto/index.js +3 -0
- package/src/lib/interfaces/crypto/index.js.map +1 -0
- package/src/lib/interfaces/dataKeyComponents.d.ts +7 -2
- package/src/lib/interfaces/dataKeyComponents.d.ts.map +1 -1
- package/src/lib/interfaces/encryptedBlockCreator.d.ts +4 -2
- package/src/lib/interfaces/encryptedBlockCreator.d.ts.map +1 -1
- package/src/lib/interfaces/events/communicationEventEmitter.d.ts +65 -0
- package/src/lib/interfaces/events/communicationEventEmitter.d.ts.map +1 -0
- package/src/lib/interfaces/events/communicationEventEmitter.js +60 -0
- package/src/lib/interfaces/events/communicationEventEmitter.js.map +1 -0
- package/src/lib/interfaces/events/index.d.ts +2 -0
- package/src/lib/interfaces/events/index.d.ts.map +1 -0
- package/src/lib/interfaces/events/index.js +5 -0
- package/src/lib/interfaces/events/index.js.map +1 -0
- package/src/lib/interfaces/failableResult.d.ts +15 -0
- package/src/lib/interfaces/failableResult.d.ts.map +1 -0
- package/src/lib/interfaces/failableResult.js +3 -0
- package/src/lib/interfaces/failableResult.js.map +1 -0
- package/src/lib/interfaces/identity/device.d.ts +59 -0
- package/src/lib/interfaces/identity/device.d.ts.map +1 -0
- package/src/lib/interfaces/identity/device.js +17 -0
- package/src/lib/interfaces/identity/device.js.map +1 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.d.ts +71 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.d.ts.map +1 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.js +16 -0
- package/src/lib/interfaces/identity/deviceKeyStorage.js.map +1 -0
- package/src/lib/interfaces/identity/identityProof.d.ts +90 -0
- package/src/lib/interfaces/identity/identityProof.d.ts.map +1 -0
- package/src/lib/interfaces/identity/identityProof.js +18 -0
- package/src/lib/interfaces/identity/identityProof.js.map +1 -0
- package/src/lib/interfaces/identity/index.d.ts +7 -0
- package/src/lib/interfaces/identity/index.d.ts.map +1 -0
- package/src/lib/interfaces/identity/index.js +3 -0
- package/src/lib/interfaces/identity/index.js.map +1 -0
- package/src/lib/interfaces/identity/paperKey.d.ts +97 -0
- package/src/lib/interfaces/identity/paperKey.d.ts.map +1 -0
- package/src/lib/interfaces/identity/paperKey.js +17 -0
- package/src/lib/interfaces/identity/paperKey.js.map +1 -0
- package/src/lib/interfaces/identity/publicProfile.d.ts +74 -0
- package/src/lib/interfaces/identity/publicProfile.d.ts.map +1 -0
- package/src/lib/interfaces/identity/publicProfile.js +18 -0
- package/src/lib/interfaces/identity/publicProfile.js.map +1 -0
- package/src/lib/interfaces/identity/splitPaperKey.d.ts +73 -0
- package/src/lib/interfaces/identity/splitPaperKey.d.ts.map +1 -0
- package/src/lib/interfaces/identity/splitPaperKey.js +20 -0
- package/src/lib/interfaces/identity/splitPaperKey.js.map +1 -0
- package/src/lib/interfaces/index.d.ts +11 -2
- package/src/lib/interfaces/index.d.ts.map +1 -1
- package/src/lib/interfaces/index.js +12 -0
- package/src/lib/interfaces/index.js.map +1 -1
- package/src/lib/interfaces/network/node.d.ts +4 -2
- package/src/lib/interfaces/network/node.d.ts.map +1 -1
- package/src/lib/interfaces/network/nodeAdvertisement.d.ts +4 -2
- package/src/lib/interfaces/network/nodeAdvertisement.d.ts.map +1 -1
- package/src/lib/interfaces/privateVotingDerivation.d.ts +7 -2
- package/src/lib/interfaces/privateVotingDerivation.d.ts.map +1 -1
- package/src/lib/interfaces/requests/communicationRequests.d.ts +154 -0
- package/src/lib/interfaces/requests/communicationRequests.d.ts.map +1 -0
- package/src/lib/interfaces/requests/communicationRequests.js +10 -0
- package/src/lib/interfaces/requests/communicationRequests.js.map +1 -0
- package/src/lib/interfaces/requests/index.d.ts +2 -0
- package/src/lib/interfaces/requests/index.d.ts.map +1 -0
- package/src/lib/interfaces/requests/index.js +3 -0
- package/src/lib/interfaces/requests/index.js.map +1 -0
- package/src/lib/interfaces/responses/blockDataResponse.d.ts +11 -0
- package/src/lib/interfaces/responses/blockDataResponse.d.ts.map +1 -0
- package/src/lib/interfaces/responses/blockDataResponse.js +3 -0
- package/src/lib/interfaces/responses/blockDataResponse.js.map +1 -0
- package/src/lib/interfaces/responses/communicationResponses.d.ts +82 -0
- package/src/lib/interfaces/responses/communicationResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/communicationResponses.js +17 -0
- package/src/lib/interfaces/responses/communicationResponses.js.map +1 -0
- package/src/lib/interfaces/responses/cryptoResponses.d.ts +30 -0
- package/src/lib/interfaces/responses/cryptoResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/cryptoResponses.js +12 -0
- package/src/lib/interfaces/responses/cryptoResponses.js.map +1 -0
- package/src/lib/interfaces/responses/deviceResponses.d.ts +26 -0
- package/src/lib/interfaces/responses/deviceResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/deviceResponses.js +15 -0
- package/src/lib/interfaces/responses/deviceResponses.js.map +1 -0
- package/src/lib/interfaces/responses/directoryResponses.d.ts +26 -0
- package/src/lib/interfaces/responses/directoryResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/directoryResponses.js +12 -0
- package/src/lib/interfaces/responses/directoryResponses.js.map +1 -0
- package/src/lib/interfaces/responses/emailResponses.d.ts +40 -0
- package/src/lib/interfaces/responses/emailResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/emailResponses.js +18 -0
- package/src/lib/interfaces/responses/emailResponses.js.map +1 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.d.ts +42 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.js +11 -0
- package/src/lib/interfaces/responses/explodingMessageResponses.js.map +1 -0
- package/src/lib/interfaces/responses/identityProofResponses.d.ts +33 -0
- package/src/lib/interfaces/responses/identityProofResponses.d.ts.map +1 -0
- package/src/lib/interfaces/responses/identityProofResponses.js +12 -0
- package/src/lib/interfaces/responses/identityProofResponses.js.map +1 -0
- package/src/lib/interfaces/responses/index.d.ts +3 -1
- package/src/lib/interfaces/responses/index.d.ts.map +1 -1
- package/src/lib/interfaces/sealResults.d.ts +7 -2
- package/src/lib/interfaces/sealResults.d.ts.map +1 -1
- package/src/lib/interfaces/services/fecService.d.ts +7 -5
- package/src/lib/interfaces/services/fecService.d.ts.map +1 -1
- package/src/lib/interfaces/services/fecService.js +2 -0
- package/src/lib/interfaces/services/fecService.js.map +1 -1
- package/src/lib/interfaces/singleEncryptedBlockDetails.d.ts +7 -2
- package/src/lib/interfaces/singleEncryptedBlockDetails.d.ts.map +1 -1
- package/src/lib/interfaces/storage/blockMetadata.d.ts +8 -1
- package/src/lib/interfaces/storage/blockMetadata.d.ts.map +1 -1
- package/src/lib/interfaces/storage/blockMetadata.js +3 -1
- package/src/lib/interfaces/storage/blockMetadata.js.map +1 -1
- package/src/lib/interfaces/storage/cblIndex.d.ts +141 -0
- package/src/lib/interfaces/storage/cblIndex.d.ts.map +1 -0
- package/src/lib/interfaces/storage/cblIndex.js +28 -0
- package/src/lib/interfaces/storage/cblIndex.js.map +1 -0
- package/src/lib/interfaces/storage/clientSession.d.ts +22 -0
- package/src/lib/interfaces/storage/clientSession.d.ts.map +1 -0
- package/src/lib/interfaces/storage/clientSession.js +3 -0
- package/src/lib/interfaces/storage/clientSession.js.map +1 -0
- package/src/lib/interfaces/storage/collection.d.ts +80 -0
- package/src/lib/interfaces/storage/collection.d.ts.map +1 -0
- package/src/lib/interfaces/storage/collection.js +3 -0
- package/src/lib/interfaces/storage/collection.js.map +1 -0
- package/src/lib/interfaces/storage/database.d.ts +30 -0
- package/src/lib/interfaces/storage/database.d.ts.map +1 -0
- package/src/lib/interfaces/storage/database.js +3 -0
- package/src/lib/interfaces/storage/database.js.map +1 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts +43 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts.map +1 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.js +3 -0
- package/src/lib/interfaces/storage/databaseLifecycleHooks.js.map +1 -0
- package/src/lib/interfaces/storage/documentTypes.d.ts +413 -0
- package/src/lib/interfaces/storage/documentTypes.d.ts.map +1 -0
- package/src/lib/interfaces/storage/documentTypes.js +8 -0
- package/src/lib/interfaces/storage/documentTypes.js.map +1 -0
- package/src/lib/interfaces/storage/encryptedPool.d.ts +64 -0
- package/src/lib/interfaces/storage/encryptedPool.d.ts.map +1 -0
- package/src/lib/interfaces/storage/encryptedPool.js +26 -0
- package/src/lib/interfaces/storage/encryptedPool.js.map +1 -0
- package/src/lib/interfaces/storage/headRegistry.d.ts +128 -0
- package/src/lib/interfaces/storage/headRegistry.d.ts.map +1 -0
- package/src/lib/interfaces/storage/headRegistry.js +3 -0
- package/src/lib/interfaces/storage/headRegistry.js.map +1 -0
- package/src/lib/interfaces/storage/index.d.ts +14 -0
- package/src/lib/interfaces/storage/index.d.ts.map +1 -1
- package/src/lib/interfaces/storage/index.js +14 -1
- package/src/lib/interfaces/storage/index.js.map +1 -1
- package/src/lib/interfaces/storage/pooledBlockStore.d.ts +163 -0
- package/src/lib/interfaces/storage/pooledBlockStore.d.ts.map +1 -0
- package/src/lib/interfaces/storage/pooledBlockStore.js +77 -0
- package/src/lib/interfaces/storage/pooledBlockStore.js.map +1 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.d.ts +47 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.d.ts.map +1 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.js +29 -0
- package/src/lib/interfaces/storage/readConcernBlockStore.js.map +1 -0
- package/src/lib/interfaces/symmetricEncryptionResults.d.ts +7 -5
- package/src/lib/interfaces/symmetricEncryptionResults.d.ts.map +1 -1
- package/src/lib/services/blockCapacity.service.d.ts.map +1 -1
- package/src/lib/services/blockCapacity.service.js +15 -0
- package/src/lib/services/blockCapacity.service.js.map +1 -1
- package/src/lib/services/brightpass/auditLogger.d.ts +41 -0
- package/src/lib/services/brightpass/auditLogger.d.ts.map +1 -0
- package/src/lib/services/brightpass/auditLogger.js +47 -0
- package/src/lib/services/brightpass/auditLogger.js.map +1 -0
- package/src/lib/services/brightpass/breachDetector.d.ts +68 -0
- package/src/lib/services/brightpass/breachDetector.d.ts.map +1 -0
- package/src/lib/services/brightpass/breachDetector.js +102 -0
- package/src/lib/services/brightpass/breachDetector.js.map +1 -0
- package/src/lib/services/brightpass/importParser.d.ts +105 -0
- package/src/lib/services/brightpass/importParser.d.ts.map +1 -0
- package/src/lib/services/brightpass/importParser.js +380 -0
- package/src/lib/services/brightpass/importParser.js.map +1 -0
- package/src/lib/services/brightpass/index.d.ts +16 -0
- package/src/lib/services/brightpass/index.d.ts.map +1 -0
- package/src/lib/services/brightpass/index.js +19 -0
- package/src/lib/services/brightpass/index.js.map +1 -0
- package/src/lib/services/brightpass/passwordGenerator.d.ts +111 -0
- package/src/lib/services/brightpass/passwordGenerator.d.ts.map +1 -0
- package/src/lib/services/brightpass/passwordGenerator.js +162 -0
- package/src/lib/services/brightpass/passwordGenerator.js.map +1 -0
- package/src/lib/services/brightpass/totpEngine.d.ts +191 -0
- package/src/lib/services/brightpass/totpEngine.d.ts.map +1 -0
- package/src/lib/services/brightpass/totpEngine.js +198 -0
- package/src/lib/services/brightpass/totpEngine.js.map +1 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.d.ts +26 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.d.ts.map +1 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.js +42 -0
- package/src/lib/services/brightpass/vaultKeyDerivation.js.map +1 -0
- package/src/lib/services/brightpass/vaultSerializer.d.ts +14 -0
- package/src/lib/services/brightpass/vaultSerializer.d.ts.map +1 -0
- package/src/lib/services/brightpass/vaultSerializer.js +77 -0
- package/src/lib/services/brightpass/vaultSerializer.js.map +1 -0
- package/src/lib/services/cblService.d.ts +4 -2
- package/src/lib/services/cblService.d.ts.map +1 -1
- package/src/lib/services/cblService.js +8 -4
- package/src/lib/services/cblService.js.map +1 -1
- package/src/lib/services/communication/channelService.d.ts +208 -0
- package/src/lib/services/communication/channelService.d.ts.map +1 -0
- package/src/lib/services/communication/channelService.js +575 -0
- package/src/lib/services/communication/channelService.js.map +1 -0
- package/src/lib/services/communication/conversationService.d.ts +130 -0
- package/src/lib/services/communication/conversationService.d.ts.map +1 -0
- package/src/lib/services/communication/conversationService.js +279 -0
- package/src/lib/services/communication/conversationService.js.map +1 -0
- package/src/lib/services/communication/explodingMessageService.d.ts +168 -0
- package/src/lib/services/communication/explodingMessageService.d.ts.map +1 -0
- package/src/lib/services/communication/explodingMessageService.js +287 -0
- package/src/lib/services/communication/explodingMessageService.js.map +1 -0
- package/src/lib/services/communication/groupService.d.ts +165 -0
- package/src/lib/services/communication/groupService.d.ts.map +1 -0
- package/src/lib/services/communication/groupService.js +437 -0
- package/src/lib/services/communication/groupService.js.map +1 -0
- package/src/lib/services/communication/index.d.ts +16 -0
- package/src/lib/services/communication/index.d.ts.map +1 -0
- package/src/lib/services/communication/index.js +63 -0
- package/src/lib/services/communication/index.js.map +1 -0
- package/src/lib/services/communication/messageOperationsService.d.ts +81 -0
- package/src/lib/services/communication/messageOperationsService.d.ts.map +1 -0
- package/src/lib/services/communication/messageOperationsService.js +162 -0
- package/src/lib/services/communication/messageOperationsService.js.map +1 -0
- package/src/lib/services/communication/permissionService.d.ts +47 -0
- package/src/lib/services/communication/permissionService.d.ts.map +1 -0
- package/src/lib/services/communication/permissionService.js +82 -0
- package/src/lib/services/communication/permissionService.js.map +1 -0
- package/src/lib/services/communication/searchService.d.ts +30 -0
- package/src/lib/services/communication/searchService.d.ts.map +1 -0
- package/src/lib/services/communication/searchService.js +83 -0
- package/src/lib/services/communication/searchService.js.map +1 -0
- package/src/lib/services/crypto/ethereumWalletService.d.ts +159 -0
- package/src/lib/services/crypto/ethereumWalletService.d.ts.map +1 -0
- package/src/lib/services/crypto/ethereumWalletService.js +345 -0
- package/src/lib/services/crypto/ethereumWalletService.js.map +1 -0
- package/src/lib/services/crypto/gitSigningService.d.ts +145 -0
- package/src/lib/services/crypto/gitSigningService.d.ts.map +1 -0
- package/src/lib/services/crypto/gitSigningService.js +291 -0
- package/src/lib/services/crypto/gitSigningService.js.map +1 -0
- package/src/lib/services/crypto/index.d.ts +3 -0
- package/src/lib/services/crypto/index.d.ts.map +1 -0
- package/src/lib/services/crypto/index.js +6 -0
- package/src/lib/services/crypto/index.js.map +1 -0
- package/src/lib/services/identity/deviceProvisioningService.d.ts +146 -0
- package/src/lib/services/identity/deviceProvisioningService.d.ts.map +1 -0
- package/src/lib/services/identity/deviceProvisioningService.js +219 -0
- package/src/lib/services/identity/deviceProvisioningService.js.map +1 -0
- package/src/lib/services/identity/identityProofService.d.ts +139 -0
- package/src/lib/services/identity/identityProofService.d.ts.map +1 -0
- package/src/lib/services/identity/identityProofService.js +245 -0
- package/src/lib/services/identity/identityProofService.js.map +1 -0
- package/src/lib/services/identity/index.d.ts +14 -0
- package/src/lib/services/identity/index.d.ts.map +1 -0
- package/src/lib/services/identity/index.js +17 -0
- package/src/lib/services/identity/index.js.map +1 -0
- package/src/lib/services/identity/memberIdentityProofService.d.ts +179 -0
- package/src/lib/services/identity/memberIdentityProofService.d.ts.map +1 -0
- package/src/lib/services/identity/memberIdentityProofService.js +232 -0
- package/src/lib/services/identity/memberIdentityProofService.js.map +1 -0
- package/src/lib/services/identity/memberPaperKeyService.d.ts +223 -0
- package/src/lib/services/identity/memberPaperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/memberPaperKeyService.js +279 -0
- package/src/lib/services/identity/memberPaperKeyService.js.map +1 -0
- package/src/lib/services/identity/paperKeyService.d.ts +106 -0
- package/src/lib/services/identity/paperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/paperKeyService.js +161 -0
- package/src/lib/services/identity/paperKeyService.js.map +1 -0
- package/src/lib/services/identity/publicKeyDirectoryService.d.ts +210 -0
- package/src/lib/services/identity/publicKeyDirectoryService.d.ts.map +1 -0
- package/src/lib/services/identity/publicKeyDirectoryService.js +328 -0
- package/src/lib/services/identity/publicKeyDirectoryService.js.map +1 -0
- package/src/lib/services/identity/splitPaperKeyService.d.ts +92 -0
- package/src/lib/services/identity/splitPaperKeyService.d.ts.map +1 -0
- package/src/lib/services/identity/splitPaperKeyService.js +305 -0
- package/src/lib/services/identity/splitPaperKeyService.js.map +1 -0
- package/src/lib/services/index.d.ts +4 -0
- package/src/lib/services/index.d.ts.map +1 -1
- package/src/lib/services/index.js +7 -0
- package/src/lib/services/index.js.map +1 -1
- package/src/lib/services/messaging/emailMessageService.d.ts.map +1 -1
- package/src/lib/services/messaging/emailMessageService.js +26 -9
- package/src/lib/services/messaging/emailMessageService.js.map +1 -1
- package/src/lib/services/messaging/emailParser.d.ts +18 -0
- package/src/lib/services/messaging/emailParser.d.ts.map +1 -1
- package/src/lib/services/messaging/emailParser.js +18 -0
- package/src/lib/services/messaging/emailParser.js.map +1 -1
- package/src/lib/services/tuple.service.d.ts +27 -2
- package/src/lib/services/tuple.service.d.ts.map +1 -1
- package/src/lib/services/tuple.service.js +62 -20
- package/src/lib/services/tuple.service.js.map +1 -1
- package/src/lib/services/vcblService.d.ts +36 -0
- package/src/lib/services/vcblService.d.ts.map +1 -0
- package/src/lib/services/vcblService.js +326 -0
- package/src/lib/services/vcblService.js.map +1 -0
- package/src/lib/stores/index.d.ts +1 -0
- package/src/lib/stores/index.d.ts.map +1 -1
- package/src/lib/stores/index.js +1 -0
- package/src/lib/stores/index.js.map +1 -1
- package/src/lib/stores/pooledMemoryBlockStore.d.ts +134 -0
- package/src/lib/stores/pooledMemoryBlockStore.d.ts.map +1 -0
- package/src/lib/stores/pooledMemoryBlockStore.js +583 -0
- package/src/lib/stores/pooledMemoryBlockStore.js.map +1 -0
- package/src/lib/types/checksum.d.ts +11 -0
- package/src/lib/types/checksum.d.ts.map +1 -1
- package/src/lib/types/checksum.js +11 -0
- package/src/lib/types/checksum.js.map +1 -1
- package/src/lib/utils/index.d.ts +9 -0
- package/src/lib/utils/index.d.ts.map +1 -1
- package/src/lib/utils/index.js +12 -0
- package/src/lib/utils/index.js.map +1 -1
- package/src/lib/utils/pagination.d.ts +27 -0
- package/src/lib/utils/pagination.d.ts.map +1 -0
- package/src/lib/utils/pagination.js +38 -0
- package/src/lib/utils/pagination.js.map +1 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConversationService — manages direct message conversations and promotion to groups.
|
|
3
|
+
*
|
|
4
|
+
* Maintains in-memory stores for conversations and messages, delegating
|
|
5
|
+
* encrypted content storage to MessagePassingService. Supports cursor-based
|
|
6
|
+
* pagination, message deletion, and conversation promotion to groups.
|
|
7
|
+
*
|
|
8
|
+
* Requirements: 10.1
|
|
9
|
+
*/
|
|
10
|
+
import { ICommunicationMessage, IConversation, IGroup, IPaginatedResult } from '../../interfaces/communication';
|
|
11
|
+
import { ICommunicationEventEmitter } from '../../interfaces/events';
|
|
12
|
+
/**
|
|
13
|
+
* Callback to check whether a member exists and is not blocked by the sender.
|
|
14
|
+
* Returns true if the member is reachable, false otherwise.
|
|
15
|
+
* Used to produce uniform errors for non-existent and blocked members.
|
|
16
|
+
*/
|
|
17
|
+
export type MemberReachabilityCheck = (senderId: string, recipientId: string) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Callback to promote a conversation to a group.
|
|
20
|
+
* Injected from GroupService once it is available.
|
|
21
|
+
* Returns the newly created IGroup.
|
|
22
|
+
*/
|
|
23
|
+
export type GroupPromotionHandler = (conversationId: string, existingParticipants: [string, string], newMemberIds: string[], messages: ICommunicationMessage[], requesterId: string) => Promise<IGroup>;
|
|
24
|
+
/**
|
|
25
|
+
* Uniform error thrown when a recipient is not reachable.
|
|
26
|
+
* The message is intentionally identical for non-existent and blocked members
|
|
27
|
+
* to prevent information leakage.
|
|
28
|
+
*/
|
|
29
|
+
export declare class RecipientNotReachableError extends Error {
|
|
30
|
+
constructor();
|
|
31
|
+
}
|
|
32
|
+
export declare class ConversationNotFoundError extends Error {
|
|
33
|
+
constructor(conversationId: string);
|
|
34
|
+
}
|
|
35
|
+
export declare class NotParticipantError extends Error {
|
|
36
|
+
constructor();
|
|
37
|
+
}
|
|
38
|
+
export declare class MessageNotFoundError extends Error {
|
|
39
|
+
constructor(messageId: string);
|
|
40
|
+
}
|
|
41
|
+
export declare class NotMessageAuthorError extends Error {
|
|
42
|
+
constructor();
|
|
43
|
+
}
|
|
44
|
+
export declare class GroupPromotionNotConfiguredError extends Error {
|
|
45
|
+
constructor();
|
|
46
|
+
}
|
|
47
|
+
export declare class ConversationService {
|
|
48
|
+
/** conversationId → IConversation */
|
|
49
|
+
private readonly conversations;
|
|
50
|
+
/** conversationId → messages (ordered by createdAt ascending) */
|
|
51
|
+
private readonly messages;
|
|
52
|
+
/** "memberA:memberB" (sorted) → conversationId for dedup */
|
|
53
|
+
private readonly participantIndex;
|
|
54
|
+
/** Set of blocked pairs: "blocker:blocked" */
|
|
55
|
+
private readonly blockedPairs;
|
|
56
|
+
/** Set of known member IDs */
|
|
57
|
+
private readonly knownMembers;
|
|
58
|
+
private groupPromotionHandler;
|
|
59
|
+
private readonly memberReachabilityCheck;
|
|
60
|
+
private readonly eventEmitter;
|
|
61
|
+
constructor(memberReachabilityCheck?: MemberReachabilityCheck | null, eventEmitter?: ICommunicationEventEmitter);
|
|
62
|
+
/**
|
|
63
|
+
* Register a member as known (exists in the system).
|
|
64
|
+
*/
|
|
65
|
+
registerMember(memberId: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Block a member. The blocker will not receive messages from the blocked member.
|
|
68
|
+
*/
|
|
69
|
+
blockMember(blockerId: string, blockedId: string): void;
|
|
70
|
+
/**
|
|
71
|
+
* Set the handler for promoting conversations to groups.
|
|
72
|
+
* Called during initialization once GroupService is available.
|
|
73
|
+
*/
|
|
74
|
+
setGroupPromotionHandler(handler: GroupPromotionHandler): void;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a recipient is reachable by the sender.
|
|
77
|
+
* Returns false for non-existent or blocked members.
|
|
78
|
+
*/
|
|
79
|
+
private isReachable;
|
|
80
|
+
/**
|
|
81
|
+
* Build a sorted participant key for dedup lookups.
|
|
82
|
+
*/
|
|
83
|
+
private participantKey;
|
|
84
|
+
/**
|
|
85
|
+
* Create a new conversation between two members, or return the existing one.
|
|
86
|
+
*/
|
|
87
|
+
createOrGetConversation(memberA: string, memberB: string): Promise<IConversation>;
|
|
88
|
+
/**
|
|
89
|
+
* List conversations for a member, sorted by lastMessageAt descending.
|
|
90
|
+
* Supports cursor-based pagination.
|
|
91
|
+
*/
|
|
92
|
+
listConversations(memberId: string, cursor?: string, limit?: number): Promise<IPaginatedResult<IConversation>>;
|
|
93
|
+
/**
|
|
94
|
+
* Get messages in a conversation, in chronological order.
|
|
95
|
+
* Supports cursor-based pagination.
|
|
96
|
+
*/
|
|
97
|
+
getMessages(conversationId: string, memberId: string, cursor?: string, limit?: number): Promise<IPaginatedResult<ICommunicationMessage>>;
|
|
98
|
+
/**
|
|
99
|
+
* Send a message in a conversation.
|
|
100
|
+
* Creates the conversation if it doesn't exist.
|
|
101
|
+
* Checks recipient reachability and returns a uniform error for
|
|
102
|
+
* non-existent or blocked members.
|
|
103
|
+
*/
|
|
104
|
+
sendMessage(senderId: string, recipientId: string, content: string, conversationId?: string): Promise<ICommunicationMessage>;
|
|
105
|
+
/**
|
|
106
|
+
* Delete a message authored by the requesting member.
|
|
107
|
+
* Marks the message as deleted for all participants.
|
|
108
|
+
*/
|
|
109
|
+
deleteMessage(conversationId: string, messageId: string, memberId: string): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Promote a conversation to a group by adding new members.
|
|
112
|
+
* Delegates to the GroupPromotionHandler (wired from GroupService).
|
|
113
|
+
*/
|
|
114
|
+
promoteToGroup(conversationId: string, newMemberIds: string[], requesterId: string): Promise<IGroup>;
|
|
115
|
+
/**
|
|
116
|
+
* Get a conversation by ID. Returns undefined if not found.
|
|
117
|
+
*/
|
|
118
|
+
getConversation(conversationId: string): IConversation | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Get all messages for a conversation (no pagination). Used internally
|
|
121
|
+
* for promotion and testing.
|
|
122
|
+
*/
|
|
123
|
+
getAllMessages(conversationId: string): ICommunicationMessage[];
|
|
124
|
+
/**
|
|
125
|
+
* Return all conversations that include the given member (no pagination).
|
|
126
|
+
* Used by SearchService for cross-context keyword search.
|
|
127
|
+
*/
|
|
128
|
+
listAllConversationsForMember(memberId: string): IConversation[];
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=conversationService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationService.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/communication/conversationService.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,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GAClB,OAAO,CAAC,MAAM,CAAC;IA4BlB;;OAEG;IACH,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIlE;;;OAGG;IACH,cAAc,CAAC,cAAc,EAAE,MAAM,GAAG,qBAAqB,EAAE;IAI/D;;;OAGG;IACH,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,EAAE;CAKjE"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ConversationService — manages direct message conversations and promotion to groups.
|
|
4
|
+
*
|
|
5
|
+
* Maintains in-memory stores for conversations and messages, delegating
|
|
6
|
+
* encrypted content storage to MessagePassingService. Supports cursor-based
|
|
7
|
+
* pagination, message deletion, and conversation promotion to groups.
|
|
8
|
+
*
|
|
9
|
+
* Requirements: 10.1
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ConversationService = exports.GroupPromotionNotConfiguredError = exports.NotMessageAuthorError = exports.MessageNotFoundError = exports.NotParticipantError = exports.ConversationNotFoundError = exports.RecipientNotReachableError = void 0;
|
|
13
|
+
const uuid_1 = require("uuid");
|
|
14
|
+
const events_1 = require("../../interfaces/events");
|
|
15
|
+
const pagination_1 = require("../../utils/pagination");
|
|
16
|
+
/**
|
|
17
|
+
* Uniform error thrown when a recipient is not reachable.
|
|
18
|
+
* The message is intentionally identical for non-existent and blocked members
|
|
19
|
+
* to prevent information leakage.
|
|
20
|
+
*/
|
|
21
|
+
class RecipientNotReachableError extends Error {
|
|
22
|
+
constructor() {
|
|
23
|
+
super('Recipient not found');
|
|
24
|
+
this.name = 'RecipientNotReachableError';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.RecipientNotReachableError = RecipientNotReachableError;
|
|
28
|
+
class ConversationNotFoundError extends Error {
|
|
29
|
+
constructor(conversationId) {
|
|
30
|
+
super(`Conversation ${conversationId} not found`);
|
|
31
|
+
this.name = 'ConversationNotFoundError';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ConversationNotFoundError = ConversationNotFoundError;
|
|
35
|
+
class NotParticipantError extends Error {
|
|
36
|
+
constructor() {
|
|
37
|
+
super('You are not a participant in this conversation');
|
|
38
|
+
this.name = 'NotParticipantError';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.NotParticipantError = NotParticipantError;
|
|
42
|
+
class MessageNotFoundError extends Error {
|
|
43
|
+
constructor(messageId) {
|
|
44
|
+
super(`Message ${messageId} not found`);
|
|
45
|
+
this.name = 'MessageNotFoundError';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MessageNotFoundError = MessageNotFoundError;
|
|
49
|
+
class NotMessageAuthorError extends Error {
|
|
50
|
+
constructor() {
|
|
51
|
+
super('You can only delete messages you authored');
|
|
52
|
+
this.name = 'NotMessageAuthorError';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.NotMessageAuthorError = NotMessageAuthorError;
|
|
56
|
+
class GroupPromotionNotConfiguredError extends Error {
|
|
57
|
+
constructor() {
|
|
58
|
+
super('Group promotion is not configured');
|
|
59
|
+
this.name = 'GroupPromotionNotConfiguredError';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.GroupPromotionNotConfiguredError = GroupPromotionNotConfiguredError;
|
|
63
|
+
class ConversationService {
|
|
64
|
+
constructor(memberReachabilityCheck = null, eventEmitter = new events_1.NullEventEmitter()) {
|
|
65
|
+
/** conversationId → IConversation */
|
|
66
|
+
this.conversations = new Map();
|
|
67
|
+
/** conversationId → messages (ordered by createdAt ascending) */
|
|
68
|
+
this.messages = new Map();
|
|
69
|
+
/** "memberA:memberB" (sorted) → conversationId for dedup */
|
|
70
|
+
this.participantIndex = new Map();
|
|
71
|
+
/** Set of blocked pairs: "blocker:blocked" */
|
|
72
|
+
this.blockedPairs = new Set();
|
|
73
|
+
/** Set of known member IDs */
|
|
74
|
+
this.knownMembers = new Set();
|
|
75
|
+
this.groupPromotionHandler = null;
|
|
76
|
+
this.memberReachabilityCheck = memberReachabilityCheck;
|
|
77
|
+
this.eventEmitter = eventEmitter;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Register a member as known (exists in the system).
|
|
81
|
+
*/
|
|
82
|
+
registerMember(memberId) {
|
|
83
|
+
this.knownMembers.add(memberId);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Block a member. The blocker will not receive messages from the blocked member.
|
|
87
|
+
*/
|
|
88
|
+
blockMember(blockerId, blockedId) {
|
|
89
|
+
this.blockedPairs.add(`${blockerId}:${blockedId}`);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Set the handler for promoting conversations to groups.
|
|
93
|
+
* Called during initialization once GroupService is available.
|
|
94
|
+
*/
|
|
95
|
+
setGroupPromotionHandler(handler) {
|
|
96
|
+
this.groupPromotionHandler = handler;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Check if a recipient is reachable by the sender.
|
|
100
|
+
* Returns false for non-existent or blocked members.
|
|
101
|
+
*/
|
|
102
|
+
isReachable(senderId, recipientId) {
|
|
103
|
+
if (this.memberReachabilityCheck) {
|
|
104
|
+
return this.memberReachabilityCheck(senderId, recipientId);
|
|
105
|
+
}
|
|
106
|
+
if (!this.knownMembers.has(recipientId)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
return !this.blockedPairs.has(`${recipientId}:${senderId}`);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Build a sorted participant key for dedup lookups.
|
|
113
|
+
*/
|
|
114
|
+
participantKey(a, b) {
|
|
115
|
+
return a < b ? `${a}:${b}` : `${b}:${a}`;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Create a new conversation between two members, or return the existing one.
|
|
119
|
+
*/
|
|
120
|
+
async createOrGetConversation(memberA, memberB) {
|
|
121
|
+
const key = this.participantKey(memberA, memberB);
|
|
122
|
+
const existingId = this.participantIndex.get(key);
|
|
123
|
+
if (existingId) {
|
|
124
|
+
const existing = this.conversations.get(existingId);
|
|
125
|
+
if (existing) {
|
|
126
|
+
return existing;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const now = new Date();
|
|
130
|
+
const conversation = {
|
|
131
|
+
id: (0, uuid_1.v4)(),
|
|
132
|
+
participants: [memberA, memberB],
|
|
133
|
+
createdAt: now,
|
|
134
|
+
lastMessageAt: now,
|
|
135
|
+
};
|
|
136
|
+
this.conversations.set(conversation.id, conversation);
|
|
137
|
+
this.messages.set(conversation.id, []);
|
|
138
|
+
this.participantIndex.set(key, conversation.id);
|
|
139
|
+
return conversation;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* List conversations for a member, sorted by lastMessageAt descending.
|
|
143
|
+
* Supports cursor-based pagination.
|
|
144
|
+
*/
|
|
145
|
+
async listConversations(memberId, cursor, limit = 20) {
|
|
146
|
+
const memberConversations = Array.from(this.conversations.values())
|
|
147
|
+
.filter((c) => c.participants[0] === memberId || c.participants[1] === memberId)
|
|
148
|
+
.sort((a, b) => b.lastMessageAt.getTime() - a.lastMessageAt.getTime());
|
|
149
|
+
return (0, pagination_1.paginateItems)(memberConversations, cursor, limit);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get messages in a conversation, in chronological order.
|
|
153
|
+
* Supports cursor-based pagination.
|
|
154
|
+
*/
|
|
155
|
+
async getMessages(conversationId, memberId, cursor, limit = 50) {
|
|
156
|
+
const conversation = this.conversations.get(conversationId);
|
|
157
|
+
if (!conversation) {
|
|
158
|
+
throw new ConversationNotFoundError(conversationId);
|
|
159
|
+
}
|
|
160
|
+
if (conversation.participants[0] !== memberId &&
|
|
161
|
+
conversation.participants[1] !== memberId) {
|
|
162
|
+
throw new NotParticipantError();
|
|
163
|
+
}
|
|
164
|
+
const msgs = this.messages.get(conversationId) ?? [];
|
|
165
|
+
return (0, pagination_1.paginateItems)(msgs, cursor, limit);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Send a message in a conversation.
|
|
169
|
+
* Creates the conversation if it doesn't exist.
|
|
170
|
+
* Checks recipient reachability and returns a uniform error for
|
|
171
|
+
* non-existent or blocked members.
|
|
172
|
+
*/
|
|
173
|
+
async sendMessage(senderId, recipientId, content, conversationId) {
|
|
174
|
+
// Check reachability: uniform error for blocked/non-existent
|
|
175
|
+
if (!this.isReachable(senderId, recipientId)) {
|
|
176
|
+
throw new RecipientNotReachableError();
|
|
177
|
+
}
|
|
178
|
+
let conversation;
|
|
179
|
+
if (conversationId) {
|
|
180
|
+
const existing = this.conversations.get(conversationId);
|
|
181
|
+
if (!existing) {
|
|
182
|
+
throw new ConversationNotFoundError(conversationId);
|
|
183
|
+
}
|
|
184
|
+
conversation = existing;
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
conversation = await this.createOrGetConversation(senderId, recipientId);
|
|
188
|
+
}
|
|
189
|
+
const now = new Date();
|
|
190
|
+
const message = {
|
|
191
|
+
id: (0, uuid_1.v4)(),
|
|
192
|
+
contextType: 'conversation',
|
|
193
|
+
contextId: conversation.id,
|
|
194
|
+
senderId,
|
|
195
|
+
encryptedContent: content,
|
|
196
|
+
createdAt: now,
|
|
197
|
+
editHistory: [],
|
|
198
|
+
deleted: false,
|
|
199
|
+
pinned: false,
|
|
200
|
+
reactions: [],
|
|
201
|
+
};
|
|
202
|
+
const msgs = this.messages.get(conversation.id);
|
|
203
|
+
if (msgs) {
|
|
204
|
+
msgs.push(message);
|
|
205
|
+
}
|
|
206
|
+
// Update conversation's lastMessageAt
|
|
207
|
+
conversation.lastMessageAt = now;
|
|
208
|
+
// Emit message sent event
|
|
209
|
+
this.eventEmitter.emitMessageSent('conversation', conversation.id, message.id, senderId);
|
|
210
|
+
return message;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Delete a message authored by the requesting member.
|
|
214
|
+
* Marks the message as deleted for all participants.
|
|
215
|
+
*/
|
|
216
|
+
async deleteMessage(conversationId, messageId, memberId) {
|
|
217
|
+
const conversation = this.conversations.get(conversationId);
|
|
218
|
+
if (!conversation) {
|
|
219
|
+
throw new ConversationNotFoundError(conversationId);
|
|
220
|
+
}
|
|
221
|
+
if (conversation.participants[0] !== memberId &&
|
|
222
|
+
conversation.participants[1] !== memberId) {
|
|
223
|
+
throw new NotParticipantError();
|
|
224
|
+
}
|
|
225
|
+
const msgs = this.messages.get(conversationId) ?? [];
|
|
226
|
+
const message = msgs.find((m) => m.id === messageId);
|
|
227
|
+
if (!message) {
|
|
228
|
+
throw new MessageNotFoundError(messageId);
|
|
229
|
+
}
|
|
230
|
+
if (message.senderId !== memberId) {
|
|
231
|
+
throw new NotMessageAuthorError();
|
|
232
|
+
}
|
|
233
|
+
message.deleted = true;
|
|
234
|
+
message.deletedBy = memberId;
|
|
235
|
+
// Emit message deleted event
|
|
236
|
+
this.eventEmitter.emitMessageDeleted('conversation', conversationId, messageId, memberId);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Promote a conversation to a group by adding new members.
|
|
240
|
+
* Delegates to the GroupPromotionHandler (wired from GroupService).
|
|
241
|
+
*/
|
|
242
|
+
async promoteToGroup(conversationId, newMemberIds, requesterId) {
|
|
243
|
+
if (!this.groupPromotionHandler) {
|
|
244
|
+
throw new GroupPromotionNotConfiguredError();
|
|
245
|
+
}
|
|
246
|
+
const conversation = this.conversations.get(conversationId);
|
|
247
|
+
if (!conversation) {
|
|
248
|
+
throw new ConversationNotFoundError(conversationId);
|
|
249
|
+
}
|
|
250
|
+
if (conversation.participants[0] !== requesterId &&
|
|
251
|
+
conversation.participants[1] !== requesterId) {
|
|
252
|
+
throw new NotParticipantError();
|
|
253
|
+
}
|
|
254
|
+
const msgs = this.messages.get(conversationId) ?? [];
|
|
255
|
+
return this.groupPromotionHandler(conversationId, conversation.participants, newMemberIds, msgs, requesterId);
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Get a conversation by ID. Returns undefined if not found.
|
|
259
|
+
*/
|
|
260
|
+
getConversation(conversationId) {
|
|
261
|
+
return this.conversations.get(conversationId);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Get all messages for a conversation (no pagination). Used internally
|
|
265
|
+
* for promotion and testing.
|
|
266
|
+
*/
|
|
267
|
+
getAllMessages(conversationId) {
|
|
268
|
+
return this.messages.get(conversationId) ?? [];
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Return all conversations that include the given member (no pagination).
|
|
272
|
+
* Used by SearchService for cross-context keyword search.
|
|
273
|
+
*/
|
|
274
|
+
listAllConversationsForMember(memberId) {
|
|
275
|
+
return Array.from(this.conversations.values()).filter((c) => c.participants[0] === memberId || c.participants[1] === memberId);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
exports.ConversationService = ConversationService;
|
|
279
|
+
//# sourceMappingURL=conversationService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversationService.js","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/communication/conversationService.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+BAAoC;AAOpC,oDAGiC;AACjC,uDAAuD;AAyBvD;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,KAAK;IACnD;QACE,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF;AALD,gEAKC;AAED,MAAa,yBAA0B,SAAQ,KAAK;IAClD,YAAY,cAAsB;QAChC,KAAK,CAAC,gBAAgB,cAAc,YAAY,CAAC,CAAC;QAClD,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AALD,8DAKC;AAED,MAAa,mBAAoB,SAAQ,KAAK;IAC5C;QACE,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACxD,IAAI,CA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;;;OAGG;IACH,cAAc,CAAC,cAAsB;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IACjD,CAAC;IAED;;;OAGG;IACH,6BAA6B,CAAC,QAAgB;QAC5C,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CACnD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,QAAQ,CACxE,CAAC;IACJ,CAAC;CACF;AAvTD,kDAuTC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExplodingMessageService — self-destructing message logic for BrightChain.
|
|
3
|
+
*
|
|
4
|
+
* Provides time-based and read-count-based message expiration with
|
|
5
|
+
* secure deletion. Messages can be configured to auto-destruct after
|
|
6
|
+
* a specified time or after being read a certain number of times.
|
|
7
|
+
*
|
|
8
|
+
* All methods are stateless and operate on message objects directly.
|
|
9
|
+
* Persistence and scheduling are handled by the caller.
|
|
10
|
+
*
|
|
11
|
+
* Requirements: 8.1, 8.2, 8.3, 8.4, 8.7
|
|
12
|
+
*/
|
|
13
|
+
import { CommunicationEventType } from '../../enumerations/communication';
|
|
14
|
+
import { ICommunicationMessage } from '../../interfaces/communication';
|
|
15
|
+
export declare class ExplodingMessageError extends Error {
|
|
16
|
+
constructor(message: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class MessageAlreadyExplodedError extends ExplodingMessageError {
|
|
19
|
+
constructor(messageId: string);
|
|
20
|
+
}
|
|
21
|
+
export declare class InvalidExpirationError extends ExplodingMessageError {
|
|
22
|
+
constructor(reason: string);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Event emitted when a message explodes (is permanently deleted).
|
|
26
|
+
*/
|
|
27
|
+
export interface IExplodingMessageEvent {
|
|
28
|
+
type: CommunicationEventType;
|
|
29
|
+
messageId: string;
|
|
30
|
+
contextId: string;
|
|
31
|
+
contextType: 'conversation' | 'group' | 'channel';
|
|
32
|
+
reason: 'time_expired' | 'read_count_exceeded';
|
|
33
|
+
explodedAt: Date;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Result of checking expired messages.
|
|
37
|
+
*/
|
|
38
|
+
export interface IExpiredMessagesResult {
|
|
39
|
+
/** Messages that have expired and should be deleted */
|
|
40
|
+
expired: ICommunicationMessage[];
|
|
41
|
+
/** Events to emit for each expired message */
|
|
42
|
+
events: IExplodingMessageEvent[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Service for managing self-destructing (exploding) messages.
|
|
46
|
+
*
|
|
47
|
+
* Supports two expiration modes:
|
|
48
|
+
* - Time-based: message expires after a specified duration
|
|
49
|
+
* - Read-count: message expires after being read N times
|
|
50
|
+
*
|
|
51
|
+
* Both modes can be combined on a single message.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* // Set a 5-minute expiration
|
|
56
|
+
* ExplodingMessageService.setExpiration(message, {
|
|
57
|
+
* expiresInMs: 5 * 60 * 1000,
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* // Set a read-count limit
|
|
61
|
+
* ExplodingMessageService.setExpiration(message, {
|
|
62
|
+
* maxReads: 3,
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* // Mark as read by a member
|
|
66
|
+
* ExplodingMessageService.markRead(message, 'member-123');
|
|
67
|
+
*
|
|
68
|
+
* // Check if expired
|
|
69
|
+
* const shouldExplode = ExplodingMessageService.checkExpiration(message);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare class ExplodingMessageService {
|
|
73
|
+
/**
|
|
74
|
+
* Configure expiration settings on a message.
|
|
75
|
+
*
|
|
76
|
+
* @param message - The message to configure
|
|
77
|
+
* @param options - Expiration options
|
|
78
|
+
* @param options.expiresAt - Absolute expiration time
|
|
79
|
+
* @param options.expiresInMs - Relative expiration (milliseconds from now)
|
|
80
|
+
* @param options.maxReads - Maximum read count before expiration
|
|
81
|
+
* @throws {MessageAlreadyExplodedError} If the message has already exploded
|
|
82
|
+
* @throws {InvalidExpirationError} If no expiration option is provided
|
|
83
|
+
*
|
|
84
|
+
* Requirements: 8.1, 8.2
|
|
85
|
+
*/
|
|
86
|
+
static setExpiration(message: ICommunicationMessage, options: {
|
|
87
|
+
expiresAt?: Date;
|
|
88
|
+
expiresInMs?: number;
|
|
89
|
+
maxReads?: number;
|
|
90
|
+
}): void;
|
|
91
|
+
/**
|
|
92
|
+
* Record that a member has read a message.
|
|
93
|
+
*
|
|
94
|
+
* Increments the read count and records the member's read timestamp.
|
|
95
|
+
* If the member has already read the message, this is a no-op for
|
|
96
|
+
* the read count but updates the timestamp.
|
|
97
|
+
*
|
|
98
|
+
* @param message - The message to mark as read
|
|
99
|
+
* @param memberId - The ID of the member who read the message
|
|
100
|
+
* @returns `true` if the message should now be exploded (read count exceeded)
|
|
101
|
+
* @throws {MessageAlreadyExplodedError} If the message has already exploded
|
|
102
|
+
*
|
|
103
|
+
* Requirements: 8.2, 8.3
|
|
104
|
+
*/
|
|
105
|
+
static markRead(message: ICommunicationMessage, memberId: string): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Check whether a message has expired based on its expiration settings.
|
|
108
|
+
*
|
|
109
|
+
* Checks both time-based and read-count-based expiration.
|
|
110
|
+
*
|
|
111
|
+
* @param message - The message to check
|
|
112
|
+
* @param now - Optional current time (defaults to Date.now())
|
|
113
|
+
* @returns The reason for expiration, or `null` if not expired
|
|
114
|
+
*
|
|
115
|
+
* Requirements: 8.1, 8.2, 8.4
|
|
116
|
+
*/
|
|
117
|
+
static checkExpiration(message: ICommunicationMessage, now?: Date): 'time_expired' | 'read_count_exceeded' | null;
|
|
118
|
+
/**
|
|
119
|
+
* Explode (permanently delete) a message.
|
|
120
|
+
*
|
|
121
|
+
* Clears the encrypted content and marks the message as exploded.
|
|
122
|
+
* The message metadata is preserved for audit purposes.
|
|
123
|
+
*
|
|
124
|
+
* @param message - The message to explode
|
|
125
|
+
* @returns The explosion event
|
|
126
|
+
* @throws {MessageAlreadyExplodedError} If the message has already exploded
|
|
127
|
+
*
|
|
128
|
+
* Requirements: 8.4, 8.7
|
|
129
|
+
*/
|
|
130
|
+
static explode(message: ICommunicationMessage): IExplodingMessageEvent;
|
|
131
|
+
/**
|
|
132
|
+
* Scan a collection of messages and find all that have expired.
|
|
133
|
+
*
|
|
134
|
+
* Returns the expired messages and the events to emit for each.
|
|
135
|
+
* Does NOT modify the messages — call {@link explode} on each
|
|
136
|
+
* returned message to actually delete them.
|
|
137
|
+
*
|
|
138
|
+
* @param messages - The messages to scan
|
|
139
|
+
* @param now - Optional current time (defaults to Date.now())
|
|
140
|
+
* @returns The expired messages and their events
|
|
141
|
+
*
|
|
142
|
+
* Requirements: 8.4
|
|
143
|
+
*/
|
|
144
|
+
static deleteExpired(messages: ReadonlyArray<ICommunicationMessage>, now?: Date): IExpiredMessagesResult;
|
|
145
|
+
/**
|
|
146
|
+
* Check if a message is an exploding message (has any expiration configured).
|
|
147
|
+
*
|
|
148
|
+
* @param message - The message to check
|
|
149
|
+
* @returns `true` if the message has expiration settings
|
|
150
|
+
*/
|
|
151
|
+
static isExplodingMessage(message: ICommunicationMessage): boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Get the remaining time until a message expires (in milliseconds).
|
|
154
|
+
*
|
|
155
|
+
* @param message - The message to check
|
|
156
|
+
* @param now - Optional current time
|
|
157
|
+
* @returns Remaining time in ms, or `null` if no time-based expiration
|
|
158
|
+
*/
|
|
159
|
+
static getRemainingTime(message: ICommunicationMessage, now?: Date): number | null;
|
|
160
|
+
/**
|
|
161
|
+
* Get the remaining reads before a message expires.
|
|
162
|
+
*
|
|
163
|
+
* @param message - The message to check
|
|
164
|
+
* @returns Remaining reads, or `null` if no read-count expiration
|
|
165
|
+
*/
|
|
166
|
+
static getRemainingReads(message: ICommunicationMessage): number | null;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=explodingMessageService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explodingMessageService.d.ts","sourceRoot":"","sources":["../../../../../../brightchain-lib/src/lib/services/communication/explodingMessageService.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAIvE,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,2BAA4B,SAAQ,qBAAqB;gBACxD,SAAS,EAAE,MAAM;CAI9B;AAED,qBAAa,sBAAuB,SAAQ,qBAAqB;gBACnD,MAAM,EAAE,MAAM;CAI3B;AAID;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,cAAc,GAAG,qBAAqB,CAAC;IAC/C,UAAU,EAAE,IAAI,CAAC;CAClB;AAID;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,uDAAuD;IACvD,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,8CAA8C;IAC9C,MAAM,EAAE,sBAAsB,EAAE,CAAC;CAClC;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,uBAAuB;IAClC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,aAAa,CAClB,OAAO,EAAE,qBAAqB,EAC9B,OAAO,EAAE;QACP,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,WAAW,CAAC,EA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