import { DecryptedPropertyStub, EncryptedPropertyStub, PropertyStub } from './PropertyStub.mjs'; import { CodeStub } from './base/CodeStub.mjs'; import { HasEncryptionMetadata } from './base/HasEncryptionMetadata.mjs'; import { HasMedicalLocation } from './base/HasMedicalLocation.mjs'; import { ICureDocument } from './base/ICureDocument.mjs'; import { StoredDocument } from './base/StoredDocument.mjs'; import { Delegation } from './embed/Delegation.mjs'; import { Encryptable } from './embed/Encryptable.mjs'; import { MessageReadStatus } from './embed/MessageReadStatus.mjs'; import { SecurityMetadata } from './embed/SecurityMetadata.mjs'; import { Base64String } from './specializations/Base64String.mjs'; /** * * Represents a message exchanged between healthcare parties. Messages can be used for internal * communication, * eHealth box messages, eFact batches, and other types of healthcare-related communications. * / */ export interface Message extends StoredDocument, ICureDocument, HasMedicalLocation, HasEncryptionMetadata, Encryptable { /** * * Address of the sender of the message. */ fromAddress: string | undefined; /** * * ID of the healthcare party sending the message. */ fromHealthcarePartyId: string | undefined; /** * * List of IDs of healthcare parties to whom the message is addressed. */ recipients: Array; /** * * The addresses of the recipients of the message. */ toAddresses: Array; /** * * The timestamp (unix epoch in ms) when the message was received. */ received: number | undefined; /** * * The timestamp (unix epoch in ms) when the message was sent. */ sent: number | undefined; /** * * Additional metadata for the message. */ metas: { [key: string]: string; }; /** * * Status showing whether the message is read or not and the time of reading. */ readStatus: { [key: string]: MessageReadStatus; }; /** * * Transport-level identifier for the message, format depends on the transport type. */ transportGuid: string | undefined; /** * * An additional remark on the message. */ remark: string | undefined; /** * * The guid of the conversation this message belongs to. */ conversationGuid: string | undefined; /** * * Subject for the message. */ subject: string | undefined; /** * * Set of IDs for invoices in the message. */ invoiceIds: Array; /** * * ID of a parent in a message conversation. */ parentId: string | undefined; /** * * Extra properties for the message. */ properties: Array; readonly isEncrypted: boolean; toJSON(): object; } /** * * Represents a message exchanged between healthcare parties. Messages can be used for internal * communication, * eHealth box messages, eFact batches, and other types of healthcare-related communications. * / */ export declare class DecryptedMessage { /** * * The ID of the message. We encourage using either a v4 UUID or a HL7 Id. */ id: string; /** * * The revision of the message in the database, used for conflict management / optimistic locking. */ rev: string | undefined; /** * * The timestamp (unix epoch in ms) of creation. */ created: number | undefined; /** * * The timestamp (unix epoch in ms) of the latest modification. */ modified: number | undefined; /** * * The id of the User that created this message. */ author: string | undefined; /** * * The id of the HealthcareParty that is responsible for this message. */ responsible: string | undefined; /** * * Tags that qualify the message as being member of a certain class. */ tags: Array; /** * * Codes that identify or qualify this particular message. */ codes: Array; /** * * Hard delete (unix epoch in ms) timestamp of the object. */ deletionDate: number | undefined; /** * * Address of the sender of the message. */ fromAddress: string | undefined; /** * * ID of the healthcare party sending the message. */ fromHealthcarePartyId: string | undefined; /** * * List of IDs of healthcare parties to whom the message is addressed. */ recipients: Array; /** * * The addresses of the recipients of the message. */ toAddresses: Array; /** * * The timestamp (unix epoch in ms) when the message was received. */ received: number | undefined; /** * * The timestamp (unix epoch in ms) when the message was sent. */ sent: number | undefined; /** * * Additional metadata for the message. */ metas: { [key: string]: string; }; /** * * Status showing whether the message is read or not and the time of reading. */ readStatus: { [key: string]: MessageReadStatus; }; /** * * Transport-level identifier for the message, format depends on the transport type. */ transportGuid: string | undefined; /** * * An additional remark on the message. */ remark: string | undefined; /** * * The guid of the conversation this message belongs to. */ conversationGuid: string | undefined; /** * * Subject for the message. */ subject: string | undefined; /** * * Set of IDs for invoices in the message. */ invoiceIds: Array; /** * * ID of a parent in a message conversation. */ parentId: string | undefined; /** * * Extra properties for the message. */ properties: Array; /** * * The secret patient key, encrypted in the patient's own AES key. */ secretForeignKeys: Array; /** * * The patient id encrypted in the delegates' AES keys. */ cryptedForeignKeys: { [key: string]: Array; }; /** * * The delegations giving access to connected healthcare information. */ delegations: { [key: string]: Array; }; /** * * The keys used to encrypt this entity when stored encrypted. */ encryptionKeys: { [key: string]: Array; }; /** * * The base64-encoded encrypted fields of this entity. */ encryptedSelf: Base64String | undefined; /** * * The security metadata of the entity. */ securityMetadata: SecurityMetadata | undefined; readonly isEncrypted: false; constructor(partial: Partial); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): DecryptedMessage; } /** * * Represents a message exchanged between healthcare parties. Messages can be used for internal * communication, * eHealth box messages, eFact batches, and other types of healthcare-related communications. * / */ export declare class EncryptedMessage { /** * * The ID of the message. We encourage using either a v4 UUID or a HL7 Id. */ id: string; /** * * The revision of the message in the database, used for conflict management / optimistic locking. */ rev: string | undefined; /** * * The timestamp (unix epoch in ms) of creation. */ created: number | undefined; /** * * The timestamp (unix epoch in ms) of the latest modification. */ modified: number | undefined; /** * * The id of the User that created this message. */ author: string | undefined; /** * * The id of the HealthcareParty that is responsible for this message. */ responsible: string | undefined; /** * * Tags that qualify the message as being member of a certain class. */ tags: Array; /** * * Codes that identify or qualify this particular message. */ codes: Array; /** * * Hard delete (unix epoch in ms) timestamp of the object. */ deletionDate: number | undefined; /** * * Address of the sender of the message. */ fromAddress: string | undefined; /** * * ID of the healthcare party sending the message. */ fromHealthcarePartyId: string | undefined; /** * * List of IDs of healthcare parties to whom the message is addressed. */ recipients: Array; /** * * The addresses of the recipients of the message. */ toAddresses: Array; /** * * The timestamp (unix epoch in ms) when the message was received. */ received: number | undefined; /** * * The timestamp (unix epoch in ms) when the message was sent. */ sent: number | undefined; /** * * Additional metadata for the message. */ metas: { [key: string]: string; }; /** * * Status showing whether the message is read or not and the time of reading. */ readStatus: { [key: string]: MessageReadStatus; }; /** * * Transport-level identifier for the message, format depends on the transport type. */ transportGuid: string | undefined; /** * * An additional remark on the message. */ remark: string | undefined; /** * * The guid of the conversation this message belongs to. */ conversationGuid: string | undefined; /** * * Subject for the message. */ subject: string | undefined; /** * * Set of IDs for invoices in the message. */ invoiceIds: Array; /** * * ID of a parent in a message conversation. */ parentId: string | undefined; /** * * Extra properties for the message. */ properties: Array; /** * * The secret patient key, encrypted in the patient's own AES key. */ secretForeignKeys: Array; /** * * The patient id encrypted in the delegates' AES keys. */ cryptedForeignKeys: { [key: string]: Array; }; /** * * The delegations giving access to connected healthcare information. */ delegations: { [key: string]: Array; }; /** * * The keys used to encrypt this entity when stored encrypted. */ encryptionKeys: { [key: string]: Array; }; /** * * The base64-encoded encrypted fields of this entity. */ encryptedSelf: Base64String | undefined; /** * * The security metadata of the entity. */ securityMetadata: SecurityMetadata | undefined; readonly isEncrypted: true; constructor(partial: Partial); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): EncryptedMessage; }