@icure/api 8.3.6 → 8.4.1
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/icc-api/api/IccClassificationApi.d.ts +1 -0
- package/icc-api/api/IccClassificationApi.js +12 -0
- package/icc-api/api/IccClassificationApi.js.map +1 -1
- package/icc-api/api/IccGroupApi.d.ts +7 -0
- package/icc-api/api/IccGroupApi.js +14 -0
- package/icc-api/api/IccGroupApi.js.map +1 -1
- package/icc-api/api/IccMessageApi.d.ts +0 -6
- package/icc-api/api/IccMessageApi.js +0 -15
- package/icc-api/api/IccMessageApi.js.map +1 -1
- package/icc-api/model/CryptoActorStub.js.map +1 -1
- package/icc-api/model/Group.d.ts +1 -0
- package/icc-api/model/Group.js.map +1 -1
- package/icc-x-api/icc-bekmehr-x-api.js +2 -1
- package/icc-x-api/icc-bekmehr-x-api.js.map +1 -1
- package/icc-x-api/icc-document-x-api.d.ts +51 -6
- package/icc-x-api/icc-document-x-api.js +231 -69
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-message-x-api.d.ts +45 -6
- package/icc-x-api/icc-message-x-api.js +202 -30
- package/icc-x-api/icc-message-x-api.js.map +1 -1
- package/icc-x-api/icc-patient-x-api.d.ts +9 -1
- package/icc-x-api/icc-patient-x-api.js +92 -100
- package/icc-x-api/icc-patient-x-api.js.map +1 -1
- package/icc-x-api/index.d.ts +6 -0
- package/icc-x-api/index.js +3 -2
- package/icc-x-api/index.js.map +1 -1
- package/package.json +1 -1
- package/test/icc-api/api/IccDocumentApi.js +27 -35
- package/test/icc-api/api/IccDocumentApi.js.map +1 -1
- package/test/icc-x-api/auth/group-switch-test.js.map +1 -1
- package/test/icc-x-api/icc-document-x-api.js +28 -4
- package/test/icc-x-api/icc-document-x-api.js.map +1 -1
- package/test/icc-x-api/icc-message-x-api.js +19 -293
- package/test/icc-x-api/icc-message-x-api.js.map +1 -1
- package/test/utils/test_utils.d.ts +4 -2
- package/test/utils/test_utils.js +3 -2
- package/test/utils/test_utils.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icc-document-x-api.js","sourceRoot":"","sources":["../../icc-x-api/icc-document-x-api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wCAAuD;AAGvD,4BAA2B;AAC3B,4CAAwC;AACxC,kDAAiD;AAEjD,uDAAiF;AAEjF,0EAAgG;AAChG,wEAAoE;AAKpE,mCAAsD;AACtD,IAAO,eAAe,GAAG,mCAAgB,CAAC,eAAe,CAAA;AAEzD,kEAA8D;AAE9D,qCAAqC;AACrC,MAAa,eAAgB,SAAQ,wBAAc;IAuhBjD,YACE,IAAY,EACZ,OAAkC,EAC1B,MAAqB,EACrB,OAAmB,EAC3B,YAA8B,EACb,cAAuB,EACxC,yBAAiD,IAAI,iDAAwB,EAAE,EAC/E,YAA2E,OAAO,MAAM,KAAK,WAAW;QACtG,CAAC,CAAC,MAAM,CAAC,KAAK;QACd,CAAC,CAAC,OAAO,IAAI,KAAK,WAAW;YAC7B,CAAC,CAAC,IAAI,CAAC,KAAK;YACZ,CAAC,CAAC,KAAK;QAET,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,sBAAsB,EAAE,SAAS,CAAC,CAAA;QAX/C,WAAM,GAAN,MAAM,CAAe;QACrB,YAAO,GAAP,OAAO,CAAY;QAEV,mBAAc,GAAd,cAAc,CAAS;QA1hB1C,mGAAmG;QACnG,qBAAgB,GAA8B;YAC5C,kCAAkC,EAAE,WAAW;YAC/C,+BAA+B,EAAE,yBAAyB;YAC1D,yBAAyB,EAAE,gBAAgB;YAC3C,0BAA0B,EAAE,WAAW;YACvC,6BAA6B,EAAE,0BAA0B;YACzD,6BAA6B,EAAE,0BAA0B;YACzD,2BAA2B,EAAE,qBAAqB;YAClD,yBAAyB,EAAE,oBAAoB;YAC/C,yBAAyB,EAAE,+BAA+B;YAC1D,4BAA4B,EAAE,uBAAuB;YACrD,qCAAqC,EAAE,8BAA8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AU,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;gBACvD,UAAU;gBACV;oBACE,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;oBAClD,mBAAmB,EAAE,OAAO,CAAC,kBAAkB;oBAC/C,oBAAoB,EAAE,OAAO,CAAC,cAAc;oBAC5C,cAAc,EAAE,OAAO,CAAC,cAAc;iBACvC;aACF,CAAC,CACH,EACD,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CACjC;iBACA,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;QACnB,CAAC;KAAA;IAED,yBAAyB,CACvB,MAAuB;QAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,yBAAyB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,oCAA4B,CAAC,QAAQ,EAAE,CAAC,CAAA;IAClI,CAAC;IAED,mBAAmB,CAAC,MAAuB;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,oCAA4B,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,CAAA;IAC9G,CAAC;IAED,uCAAuC,CAAC,MAAuB,EAAE,SAAmB;QAClF,OAAO,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,iCAAiC,CAC7E,EAAE,MAAM,EAAE,IAAI,EAAE,oCAA4B,CAAC,QAAQ,EAAE,EACvD,SAAS,CACV,CAAA;IACH,CAAC;CACF;AA1jCD,0CA0jCC","sourcesContent":["import { IccAuthApi, IccDocumentApi } from '../icc-api'\nimport { IccCryptoXApi } from './icc-crypto-x-api'\n\nimport * as _ from 'lodash'\nimport { XHR } from '../icc-api/api/XHR'\nimport * as models from '../icc-api/model/models'\n\nimport { a2b, hex2ua, string2ua, ua2string, ua2utf8 } from './utils/binary-utils'\nimport { IccDataOwnerXApi } from './icc-data-owner-x-api'\nimport { AuthenticationProvider, NoAuthenticationProvider } from './auth/AuthenticationProvider'\nimport { SecureDelegation } from '../icc-api/model/SecureDelegation'\nimport { ShareMetadataBehaviour } from './crypto/ShareMetadataBehaviour'\nimport { ShareResult } from './utils/ShareResult'\nimport { EntityShareRequest } from '../icc-api/model/requests/EntityShareRequest'\nimport { EncryptedEntityXApi } from './basexapi/EncryptedEntityXApi'\nimport { EntityWithDelegationTypeName } from './utils'\nimport AccessLevelEnum = SecureDelegation.AccessLevelEnum\nimport RequestedPermissionEnum = EntityShareRequest.RequestedPermissionEnum\nimport { SecretIdUseOption } from './crypto/SecretIdUseOption'\n\n// noinspection JSUnusedGlobalSymbols\nexport class IccDocumentXApi extends IccDocumentApi implements EncryptedEntityXApi<models.Document> {\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n /** maps invalid UTI values to corresponding MIME type for backward-compatibility (pre-v1.0.117) */\n compatUtiRevDefs: { [key: string]: string } = {\n 'com.adobe.encapsulatedPostscript': 'image/eps',\n 'com.adobe.illustrator.aiImage': 'application/illustrator',\n 'com.adobe.indesignImage': 'image/indesign',\n 'com.adobe.photoshopImage': 'image/psd',\n 'com.adobe.postscriptPfaFont': 'application/x-font-type1',\n 'com.adobe.postscriptPfbFont': 'application/x-font-type1',\n 'com.allume.stuffitArchive': 'application/stuffit',\n 'com.apple.binhexArchive': 'application/binhex',\n 'com.apple.diskImageUdif': 'application/x-apple-diskimage',\n 'com.apple.macbinaryArchive': 'application/macbinary',\n 'com.apple.quartzComposerComposition': 'application/x-quartzcomposer',\n 'com.apple.quicktimeImage': 'image/x-quicktime',\n 'com.apple.quicktimeMovie': 'video/quicktime',\n 'com.js.efxFax': 'image/efax',\n 'com.macromedia.shockwaveFlash': 'application/x-shockwave-flash',\n 'com.microsoft.advancedStreamRedirector': 'video/x-ms-asx',\n 'com.microsoft.advancedSystemsFormat': 'video/x-ms-asf',\n 'com.microsoft.waveformAudio': 'audio/wave',\n 'com.microsoft.windowsDynamicLinkLibrary': 'application/x-msdownload',\n 'com.microsoft.windowsExecutable': 'application/exe',\n 'com.microsoft.windowsMediaWax': 'audio/x-ms-wax',\n 'com.microsoft.windowsMediaWm': 'video/x-ms-wm',\n 'com.microsoft.windowsMediaWma': 'audio/x-ms-wma',\n 'com.microsoft.windowsMediaWmd': 'video/x-ms-wmd',\n 'com.microsoft.windowsMediaWmp': 'video/x-ms-wmp',\n 'com.microsoft.windowsMediaWmv': 'video/x-ms-wmv',\n 'com.microsoft.windowsMediaWmx': 'video/x-ms-wmx',\n 'com.microsoft.windowsMediaWmz': 'video/x-ms-wmz',\n 'com.microsoft.windowsMediaWvx': 'video/x-ms-wvx',\n 'com.netscape.javascriptSource': 'text/javascript',\n 'com.pkware.zipArchive': 'application/zip',\n 'com.rarlab.rarArchive': 'application/rar',\n 'com.redhat.redhatPackage': 'application/x-redhat-package',\n 'com.sgi.sgiImage': 'image/sgi',\n 'com.sun.javaAppDescriptor': 'text/vnd.sun.j2me.app-descriptor',\n 'com.sun.javaArchive': 'application/java-archive',\n 'com.sun.javaClass': 'application/java',\n 'com.sun.javaSource': 'text/x-java-source',\n 'com.sun.javaWebStart': 'application/jnlp',\n 'com.truevision.tgaImage': 'image/tga',\n 'org.bzip.bzip2Archive': 'application/x-bzip2',\n 'org.debian.debianPackage': 'application/x-debian-package',\n 'org.gnu.gnuTarArchive': 'application/x-gtar',\n 'org.gnu.gnuZipArchive': 'application/gzip',\n 'org.oasis.opendocument.textMaster': 'application/vnd.oasis.opendocument.text-master',\n 'org.oasis.opendocument.textWeb': 'application/vnd.oasis.opendocument.text-web',\n 'org.xiph.oggTheora': 'video/ogg',\n 'org.xiph.oggVorbis': 'audio/ogg',\n 'public.aifcAudio': 'audio/aiff',\n 'public.aiffAudio': 'audio/aiff',\n 'public.assemblySource': 'text/x-asm',\n 'public.cHeader': 'text/x-c-header',\n 'public.cpioArchive': 'application/x-cpio',\n 'public.cPlusPlusHeader': 'text/x-c++-hdr',\n 'public.cPlusPlusSource': 'application/x-cplusplus',\n 'public.cshScript': 'application/x-csh',\n 'public.cSource': 'text/x-c-code',\n 'public.isoImage': 'application/x-iso-image',\n 'public.mpeg4Audio': 'audio/mp4',\n 'public.objectiveCPlusPlusSource': 'text/x-objcppsrc',\n 'public.objectiveCSource': 'text/x-objcsrc',\n 'public.opentypeFont': 'font/opentype',\n 'public.perlScript': 'text/x-perl',\n 'public.phpScript': 'text/php',\n 'public.plainText': 'text/plain',\n 'public.pythonScript': 'text/x-python-script',\n 'public.shellScript': 'application/x-sh',\n 'public.tarArchive': 'application/tar',\n 'public.truetypeTtfFont': 'application/x-font-ttf',\n 'public.ulawAudio': 'audio/au',\n 'public.xbitmapImage': 'image/xbm',\n 'unofficial.atomFeed': 'application/atom+xml',\n 'unofficial.m3u8Playlist': 'application/x-mpegURL',\n 'unofficial.plsPlaylist': 'audio/scpls',\n 'unofficial.rdfFeed': 'application/rdf+xml',\n 'unofficial.rssFeed': 'application/rss+xml',\n }\n\n utiRevDefs: { [key: string]: string } = {\n ...this.compatUtiRevDefs,\n 'com.adobe.encapsulated-postscript': 'image/eps',\n 'com.adobe.illustrator.ai-image': 'application/illustrator',\n 'com.adobe.indesign-image': 'image/indesign',\n 'com.adobe.pdf': 'application/pdf',\n 'com.adobe.photoshop-image': 'image/psd',\n 'com.adobe.postscript': 'application/postscript',\n 'com.adobe.postscript-pfa-font': 'application/x-font-type1',\n 'com.adobe.postscript-pfb-font': 'application/x-font-type1',\n 'com.allume.stuffit-archive': 'application/stuffit',\n 'com.apple.applescript.script': 'application/x-applescript',\n 'com.apple.applescript.text': 'application/x-applescript',\n 'com.apple.binhex-archive': 'application/binhex',\n 'com.apple.disk-image-udif': 'application/x-apple-diskimage',\n 'com.apple.ical.ics': 'text/calendar',\n 'com.apple.ical.vcs': 'text/x-vcalendar',\n 'com.apple.macbinary-archive': 'application/macbinary',\n 'com.apple.pict': 'image/pict',\n 'com.apple.quartz-composer-composition': 'application/x-quartzcomposer',\n 'com.apple.quicktime-image': 'image/x-quicktime',\n 'com.apple.quicktime-movie': 'video/quicktime',\n 'com.bittorrent.torrent': 'application/x-bittorrent',\n 'com.compuserve.gif': 'image/gif',\n 'com.js.efx-fax': 'image/efax',\n 'com.kodak.flashpix.image': 'image/vndfpx',\n 'com.lizardtech.djvu': 'image/vnd.djvu',\n 'com.macromedia.shockwave-flash': 'application/x-shockwave-flash',\n 'com.microsoft.advanced-stream-redirector': 'video/x-ms-asx',\n 'com.microsoft.advanced-systems-format': 'video/x-ms-asf',\n 'com.microsoft.bmp': 'image/bmp',\n 'com.microsoft.excel.xls': 'application/excel',\n 'com.microsoft.ico': 'image/x-icon',\n 'com.microsoft.powerpoint.ppt': 'application/powerpoint',\n 'com.microsoft.waveform-audio': 'audio/wave',\n 'com.microsoft.windows-dynamic-link-library': 'application/x-msdownload',\n 'com.microsoft.windows-executable': 'application/exe',\n 'com.microsoft.windows-media-wax': 'audio/x-ms-wax',\n 'com.microsoft.windows-media-wm': 'video/x-ms-wm',\n 'com.microsoft.windows-media-wma': 'audio/x-ms-wma',\n 'com.microsoft.windows-media-wmd': 'video/x-ms-wmd',\n 'com.microsoft.windows-media-wmp': 'video/x-ms-wmp',\n 'com.microsoft.windows-media-wmv': 'video/x-ms-wmv',\n 'com.microsoft.windows-media-wmx': 'video/x-ms-wmx',\n 'com.microsoft.windows-media-wmz': 'video/x-ms-wmz',\n 'com.microsoft.windows-media-wvx': 'video/x-ms-wvx',\n 'com.microsoft.word.doc': 'application/msword',\n 'com.netscape.javascript-source': 'text/javascript',\n 'com.pkware.zip-archive': 'application/zip',\n 'com.rarlab.rar-archive': 'application/rar',\n 'com.real.realaudio': 'audio/vnd.rn-realaudio',\n 'com.real.realmedia': 'application/vnd.rn-realmedia',\n 'com.real.smil': 'application/smil',\n 'com.redhat.redhat-package': 'application/x-redhat-package',\n 'com.sgi.sgi-image': 'image/sgi',\n 'com.soundblaster.soundfont': 'application/x-soundfont',\n 'com.sun.java-app-descriptor': 'text/vnd.sun.j2me.app-descriptor',\n 'com.sun.java-archive': 'application/java-archive',\n 'com.sun.java-class': 'application/java',\n 'com.sun.java-source': 'text/x-java-source',\n 'com.sun.java-web-start': 'application/jnlp',\n 'com.truevision.tga-image': 'image/tga',\n 'org.bzip.bzip2-archive': 'application/x-bzip2',\n 'org.debian.debian-package': 'application/x-debian-package',\n 'org.gnu.gnu-tar-archive': 'application/x-gtar',\n 'org.gnu.gnu-zip-archive': 'application/gzip',\n 'org.neooffice.calc': 'application/vnd.sun.xml.calc',\n 'org.neooffice.draw': 'application/vnd.sun.xml.draw',\n 'org.neooffice.global': 'application/vnd.sun.xml.writer.global',\n 'org.neooffice.impress': 'application/vnd.sun.xml.impress',\n 'org.neooffice.math': 'application/vnd.sun.xml.math',\n 'org.neooffice.writer': 'application/vnd.sun.xml.writer',\n 'org.oasis.opendocument.chart': 'application/vnd.oasis.opendocument.chart',\n 'org.oasis.opendocument.database': 'application/vnd.oasis.opendocument.database',\n 'org.oasis.opendocument.formula': 'application/vnd.oasis.opendocument.formula',\n 'org.oasis.opendocument.graphics': 'application/vnd.oasis.opendocument.graphics',\n 'org.oasis.opendocument.image': 'application/vnd.oasis.opendocument.image',\n 'org.oasis.opendocument.presentation': 'application/vnd.oasis.opendocument.presentation',\n 'org.oasis.opendocument.spreadsheet': 'application/vnd.oasis.opendocument.spreadsheet',\n 'org.oasis.opendocument.text': 'application/vnd.oasis.opendocument.text',\n 'org.oasis.opendocument.text-master': 'application/vnd.oasis.opendocument.text-master',\n 'org.oasis.opendocument.text-web': 'application/vnd.oasis.opendocument.text-web',\n 'org.tug.tex': 'text/tex',\n 'org.xiph.flac': 'audio/flac',\n 'org.xiph.ogg-theora': 'video/ogg',\n 'org.xiph.ogg-vorbis': 'audio/ogg',\n 'public.3gpp': 'video/3gpp',\n 'public.3gpp2': 'video/3gpp2',\n 'public.aifc-audio': 'audio/aiff',\n 'public.aiff-audio': 'audio/aiff',\n 'public.assembly-source': 'text/x-asm',\n 'public.avi': 'video/avi',\n 'public.c-header': 'text/x-c-header',\n 'public.cpio-archive': 'application/x-cpio',\n 'public.c-plus-plus-header': 'text/x-c++-hdr',\n 'public.c-plus-plus-source': 'application/x-cplusplus',\n 'public.csh-script': 'application/x-csh',\n 'public.c-source': 'text/x-c-code',\n 'public.css': 'text/css',\n 'public.dv': 'video/x-dv',\n 'public.flv': 'video/x-flv',\n 'public.html': 'text/html',\n 'public.iso-image': 'application/x-iso-image',\n 'public.jpeg': 'image/jpeg',\n 'public.jpeg2000': 'image/jp2',\n 'public.midi': 'audio/midi',\n 'public.mka': 'audio/x-matroska',\n 'public.mkv': 'video/x-matroska',\n 'public.mp3': 'audio/mp3',\n 'public.mpeg': 'video/mpeg',\n 'public.mpeg4': 'video/mp4',\n 'public.mpeg4-audio': 'audio/mp4',\n 'public.mpegts': 'video/MP2T',\n 'public.objective-c-plus-plus-source': 'text/x-objcppsrc',\n 'public.objective-c-source': 'text/x-objcsrc',\n 'public.opentype-font': 'font/opentype',\n 'public.perl-script': 'text/x-perl',\n 'public.php-script': 'text/php',\n 'public.plain-text': 'text/plain',\n 'public.png': 'image/png',\n 'public.python-script': 'text/x-python-script',\n 'public.rtf': 'text/rtf',\n 'public.shell-script': 'application/x-sh',\n 'public.tar-archive': 'application/tar',\n 'public.tiff': 'image/tiff',\n 'public.truetype-ttf-font': 'application/x-font-ttf',\n 'public.ulaw-audio': 'audio/au',\n 'public.vcard': 'text/vcard',\n 'public.webm': 'video/webm',\n 'public.xbitmap-image': 'image/xbm',\n 'public.xml': 'text/xml',\n 'unofficial.atom-feed': 'application/atom+xml',\n 'unofficial.m3u8-playlist': 'application/x-mpegURL',\n 'unofficial.opml': 'text/x-opml',\n 'unofficial.pls-playlist': 'audio/scpls',\n 'unofficial.rdf-feed': 'application/rdf+xml',\n 'unofficial.rss-feed': 'application/rss+xml',\n }\n\n utiExts: { [key: string]: string } = {\n jpg: 'public.jpeg',\n jpeg: 'public.jpeg',\n png: 'public.png',\n rtf: 'public.rtf',\n mpeg: 'public.mpeg',\n mpg: 'public.mpeg',\n html: 'public.html',\n htm: 'public.html',\n pdf: 'com.adobe.pdf',\n xls: 'com.microsoft.excel.xls',\n xlsx: 'com.microsoft.excel.xls',\n doc: 'com.microsoft.word.doc',\n docx: 'com.microsoft.word.doc',\n }\n\n utiDefs: { [key: string]: string } = {\n 'application/atom+xml': 'unofficial.atom-feed',\n 'application/bat': 'com.microsoft.windows-executable',\n 'application/binhex': 'com.apple.binhex-archive',\n 'application/binhex4': 'com.apple.binhex-archive',\n 'application/ecmascript': 'com.netscape.javascript-source',\n 'application/eps': 'com.adobe.encapsulated-postscript',\n 'application/excel': 'com.microsoft.excel.xls',\n 'application/exe': 'com.microsoft.windows-executable',\n 'application/gnutar': 'public.tar-archive',\n 'application/gzip': 'org.gnu.gnu-zip-archive',\n 'application/illustrator': 'com.adobe.illustrator.ai-image',\n 'application/indesign': 'com.adobe.indesign-image',\n 'application/java-archive': 'com.sun.java-archive',\n 'application/java-byte-code': 'com.sun.java-class',\n 'application/java': 'com.sun.java-class',\n 'application/javascript': 'com.netscape.javascript-source',\n 'application/jnlp': 'com.sun.java-web-start',\n 'application/latex': 'org.tug.tex',\n 'application/mac-binary': 'com.apple.macbinary-archive',\n 'application/mac-binhex': 'com.apple.binhex-archive',\n 'application/mac-binhex40': 'com.apple.binhex-archive',\n 'application/macbinary': 'com.apple.macbinary-archive',\n 'application/mspowerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/msword': 'com.microsoft.word.doc',\n 'application/octet-stream': 'com.microsoft.windows-executable',\n 'application/pdf': 'com.adobe.pdf',\n 'application/photoshop': 'com.adobe.photoshop-image',\n 'application/php': 'public.php-script',\n 'application/plain': 'public.plain-text',\n 'application/postscript': 'com.adobe.postscript',\n 'application/powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/rar': 'com.rarlab.rar-archive',\n 'application/rdf+xml': 'unofficial.rdf-feed',\n 'application/rss+xml': 'unofficial.rss-feed',\n 'application/rtf': 'public.rtf',\n 'application/smil': 'com.real.smil',\n 'application/stuffit': 'com.allume.stuffit-archive',\n 'application/tar': 'public.tar-archive',\n 'application/tga': 'com.truevision.tga-image',\n 'application/vnd.fpx': 'com.kodak.flashpix.image',\n 'application/vnd.ms-excel': 'com.microsoft.excel.xls',\n 'application/vnd.ms-powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/vnd.oasis.opendocument.chart': 'org.oasis.opendocument.chart',\n 'application/vnd.oasis.opendocument.database': 'org.oasis.opendocument.database',\n 'application/vnd.oasis.opendocument.formula': 'org.oasis.opendocument.formula',\n 'application/vnd.oasis.opendocument.graphics-template': 'org.oasis.opendocument.graphics',\n 'application/vnd.oasis.opendocument.graphics': 'org.oasis.opendocument.graphics',\n 'application/vnd.oasis.opendocument.image': 'org.oasis.opendocument.image',\n 'application/vnd.oasis.opendocument.presentation-template': 'org.oasis.opendocument.presentation',\n 'application/vnd.oasis.opendocument.presentation': 'org.oasis.opendocument.presentation',\n 'application/vnd.oasis.opendocument.spreadsheet-template': 'org.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.spreadsheet': 'org.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.text-master': 'org.oasis.opendocument.text-master',\n 'application/vnd.oasis.opendocument.text-template': 'org.oasis.opendocument.text',\n 'application/vnd.oasis.opendocument.text-web': 'org.oasis.opendocument.text-web',\n 'application/vnd.oasis.opendocument.text': 'org.oasis.opendocument.text',\n 'application/vnd.rn-realmedia': 'com.real.realmedia',\n 'application/vnd.sun.xml.calc.template': 'org.neooffice.calc',\n 'application/vnd.sun.xml.calc': 'org.neooffice.calc',\n 'application/vnd.sun.xml.draw.template': 'org.neooffice.draw',\n 'application/vnd.sun.xml.draw': 'org.neooffice.draw',\n 'application/vnd.sun.xml.impress.template': 'org.neooffice.impress',\n 'application/vnd.sun.xml.impress': 'org.neooffice.impress',\n 'application/vnd.sun.xml.math': 'org.neooffice.math',\n 'application/vnd.sun.xml.writer.global': 'org.neooffice.global',\n 'application/vnd.sun.xml.writer.template': 'org.neooffice.writer',\n 'application/vnd.sun.xml.writer': 'org.neooffice.writer',\n 'application/vndms-excel': 'com.microsoft.excel.xls',\n 'application/vndms-powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/vndrn-realmedia': 'com.real.realmedia',\n 'application/x-apple-diskimage': 'com.apple.disk-image-udif',\n 'application/x-applescript': 'com.apple.applescript.script',\n 'application/x-bat': 'com.microsoft.windows-executable',\n 'application/x-binary': 'com.apple.macbinary-archive',\n 'application/x-binhex40': 'com.apple.binhex-archive',\n 'application/x-bittorrent': 'com.bittorrent.torrent',\n 'application/x-bzip2': 'org.bzip.bzip2-archive',\n 'application/x-cpio': 'public.cpio-archive',\n 'application/x-cplusplus': 'public.c-plus-plus-source',\n 'application/x-csh': 'public.csh-script',\n 'application/x-deb': 'org.debian.debian-package',\n 'application/x-debian-package': 'org.debian.debian-package',\n 'application/x-eps': 'com.adobe.encapsulated-postscript',\n 'application/x-excel': 'com.microsoft.excel.xls',\n 'application/x-exe': 'com.microsoft.windows-executable',\n 'application/x-flac': 'org.xiph.flac',\n 'application/x-font-ttf': 'public.truetype-ttf-font',\n 'application/x-font-type1': 'com.adobe.postscript-pfa-font',\n 'application/x-gtar': 'org.gnu.gnu-tar-archive',\n 'application/x-gzip': 'org.gnu.gnu-zip-archive',\n 'application/x-iso-image': 'public.iso-image',\n 'application/x-java-class': 'com.sun.java-class',\n 'application/x-java': 'com.sun.java-web-start',\n 'application/x-javascript': 'com.netscape.javascript-source',\n 'application/x-latex': 'org.tug.tex',\n 'application/x-mac-binhex40': 'com.apple.binhex-archive',\n 'application/x-macbinary': 'com.apple.macbinary-archive',\n 'application/x-midi': 'public.midi',\n 'application/x-mpegURL': 'unofficial.m3u8-playlist',\n 'application/x-ms-wmd': 'com.microsoft.windows-media-wmd',\n 'application/x-ms-wmz': 'com.microsoft.windows-media-wmz',\n 'application/x-msdos-program': 'com.microsoft.windows-executable',\n 'application/x-msdownload': 'com.microsoft.windows-executable',\n 'application/x-msexcel': 'com.microsoft.excel.xls',\n 'application/x-mspowerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/x-pdf': 'com.adobe.pdf',\n 'application/x-perl': 'public.perl-script',\n 'application/x-php': 'public.php-script',\n 'application/x-quartzcomposer': 'com.apple.quartz-composer-composition',\n 'application/x-rar-compressed': 'com.rarlab.rar-archive',\n 'application/x-redhat-package': 'com.redhat.redhat-package',\n 'application/x-rpm': 'com.redhat.redhat-package',\n 'application/x-rtf': 'public.rtf',\n 'application/x-sh': 'public.shell-script',\n 'application/x-shellscript': 'public.shell-script',\n 'application/x-shockwave-flash': 'com.macromedia.shockwave-flash',\n 'application/x-sit': 'com.allume.stuffit-archive',\n 'application/x-smil': 'com.real.smil',\n 'application/x-soundfont': 'com.soundblaster.soundfont',\n 'application/x-stuffit': 'com.allume.stuffit-archive',\n 'application/x-tar': 'public.tar-archive',\n 'application/x-tex': 'org.tug.tex',\n 'application/x-texinfo': 'org.tug.tex',\n 'application/x-troff-msvideo': 'public.avi',\n 'application/x-zip-compressed': 'com.pkware.zip-archive',\n 'application/xhtml+xml': 'public.html',\n 'application/xml': 'public.xml',\n 'application/zip': 'com.pkware.zip-archive',\n 'audio/3gpp': 'public.3gpp',\n 'audio/3gpp2': 'public.3gpp2',\n 'audio/aiff': 'public.aiff-audio',\n 'audio/au': 'public.ulaw-audio',\n 'audio/basic': 'public.ulaw-audio',\n 'audio/flac': 'org.xiph.flac',\n 'audio/mid': 'public.midi',\n 'audio/midi': 'public.midi',\n 'audio/mp3': 'public.mp3',\n 'audio/mp4': 'public.mpeg4-audio',\n 'audio/mp4a-latm': 'public.mpeg4-audio',\n 'audio/mpeg': 'public.mp3',\n 'audio/mpeg3': 'public.mp3',\n 'audio/mpegurl': 'unofficial.m3u-playlist',\n 'audio/mpg': 'public.mp3',\n 'audio/ogg': 'org.xiph.ogg-vorbis',\n 'audio/scpls': 'unofficial.pls-playlist',\n 'audio/snd': 'public.ulaw-audio',\n 'audio/vnd.rn-realaudio': 'com.real.realaudio',\n 'audio/wav': 'com.microsoft.waveform-audio',\n 'audio/wave': 'com.microsoft.waveform-audio',\n 'audio/webm': 'public.webm',\n 'audio/x-adpcm': 'public.ulaw-audio',\n 'audio/x-aiff': 'public.aiff-audio',\n 'audio/x-au': 'public.ulaw-audio',\n 'audio/x-flac': 'org.xiph.flac',\n 'audio/x-matroska': 'public.mka',\n 'audio/x-mid': 'public.midi',\n 'audio/x-midi': 'public.midi',\n 'audio/x-mp3': 'public.mp3',\n 'audio/x-mpeg-3': 'public.mp3',\n 'audio/x-mpeg': 'public.mp3',\n 'audio/x-mpeg3': 'public.mp3',\n 'audio/x-mpegurl': 'unofficial.m3u-playlist',\n 'audio/x-mpg': 'public.mp3',\n 'audio/x-ms-wax': 'com.microsoft.windows-media-wax',\n 'audio/x-ms-wma': 'com.microsoft.windows-media-wma',\n 'audio/x-ogg': 'org.xiph.ogg-vorbis',\n 'audio/x-pn-realaudio-plugin': 'com.real.realaudio',\n 'audio/x-pn-realaudio': 'com.real.realaudio',\n 'audio/x-pn-wav': 'com.microsoft.waveform-audio',\n 'audio/x-realaudio': 'com.real.realmedia',\n 'audio/x-scpls': 'unofficial.pls-playlist',\n 'audio/x-wav': 'com.microsoft.waveform-audio',\n 'font/opentype': 'public.opentype-font',\n 'image/bmp': 'com.microsoft.bmp',\n 'image/efax': 'com.js.efx-fax',\n 'image/eps': 'com.adobe.encapsulated-postscript',\n 'image/fpx': 'com.kodak.flashpix.image',\n 'image/gif': 'com.compuserve.gif',\n 'image/indd': 'com.adobe.indesign-image',\n 'image/indesign': 'com.adobe.indesign-image',\n 'image/jp2': 'public.jpeg2000',\n 'image/jpeg': 'public.jpeg',\n 'image/ms-bmp': 'com.microsoft.bmp',\n 'image/photoshop': 'com.adobe.photoshop-image',\n 'image/pict': 'com.apple.pict',\n 'image/pipeg': 'public.jpeg',\n 'image/pjpeg': 'public.jpeg',\n 'image/png': 'public.png',\n 'image/psd': 'com.adobe.photoshop-image',\n 'image/sgi': 'com.sgi.sgi-image',\n 'image/targa': 'com.truevision.tga-image',\n 'image/tga': 'com.truevision.tga-image',\n 'image/tiff': 'public.tiff',\n 'image/vnd.djvu': 'com.lizardtech.djvu',\n 'image/vndfpx': 'com.kodak.flashpix.image',\n 'image/vndnet-fpx': 'com.kodak.flashpix.image',\n 'image/webp': 'public.webp',\n 'image/x-bitmap': 'com.microsoft.bmp',\n 'image/x-bmp': 'com.microsoft.bmp',\n 'image/x-djvu': 'com.lizardtech.djvu',\n 'image/x-eps': 'com.adobe.encapsulated-postscript',\n 'image/x-icon': 'com.microsoft.ico',\n 'image/x-indesign': 'com.adobe.indesign-image',\n 'image/x-macpict': 'com.apple.pict',\n 'image/x-ms-bmp': 'com.microsoft.bmp',\n 'image/x-photoshop': 'com.adobe.photoshop-image',\n 'image/x-pict': 'com.apple.pict',\n 'image/x-quicktime': 'com.apple.quicktime-image',\n 'image/x-tiff': 'public.tiff',\n 'image/x-windows-bmp': 'com.microsoft.bmp',\n 'image/x-xbitmap': 'com.microsoft.bmp',\n 'image/x-xbm': 'public.xbitmap-image',\n 'image/xbm': 'public.xbitmap-image',\n 'multipart/x-gzip': 'org.gnu.gnu-zip-archive',\n 'multipart/x-zip': 'com.pkware.zip-archive',\n 'music/crescendo': 'public.midi',\n 'text/calendar': 'com.apple.ical.ics',\n 'text/css': 'public.css',\n 'text/directory': 'public.vcard',\n 'text/ecmascript': 'com.netscape.javascript-source',\n 'text/html': 'public.html',\n 'text/javascript': 'com.netscape.javascript-source',\n 'text/php': 'public.php-script',\n 'text/plain': 'public.plain-text',\n 'text/richtext': 'public.rtf',\n 'text/rtf': 'public.rtf',\n 'text/ruby-script': 'public.ruby-script',\n 'text/tex': 'org.tug.tex',\n 'text/vcard': 'public.vcard',\n 'text/vnd.sun.j2me.app-descriptor': 'com.sun.java-app-descriptor',\n 'text/x-asm': 'public.assembly-source',\n 'text/x-c-code': 'public.c-source',\n 'text/x-c-header': 'public.c-header',\n 'text/x-c': 'public.c-source',\n 'text/x-c++-code': 'public.c-plus-plus-source',\n 'text/x-c++-hdr': 'public.c-plus-plus-header',\n 'text/x-c++-src': 'public.c-plus-plus-source',\n 'text/x-c++src': 'public.c-plus-plus-source',\n 'text/x-h': 'public.c-header',\n 'text/x-java-source': 'com.sun.java-source',\n 'text/x-latex': 'org.tug.tex',\n 'text/x-objcppsrc': 'public.objective-c-plus-plus-source',\n 'text/x-objcsrc': 'public.objective-c-source',\n 'text/x-opml': 'unofficial.opml',\n 'text/x-perl-script': 'public.perl-script',\n 'text/x-perl': 'public.perl-script',\n 'text/x-php-script': 'public.php-script',\n 'text/x-python-script': 'public.python-script',\n 'text/x-python': 'public.python-script',\n 'text/x-scriptcsh': 'public.csh-script',\n 'text/x-scriptperl-module': 'public.perl-script',\n 'text/x-scriptperl': 'public.perl-script',\n 'text/x-scriptphyton': 'public.python-script',\n 'text/x-scriptsh': 'public.shell-script',\n 'text/x-server-parsed-html': 'public.html',\n 'text/x-tex': 'org.tug.tex',\n 'text/x-vcalendar': 'com.apple.ical.vcs',\n 'text/x-vcard': 'public.vcard',\n 'text/xhtml': 'public.html',\n 'text/xml': 'public.xml',\n 'video/3gpp': 'public.3gpp',\n 'video/3gpp2': 'public.3gpp2',\n 'video/avi': 'public.avi',\n 'video/MP2T': 'public.mpegts',\n 'video/mp4': 'public.mpeg4',\n 'video/mp4v': 'public.mpeg4',\n 'video/mpeg': 'public.mpeg',\n 'video/mpg': 'public.mpeg',\n 'video/msvideo': 'public.avi',\n 'video/ogg': 'org.xiph.ogg-theora',\n 'video/quicktime': 'com.apple.quicktime-movie',\n 'video/webm': 'public.webm',\n 'video/x-dv': 'public.dv',\n 'video/x-flv': 'public.flv',\n 'video/x-m4v': 'public.mpeg4',\n 'video/x-matroska': 'public.mkv',\n 'video/x-mpeg': 'public.mpeg',\n 'video/x-mpg': 'public.mpeg',\n 'video/x-ms-asf-plugin': 'com.microsoft.advanced-systems-format',\n 'video/x-ms-asf': 'com.microsoft.advanced-systems-format',\n 'video/x-ms-asx': 'com.microsoft.advanced-stream-redirector',\n 'video/x-ms-wm': 'com.microsoft.windows-media-wm',\n 'video/x-ms-wmd': 'com.microsoft.windows-media-wmd',\n 'video/x-ms-wmp': 'com.microsoft.windows-media-wmp',\n 'video/x-ms-wmv': 'com.microsoft.windows-media-wmv',\n 'video/x-ms-wmx': 'com.microsoft.windows-media-wmx',\n 'video/x-ms-wmz': 'com.microsoft.windows-media-wmz',\n 'video/x-ms-wvx': 'com.microsoft.windows-media-wvx',\n 'video/x-msvideo': 'public.avi',\n 'video/x-ogg': 'org.xiph.ogg-theora',\n 'x-msdos-program': 'com.microsoft.windows-executable',\n 'x-music/x-midi': 'public.midi',\n }\n dataOwnerApi: IccDataOwnerXApi\n authenticationProvider: AuthenticationProvider\n\n constructor(\n host: string,\n headers: { [key: string]: string },\n private crypto: IccCryptoXApi,\n private authApi: IccAuthApi,\n dataOwnerApi: IccDataOwnerXApi,\n private readonly autofillAuthor: boolean,\n authenticationProvider: AuthenticationProvider = new NoAuthenticationProvider(),\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch\n ) {\n super(host, headers, authenticationProvider, fetchImpl)\n this.fetchImpl = fetchImpl\n this.authenticationProvider = authenticationProvider\n this.dataOwnerApi = dataOwnerApi\n }\n\n override get headers(): Promise<Array<XHR.Header>> {\n return super.headers.then((h) => this.crypto.accessControlKeysHeaders.addAccessControlKeysHeaders(h, EntityWithDelegationTypeName.Document))\n }\n\n /**\n * Creates a new instance of document with initialised encryption metadata (not in the database).\n * @param user the current user.\n * @param message the message this document refers to.\n * @param c initialised data for the document. Metadata such as id, creation data, etc. will be automatically initialised, but you can specify\n * other kinds of data or overwrite generated metadata with this. You can't specify encryption metadata.\n * @param options optional parameters:\n * - additionalDelegates: delegates which will have access to the entity in addition to the current data owner and delegates from the\n * auto-delegations. Must be an object which associates each data owner id with the access level to give to that data owner. May overlap with\n * auto-delegations, in such case the access level specified here will be used.\n * - sfkOption: specifies which sfk of the owning entity to use.\n * - ignoreAutoDelegations: if true the data won't be shared with the autodelegations of the user, but only with additional delegates\n * - alternateRootDelegation: by default a new entity is created with a root delegation from self to self. In keyless mode this is not possible,\n * and instead the root delegation will be from self to another. You have to specify which delegate will be part of the root delegation.\n * @return a new instance of document.\n */\n async newInstance(\n user: models.User,\n message?: models.Message,\n c: any = {},\n options: {\n additionalDelegates?: { [dataOwnerId: string]: AccessLevelEnum }\n sfkOption?: SecretIdUseOption\n ignoreAutoDelegations?: boolean\n alternateRootDelegation?: string\n } = {}\n ) {\n const document = {\n ...(c ?? {}),\n _type: 'org.taktik.icure.entities.Document',\n id: c?.id ?? this.crypto.primitives.randomUuid(),\n created: c?.created ?? new Date().getTime(),\n modified: c?.modified ?? new Date().getTime(),\n responsible: c?.responsible ?? (this.autofillAuthor ? this.dataOwnerApi.getDataOwnerIdOf(user) : undefined),\n author: c?.author ?? (this.autofillAuthor ? user.id : undefined),\n codes: c?.codes ?? [],\n tags: c?.tags ?? [],\n }\n\n const ownerId = this.dataOwnerApi.getDataOwnerIdOf(user)\n if (ownerId !== (await this.dataOwnerApi.getCurrentDataOwnerId())) throw new Error('Can only initialise entities as current data owner.')\n const sfk = message\n ? await this.crypto.xapi.resolveSecretIdUseOptions(\n { entity: message, type: EntityWithDelegationTypeName.Message },\n options.sfkOption ?? SecretIdUseOption.UseAnySharedWithParent\n )\n : []\n const extraDelegations = {\n ...(options.ignoreAutoDelegations == true\n ? {}\n : Object.fromEntries(\n [...(user.autoDelegations?.all ?? []), ...(user.autoDelegations?.medicalInformation ?? [])].map((d) => [d, AccessLevelEnum.WRITE])\n )),\n ...(options?.additionalDelegates ?? {}),\n }\n return new models.Document(\n await this.crypto.xapi\n .entityWithInitialisedEncryptedMetadata(\n document,\n EntityWithDelegationTypeName.Document,\n message?.id,\n sfk,\n true,\n extraDelegations,\n options.alternateRootDelegation\n )\n .then((x) => x.updatedEntity)\n )\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * @deprecated use {@link findIdsByMessage} instead.\n */\n async findByMessage(hcpartyId: string, message: models.Message) {\n const extractedKeys = await this.crypto.xapi.secretIdsOf({ entity: message, type: EntityWithDelegationTypeName.Message }, hcpartyId)\n const topmostParentId = (await this.dataOwnerApi.getCurrentDataOwnerHierarchyIds())[0]\n let documents: Array<models.Document> = await this.findDocumentsByHCPartyPatientForeignKeys(topmostParentId, _.uniq(extractedKeys))\n return await this.decrypt(hcpartyId, documents)\n }\n\n /**\n * Same as {@link findByMessage} but it will only return the ids of the contacts. It can also filter the documents where Document.created is between\n * startDate and endDate in ascending or descending order by that field. (default: ascending).\n */\n async findIdsByMessage(hcpartyId: string, message: models.Message, startDate?: number, endDate?: number, descending?: boolean): Promise<string[]> {\n const extractedKeys = await this.crypto.xapi.secretIdsOf({ entity: message, type: EntityWithDelegationTypeName.Message }, hcpartyId)\n const topmostParentId = (await this.dataOwnerApi.getCurrentDataOwnerHierarchyIds())[0]\n return this.findDocumentIdsByDataOwnerSecretForeignKey(topmostParentId, _.uniq(extractedKeys), startDate, endDate, descending)\n }\n\n // Note: this is only for dealing with legacy documents: new document are not encrypted, only their attachments are\n async decrypt(hcpartyId: string, documents: Array<models.Document>): Promise<Array<models.Document>> {\n const res: models.Document[] = []\n for (const document of documents) {\n const keys = await this.crypto.xapi.encryptionKeysOf({ entity: document, type: EntityWithDelegationTypeName.Document }, undefined)\n if (!keys.length) {\n console.log('Cannot decrypt document', document.id)\n res.push(document)\n } else if (keys.length && (document.encryptedSelf || document.encryptedAttachment)) {\n const key = await this.crypto.primitives.AES.importKey('raw', hex2ua(keys[0]))\n res.push(\n await Promise.all([\n document.encryptedSelf\n ? new Promise((resolve: (value: ArrayBuffer | null) => any) => {\n this.crypto.primitives.AES.decrypt(key, string2ua(a2b(document.encryptedSelf!))).then(resolve, () => {\n console.log('Cannot decrypt document', document.id)\n resolve(null)\n })\n })\n : Promise.resolve(null),\n document.encryptedAttachment\n ? new Promise((resolve: (value: ArrayBuffer | null) => any) => {\n this.crypto.primitives.AES.decrypt(key, document.encryptedAttachment!).then(resolve, () => {\n console.log('Cannot decrypt document', document.id)\n resolve(null)\n })\n })\n : Promise.resolve(null),\n ]).then((decrypted: [ArrayBuffer | null, ArrayBuffer | null]) => {\n let updatedDocument = { ...document }\n if (decrypted) {\n if (decrypted[0]) {\n updatedDocument = _.extend(document, JSON.parse(ua2string(decrypted[0])))\n }\n if (decrypted[1]) {\n updatedDocument.decryptedAttachment = decrypted[1]\n }\n }\n return updatedDocument\n })\n )\n } else {\n res.push(document)\n }\n }\n return res\n }\n\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"application/octet-stream\", enckeys?: string, fileName?: string): Promise<ArrayBuffer>\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"text/plain\", enckeys?: string, fileName?: string): Promise<string>\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"application/json\", enckeys?: string, fileName?: string): Promise<any>\n /**\n * @deprecated use getMainAttachmentAs instead\n */\n async getAttachmentAs(\n documentId: string,\n attachmentId: string,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json',\n enckeys?: string,\n fileName?: string\n ): Promise<any> {\n if (!!enckeys || !!fileName) {\n console.warn('Using getAttachmentAs method with a value for enckeys or fileName does nothing anymore.')\n }\n return this.getMainAttachmentAs(documentId, returnType)\n }\n\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"application/octet-stream\"): Promise<ArrayBuffer>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"text/plain\"): Promise<string>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"application/json\", tryHardToParseJson?: boolean): Promise<any>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: 'application/octet-stream' | 'text/plain' | 'application/json', tryHardToParseJson?: boolean): Promise<any>\n async getMainAttachmentAs(\n documentId: string,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json',\n tryHardToParseJson: boolean = false\n ): Promise<any> {\n const url = this.host + `/document/${documentId}/attachment` + '?ts=' + new Date().getTime()\n return XHR.sendCommand(\n 'GET',\n url,\n await this.headers,\n null,\n this.fetchImpl,\n returnType,\n this.authenticationProvider.getAuthService(),\n undefined,\n returnType == 'application/json' && tryHardToParseJson\n )\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"application/octet-stream\"): Promise<ArrayBuffer | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"text/plain\"): Promise<string | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"application/json\"): Promise<any | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: 'application/octet-stream' | 'text/plain' | 'application/json'): Promise<any | undefined>\n async getAndTryDecryptMainAttachmentAs(\n document: models.Document,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json'\n ): Promise<any | undefined> {\n const key = (await this.crypto.xapi.encryptionKeysOf({ entity: document, type: EntityWithDelegationTypeName.Document }, undefined))[0]\n if (!key) return undefined\n const tryParse = this.parserFor(returnType)\n const attachmentInfo = await this.getAndTryDecryptDocumentAttachment(document, (decrypted) => Promise.resolve(tryParse(decrypted) !== undefined))\n if (attachmentInfo.wasDecrypted) {\n return tryParse(attachmentInfo.data)\n } else return undefined\n }\n private parserFor(returnType: 'application/octet-stream' | 'text/plain' | 'application/json'): (data: ArrayBuffer) => any | undefined {\n if (returnType === 'application/octet-stream') {\n return (data) => data\n } else if (returnType === 'text/plain') {\n return (data) => {\n try {\n return ua2utf8(data)\n } catch (e) {\n return undefined\n }\n }\n } else if (returnType === 'application/json') {\n return (data) => {\n try {\n return JSON.parse(ua2utf8(data))\n } catch (e) {\n return undefined\n }\n }\n } else throw new Error(`Unsupported type ${returnType}`)\n }\n\n // noinspection JSUnusedGlobalSymbols\n uti(mimeType: string, extension: string) {\n return (mimeType && mimeType !== 'application/octet-stream' ? this.utiDefs[mimeType] : this.utiExts[extension]) || this.utiDefs[mimeType]\n }\n\n // noinspection JSUnusedGlobalSymbols\n mimeType(uti: string) {\n return this.utiRevDefs[uti]\n }\n\n /**\n * Adds an attachment to a document, encrypting it on client side using the encryption keys of the provided document.\n * @param document a document.\n * @param attachment a new main attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async encryptAndSetDocumentAttachment(document: models.Document, attachment: ArrayBuffer | Uint8Array, utis?: string[]): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n const { encryptedData, updatedEntity } = await this.crypto.xapi.encryptDataOf(document, EntityWithDelegationTypeName.Document, attachment, (d) =>\n this.modifyDocument(d)\n )\n return await this.setMainDocumentAttachment(document.id!, updatedEntity?.rev ?? document.rev, encryptedData, utis, true)\n }\n\n /**\n * Adds an unencrypted attachment to a document.\n * @param document a document.\n * @param attachment a new main attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async setClearDocumentAttachment(document: models.Document, attachment: ArrayBuffer | Uint8Array, utis?: string[]): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n return await this.setMainDocumentAttachment(document.id!, document.rev, attachment, utis, false)\n }\n\n /**\n * Adds a secondary attachment to a document, encrypting it on client side using the encryption keys of the provided document.\n * @param document a document.\n * @param secondaryAttachmentKey key for the secondary attachment.\n * @param attachment a new secondary attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async encryptAndSetSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n attachment: ArrayBuffer | Uint8Array,\n utis?: string[]\n ): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n const { encryptedData, updatedEntity } = await this.crypto.xapi.encryptDataOf(document, EntityWithDelegationTypeName.Document, attachment, (d) =>\n this.modifyDocument()\n )\n return await this.setSecondaryAttachment(document.id!, secondaryAttachmentKey, updatedEntity?.rev ?? document.rev!, encryptedData, utis, true)\n }\n\n /**\n * Adds an unencrypted secondary attachment to a document.\n * @param document a document.\n * @param secondaryAttachmentKey key for the secondary attachment.\n * @param attachment a new secondary attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async setClearSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n attachment: ArrayBuffer | Uint8Array,\n utis?: string[]\n ): Promise<models.Document> {\n return await this.setSecondaryAttachment(document.id!, secondaryAttachmentKey, document.rev!, attachment, utis, false)\n }\n\n /**\n * Gets the main attachment of a document and tries to decrypt it using the encryption keys of the document, throwing an error if the operation fails.\n * @param document a document.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n */\n async getAndDecryptDocumentAttachment(\n document: models.Document,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<ArrayBuffer> {\n const retrieved = await this.getAndTryDecryptDocumentAttachment(document, (x) => validator(x))\n if (!retrieved.wasDecrypted) throw new Error(`No valid key found to decrypt data of document ${document.id}.`)\n return retrieved.data\n }\n\n /**\n * Gets the main attachment of a document and tries to decrypt it using the encryption keys of the document.\n * @param document a document.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return an object containing:\n * - data: the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n * - wasDecrypted: if the data was successfully decrypted or not\n */\n async getAndTryDecryptDocumentAttachment(\n document: models.Document,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<{ data: ArrayBuffer; wasDecrypted: boolean }> {\n return await this.crypto.xapi.tryDecryptDataOf(\n { entity: document, type: EntityWithDelegationTypeName.Document },\n await this.getRawMainDocumentAttachment(document.id!),\n (x) => validator(x)\n )\n }\n\n /**\n * Gets the secondary attachment of a document and tries to decrypt it using the encryption keys of the document, throwing an error if the operation fails.\n * @param document a document.\n * @param secondaryAttachmentKey key of the secondary attachment.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return the decrypted attachment.\n */\n async getAndDecryptSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<ArrayBuffer> {\n const { data, wasDecrypted } = await this.getAndTryDecryptSecondaryDocumentAttachment(document, secondaryAttachmentKey, (x) => validator(x))\n if (!wasDecrypted) throw new Error(`No valid key found to decrypt data of document ${document.id}.`)\n return data\n }\n\n /**\n * Gets the secondary attachment of a document and tries to decrypt it using the encryption keys of the document.\n * @param document a document.\n * @param secondaryAttachmentKey key of the secondary attachment.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return an object containing:\n * - data: the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n * - wasDecrypted: if the data was successfully decrypted or not\n */\n async getAndTryDecryptSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<{ data: ArrayBuffer; wasDecrypted: boolean }> {\n return await this.crypto.xapi.tryDecryptDataOf(\n { entity: document, type: EntityWithDelegationTypeName.Document },\n await this.getSecondaryAttachment(document.id!, secondaryAttachmentKey),\n (x) => validator(x)\n )\n }\n\n /**\n * @param document a document\n * @return the id of the message that the document refers to, retrieved from the encrypted metadata. Normally there should only be one element\n * in the returned array, but in case of entity merges there could be multiple values.\n */\n async decryptMessageIdOf(document: models.Document): Promise<string[]> {\n return this.crypto.xapi.owningEntityIdsOf({ entity: document, type: EntityWithDelegationTypeName.Document }, undefined)\n }\n\n /**\n * @return if the logged data owner has write access to the content of the given document\n */\n async hasWriteAccess(document: models.Document): Promise<boolean> {\n return this.crypto.xapi.hasWriteAccess({ entity: document, type: EntityWithDelegationTypeName.Document })\n }\n\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param delegateId the id of the data owner which will be granted access to the document.\n * @param document the document to share.\n * @param options optional parameters to customize the sharing behaviour:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return the updated entity\n */\n async shareWith(\n delegateId: string,\n document: models.Document,\n options: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n } = {}\n ): Promise<models.Document> {\n return this.shareWithMany(document, { [delegateId]: options })\n }\n\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param document the document to share.\n * @param delegates associates the id of data owners which will be granted access to the entity, to the following sharing options:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return the updated entity.\n */\n async shareWithMany(\n document: models.Document,\n delegates: {\n [delegateId: string]: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n }\n }\n ): Promise<models.Document> {\n return (await this.tryShareWithMany(document, delegates)).updatedEntityOrThrow\n }\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param document the document to share.\n * @param delegates associates the id of data owners which will be granted access to the entity, to the following sharing options:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return a promise which will contain the result of the operation: the updated entity if the operation was successful or details of the error if\n * the operation failed.\n */\n async tryShareWithMany(\n document: models.Document,\n delegates: {\n [delegateId: string]: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n }\n }\n ): Promise<ShareResult<models.Document>> {\n const self = await this.dataOwnerApi.getCurrentDataOwnerId()\n // All entities should have an encryption key.\n const entityWithEncryptionKey = await this.crypto.xapi.ensureEncryptionKeysInitialised(document, EntityWithDelegationTypeName.Document)\n const updatedEntity = entityWithEncryptionKey ? await this.modifyDocument(entityWithEncryptionKey) : document\n return this.crypto.xapi\n .simpleShareOrUpdateEncryptedEntityMetadata(\n {\n entity: updatedEntity,\n type: EntityWithDelegationTypeName.Document,\n },\n Object.fromEntries(\n Object.entries(delegates).map(([delegateId, options]) => [\n delegateId,\n {\n requestedPermissions: options.requestedPermissions,\n shareEncryptionKeys: options.shareEncryptionKey,\n shareOwningEntityIds: options.shareMessageId,\n shareSecretIds: options.shareSecretIds,\n },\n ])\n ),\n (x) => this.bulkShareDocument(x)\n )\n .then((r) => r)\n }\n\n getDataOwnersWithAccessTo(\n entity: models.Document\n ): Promise<{ permissionsByDataOwnerId: { [p: string]: AccessLevelEnum }; hasUnknownAnonymousDataOwners: boolean }> {\n return this.crypto.delegationsDeAnonymization.getDataOwnersWithAccessTo({ entity, type: EntityWithDelegationTypeName.Document })\n }\n\n getEncryptionKeysOf(entity: models.Document): Promise<string[]> {\n return this.crypto.xapi.encryptionKeysOf({ entity, type: EntityWithDelegationTypeName.Document }, undefined)\n }\n\n createDelegationDeAnonymizationMetadata(entity: models.Document, delegates: string[]): Promise<void> {\n return this.crypto.delegationsDeAnonymization.createOrUpdateDeAnonymizationInfo(\n { entity, type: EntityWithDelegationTypeName.Document },\n delegates\n )\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"icc-document-x-api.js","sourceRoot":"","sources":["../../icc-x-api/icc-document-x-api.ts"],"names":[],"mappings":";;;;;;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AAE,UAAkB,EAAE,IAAoB,EAAE,eAAyB;QACtI,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;IAED,yBAAyB,CAAC,UAAkB,EAAE,GAAW,EAAE,GAAW;QACpE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACxC,CAAC;CACF;AA5sCD,0CA4sCC","sourcesContent":["import { IccAuthApi, IccDocumentApi } from '../icc-api'\nimport { IccCryptoXApi } from './icc-crypto-x-api'\n\nimport * as _ from 'lodash'\nimport { XHR } from '../icc-api/api/XHR'\nimport * as models from '../icc-api/model/models'\n\nimport { a2b, hex2ua, string2ua, ua2string, ua2utf8 } from './utils/binary-utils'\nimport { IccDataOwnerXApi } from './icc-data-owner-x-api'\nimport { AuthenticationProvider, NoAuthenticationProvider } from './auth/AuthenticationProvider'\nimport { SecureDelegation } from '../icc-api/model/SecureDelegation'\nimport { ShareMetadataBehaviour } from './crypto/ShareMetadataBehaviour'\nimport { ShareResult } from './utils/ShareResult'\nimport { EntityShareRequest } from '../icc-api/model/requests/EntityShareRequest'\nimport { EncryptedEntityXApi } from './basexapi/EncryptedEntityXApi'\nimport { EncryptedFieldsManifest, EntityWithDelegationTypeName, parseEncryptedFields } from './utils'\nimport AccessLevelEnum = SecureDelegation.AccessLevelEnum\nimport RequestedPermissionEnum = EntityShareRequest.RequestedPermissionEnum\nimport { SecretIdUseOption } from './crypto/SecretIdUseOption'\nimport { ListOfIds, PaginatedListDocument, PaginatedListMessage } from '../icc-api/model/models'\n\n// noinspection JSUnusedGlobalSymbols\nexport class IccDocumentXApi extends IccDocumentApi implements EncryptedEntityXApi<models.Document> {\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n /** maps invalid UTI values to corresponding MIME type for backward-compatibility (pre-v1.0.117) */\n compatUtiRevDefs: { [key: string]: string } = {\n 'com.adobe.encapsulatedPostscript': 'image/eps',\n 'com.adobe.illustrator.aiImage': 'application/illustrator',\n 'com.adobe.indesignImage': 'image/indesign',\n 'com.adobe.photoshopImage': 'image/psd',\n 'com.adobe.postscriptPfaFont': 'application/x-font-type1',\n 'com.adobe.postscriptPfbFont': 'application/x-font-type1',\n 'com.allume.stuffitArchive': 'application/stuffit',\n 'com.apple.binhexArchive': 'application/binhex',\n 'com.apple.diskImageUdif': 'application/x-apple-diskimage',\n 'com.apple.macbinaryArchive': 'application/macbinary',\n 'com.apple.quartzComposerComposition': 'application/x-quartzcomposer',\n 'com.apple.quicktimeImage': 'image/x-quicktime',\n 'com.apple.quicktimeMovie': 'video/quicktime',\n 'com.js.efxFax': 'image/efax',\n 'com.macromedia.shockwaveFlash': 'application/x-shockwave-flash',\n 'com.microsoft.advancedStreamRedirector': 'video/x-ms-asx',\n 'com.microsoft.advancedSystemsFormat': 'video/x-ms-asf',\n 'com.microsoft.waveformAudio': 'audio/wave',\n 'com.microsoft.windowsDynamicLinkLibrary': 'application/x-msdownload',\n 'com.microsoft.windowsExecutable': 'application/exe',\n 'com.microsoft.windowsMediaWax': 'audio/x-ms-wax',\n 'com.microsoft.windowsMediaWm': 'video/x-ms-wm',\n 'com.microsoft.windowsMediaWma': 'audio/x-ms-wma',\n 'com.microsoft.windowsMediaWmd': 'video/x-ms-wmd',\n 'com.microsoft.windowsMediaWmp': 'video/x-ms-wmp',\n 'com.microsoft.windowsMediaWmv': 'video/x-ms-wmv',\n 'com.microsoft.windowsMediaWmx': 'video/x-ms-wmx',\n 'com.microsoft.windowsMediaWmz': 'video/x-ms-wmz',\n 'com.microsoft.windowsMediaWvx': 'video/x-ms-wvx',\n 'com.netscape.javascriptSource': 'text/javascript',\n 'com.pkware.zipArchive': 'application/zip',\n 'com.rarlab.rarArchive': 'application/rar',\n 'com.redhat.redhatPackage': 'application/x-redhat-package',\n 'com.sgi.sgiImage': 'image/sgi',\n 'com.sun.javaAppDescriptor': 'text/vnd.sun.j2me.app-descriptor',\n 'com.sun.javaArchive': 'application/java-archive',\n 'com.sun.javaClass': 'application/java',\n 'com.sun.javaSource': 'text/x-java-source',\n 'com.sun.javaWebStart': 'application/jnlp',\n 'com.truevision.tgaImage': 'image/tga',\n 'org.bzip.bzip2Archive': 'application/x-bzip2',\n 'org.debian.debianPackage': 'application/x-debian-package',\n 'org.gnu.gnuTarArchive': 'application/x-gtar',\n 'org.gnu.gnuZipArchive': 'application/gzip',\n 'org.oasis.opendocument.textMaster': 'application/vnd.oasis.opendocument.text-master',\n 'org.oasis.opendocument.textWeb': 'application/vnd.oasis.opendocument.text-web',\n 'org.xiph.oggTheora': 'video/ogg',\n 'org.xiph.oggVorbis': 'audio/ogg',\n 'public.aifcAudio': 'audio/aiff',\n 'public.aiffAudio': 'audio/aiff',\n 'public.assemblySource': 'text/x-asm',\n 'public.cHeader': 'text/x-c-header',\n 'public.cpioArchive': 'application/x-cpio',\n 'public.cPlusPlusHeader': 'text/x-c++-hdr',\n 'public.cPlusPlusSource': 'application/x-cplusplus',\n 'public.cshScript': 'application/x-csh',\n 'public.cSource': 'text/x-c-code',\n 'public.isoImage': 'application/x-iso-image',\n 'public.mpeg4Audio': 'audio/mp4',\n 'public.objectiveCPlusPlusSource': 'text/x-objcppsrc',\n 'public.objectiveCSource': 'text/x-objcsrc',\n 'public.opentypeFont': 'font/opentype',\n 'public.perlScript': 'text/x-perl',\n 'public.phpScript': 'text/php',\n 'public.plainText': 'text/plain',\n 'public.pythonScript': 'text/x-python-script',\n 'public.shellScript': 'application/x-sh',\n 'public.tarArchive': 'application/tar',\n 'public.truetypeTtfFont': 'application/x-font-ttf',\n 'public.ulawAudio': 'audio/au',\n 'public.xbitmapImage': 'image/xbm',\n 'unofficial.atomFeed': 'application/atom+xml',\n 'unofficial.m3u8Playlist': 'application/x-mpegURL',\n 'unofficial.plsPlaylist': 'audio/scpls',\n 'unofficial.rdfFeed': 'application/rdf+xml',\n 'unofficial.rssFeed': 'application/rss+xml',\n }\n\n utiRevDefs: { [key: string]: string } = {\n ...this.compatUtiRevDefs,\n 'com.adobe.encapsulated-postscript': 'image/eps',\n 'com.adobe.illustrator.ai-image': 'application/illustrator',\n 'com.adobe.indesign-image': 'image/indesign',\n 'com.adobe.pdf': 'application/pdf',\n 'com.adobe.photoshop-image': 'image/psd',\n 'com.adobe.postscript': 'application/postscript',\n 'com.adobe.postscript-pfa-font': 'application/x-font-type1',\n 'com.adobe.postscript-pfb-font': 'application/x-font-type1',\n 'com.allume.stuffit-archive': 'application/stuffit',\n 'com.apple.applescript.script': 'application/x-applescript',\n 'com.apple.applescript.text': 'application/x-applescript',\n 'com.apple.binhex-archive': 'application/binhex',\n 'com.apple.disk-image-udif': 'application/x-apple-diskimage',\n 'com.apple.ical.ics': 'text/calendar',\n 'com.apple.ical.vcs': 'text/x-vcalendar',\n 'com.apple.macbinary-archive': 'application/macbinary',\n 'com.apple.pict': 'image/pict',\n 'com.apple.quartz-composer-composition': 'application/x-quartzcomposer',\n 'com.apple.quicktime-image': 'image/x-quicktime',\n 'com.apple.quicktime-movie': 'video/quicktime',\n 'com.bittorrent.torrent': 'application/x-bittorrent',\n 'com.compuserve.gif': 'image/gif',\n 'com.js.efx-fax': 'image/efax',\n 'com.kodak.flashpix.image': 'image/vndfpx',\n 'com.lizardtech.djvu': 'image/vnd.djvu',\n 'com.macromedia.shockwave-flash': 'application/x-shockwave-flash',\n 'com.microsoft.advanced-stream-redirector': 'video/x-ms-asx',\n 'com.microsoft.advanced-systems-format': 'video/x-ms-asf',\n 'com.microsoft.bmp': 'image/bmp',\n 'com.microsoft.excel.xls': 'application/excel',\n 'com.microsoft.ico': 'image/x-icon',\n 'com.microsoft.powerpoint.ppt': 'application/powerpoint',\n 'com.microsoft.waveform-audio': 'audio/wave',\n 'com.microsoft.windows-dynamic-link-library': 'application/x-msdownload',\n 'com.microsoft.windows-executable': 'application/exe',\n 'com.microsoft.windows-media-wax': 'audio/x-ms-wax',\n 'com.microsoft.windows-media-wm': 'video/x-ms-wm',\n 'com.microsoft.windows-media-wma': 'audio/x-ms-wma',\n 'com.microsoft.windows-media-wmd': 'video/x-ms-wmd',\n 'com.microsoft.windows-media-wmp': 'video/x-ms-wmp',\n 'com.microsoft.windows-media-wmv': 'video/x-ms-wmv',\n 'com.microsoft.windows-media-wmx': 'video/x-ms-wmx',\n 'com.microsoft.windows-media-wmz': 'video/x-ms-wmz',\n 'com.microsoft.windows-media-wvx': 'video/x-ms-wvx',\n 'com.microsoft.word.doc': 'application/msword',\n 'com.netscape.javascript-source': 'text/javascript',\n 'com.pkware.zip-archive': 'application/zip',\n 'com.rarlab.rar-archive': 'application/rar',\n 'com.real.realaudio': 'audio/vnd.rn-realaudio',\n 'com.real.realmedia': 'application/vnd.rn-realmedia',\n 'com.real.smil': 'application/smil',\n 'com.redhat.redhat-package': 'application/x-redhat-package',\n 'com.sgi.sgi-image': 'image/sgi',\n 'com.soundblaster.soundfont': 'application/x-soundfont',\n 'com.sun.java-app-descriptor': 'text/vnd.sun.j2me.app-descriptor',\n 'com.sun.java-archive': 'application/java-archive',\n 'com.sun.java-class': 'application/java',\n 'com.sun.java-source': 'text/x-java-source',\n 'com.sun.java-web-start': 'application/jnlp',\n 'com.truevision.tga-image': 'image/tga',\n 'org.bzip.bzip2-archive': 'application/x-bzip2',\n 'org.debian.debian-package': 'application/x-debian-package',\n 'org.gnu.gnu-tar-archive': 'application/x-gtar',\n 'org.gnu.gnu-zip-archive': 'application/gzip',\n 'org.neooffice.calc': 'application/vnd.sun.xml.calc',\n 'org.neooffice.draw': 'application/vnd.sun.xml.draw',\n 'org.neooffice.global': 'application/vnd.sun.xml.writer.global',\n 'org.neooffice.impress': 'application/vnd.sun.xml.impress',\n 'org.neooffice.math': 'application/vnd.sun.xml.math',\n 'org.neooffice.writer': 'application/vnd.sun.xml.writer',\n 'org.oasis.opendocument.chart': 'application/vnd.oasis.opendocument.chart',\n 'org.oasis.opendocument.database': 'application/vnd.oasis.opendocument.database',\n 'org.oasis.opendocument.formula': 'application/vnd.oasis.opendocument.formula',\n 'org.oasis.opendocument.graphics': 'application/vnd.oasis.opendocument.graphics',\n 'org.oasis.opendocument.image': 'application/vnd.oasis.opendocument.image',\n 'org.oasis.opendocument.presentation': 'application/vnd.oasis.opendocument.presentation',\n 'org.oasis.opendocument.spreadsheet': 'application/vnd.oasis.opendocument.spreadsheet',\n 'org.oasis.opendocument.text': 'application/vnd.oasis.opendocument.text',\n 'org.oasis.opendocument.text-master': 'application/vnd.oasis.opendocument.text-master',\n 'org.oasis.opendocument.text-web': 'application/vnd.oasis.opendocument.text-web',\n 'org.tug.tex': 'text/tex',\n 'org.xiph.flac': 'audio/flac',\n 'org.xiph.ogg-theora': 'video/ogg',\n 'org.xiph.ogg-vorbis': 'audio/ogg',\n 'public.3gpp': 'video/3gpp',\n 'public.3gpp2': 'video/3gpp2',\n 'public.aifc-audio': 'audio/aiff',\n 'public.aiff-audio': 'audio/aiff',\n 'public.assembly-source': 'text/x-asm',\n 'public.avi': 'video/avi',\n 'public.c-header': 'text/x-c-header',\n 'public.cpio-archive': 'application/x-cpio',\n 'public.c-plus-plus-header': 'text/x-c++-hdr',\n 'public.c-plus-plus-source': 'application/x-cplusplus',\n 'public.csh-script': 'application/x-csh',\n 'public.c-source': 'text/x-c-code',\n 'public.css': 'text/css',\n 'public.dv': 'video/x-dv',\n 'public.flv': 'video/x-flv',\n 'public.html': 'text/html',\n 'public.iso-image': 'application/x-iso-image',\n 'public.jpeg': 'image/jpeg',\n 'public.jpeg2000': 'image/jp2',\n 'public.midi': 'audio/midi',\n 'public.mka': 'audio/x-matroska',\n 'public.mkv': 'video/x-matroska',\n 'public.mp3': 'audio/mp3',\n 'public.mpeg': 'video/mpeg',\n 'public.mpeg4': 'video/mp4',\n 'public.mpeg4-audio': 'audio/mp4',\n 'public.mpegts': 'video/MP2T',\n 'public.objective-c-plus-plus-source': 'text/x-objcppsrc',\n 'public.objective-c-source': 'text/x-objcsrc',\n 'public.opentype-font': 'font/opentype',\n 'public.perl-script': 'text/x-perl',\n 'public.php-script': 'text/php',\n 'public.plain-text': 'text/plain',\n 'public.png': 'image/png',\n 'public.python-script': 'text/x-python-script',\n 'public.rtf': 'text/rtf',\n 'public.shell-script': 'application/x-sh',\n 'public.tar-archive': 'application/tar',\n 'public.tiff': 'image/tiff',\n 'public.truetype-ttf-font': 'application/x-font-ttf',\n 'public.ulaw-audio': 'audio/au',\n 'public.vcard': 'text/vcard',\n 'public.webm': 'video/webm',\n 'public.xbitmap-image': 'image/xbm',\n 'public.xml': 'text/xml',\n 'unofficial.atom-feed': 'application/atom+xml',\n 'unofficial.m3u8-playlist': 'application/x-mpegURL',\n 'unofficial.opml': 'text/x-opml',\n 'unofficial.pls-playlist': 'audio/scpls',\n 'unofficial.rdf-feed': 'application/rdf+xml',\n 'unofficial.rss-feed': 'application/rss+xml',\n }\n\n utiExts: { [key: string]: string } = {\n jpg: 'public.jpeg',\n jpeg: 'public.jpeg',\n png: 'public.png',\n rtf: 'public.rtf',\n mpeg: 'public.mpeg',\n mpg: 'public.mpeg',\n html: 'public.html',\n htm: 'public.html',\n pdf: 'com.adobe.pdf',\n xls: 'com.microsoft.excel.xls',\n xlsx: 'com.microsoft.excel.xls',\n doc: 'com.microsoft.word.doc',\n docx: 'com.microsoft.word.doc',\n }\n\n utiDefs: { [key: string]: string } = {\n 'application/atom+xml': 'unofficial.atom-feed',\n 'application/bat': 'com.microsoft.windows-executable',\n 'application/binhex': 'com.apple.binhex-archive',\n 'application/binhex4': 'com.apple.binhex-archive',\n 'application/ecmascript': 'com.netscape.javascript-source',\n 'application/eps': 'com.adobe.encapsulated-postscript',\n 'application/excel': 'com.microsoft.excel.xls',\n 'application/exe': 'com.microsoft.windows-executable',\n 'application/gnutar': 'public.tar-archive',\n 'application/gzip': 'org.gnu.gnu-zip-archive',\n 'application/illustrator': 'com.adobe.illustrator.ai-image',\n 'application/indesign': 'com.adobe.indesign-image',\n 'application/java-archive': 'com.sun.java-archive',\n 'application/java-byte-code': 'com.sun.java-class',\n 'application/java': 'com.sun.java-class',\n 'application/javascript': 'com.netscape.javascript-source',\n 'application/jnlp': 'com.sun.java-web-start',\n 'application/latex': 'org.tug.tex',\n 'application/mac-binary': 'com.apple.macbinary-archive',\n 'application/mac-binhex': 'com.apple.binhex-archive',\n 'application/mac-binhex40': 'com.apple.binhex-archive',\n 'application/macbinary': 'com.apple.macbinary-archive',\n 'application/mspowerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/msword': 'com.microsoft.word.doc',\n 'application/octet-stream': 'com.microsoft.windows-executable',\n 'application/pdf': 'com.adobe.pdf',\n 'application/photoshop': 'com.adobe.photoshop-image',\n 'application/php': 'public.php-script',\n 'application/plain': 'public.plain-text',\n 'application/postscript': 'com.adobe.postscript',\n 'application/powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/rar': 'com.rarlab.rar-archive',\n 'application/rdf+xml': 'unofficial.rdf-feed',\n 'application/rss+xml': 'unofficial.rss-feed',\n 'application/rtf': 'public.rtf',\n 'application/smil': 'com.real.smil',\n 'application/stuffit': 'com.allume.stuffit-archive',\n 'application/tar': 'public.tar-archive',\n 'application/tga': 'com.truevision.tga-image',\n 'application/vnd.fpx': 'com.kodak.flashpix.image',\n 'application/vnd.ms-excel': 'com.microsoft.excel.xls',\n 'application/vnd.ms-powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/vnd.oasis.opendocument.chart': 'org.oasis.opendocument.chart',\n 'application/vnd.oasis.opendocument.database': 'org.oasis.opendocument.database',\n 'application/vnd.oasis.opendocument.formula': 'org.oasis.opendocument.formula',\n 'application/vnd.oasis.opendocument.graphics-template': 'org.oasis.opendocument.graphics',\n 'application/vnd.oasis.opendocument.graphics': 'org.oasis.opendocument.graphics',\n 'application/vnd.oasis.opendocument.image': 'org.oasis.opendocument.image',\n 'application/vnd.oasis.opendocument.presentation-template': 'org.oasis.opendocument.presentation',\n 'application/vnd.oasis.opendocument.presentation': 'org.oasis.opendocument.presentation',\n 'application/vnd.oasis.opendocument.spreadsheet-template': 'org.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.spreadsheet': 'org.oasis.opendocument.spreadsheet',\n 'application/vnd.oasis.opendocument.text-master': 'org.oasis.opendocument.text-master',\n 'application/vnd.oasis.opendocument.text-template': 'org.oasis.opendocument.text',\n 'application/vnd.oasis.opendocument.text-web': 'org.oasis.opendocument.text-web',\n 'application/vnd.oasis.opendocument.text': 'org.oasis.opendocument.text',\n 'application/vnd.rn-realmedia': 'com.real.realmedia',\n 'application/vnd.sun.xml.calc.template': 'org.neooffice.calc',\n 'application/vnd.sun.xml.calc': 'org.neooffice.calc',\n 'application/vnd.sun.xml.draw.template': 'org.neooffice.draw',\n 'application/vnd.sun.xml.draw': 'org.neooffice.draw',\n 'application/vnd.sun.xml.impress.template': 'org.neooffice.impress',\n 'application/vnd.sun.xml.impress': 'org.neooffice.impress',\n 'application/vnd.sun.xml.math': 'org.neooffice.math',\n 'application/vnd.sun.xml.writer.global': 'org.neooffice.global',\n 'application/vnd.sun.xml.writer.template': 'org.neooffice.writer',\n 'application/vnd.sun.xml.writer': 'org.neooffice.writer',\n 'application/vndms-excel': 'com.microsoft.excel.xls',\n 'application/vndms-powerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/vndrn-realmedia': 'com.real.realmedia',\n 'application/x-apple-diskimage': 'com.apple.disk-image-udif',\n 'application/x-applescript': 'com.apple.applescript.script',\n 'application/x-bat': 'com.microsoft.windows-executable',\n 'application/x-binary': 'com.apple.macbinary-archive',\n 'application/x-binhex40': 'com.apple.binhex-archive',\n 'application/x-bittorrent': 'com.bittorrent.torrent',\n 'application/x-bzip2': 'org.bzip.bzip2-archive',\n 'application/x-cpio': 'public.cpio-archive',\n 'application/x-cplusplus': 'public.c-plus-plus-source',\n 'application/x-csh': 'public.csh-script',\n 'application/x-deb': 'org.debian.debian-package',\n 'application/x-debian-package': 'org.debian.debian-package',\n 'application/x-eps': 'com.adobe.encapsulated-postscript',\n 'application/x-excel': 'com.microsoft.excel.xls',\n 'application/x-exe': 'com.microsoft.windows-executable',\n 'application/x-flac': 'org.xiph.flac',\n 'application/x-font-ttf': 'public.truetype-ttf-font',\n 'application/x-font-type1': 'com.adobe.postscript-pfa-font',\n 'application/x-gtar': 'org.gnu.gnu-tar-archive',\n 'application/x-gzip': 'org.gnu.gnu-zip-archive',\n 'application/x-iso-image': 'public.iso-image',\n 'application/x-java-class': 'com.sun.java-class',\n 'application/x-java': 'com.sun.java-web-start',\n 'application/x-javascript': 'com.netscape.javascript-source',\n 'application/x-latex': 'org.tug.tex',\n 'application/x-mac-binhex40': 'com.apple.binhex-archive',\n 'application/x-macbinary': 'com.apple.macbinary-archive',\n 'application/x-midi': 'public.midi',\n 'application/x-mpegURL': 'unofficial.m3u8-playlist',\n 'application/x-ms-wmd': 'com.microsoft.windows-media-wmd',\n 'application/x-ms-wmz': 'com.microsoft.windows-media-wmz',\n 'application/x-msdos-program': 'com.microsoft.windows-executable',\n 'application/x-msdownload': 'com.microsoft.windows-executable',\n 'application/x-msexcel': 'com.microsoft.excel.xls',\n 'application/x-mspowerpoint': 'com.microsoft.powerpoint.ppt',\n 'application/x-pdf': 'com.adobe.pdf',\n 'application/x-perl': 'public.perl-script',\n 'application/x-php': 'public.php-script',\n 'application/x-quartzcomposer': 'com.apple.quartz-composer-composition',\n 'application/x-rar-compressed': 'com.rarlab.rar-archive',\n 'application/x-redhat-package': 'com.redhat.redhat-package',\n 'application/x-rpm': 'com.redhat.redhat-package',\n 'application/x-rtf': 'public.rtf',\n 'application/x-sh': 'public.shell-script',\n 'application/x-shellscript': 'public.shell-script',\n 'application/x-shockwave-flash': 'com.macromedia.shockwave-flash',\n 'application/x-sit': 'com.allume.stuffit-archive',\n 'application/x-smil': 'com.real.smil',\n 'application/x-soundfont': 'com.soundblaster.soundfont',\n 'application/x-stuffit': 'com.allume.stuffit-archive',\n 'application/x-tar': 'public.tar-archive',\n 'application/x-tex': 'org.tug.tex',\n 'application/x-texinfo': 'org.tug.tex',\n 'application/x-troff-msvideo': 'public.avi',\n 'application/x-zip-compressed': 'com.pkware.zip-archive',\n 'application/xhtml+xml': 'public.html',\n 'application/xml': 'public.xml',\n 'application/zip': 'com.pkware.zip-archive',\n 'audio/3gpp': 'public.3gpp',\n 'audio/3gpp2': 'public.3gpp2',\n 'audio/aiff': 'public.aiff-audio',\n 'audio/au': 'public.ulaw-audio',\n 'audio/basic': 'public.ulaw-audio',\n 'audio/flac': 'org.xiph.flac',\n 'audio/mid': 'public.midi',\n 'audio/midi': 'public.midi',\n 'audio/mp3': 'public.mp3',\n 'audio/mp4': 'public.mpeg4-audio',\n 'audio/mp4a-latm': 'public.mpeg4-audio',\n 'audio/mpeg': 'public.mp3',\n 'audio/mpeg3': 'public.mp3',\n 'audio/mpegurl': 'unofficial.m3u-playlist',\n 'audio/mpg': 'public.mp3',\n 'audio/ogg': 'org.xiph.ogg-vorbis',\n 'audio/scpls': 'unofficial.pls-playlist',\n 'audio/snd': 'public.ulaw-audio',\n 'audio/vnd.rn-realaudio': 'com.real.realaudio',\n 'audio/wav': 'com.microsoft.waveform-audio',\n 'audio/wave': 'com.microsoft.waveform-audio',\n 'audio/webm': 'public.webm',\n 'audio/x-adpcm': 'public.ulaw-audio',\n 'audio/x-aiff': 'public.aiff-audio',\n 'audio/x-au': 'public.ulaw-audio',\n 'audio/x-flac': 'org.xiph.flac',\n 'audio/x-matroska': 'public.mka',\n 'audio/x-mid': 'public.midi',\n 'audio/x-midi': 'public.midi',\n 'audio/x-mp3': 'public.mp3',\n 'audio/x-mpeg-3': 'public.mp3',\n 'audio/x-mpeg': 'public.mp3',\n 'audio/x-mpeg3': 'public.mp3',\n 'audio/x-mpegurl': 'unofficial.m3u-playlist',\n 'audio/x-mpg': 'public.mp3',\n 'audio/x-ms-wax': 'com.microsoft.windows-media-wax',\n 'audio/x-ms-wma': 'com.microsoft.windows-media-wma',\n 'audio/x-ogg': 'org.xiph.ogg-vorbis',\n 'audio/x-pn-realaudio-plugin': 'com.real.realaudio',\n 'audio/x-pn-realaudio': 'com.real.realaudio',\n 'audio/x-pn-wav': 'com.microsoft.waveform-audio',\n 'audio/x-realaudio': 'com.real.realmedia',\n 'audio/x-scpls': 'unofficial.pls-playlist',\n 'audio/x-wav': 'com.microsoft.waveform-audio',\n 'font/opentype': 'public.opentype-font',\n 'image/bmp': 'com.microsoft.bmp',\n 'image/efax': 'com.js.efx-fax',\n 'image/eps': 'com.adobe.encapsulated-postscript',\n 'image/fpx': 'com.kodak.flashpix.image',\n 'image/gif': 'com.compuserve.gif',\n 'image/indd': 'com.adobe.indesign-image',\n 'image/indesign': 'com.adobe.indesign-image',\n 'image/jp2': 'public.jpeg2000',\n 'image/jpeg': 'public.jpeg',\n 'image/ms-bmp': 'com.microsoft.bmp',\n 'image/photoshop': 'com.adobe.photoshop-image',\n 'image/pict': 'com.apple.pict',\n 'image/pipeg': 'public.jpeg',\n 'image/pjpeg': 'public.jpeg',\n 'image/png': 'public.png',\n 'image/psd': 'com.adobe.photoshop-image',\n 'image/sgi': 'com.sgi.sgi-image',\n 'image/targa': 'com.truevision.tga-image',\n 'image/tga': 'com.truevision.tga-image',\n 'image/tiff': 'public.tiff',\n 'image/vnd.djvu': 'com.lizardtech.djvu',\n 'image/vndfpx': 'com.kodak.flashpix.image',\n 'image/vndnet-fpx': 'com.kodak.flashpix.image',\n 'image/webp': 'public.webp',\n 'image/x-bitmap': 'com.microsoft.bmp',\n 'image/x-bmp': 'com.microsoft.bmp',\n 'image/x-djvu': 'com.lizardtech.djvu',\n 'image/x-eps': 'com.adobe.encapsulated-postscript',\n 'image/x-icon': 'com.microsoft.ico',\n 'image/x-indesign': 'com.adobe.indesign-image',\n 'image/x-macpict': 'com.apple.pict',\n 'image/x-ms-bmp': 'com.microsoft.bmp',\n 'image/x-photoshop': 'com.adobe.photoshop-image',\n 'image/x-pict': 'com.apple.pict',\n 'image/x-quicktime': 'com.apple.quicktime-image',\n 'image/x-tiff': 'public.tiff',\n 'image/x-windows-bmp': 'com.microsoft.bmp',\n 'image/x-xbitmap': 'com.microsoft.bmp',\n 'image/x-xbm': 'public.xbitmap-image',\n 'image/xbm': 'public.xbitmap-image',\n 'multipart/x-gzip': 'org.gnu.gnu-zip-archive',\n 'multipart/x-zip': 'com.pkware.zip-archive',\n 'music/crescendo': 'public.midi',\n 'text/calendar': 'com.apple.ical.ics',\n 'text/css': 'public.css',\n 'text/directory': 'public.vcard',\n 'text/ecmascript': 'com.netscape.javascript-source',\n 'text/html': 'public.html',\n 'text/javascript': 'com.netscape.javascript-source',\n 'text/php': 'public.php-script',\n 'text/plain': 'public.plain-text',\n 'text/richtext': 'public.rtf',\n 'text/rtf': 'public.rtf',\n 'text/ruby-script': 'public.ruby-script',\n 'text/tex': 'org.tug.tex',\n 'text/vcard': 'public.vcard',\n 'text/vnd.sun.j2me.app-descriptor': 'com.sun.java-app-descriptor',\n 'text/x-asm': 'public.assembly-source',\n 'text/x-c-code': 'public.c-source',\n 'text/x-c-header': 'public.c-header',\n 'text/x-c': 'public.c-source',\n 'text/x-c++-code': 'public.c-plus-plus-source',\n 'text/x-c++-hdr': 'public.c-plus-plus-header',\n 'text/x-c++-src': 'public.c-plus-plus-source',\n 'text/x-c++src': 'public.c-plus-plus-source',\n 'text/x-h': 'public.c-header',\n 'text/x-java-source': 'com.sun.java-source',\n 'text/x-latex': 'org.tug.tex',\n 'text/x-objcppsrc': 'public.objective-c-plus-plus-source',\n 'text/x-objcsrc': 'public.objective-c-source',\n 'text/x-opml': 'unofficial.opml',\n 'text/x-perl-script': 'public.perl-script',\n 'text/x-perl': 'public.perl-script',\n 'text/x-php-script': 'public.php-script',\n 'text/x-python-script': 'public.python-script',\n 'text/x-python': 'public.python-script',\n 'text/x-scriptcsh': 'public.csh-script',\n 'text/x-scriptperl-module': 'public.perl-script',\n 'text/x-scriptperl': 'public.perl-script',\n 'text/x-scriptphyton': 'public.python-script',\n 'text/x-scriptsh': 'public.shell-script',\n 'text/x-server-parsed-html': 'public.html',\n 'text/x-tex': 'org.tug.tex',\n 'text/x-vcalendar': 'com.apple.ical.vcs',\n 'text/x-vcard': 'public.vcard',\n 'text/xhtml': 'public.html',\n 'text/xml': 'public.xml',\n 'video/3gpp': 'public.3gpp',\n 'video/3gpp2': 'public.3gpp2',\n 'video/avi': 'public.avi',\n 'video/MP2T': 'public.mpegts',\n 'video/mp4': 'public.mpeg4',\n 'video/mp4v': 'public.mpeg4',\n 'video/mpeg': 'public.mpeg',\n 'video/mpg': 'public.mpeg',\n 'video/msvideo': 'public.avi',\n 'video/ogg': 'org.xiph.ogg-theora',\n 'video/quicktime': 'com.apple.quicktime-movie',\n 'video/webm': 'public.webm',\n 'video/x-dv': 'public.dv',\n 'video/x-flv': 'public.flv',\n 'video/x-m4v': 'public.mpeg4',\n 'video/x-matroska': 'public.mkv',\n 'video/x-mpeg': 'public.mpeg',\n 'video/x-mpg': 'public.mpeg',\n 'video/x-ms-asf-plugin': 'com.microsoft.advanced-systems-format',\n 'video/x-ms-asf': 'com.microsoft.advanced-systems-format',\n 'video/x-ms-asx': 'com.microsoft.advanced-stream-redirector',\n 'video/x-ms-wm': 'com.microsoft.windows-media-wm',\n 'video/x-ms-wmd': 'com.microsoft.windows-media-wmd',\n 'video/x-ms-wmp': 'com.microsoft.windows-media-wmp',\n 'video/x-ms-wmv': 'com.microsoft.windows-media-wmv',\n 'video/x-ms-wmx': 'com.microsoft.windows-media-wmx',\n 'video/x-ms-wmz': 'com.microsoft.windows-media-wmz',\n 'video/x-ms-wvx': 'com.microsoft.windows-media-wvx',\n 'video/x-msvideo': 'public.avi',\n 'video/x-ogg': 'org.xiph.ogg-theora',\n 'x-msdos-program': 'com.microsoft.windows-executable',\n 'x-music/x-midi': 'public.midi',\n }\n dataOwnerApi: IccDataOwnerXApi\n authenticationProvider: AuthenticationProvider\n private readonly encryptedFields: EncryptedFieldsManifest\n\n constructor(\n host: string,\n headers: { [key: string]: string },\n private crypto: IccCryptoXApi,\n private authApi: IccAuthApi,\n dataOwnerApi: IccDataOwnerXApi,\n private readonly autofillAuthor: boolean,\n authenticationProvider: AuthenticationProvider = new NoAuthenticationProvider(),\n encryptedKeys: Array<string> = [],\n fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response> = typeof window !== 'undefined'\n ? window.fetch\n : typeof self !== 'undefined'\n ? self.fetch\n : fetch\n ) {\n super(host, headers, authenticationProvider, fetchImpl)\n this.fetchImpl = fetchImpl\n this.authenticationProvider = authenticationProvider\n this.dataOwnerApi = dataOwnerApi\n this.encryptedFields = parseEncryptedFields(encryptedKeys, 'Document.')\n }\n\n override get headers(): Promise<Array<XHR.Header>> {\n return super.headers.then((h) => this.crypto.accessControlKeysHeaders.addAccessControlKeysHeaders(h, EntityWithDelegationTypeName.Document))\n }\n\n /**\n * Creates a new instance of document with initialised encryption metadata (not in the database).\n * @param user the current user.\n * @param message the message this document refers to.\n * @param c initialised data for the document. Metadata such as id, creation data, etc. will be automatically initialised, but you can specify\n * other kinds of data or overwrite generated metadata with this. You can't specify encryption metadata.\n * @param options optional parameters:\n * - additionalDelegates: delegates which will have access to the entity in addition to the current data owner and delegates from the\n * auto-delegations. Must be an object which associates each data owner id with the access level to give to that data owner. May overlap with\n * auto-delegations, in such case the access level specified here will be used.\n * - sfkOption: specifies which sfk of the owning entity to use.\n * - ignoreAutoDelegations: if true the data won't be shared with the autodelegations of the user, but only with additional delegates\n * - alternateRootDelegation: by default a new entity is created with a root delegation from self to self. In keyless mode this is not possible,\n * and instead the root delegation will be from self to another. You have to specify which delegate will be part of the root delegation.\n * @return a new instance of document.\n */\n async newInstance(\n user: models.User,\n message?: models.Message,\n c: any = {},\n options: {\n additionalDelegates?: { [dataOwnerId: string]: AccessLevelEnum }\n sfkOption?: SecretIdUseOption\n ignoreAutoDelegations?: boolean\n alternateRootDelegation?: string\n } = {}\n ) {\n const document = {\n ...(c ?? {}),\n _type: 'org.taktik.icure.entities.Document',\n id: c?.id ?? this.crypto.primitives.randomUuid(),\n created: c?.created ?? new Date().getTime(),\n modified: c?.modified ?? new Date().getTime(),\n responsible: c?.responsible ?? (this.autofillAuthor ? this.dataOwnerApi.getDataOwnerIdOf(user) : undefined),\n author: c?.author ?? (this.autofillAuthor ? user.id : undefined),\n codes: c?.codes ?? [],\n tags: c?.tags ?? [],\n }\n\n const ownerId = this.dataOwnerApi.getDataOwnerIdOf(user)\n if (ownerId !== (await this.dataOwnerApi.getCurrentDataOwnerId())) throw new Error('Can only initialise entities as current data owner.')\n const sfk = message\n ? await this.crypto.xapi.resolveSecretIdUseOptions(\n { entity: message, type: EntityWithDelegationTypeName.Message },\n options.sfkOption ?? SecretIdUseOption.UseAnySharedWithParent\n )\n : []\n const extraDelegations = {\n ...(options.ignoreAutoDelegations == true\n ? {}\n : Object.fromEntries(\n [...(user.autoDelegations?.all ?? []), ...(user.autoDelegations?.medicalInformation ?? [])].map((d) => [d, AccessLevelEnum.WRITE])\n )),\n ...(options?.additionalDelegates ?? {}),\n }\n return new models.Document(\n await this.crypto.xapi\n .entityWithInitialisedEncryptedMetadata(\n document,\n EntityWithDelegationTypeName.Document,\n message?.id,\n sfk,\n true,\n extraDelegations,\n options.alternateRootDelegation\n )\n .then((x) => x.updatedEntity)\n )\n }\n\n // noinspection JSUnusedGlobalSymbols\n /**\n * Same as {@link findByMessage} but it will only return the ids of the contacts. It can also filter the documents where Document.created is between\n * startDate and endDate in ascending or descending order by that field. (default: ascending).\n */\n async findIdsByMessage(hcpartyId: string, message: models.Message, startDate?: number, endDate?: number, descending?: boolean): Promise<string[]> {\n const extractedKeys = await this.crypto.xapi.secretIdsOf({ entity: message, type: EntityWithDelegationTypeName.Message }, hcpartyId)\n const topmostParentId = (await this.dataOwnerApi.getCurrentDataOwnerHierarchyIds())[0]\n return this.findDocumentIdsByDataOwnerSecretForeignKey(topmostParentId, _.uniq(extractedKeys), startDate, endDate, descending)\n }\n\n async decrypt(documents: Array<models.Document>): Promise<{ entity: models.Document; decrypted: boolean }[]> {\n return await this.crypto.xapi.tryDecryptEntities(documents, EntityWithDelegationTypeName.Document, (x) => new models.Document(x))\n }\n\n encrypt(documents: Array<models.Document>): Promise<Array<models.Document>> {\n return this.crypto.xapi.tryEncryptEntities(\n documents,\n EntityWithDelegationTypeName.Document,\n this.encryptedFields,\n true,\n false,\n (x) => new models.Document(x)\n )\n }\n\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"application/octet-stream\", enckeys?: string, fileName?: string): Promise<ArrayBuffer>\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"text/plain\", enckeys?: string, fileName?: string): Promise<string>\n //prettier-ignore\n getAttachmentAs(documentId: string, attachmentId: string, returnType: \"application/json\", enckeys?: string, fileName?: string): Promise<any>\n /**\n * @deprecated use getMainAttachmentAs instead\n */\n async getAttachmentAs(\n documentId: string,\n attachmentId: string,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json',\n enckeys?: string,\n fileName?: string\n ): Promise<any> {\n if (!!enckeys || !!fileName) {\n console.warn('Using getAttachmentAs method with a value for enckeys or fileName does nothing anymore.')\n }\n return this.getMainAttachmentAs(documentId, returnType)\n }\n\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"application/octet-stream\"): Promise<ArrayBuffer>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"text/plain\"): Promise<string>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: \"application/json\", tryHardToParseJson?: boolean): Promise<any>\n //prettier-ignore\n getMainAttachmentAs(documentId: string, returnType: 'application/octet-stream' | 'text/plain' | 'application/json', tryHardToParseJson?: boolean): Promise<any>\n async getMainAttachmentAs(\n documentId: string,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json',\n tryHardToParseJson: boolean = false\n ): Promise<any> {\n const url = this.host + `/document/${documentId}/attachment` + '?ts=' + new Date().getTime()\n return XHR.sendCommand(\n 'GET',\n url,\n await this.headers,\n null,\n this.fetchImpl,\n returnType,\n this.authenticationProvider.getAuthService(),\n undefined,\n returnType == 'application/json' && tryHardToParseJson\n )\n .then((doc) => doc.body)\n .catch((err) => this.handleError(err))\n }\n\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"application/octet-stream\"): Promise<ArrayBuffer | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"text/plain\"): Promise<string | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: \"application/json\"): Promise<any | undefined>\n //prettier-ignore\n getAndTryDecryptMainAttachmentAs(document: models.Document, returnType: 'application/octet-stream' | 'text/plain' | 'application/json'): Promise<any | undefined>\n async getAndTryDecryptMainAttachmentAs(\n document: models.Document,\n returnType: 'application/octet-stream' | 'text/plain' | 'application/json'\n ): Promise<any | undefined> {\n const key = (await this.crypto.xapi.encryptionKeysOf({ entity: document, type: EntityWithDelegationTypeName.Document }, undefined))[0]\n if (!key) return undefined\n const tryParse = this.parserFor(returnType)\n const attachmentInfo = await this.getAndTryDecryptDocumentAttachment(document, (decrypted) => Promise.resolve(tryParse(decrypted) !== undefined))\n if (attachmentInfo.wasDecrypted) {\n return tryParse(attachmentInfo.data)\n } else return undefined\n }\n private parserFor(returnType: 'application/octet-stream' | 'text/plain' | 'application/json'): (data: ArrayBuffer) => any | undefined {\n if (returnType === 'application/octet-stream') {\n return (data) => data\n } else if (returnType === 'text/plain') {\n return (data) => {\n try {\n return ua2utf8(data)\n } catch (e) {\n return undefined\n }\n }\n } else if (returnType === 'application/json') {\n return (data) => {\n try {\n return JSON.parse(ua2utf8(data))\n } catch (e) {\n return undefined\n }\n }\n } else throw new Error(`Unsupported type ${returnType}`)\n }\n\n // noinspection JSUnusedGlobalSymbols\n uti(mimeType: string, extension: string) {\n return (mimeType && mimeType !== 'application/octet-stream' ? this.utiDefs[mimeType] : this.utiExts[extension]) || this.utiDefs[mimeType]\n }\n\n // noinspection JSUnusedGlobalSymbols\n mimeType(uti: string) {\n return this.utiRevDefs[uti]\n }\n\n /**\n * Adds an attachment to a document, encrypting it on client side using the encryption keys of the provided document.\n * @param document a document.\n * @param attachment a new main attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async encryptAndSetDocumentAttachment(document: models.Document, attachment: ArrayBuffer | Uint8Array, utis?: string[]): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n const { encryptedData, updatedEntity } = await this.crypto.xapi.encryptDataOf(document, EntityWithDelegationTypeName.Document, attachment, (d) =>\n this.modifyDocumentWithUser(undefined, d)\n )\n return (\n await this.decrypt([await super.setMainDocumentAttachment(document.id!, updatedEntity?.rev ?? document.rev, encryptedData, utis, true)])\n )[0].entity\n }\n\n /**\n * Adds an unencrypted attachment to a document.\n * @param document a document.\n * @param attachment a new main attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async setClearDocumentAttachment(document: models.Document, attachment: ArrayBuffer | Uint8Array, utis?: string[]): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n return (await this.decrypt([await super.setMainDocumentAttachment(document.id!, document.rev, attachment, utis, false)]))[0].entity\n }\n\n /**\n * Adds a secondary attachment to a document, encrypting it on client side using the encryption keys of the provided document.\n * @param document a document.\n * @param secondaryAttachmentKey key for the secondary attachment.\n * @param attachment a new secondary attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async encryptAndSetSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n attachment: ArrayBuffer | Uint8Array,\n utis?: string[]\n ): Promise<models.Document> {\n if (!document.rev) throw new Error('Cannot set attachment on document without rev')\n const { encryptedData, updatedEntity } = await this.crypto.xapi.encryptDataOf(document, EntityWithDelegationTypeName.Document, attachment, (d) =>\n this.modifyDocumentWithUser(undefined, d)\n )\n return (\n await this.decrypt([\n await super.setSecondaryAttachment(document.id!, secondaryAttachmentKey, updatedEntity?.rev ?? document.rev!, encryptedData, utis, true),\n ])\n )[0].entity\n }\n\n /**\n * Adds an unencrypted secondary attachment to a document.\n * @param document a document.\n * @param secondaryAttachmentKey key for the secondary attachment.\n * @param attachment a new secondary attachment for the document.\n * @param utis an array of UTIs for the attachment. The first element will be considered as the main UTI for the document. If provided and non-empty\n * overrides existing values.\n * @return the updated document.\n */\n async setClearSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n attachment: ArrayBuffer | Uint8Array,\n utis?: string[]\n ): Promise<models.Document> {\n return (await this.decrypt([await super.setSecondaryAttachment(document.id!, secondaryAttachmentKey, document.rev!, attachment, utis, false)]))[0]\n .entity\n }\n\n /**\n * Gets the main attachment of a document and tries to decrypt it using the encryption keys of the document, throwing an error if the operation fails.\n * @param document a document.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n */\n async getAndDecryptDocumentAttachment(\n document: models.Document,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<ArrayBuffer> {\n const retrieved = await this.getAndTryDecryptDocumentAttachment(document, (x) => validator(x))\n if (!retrieved.wasDecrypted) throw new Error(`No valid key found to decrypt data of document ${document.id}.`)\n return retrieved.data\n }\n\n /**\n * Gets the main attachment of a document and tries to decrypt it using the encryption keys of the document.\n * @param document a document.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return an object containing:\n * - data: the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n * - wasDecrypted: if the data was successfully decrypted or not\n */\n async getAndTryDecryptDocumentAttachment(\n document: models.Document,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<{ data: ArrayBuffer; wasDecrypted: boolean }> {\n return await this.crypto.xapi.tryDecryptDataOf(\n { entity: document, type: EntityWithDelegationTypeName.Document },\n await super.getRawMainDocumentAttachment(document.id!),\n (x) => validator(x)\n )\n }\n\n /**\n * Gets the secondary attachment of a document and tries to decrypt it using the encryption keys of the document, throwing an error if the operation fails.\n * @param document a document.\n * @param secondaryAttachmentKey key of the secondary attachment.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return the decrypted attachment.\n */\n async getAndDecryptSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<ArrayBuffer> {\n const { data, wasDecrypted } = await this.getAndTryDecryptSecondaryDocumentAttachment(document, secondaryAttachmentKey, (x) => validator(x))\n if (!wasDecrypted) throw new Error(`No valid key found to decrypt data of document ${document.id}.`)\n return data\n }\n\n /**\n * Gets the secondary attachment of a document and tries to decrypt it using the encryption keys of the document.\n * @param document a document.\n * @param secondaryAttachmentKey key of the secondary attachment.\n * @param validator optionally a validator function which checks if the decryption was successful. In cases where the document has many encryption\n * keys and it is unclear which one should be used this function can help to detect bad decryptions.\n * @return an object containing:\n * - data: the decrypted attachment, if it could be decrypted, else the encrypted attachment.\n * - wasDecrypted: if the data was successfully decrypted or not\n */\n async getAndTryDecryptSecondaryDocumentAttachment(\n document: models.Document,\n secondaryAttachmentKey: string,\n validator: (decrypted: ArrayBuffer) => Promise<boolean> = () => Promise.resolve(true)\n ): Promise<{ data: ArrayBuffer; wasDecrypted: boolean }> {\n return await this.crypto.xapi.tryDecryptDataOf(\n { entity: document, type: EntityWithDelegationTypeName.Document },\n await super.getSecondaryAttachment(document.id!, secondaryAttachmentKey),\n (x) => validator(x)\n )\n }\n\n /**\n * @param document a document\n * @return the id of the message that the document refers to, retrieved from the encrypted metadata. Normally there should only be one element\n * in the returned array, but in case of entity merges there could be multiple values.\n */\n async decryptMessageIdOf(document: models.Document): Promise<string[]> {\n return this.crypto.xapi.owningEntityIdsOf({ entity: document, type: EntityWithDelegationTypeName.Document }, undefined)\n }\n\n /**\n * @return if the logged data owner has write access to the content of the given document\n */\n async hasWriteAccess(document: models.Document): Promise<boolean> {\n return this.crypto.xapi.hasWriteAccess({ entity: document, type: EntityWithDelegationTypeName.Document })\n }\n\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param delegateId the id of the data owner which will be granted access to the document.\n * @param document the document to share.\n * @param options optional parameters to customize the sharing behaviour:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return the updated entity\n */\n async shareWith(\n delegateId: string,\n document: models.Document,\n options: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n } = {}\n ): Promise<models.Document> {\n return this.shareWithMany(document, { [delegateId]: options })\n }\n\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param document the document to share.\n * @param delegates associates the id of data owners which will be granted access to the entity, to the following sharing options:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return the updated entity.\n */\n async shareWithMany(\n document: models.Document,\n delegates: {\n [delegateId: string]: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n }\n }\n ): Promise<models.Document> {\n return (await this.tryShareWithMany(document, delegates)).updatedEntityOrThrow\n }\n /**\n * Share an existing document with other data owners, allowing them to access the non-encrypted data of the document and optionally also\n * the encrypted content, with read-only or read-write permissions.\n * @param document the document to share.\n * @param delegates associates the id of data owners which will be granted access to the entity, to the following sharing options:\n * - shareSecretIds: specifies which secret ids of the entity should be shared. If not provided all secret ids available to the current user will be shared\n * - shareEncryptionKey: specifies if the encryption key of the access log should be shared with the delegate, giving access to all encrypted\n * content of the entity, excluding other encrypted metadata (defaults to {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - shareMessageId: specifies if the id of the message that this document refers to should be shared with the delegate (defaults to\n * {@link ShareMetadataBehaviour.IF_AVAILABLE}).\n * - requestedPermissions: the requested permissions for the delegate, defaults to {@link RequestedPermissionEnum.MAX_WRITE}.\n * @return a promise which will contain the result of the operation: the updated entity if the operation was successful or details of the error if\n * the operation failed.\n */\n async tryShareWithMany(\n document: models.Document,\n delegates: {\n [delegateId: string]: {\n shareSecretIds?: string[]\n requestedPermissions?: RequestedPermissionEnum\n shareEncryptionKey?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n shareMessageId?: ShareMetadataBehaviour // Defaults to ShareMetadataBehaviour.IF_AVAILABLE\n }\n }\n ): Promise<ShareResult<models.Document>> {\n const self = await this.dataOwnerApi.getCurrentDataOwnerId()\n // All entities should have an encryption key.\n const entityWithEncryptionKey = await this.crypto.xapi.ensureEncryptionKeysInitialised(document, EntityWithDelegationTypeName.Document)\n const updatedEntity = entityWithEncryptionKey ? await this.modifyDocumentWithUser(undefined, entityWithEncryptionKey) : document\n return this.crypto.xapi\n .simpleShareOrUpdateEncryptedEntityMetadata(\n {\n entity: updatedEntity,\n type: EntityWithDelegationTypeName.Document,\n },\n Object.fromEntries(\n Object.entries(delegates).map(([delegateId, options]) => [\n delegateId,\n {\n requestedPermissions: options.requestedPermissions,\n shareEncryptionKeys: options.shareEncryptionKey,\n shareOwningEntityIds: options.shareMessageId,\n shareSecretIds: options.shareSecretIds,\n },\n ])\n ),\n (x) => super.bulkShareDocument(x)\n )\n .then((r) => r.mapSuccessAsync(async (m) => (await this.decrypt([m]))[0].entity))\n }\n\n getDataOwnersWithAccessTo(\n entity: models.Document\n ): Promise<{ permissionsByDataOwnerId: { [p: string]: AccessLevelEnum }; hasUnknownAnonymousDataOwners: boolean }> {\n return this.crypto.delegationsDeAnonymization.getDataOwnersWithAccessTo({ entity, type: EntityWithDelegationTypeName.Document })\n }\n\n getEncryptionKeysOf(entity: models.Document): Promise<string[]> {\n return this.crypto.xapi.encryptionKeysOf({ entity, type: EntityWithDelegationTypeName.Document }, undefined)\n }\n\n createDelegationDeAnonymizationMetadata(entity: models.Document, delegates: string[]): Promise<void> {\n return this.crypto.delegationsDeAnonymization.createOrUpdateDeAnonymizationInfo(\n { entity, type: EntityWithDelegationTypeName.Document },\n delegates\n )\n }\n\n private async decryptPage(page: PaginatedListDocument): Promise<PaginatedListDocument> {\n return {\n ...page,\n rows: (await this.decrypt(page.rows ?? [])).map((x) => x.entity),\n }\n }\n\n async createDocumentWithUser(user: models.User | undefined, body: models.Document): Promise<models.Document> {\n return (await this.decrypt([await super.createDocument((await this.encrypt([body]))[0])]))[0].entity\n }\n\n async deleteAttachmentWithUser(user: models.User | undefined, documentId: string): Promise<models.Document> {\n return (await this.decrypt([await super.deleteAttachment(documentId)]))[0].entity\n }\n\n /**\n * @deprecated\n */\n async findByTypeHCPartyMessageSecretFKeysWithUser(\n user: models.User | undefined,\n documentTypeCode: string,\n hcPartyId: string,\n secretFKeys: string[]\n ): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.findByTypeHCPartyMessageSecretFKeys(documentTypeCode, hcPartyId, secretFKeys))).map((x) => x.entity)\n }\n\n /**\n * @deprecated\n */\n async findDocumentsByHCPartyPatientForeignKeysWithUser(\n user: models.User | undefined,\n hcPartyId: string,\n secretFKeys: string[]\n ): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.findDocumentsByHCPartyPatientForeignKeys(hcPartyId, secretFKeys))).map((x) => x.entity)\n }\n\n /**\n * @deprecated\n */\n async findDocumentsByHCPartyPatientForeignKeyWithUser(\n user: models.User | undefined,\n hcPartyId: string,\n secretFKey: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListDocument> {\n return await this.decryptPage(await super.findDocumentsByHCPartyPatientForeignKey(hcPartyId, secretFKey, startKey, startDocumentId, limit))\n }\n\n async findWithoutDelegationWithUser(user: models.User | undefined, limit?: number): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.findWithoutDelegation(limit))).map((x) => x.entity)\n }\n\n async getDocumentWithUser(user: models.User | undefined, documentId: string): Promise<models.Document> {\n return (await this.decrypt([await super.getDocument(documentId)]))[0].entity\n }\n\n async getDocumentByExternalUuidWithUser(user: models.User | undefined, externalUuid: string): Promise<models.Document> {\n return (await this.decrypt([await super.getDocumentByExternalUuid(externalUuid)]))[0].entity\n }\n\n async getDocumentsWithUser(user: models.User | undefined, body?: ListOfIds): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.getDocuments(body))).map((x) => x.entity)\n }\n\n async getDocumentsByExternalUuidWithUser(user: models.User | undefined, externalUuid: string): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.getDocumentsByExternalUuid(externalUuid))).map((x) => x.entity)\n }\n\n async modifyDocumentWithUser(user: models.User | undefined, body: models.Document): Promise<models.Document> {\n return (await this.decrypt([await super.modifyDocument((await this.encrypt([body]))[0])]))[0].entity\n }\n\n async modifyDocumentsWithUser(user: models.User | undefined, body: Array<models.Document>): Promise<Array<models.Document>> {\n return (await this.decrypt(await super.modifyDocuments(await this.encrypt(body)))).map((x) => x.entity)\n }\n\n async setMainDocumentAttachmentWithUser(\n user: models.User | undefined,\n documentId: string,\n documentRev: string,\n body: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean\n ): Promise<models.Document> {\n return (await this.decrypt([await super.setMainDocumentAttachment(documentId, documentRev, body, utis, dataIsEncrypted)]))[0].entity\n }\n\n async setSecondaryAttachmentWithUser(\n user: models.User | undefined,\n documentId: string,\n key: string,\n rev: string,\n attachment: Object,\n utis?: Array<string>,\n dataIsEncrypted?: boolean\n ): Promise<models.Document> {\n return (await this.decrypt([await super.setSecondaryAttachment(documentId, key, rev, attachment, utis, dataIsEncrypted)]))[0].entity\n }\n\n async deleteSecondaryAttachmentWithUser(user: models.User | undefined, documentId: string, key: string, rev: string): Promise<models.Document> {\n return (await this.decrypt([await super.deleteSecondaryAttachment(documentId, key, rev)]))[0].entity\n }\n\n createDocument(body?: models.Document): never {\n throw new Error('Use withUser method')\n }\n\n deleteAttachment(documentId: string): never {\n throw new Error('Use withUser method')\n }\n\n findByTypeHCPartyMessageSecretFKeys(documentTypeCode: string, hcPartyId: string, secretFKeys: string[]): never {\n throw new Error('Use withUser method')\n }\n\n findDocumentsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string[]): never {\n throw new Error('Use withUser method')\n }\n\n findDocumentsByHCPartyPatientForeignKey(hcPartyId: string, secretFKey: string, startKey?: string, startDocumentId?: string, limit?: number): never {\n throw new Error('Use withUser method')\n }\n\n findWithoutDelegation(limit?: number): never {\n throw new Error('Use withUser method')\n }\n\n getDocument(documentId: string): never {\n throw new Error('Use withUser method')\n }\n\n getDocumentByExternalUuid(externalUuid: string): never {\n throw new Error('Use withUser method')\n }\n\n getDocuments(body?: ListOfIds): never {\n throw new Error('Use withUser method')\n }\n\n getDocumentsByExternalUuid(externalUuid: string): never {\n throw new Error('Use withUser method')\n }\n\n modifyDocument(body?: models.Document): never {\n throw new Error('Use withUser method')\n }\n\n modifyDocuments(body?: Array<models.Document>): never {\n throw new Error('Use withUser method')\n }\n\n setMainDocumentAttachment(documentId: string, documentRev: string, body: Object, utis?: Array<string>, dataIsEncrypted?: boolean): never {\n throw new Error('Use withUser method')\n }\n\n setDocumentAttachmentBody(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): never {\n throw new Error('Use withUser method')\n }\n\n setDocumentAttachment(documentId: string, documentRev: string, enckeys?: null, body?: Object, utis?: string[]): never {\n throw new Error('Use withUser method')\n }\n\n setDocumentAttachmentMulti(attachment: ArrayBuffer, documentRev: string, documentId: string, enckeys?: null): never {\n throw new Error('Use withUser method')\n }\n\n setSecondaryAttachment(documentId: string, key: string, rev: string, attachment: Object, utis?: Array<string>, dataIsEncrypted?: boolean): never {\n throw new Error('Use withUser method')\n }\n\n deleteSecondaryAttachment(documentId: string, key: string, rev: string): never {\n throw new Error('Use withUser method')\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IccAuthApi, IccMessageApi } from '../icc-api';
|
|
2
2
|
import { IccCryptoXApi } from './icc-crypto-x-api';
|
|
3
3
|
import * as models from '../icc-api/model/models';
|
|
4
|
-
import { Message, MessagesReadStatusUpdate, PaginatedListMessage, Patient, User } from '../icc-api/model/models';
|
|
4
|
+
import { ListOfIds, Message, MessagesReadStatusUpdate, PaginatedListMessage, Patient, User } from '../icc-api/model/models';
|
|
5
5
|
import { IccDataOwnerXApi } from './icc-data-owner-x-api';
|
|
6
6
|
import { AuthenticationProvider } from './auth/AuthenticationProvider';
|
|
7
7
|
import { SecureDelegation } from '../icc-api/model/SecureDelegation';
|
|
@@ -140,6 +140,7 @@ export declare class IccMessageXApi extends IccMessageApi implements EncryptedEn
|
|
|
140
140
|
* the 'owning entity', or in the {@link shareWith} method in order to share it with other data owners.
|
|
141
141
|
*/
|
|
142
142
|
decryptSecretIdsOf(message: models.Message): Promise<string[]>;
|
|
143
|
+
createDelegationDeAnonymizationMetadata(entity: Message, delegates: string[]): Promise<void>;
|
|
143
144
|
getDataOwnersWithAccessTo(entity: models.Message): Promise<{
|
|
144
145
|
permissionsByDataOwnerId: {
|
|
145
146
|
[p: string]: AccessLevelEnum;
|
|
@@ -147,10 +148,48 @@ export declare class IccMessageXApi extends IccMessageApi implements EncryptedEn
|
|
|
147
148
|
hasUnknownAnonymousDataOwners: boolean;
|
|
148
149
|
}>;
|
|
149
150
|
getEncryptionKeysOf(entity: models.Message): Promise<string[]>;
|
|
150
|
-
filterMessagesBy(body: FilterChainMessage, startDocumentId?: string, limit?: number): Promise<PaginatedListMessage>;
|
|
151
|
-
encryptAndCreateMessageInTopic(body: Message): Promise<Message>;
|
|
152
|
-
setMessagesReadStatus(body?: MessagesReadStatusUpdate): Promise<Array<Message>>;
|
|
153
|
-
getAndDecryptMessage(messageId: string): Promise<Message>;
|
|
154
151
|
subscribeToMessageEvents(eventTypes: ('CREATE' | 'UPDATE' | 'DELETE')[], filter: AbstractFilter<Message> | undefined, eventFired: (message: Message) => Promise<void>, options?: SubscriptionOptions): Promise<Connection>;
|
|
155
|
-
|
|
152
|
+
private decryptPage;
|
|
153
|
+
createMessageWithUser(user: models.User | undefined, body: Message): Promise<Message>;
|
|
154
|
+
findMessagesWithUser(user: models.User | undefined, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListMessage>;
|
|
155
|
+
findMessagesByFromAddressWithUser(user: models.User | undefined, fromAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
|
|
156
|
+
/**
|
|
157
|
+
* @deprecated
|
|
158
|
+
*/
|
|
159
|
+
findMessagesByHCPartyPatientForeignKeysUsingPostWithUser(user: models.User | undefined, body?: Array<string>): Promise<Array<Message>>;
|
|
160
|
+
/**
|
|
161
|
+
* @deprecated
|
|
162
|
+
*/
|
|
163
|
+
findMessagesByHCPartyPatientForeignKeysWithUser(user: models.User | undefined, secretFKeys: string): Promise<Array<Message>>;
|
|
164
|
+
findMessagesByToAddressWithUser(user: models.User | undefined, toAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, reverse?: boolean, hcpId?: string): Promise<PaginatedListMessage>;
|
|
165
|
+
findMessagesByTransportGuidWithUser(user: models.User | undefined, transportGuid?: string, received?: boolean, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
|
|
166
|
+
findMessagesByTransportGuidSentDateWithUser(user: models.User | undefined, transportGuid?: string, from?: number, to?: number, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
|
|
167
|
+
getChildrenMessagesWithUser(user: models.User | undefined, messageId: string): Promise<Array<Message>>;
|
|
168
|
+
getChildrenMessagesOfListWithUser(user: models.User | undefined, body?: ListOfIds): Promise<Array<Message>>;
|
|
169
|
+
getMessageWithUser(user: models.User | undefined, messageId: string): Promise<Message>;
|
|
170
|
+
getMessagesWithUser(user: models.User | undefined, messageIds: ListOfIds): Promise<Message[]>;
|
|
171
|
+
listMessagesByInvoiceIdsWithUser(user: models.User | undefined, body?: ListOfIds): Promise<Array<Message>>;
|
|
172
|
+
listMessagesByTransportGuidsWithUser(user: models.User | undefined, hcpId: string, body?: ListOfIds): Promise<Array<Message>>;
|
|
173
|
+
modifyMessageWithUser(user: models.User | undefined, body: Message): Promise<Message>;
|
|
174
|
+
setMessagesStatusBitsWithUser(user: models.User | undefined, status: number, body?: ListOfIds): Promise<Array<Message>>;
|
|
175
|
+
filterMessagesByWithUser(user: models.User | undefined, body: FilterChainMessage, startDocumentId?: string, limit?: number): Promise<PaginatedListMessage>;
|
|
176
|
+
setMessagesReadStatusWithUser(user: models.User | undefined, body?: MessagesReadStatusUpdate): Promise<Array<Message>>;
|
|
177
|
+
createMessage(body?: Message): never;
|
|
178
|
+
findMessages(startKey?: string, startDocumentId?: string, limit?: number): never;
|
|
179
|
+
findMessagesByFromAddress(fromAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): never;
|
|
180
|
+
findMessagesByHCPartyPatientForeignKeysUsingPost(body?: Array<string>): never;
|
|
181
|
+
findMessagesByHCPartyPatientForeignKeys(secretFKeys: string): never;
|
|
182
|
+
findMessagesByToAddress(toAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, reverse?: boolean, hcpId?: string): never;
|
|
183
|
+
findMessagesByTransportGuid(transportGuid?: string, received?: boolean, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): never;
|
|
184
|
+
findMessagesByTransportGuidSentDate(transportGuid?: string, from?: number, to?: number, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): never;
|
|
185
|
+
getChildrenMessages(messageId: string): never;
|
|
186
|
+
getChildrenMessagesOfList(body?: ListOfIds): never;
|
|
187
|
+
getMessage(messageId: string): never;
|
|
188
|
+
getMessages(messageIds: ListOfIds): never;
|
|
189
|
+
listMessagesByInvoiceIds(body?: ListOfIds): never;
|
|
190
|
+
listMessagesByTransportGuids(hcpId: string, body?: ListOfIds): never;
|
|
191
|
+
modifyMessage(body?: Message): never;
|
|
192
|
+
setMessagesStatusBits(status: number, body?: ListOfIds): never;
|
|
193
|
+
filterMessagesBy(body: FilterChainMessage, startDocumentId?: string, limit?: number): never;
|
|
194
|
+
setMessagesReadStatus(body?: MessagesReadStatusUpdate): never;
|
|
156
195
|
}
|