@icure/api 8.6.18 → 8.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icc-api/api/IccDocumentApi.d.ts +10 -2
- package/icc-api/api/IccDocumentApi.js +22 -4
- package/icc-api/api/IccDocumentApi.js.map +1 -1
- package/icc-api/api/IccReceiptApi.d.ts +17 -0
- package/icc-api/api/IccReceiptApi.js +52 -0
- package/icc-api/api/IccReceiptApi.js.map +1 -1
- package/icc-api/model/DataAttachment.d.ts +22 -0
- package/icc-api/model/DataAttachment.js.map +1 -1
- package/icc-api/model/Document.d.ts +6 -0
- package/icc-api/model/Document.js.map +1 -1
- package/icc-api/model/Receipt.d.ts +6 -0
- package/icc-api/model/Receipt.js.map +1 -1
- package/icc-x-api/crypto/BaseExchangeDataManager.js +2 -2
- package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -1
- package/icc-x-api/crypto/ExchangeDataManager.js +3 -3
- package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -1
- package/icc-x-api/crypto/ExtendedApisUtils.d.ts +1 -1
- package/icc-x-api/crypto/ExtendedApisUtils.js.map +1 -1
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.d.ts +1 -1
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.js +8 -2
- package/icc-x-api/crypto/ExtendedApisUtilsImpl.js.map +1 -1
- package/icc-x-api/crypto/RecoveryDataEncryption.js.map +1 -1
- package/icc-x-api/icc-accesslog-x-api.js +7 -7
- package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
- package/icc-x-api/icc-calendar-item-x-api.js +7 -7
- package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
- package/icc-x-api/icc-classification-x-api.js +4 -5
- package/icc-x-api/icc-classification-x-api.js.map +1 -1
- package/icc-x-api/icc-code-x-api.d.ts +2 -2
- package/icc-x-api/icc-code-x-api.js +3 -33
- package/icc-x-api/icc-code-x-api.js.map +1 -1
- package/icc-x-api/icc-contact-x-api.js +20 -33
- package/icc-x-api/icc-contact-x-api.js.map +1 -1
- package/icc-x-api/icc-doctemplate-x-api.js.map +1 -1
- package/icc-x-api/icc-document-x-api.d.ts +8 -7
- package/icc-x-api/icc-document-x-api.js +64 -22
- package/icc-x-api/icc-document-x-api.js.map +1 -1
- package/icc-x-api/icc-form-x-api.js +3 -4
- package/icc-x-api/icc-form-x-api.js.map +1 -1
- package/icc-x-api/icc-helement-x-api.js +11 -11
- package/icc-x-api/icc-helement-x-api.js.map +1 -1
- package/icc-x-api/icc-invoice-x-api.js +3 -4
- package/icc-x-api/icc-invoice-x-api.js.map +1 -1
- package/icc-x-api/icc-maintenance-task-x-api.js +3 -3
- package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
- package/icc-x-api/icc-patient-x-api.js +29 -29
- package/icc-x-api/icc-patient-x-api.js.map +1 -1
- package/icc-x-api/icc-receipt-x-api.d.ts +40 -0
- package/icc-x-api/icc-receipt-x-api.js +79 -1
- package/icc-x-api/icc-receipt-x-api.js.map +1 -1
- package/icc-x-api/icc-topic-x-api.js.map +1 -1
- package/icc-x-api/index.js +1 -1
- package/icc-x-api/index.js.map +1 -1
- package/icc-x-api/utils/code-util.d.ts +23 -0
- package/icc-x-api/utils/code-util.js +39 -2
- package/icc-x-api/utils/code-util.js.map +1 -1
- package/icc-x-api/utils/collection-utils.d.ts +13 -0
- package/icc-x-api/utils/collection-utils.js +69 -0
- package/icc-x-api/utils/collection-utils.js.map +1 -1
- package/icc-x-api/utils/compression-utils.d.ts +28 -0
- package/icc-x-api/utils/compression-utils.js +106 -0
- package/icc-x-api/utils/compression-utils.js.map +1 -0
- package/icc-x-api/utils/crypto-utils.js +7 -7
- package/icc-x-api/utils/crypto-utils.js.map +1 -1
- package/icc-x-api/utils/formatting-util.d.ts +1 -3
- package/icc-x-api/utils/formatting-util.js +15 -17
- package/icc-x-api/utils/formatting-util.js.map +1 -1
- package/icc-x-api/utils/hcp-util.js +2 -3
- package/icc-x-api/utils/hcp-util.js.map +1 -1
- package/icc-x-api/utils/insurability-util.js +10 -8
- package/icc-x-api/utils/insurability-util.js.map +1 -1
- package/icc-x-api/utils/lzma-wasm.d.ts +6 -0
- package/icc-x-api/utils/lzma-wasm.js +81 -0
- package/icc-x-api/utils/lzma-wasm.js.map +1 -0
- package/icc-x-api/utils/mutex.d.ts +12 -0
- package/icc-x-api/utils/mutex.js +26 -0
- package/icc-x-api/utils/mutex.js.map +1 -0
- package/icc-x-api/utils/websocket.js +7 -7
- package/icc-x-api/utils/websocket.js.map +1 -1
- package/icc-x-api/wasm/lzma/lzma.js +2 -0
- package/icc-x-api/wasm/lzma/lzma.wasm +0 -0
- package/package.json +2 -11
- package/icc-x-api/utils/uuid-encoder.d.ts +0 -44
- package/icc-x-api/utils/uuid-encoder.js +0 -114
- package/icc-x-api/utils/uuid-encoder.js.map +0 -1
- package/test/icc-api/api/IccAgendaApi.d.ts +0 -1
- package/test/icc-api/api/IccAgendaApi.js +0 -64
- package/test/icc-api/api/IccAgendaApi.js.map +0 -1
- package/test/icc-api/api/IccAnonymousAccessApi.d.ts +0 -1
- package/test/icc-api/api/IccAnonymousAccessApi.js +0 -58
- package/test/icc-api/api/IccAnonymousAccessApi.js.map +0 -1
- package/test/icc-api/api/IccCalendarItemApi.d.ts +0 -1
- package/test/icc-api/api/IccCalendarItemApi.js +0 -67
- package/test/icc-api/api/IccCalendarItemApi.js.map +0 -1
- package/test/icc-api/api/IccCalendarItemTypeApi.d.ts +0 -1
- package/test/icc-api/api/IccCalendarItemTypeApi.js +0 -96
- package/test/icc-api/api/IccCalendarItemTypeApi.js.map +0 -1
- package/test/icc-api/api/IccCodeApi.d.ts +0 -1
- package/test/icc-api/api/IccCodeApi.js +0 -38
- package/test/icc-api/api/IccCodeApi.js.map +0 -1
- package/test/icc-api/api/IccDocumentApi.d.ts +0 -1
- package/test/icc-api/api/IccDocumentApi.js +0 -199
- package/test/icc-api/api/IccDocumentApi.js.map +0 -1
- package/test/icc-api/api/IccGroupApi.d.ts +0 -1
- package/test/icc-api/api/IccGroupApi.js +0 -50
- package/test/icc-api/api/IccGroupApi.js.map +0 -1
- package/test/icc-api/api/IccKeywordApi.d.ts +0 -1
- package/test/icc-api/api/IccKeywordApi.js +0 -64
- package/test/icc-api/api/IccKeywordApi.js.map +0 -1
- package/test/icc-api/api/IccMedicalLocationApi.d.ts +0 -1
- package/test/icc-api/api/IccMedicalLocationApi.js +0 -64
- package/test/icc-api/api/IccMedicalLocationApi.js.map +0 -1
- package/test/icc-api/api/IccPlaceApi.d.ts +0 -1
- package/test/icc-api/api/IccPlaceApi.js +0 -64
- package/test/icc-api/api/IccPlaceApi.js.map +0 -1
- package/test/icc-api/api/IccRecoveryDataApi.d.ts +0 -1
- package/test/icc-api/api/IccRecoveryDataApi.js +0 -95
- package/test/icc-api/api/IccRecoveryDataApi.js.map +0 -1
- package/test/icc-api/api/IccRoleApi.d.ts +0 -1
- package/test/icc-api/api/IccRoleApi.js +0 -34
- package/test/icc-api/api/IccRoleApi.js.map +0 -1
- package/test/icc-api/api/IccUserApi.d.ts +0 -1
- package/test/icc-api/api/IccUserApi.js +0 -96
- package/test/icc-api/api/IccUserApi.js.map +0 -1
- package/test/icc-api/e2e/IccCalendarItemApi.d.ts +0 -1
- package/test/icc-api/e2e/IccCalendarItemApi.js +0 -46
- package/test/icc-api/e2e/IccCalendarItemApi.js.map +0 -1
- package/test/icc-api/model/modelHelpersTest.d.ts +0 -1
- package/test/icc-api/model/modelHelpersTest.js +0 -45
- package/test/icc-api/model/modelHelpersTest.js.map +0 -1
- package/test/icc-x-api/auth/group-switch-test.d.ts +0 -1
- package/test/icc-x-api/auth/group-switch-test.js +0 -81
- package/test/icc-x-api/auth/group-switch-test.js.map +0 -1
- package/test/icc-x-api/auth/jwt-concurrency-test.d.ts +0 -2
- package/test/icc-x-api/auth/jwt-concurrency-test.js +0 -112
- package/test/icc-x-api/auth/jwt-concurrency-test.js.map +0 -1
- package/test/icc-x-api/auth/jwt-provider-test.d.ts +0 -1
- package/test/icc-x-api/auth/jwt-provider-test.js +0 -197
- package/test/icc-x-api/auth/jwt-provider-test.js.map +0 -1
- package/test/icc-x-api/auth/smart-auth-provider-test.d.ts +0 -1
- package/test/icc-x-api/auth/smart-auth-provider-test.js +0 -224
- package/test/icc-x-api/auth/smart-auth-provider-test.js.map +0 -1
- package/test/icc-x-api/autofix-anonymity-test.d.ts +0 -1
- package/test/icc-x-api/autofix-anonymity-test.js +0 -122
- package/test/icc-x-api/autofix-anonymity-test.js.map +0 -1
- package/test/icc-x-api/confidential-entities-test.d.ts +0 -1
- package/test/icc-x-api/confidential-entities-test.js +0 -168
- package/test/icc-x-api/confidential-entities-test.js.map +0 -1
- package/test/icc-x-api/crud/comprehensive-crud-test.d.ts +0 -1
- package/test/icc-x-api/crud/comprehensive-crud-test.js +0 -276
- package/test/icc-x-api/crud/comprehensive-crud-test.js.map +0 -1
- package/test/icc-x-api/crud/entities-crud-test-interface.d.ts +0 -16
- package/test/icc-x-api/crud/entities-crud-test-interface.js +0 -408
- package/test/icc-x-api/crud/entities-crud-test-interface.js.map +0 -1
- package/test/icc-x-api/crypto/anonymous-delegations-test.d.ts +0 -1
- package/test/icc-x-api/crypto/anonymous-delegations-test.js +0 -587
- package/test/icc-x-api/crypto/anonymous-delegations-test.js.map +0 -1
- package/test/icc-x-api/crypto/concurrency.d.ts +0 -1
- package/test/icc-x-api/crypto/concurrency.js +0 -35
- package/test/icc-x-api/crypto/concurrency.js.map +0 -1
- package/test/icc-x-api/crypto/crypto-utils.d.ts +0 -1
- package/test/icc-x-api/crypto/crypto-utils.js +0 -79
- package/test/icc-x-api/crypto/crypto-utils.js.map +0 -1
- package/test/icc-x-api/crypto/cryptoTest.d.ts +0 -2
- package/test/icc-x-api/crypto/cryptoTest.js +0 -402
- package/test/icc-x-api/crypto/cryptoTest.js.map +0 -1
- package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.d.ts +0 -1
- package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js +0 -166
- package/test/icc-x-api/crypto/delegate-ci-to-patient-with-missing-keys-test.js.map +0 -1
- package/test/icc-x-api/crypto/exchange-data-manager-test.d.ts +0 -1
- package/test/icc-x-api/crypto/exchange-data-manager-test.js +0 -674
- package/test/icc-x-api/crypto/exchange-data-manager-test.js.map +0 -1
- package/test/icc-x-api/crypto/full-crypto-test.d.ts +0 -1
- package/test/icc-x-api/crypto/full-crypto-test.js +0 -454
- package/test/icc-x-api/crypto/full-crypto-test.js.map +0 -1
- package/test/icc-x-api/crypto/legacy-metadata-migration-test.d.ts +0 -1
- package/test/icc-x-api/crypto/legacy-metadata-migration-test.js +0 -379
- package/test/icc-x-api/crypto/legacy-metadata-migration-test.js.map +0 -1
- package/test/icc-x-api/crypto/secure-delegations-manager-test.d.ts +0 -1
- package/test/icc-x-api/crypto/secure-delegations-manager-test.js +0 -278
- package/test/icc-x-api/crypto/secure-delegations-manager-test.js.map +0 -1
- package/test/icc-x-api/crypto/shamir.d.ts +0 -2
- package/test/icc-x-api/crypto/shamir.js +0 -167
- package/test/icc-x-api/crypto/shamir.js.map +0 -1
- package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.d.ts +0 -1
- package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js +0 -71
- package/test/icc-x-api/crypto/share-to-newly-created-patient-from-hcp.js.map +0 -1
- package/test/icc-x-api/crypto/soft-deleted-data-owners.d.ts +0 -2
- package/test/icc-x-api/crypto/soft-deleted-data-owners.js +0 -113
- package/test/icc-x-api/crypto/soft-deleted-data-owners.js.map +0 -1
- package/test/icc-x-api/crypto/user-encryption-keys-manager-test.d.ts +0 -1
- package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js +0 -246
- package/test/icc-x-api/crypto/user-encryption-keys-manager-test.js.map +0 -1
- package/test/icc-x-api/entity-with-attachments-api-test.d.ts +0 -1
- package/test/icc-x-api/entity-with-attachments-api-test.js +0 -142
- package/test/icc-x-api/entity-with-attachments-api-test.js.map +0 -1
- package/test/icc-x-api/filters/filters.d.ts +0 -1
- package/test/icc-x-api/filters/filters.js +0 -49
- package/test/icc-x-api/filters/filters.js.map +0 -1
- package/test/icc-x-api/filters/healthelement.d.ts +0 -1
- package/test/icc-x-api/filters/healthelement.js +0 -333
- package/test/icc-x-api/filters/healthelement.js.map +0 -1
- package/test/icc-x-api/icc-accesslog-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-accesslog-x-api.js +0 -106
- package/test/icc-x-api/icc-accesslog-x-api.js.map +0 -1
- package/test/icc-x-api/icc-application-settings-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-application-settings-x-api.js +0 -91
- package/test/icc-x-api/icc-application-settings-x-api.js.map +0 -1
- package/test/icc-x-api/icc-auth-api.d.ts +0 -1
- package/test/icc-x-api/icc-auth-api.js +0 -47
- package/test/icc-x-api/icc-auth-api.js.map +0 -1
- package/test/icc-x-api/icc-calendar-item-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-calendar-item-x-api.js +0 -150
- package/test/icc-x-api/icc-calendar-item-x-api.js.map +0 -1
- package/test/icc-x-api/icc-contact-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-contact-x-api.js +0 -355
- package/test/icc-x-api/icc-contact-x-api.js.map +0 -1
- package/test/icc-x-api/icc-document-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-document-x-api.js +0 -76
- package/test/icc-x-api/icc-document-x-api.js.map +0 -1
- package/test/icc-x-api/icc-form-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-form-x-api.js +0 -413
- package/test/icc-x-api/icc-form-x-api.js.map +0 -1
- package/test/icc-x-api/icc-hcparty-x-api-test.d.ts +0 -1
- package/test/icc-x-api/icc-hcparty-x-api-test.js +0 -43
- package/test/icc-x-api/icc-hcparty-x-api-test.js.map +0 -1
- package/test/icc-x-api/icc-helement-x-api-test.d.ts +0 -1
- package/test/icc-x-api/icc-helement-x-api-test.js +0 -155
- package/test/icc-x-api/icc-helement-x-api-test.js.map +0 -1
- package/test/icc-x-api/icc-invoice-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-invoice-x-api.js +0 -99
- package/test/icc-x-api/icc-invoice-x-api.js.map +0 -1
- package/test/icc-x-api/icc-maintenance-task-x-api-test.d.ts +0 -1
- package/test/icc-x-api/icc-maintenance-task-x-api-test.js +0 -222
- package/test/icc-x-api/icc-maintenance-task-x-api-test.js.map +0 -1
- package/test/icc-x-api/icc-message-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-message-x-api.js +0 -54
- package/test/icc-x-api/icc-message-x-api.js.map +0 -1
- package/test/icc-x-api/icc-patient-x-api-test.d.ts +0 -1
- package/test/icc-x-api/icc-patient-x-api-test.js +0 -165
- package/test/icc-x-api/icc-patient-x-api-test.js.map +0 -1
- package/test/icc-x-api/icc-recovery-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-recovery-x-api.js +0 -175
- package/test/icc-x-api/icc-recovery-x-api.js.map +0 -1
- package/test/icc-x-api/icc-topic-x-api.d.ts +0 -1
- package/test/icc-x-api/icc-topic-x-api.js +0 -269
- package/test/icc-x-api/icc-topic-x-api.js.map +0 -1
- package/test/icc-x-api/icc-user-x-api-test.d.ts +0 -1
- package/test/icc-x-api/icc-user-x-api-test.js +0 -99
- package/test/icc-x-api/icc-user-x-api-test.js.map +0 -1
- package/test/icc-x-api/keyless-api.d.ts +0 -1
- package/test/icc-x-api/keyless-api.js +0 -125
- package/test/icc-x-api/keyless-api.js.map +0 -1
- package/test/icc-x-api/patient-user.d.ts +0 -2
- package/test/icc-x-api/patient-user.js +0 -103
- package/test/icc-x-api/patient-user.js.map +0 -1
- package/test/icc-x-api/storage/storage.d.ts +0 -1
- package/test/icc-x-api/storage/storage.js +0 -48
- package/test/icc-x-api/storage/storage.js.map +0 -1
- package/test/icc-x-api/test-api-no-parent.d.ts +0 -1
- package/test/icc-x-api/test-api-no-parent.js +0 -79
- package/test/icc-x-api/test-api-no-parent.js.map +0 -1
- package/test/icc-x-api/test-legacy-data-support.d.ts +0 -1
- package/test/icc-x-api/test-legacy-data-support.js +0 -375
- package/test/icc-x-api/test-legacy-data-support.js.map +0 -1
- package/test/icc-x-api/utils/graph-test.d.ts +0 -1
- package/test/icc-x-api/utils/graph-test.js +0 -54
- package/test/icc-x-api/utils/graph-test.js.map +0 -1
- package/test/icc-x-api/utils/lru-temporised-async-cache-test.d.ts +0 -1
- package/test/icc-x-api/utils/lru-temporised-async-cache-test.js +0 -364
- package/test/icc-x-api/utils/lru-temporised-async-cache-test.js.map +0 -1
- package/test/support/CSM-185.d.ts +0 -1
- package/test/support/CSM-185.js +0 -124
- package/test/support/CSM-185.js.map +0 -1
- package/test/support/CSM-243.d.ts +0 -1
- package/test/support/CSM-243.js +0 -120
- package/test/support/CSM-243.js.map +0 -1
- package/test/support/CSM-543.d.ts +0 -1
- package/test/support/CSM-543.js +0 -164
- package/test/support/CSM-543.js.map +0 -1
- package/test/support/CSM-729.d.ts +0 -1
- package/test/support/CSM-729.js +0 -225
- package/test/support/CSM-729.js.map +0 -1
- package/test/support/CSM-87.d.ts +0 -0
- package/test/support/CSM-87.js +0 -21
- package/test/support/CSM-87.js.map +0 -1
- package/test/support/CSM-93.d.ts +0 -1
- package/test/support/CSM-93.js +0 -112
- package/test/support/CSM-93.js.map +0 -1
- package/test/utils/FakeDataOwnerApi.d.ts +0 -32
- package/test/utils/FakeDataOwnerApi.js +0 -136
- package/test/utils/FakeDataOwnerApi.js.map +0 -1
- package/test/utils/FakeEncryptionKeysManager.d.ts +0 -36
- package/test/utils/FakeEncryptionKeysManager.js +0 -98
- package/test/utils/FakeEncryptionKeysManager.js.map +0 -1
- package/test/utils/FakeExchangeDataApi.d.ts +0 -32
- package/test/utils/FakeExchangeDataApi.js +0 -92
- package/test/utils/FakeExchangeDataApi.js.map +0 -1
- package/test/utils/FakeExchangeDataManager.d.ts +0 -48
- package/test/utils/FakeExchangeDataManager.js +0 -82
- package/test/utils/FakeExchangeDataManager.js.map +0 -1
- package/test/utils/FakeExchangeDataMapManager.d.ts +0 -12
- package/test/utils/FakeExchangeDataMapManager.js +0 -38
- package/test/utils/FakeExchangeDataMapManager.js.map +0 -1
- package/test/utils/FakeGenericApi.d.ts +0 -16
- package/test/utils/FakeGenericApi.js +0 -65
- package/test/utils/FakeGenericApi.js.map +0 -1
- package/test/utils/KeylessCryptoStrategies.d.ts +0 -23
- package/test/utils/KeylessCryptoStrategies.js +0 -26
- package/test/utils/KeylessCryptoStrategies.js.map +0 -1
- package/test/utils/TestApi.d.ts +0 -3
- package/test/utils/TestApi.js +0 -30
- package/test/utils/TestApi.js.map +0 -1
- package/test/utils/TestCollectionUtils.d.ts +0 -1
- package/test/utils/TestCollectionUtils.js +0 -109
- package/test/utils/TestCollectionUtils.js.map +0 -1
- package/test/utils/TestCryptoStrategies.d.ts +0 -42
- package/test/utils/TestCryptoStrategies.js +0 -80
- package/test/utils/TestCryptoStrategies.js.map +0 -1
- package/test/utils/TestStorage.d.ts +0 -23
- package/test/utils/TestStorage.js +0 -61
- package/test/utils/TestStorage.js.map +0 -1
- package/test/utils/roles.d.ts +0 -14
- package/test/utils/roles.js +0 -345
- package/test/utils/roles.js.map +0 -1
- package/test/utils/test_utils.d.ts +0 -87
- package/test/utils/test_utils.js +0 -452
- package/test/utils/test_utils.js.map +0 -1
|
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.IccDocumentXApi = void 0;
|
|
13
13
|
const icc_api_1 = require("../icc-api");
|
|
14
|
-
const _ = require("lodash");
|
|
15
14
|
const XHR_1 = require("../icc-api/api/XHR");
|
|
16
15
|
const models = require("../icc-api/model/models");
|
|
17
16
|
const binary_utils_1 = require("./utils/binary-utils");
|
|
@@ -20,6 +19,7 @@ const SecureDelegation_1 = require("../icc-api/model/SecureDelegation");
|
|
|
20
19
|
const utils_1 = require("./utils");
|
|
21
20
|
var AccessLevelEnum = SecureDelegation_1.SecureDelegation.AccessLevelEnum;
|
|
22
21
|
const SecretIdUseOption_1 = require("./crypto/SecretIdUseOption");
|
|
22
|
+
const compression_utils_1 = require("./utils/compression-utils");
|
|
23
23
|
// noinspection JSUnusedGlobalSymbols
|
|
24
24
|
class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
25
25
|
constructor(host, headers, crypto, authApi, dataOwnerApi, autofillAuthor, authenticationProvider = new AuthenticationProvider_1.NoAuthenticationProvider(), encryptedKeys = [], fetchImpl = typeof window !== 'undefined'
|
|
@@ -471,7 +471,7 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
471
471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
472
472
|
const extractedKeys = yield this.crypto.xapi.secretIdsOf({ entity: message, type: utils_1.EntityWithDelegationTypeName.Message }, hcpartyId);
|
|
473
473
|
const topmostParentId = (yield this.dataOwnerApi.getCurrentDataOwnerHierarchyIds())[0];
|
|
474
|
-
return this.findDocumentIdsByDataOwnerSecretForeignKey(topmostParentId,
|
|
474
|
+
return this.findDocumentIdsByDataOwnerSecretForeignKey(topmostParentId, [...new Set(extractedKeys)], startDate, endDate, descending);
|
|
475
475
|
});
|
|
476
476
|
}
|
|
477
477
|
/**
|
|
@@ -590,18 +590,24 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
590
590
|
* @param attachment a new main attachment for the document.
|
|
591
591
|
* @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
|
|
592
592
|
* overrides existing values.
|
|
593
|
-
* @return the updated document.
|
|
593
|
+
* @param deflate if true, compress the attachment before uploading. Reliable decompression of compressed data requires version 26.5 of the API and all users to be using at least version 8.7.0 of the SDK * @return the updated document.
|
|
594
594
|
*/
|
|
595
|
-
encryptAndSetDocumentAttachment(
|
|
595
|
+
encryptAndSetDocumentAttachment(document_1, attachment_1, utis_1) {
|
|
596
596
|
const _super = Object.create(null, {
|
|
597
597
|
setMainDocumentAttachment: { get: () => super.setMainDocumentAttachment }
|
|
598
598
|
});
|
|
599
|
-
return __awaiter(this,
|
|
599
|
+
return __awaiter(this, arguments, void 0, function* (document, attachment, utis, deflate = false) {
|
|
600
600
|
var _a;
|
|
601
601
|
if (!document.rev)
|
|
602
602
|
throw new Error('Cannot set attachment on document without rev');
|
|
603
|
-
const
|
|
604
|
-
|
|
603
|
+
const realDataSize = (0, binary_utils_1.ua2ab)(attachment).byteLength;
|
|
604
|
+
const { data: dataToEncrypt, algorithm: compressionAlgorithm } = deflate
|
|
605
|
+
? yield (0, compression_utils_1.compressData)(attachment, utis)
|
|
606
|
+
: { data: (0, binary_utils_1.ua2ab)(attachment), algorithm: undefined };
|
|
607
|
+
const { encryptedData, updatedEntity } = yield this.crypto.xapi.encryptDataOf(document, utils_1.EntityWithDelegationTypeName.Document, dataToEncrypt, (d) => this.modifyDocumentWithUser(undefined, d));
|
|
608
|
+
return (yield this.decrypt([
|
|
609
|
+
yield _super.setMainDocumentAttachment.call(this, document.id, (_a = updatedEntity === null || updatedEntity === void 0 ? void 0 : updatedEntity.rev) !== null && _a !== void 0 ? _a : document.rev, encryptedData, utis, true, compressionAlgorithm, (0, compression_utils_1.getCompressionVersion)(), realDataSize),
|
|
610
|
+
]))[0].entity;
|
|
605
611
|
});
|
|
606
612
|
}
|
|
607
613
|
/**
|
|
@@ -610,16 +616,22 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
610
616
|
* @param attachment a new main attachment for the document.
|
|
611
617
|
* @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
|
|
612
618
|
* overrides existing values.
|
|
613
|
-
* @return the updated document.
|
|
619
|
+
* @param deflate if true, compress the attachment before uploading. Reliable decompression of compressed data requires version 26.5 of the API and all users to be using at least version 8.7.0 of the SDK * @return the updated document.
|
|
614
620
|
*/
|
|
615
|
-
setClearDocumentAttachment(
|
|
621
|
+
setClearDocumentAttachment(document_1, attachment_1, utis_1) {
|
|
616
622
|
const _super = Object.create(null, {
|
|
617
623
|
setMainDocumentAttachment: { get: () => super.setMainDocumentAttachment }
|
|
618
624
|
});
|
|
619
|
-
return __awaiter(this,
|
|
625
|
+
return __awaiter(this, arguments, void 0, function* (document, attachment, utis, deflate = false) {
|
|
620
626
|
if (!document.rev)
|
|
621
627
|
throw new Error('Cannot set attachment on document without rev');
|
|
622
|
-
|
|
628
|
+
const realDataSize = (0, binary_utils_1.ua2ab)(attachment).byteLength;
|
|
629
|
+
const { data: dataToUpload, algorithm: compressionAlgorithm } = deflate
|
|
630
|
+
? yield (0, compression_utils_1.compressData)(attachment, utis)
|
|
631
|
+
: { data: (0, binary_utils_1.ua2ab)(attachment), algorithm: undefined };
|
|
632
|
+
return (yield this.decrypt([
|
|
633
|
+
yield _super.setMainDocumentAttachment.call(this, document.id, document.rev, dataToUpload, utis, false, compressionAlgorithm, (0, compression_utils_1.getCompressionVersion)(), realDataSize),
|
|
634
|
+
]))[0].entity;
|
|
623
635
|
});
|
|
624
636
|
}
|
|
625
637
|
/**
|
|
@@ -629,19 +641,23 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
629
641
|
* @param attachment a new secondary attachment for the document.
|
|
630
642
|
* @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
|
|
631
643
|
* overrides existing values.
|
|
632
|
-
* @return the updated document.
|
|
644
|
+
* @param deflate if true, compress the attachment before uploading. Reliable decompression of compressed data requires version 26.5 of the API and all users to be using at least version 8.7.0 of the SDK * @return the updated document.
|
|
633
645
|
*/
|
|
634
|
-
encryptAndSetSecondaryDocumentAttachment(
|
|
646
|
+
encryptAndSetSecondaryDocumentAttachment(document_1, secondaryAttachmentKey_1, attachment_1, utis_1) {
|
|
635
647
|
const _super = Object.create(null, {
|
|
636
648
|
setSecondaryAttachment: { get: () => super.setSecondaryAttachment }
|
|
637
649
|
});
|
|
638
|
-
return __awaiter(this,
|
|
650
|
+
return __awaiter(this, arguments, void 0, function* (document, secondaryAttachmentKey, attachment, utis, deflate = false) {
|
|
639
651
|
var _a;
|
|
640
652
|
if (!document.rev)
|
|
641
653
|
throw new Error('Cannot set attachment on document without rev');
|
|
642
|
-
const
|
|
654
|
+
const realDataSize = (0, binary_utils_1.ua2ab)(attachment).byteLength;
|
|
655
|
+
const { data: dataToEncrypt, algorithm: compressionAlgorithm } = deflate
|
|
656
|
+
? yield (0, compression_utils_1.compressData)(attachment, utis)
|
|
657
|
+
: { data: (0, binary_utils_1.ua2ab)(attachment), algorithm: undefined };
|
|
658
|
+
const { encryptedData, updatedEntity } = yield this.crypto.xapi.encryptDataOf(document, utils_1.EntityWithDelegationTypeName.Document, dataToEncrypt, (d) => this.modifyDocumentWithUser(undefined, d));
|
|
643
659
|
return (yield this.decrypt([
|
|
644
|
-
yield _super.setSecondaryAttachment.call(this, document.id, secondaryAttachmentKey, (_a = updatedEntity === null || updatedEntity === void 0 ? void 0 : updatedEntity.rev) !== null && _a !== void 0 ? _a : document.rev, encryptedData, utis, true),
|
|
660
|
+
yield _super.setSecondaryAttachment.call(this, document.id, secondaryAttachmentKey, (_a = updatedEntity === null || updatedEntity === void 0 ? void 0 : updatedEntity.rev) !== null && _a !== void 0 ? _a : document.rev, encryptedData, utis, true, compressionAlgorithm, (0, compression_utils_1.getCompressionVersion)(), realDataSize),
|
|
645
661
|
]))[0].entity;
|
|
646
662
|
});
|
|
647
663
|
}
|
|
@@ -652,15 +668,21 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
652
668
|
* @param attachment a new secondary attachment for the document.
|
|
653
669
|
* @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
|
|
654
670
|
* overrides existing values.
|
|
671
|
+
* @param deflate if true, compress the attachment before uploading. Reliable decompression of compressed data requires version 26.5 of the API and all users to be using at least version 8.7.0 of the SDK
|
|
655
672
|
* @return the updated document.
|
|
656
673
|
*/
|
|
657
|
-
setClearSecondaryDocumentAttachment(
|
|
674
|
+
setClearSecondaryDocumentAttachment(document_1, secondaryAttachmentKey_1, attachment_1, utis_1) {
|
|
658
675
|
const _super = Object.create(null, {
|
|
659
676
|
setSecondaryAttachment: { get: () => super.setSecondaryAttachment }
|
|
660
677
|
});
|
|
661
|
-
return __awaiter(this,
|
|
662
|
-
|
|
663
|
-
|
|
678
|
+
return __awaiter(this, arguments, void 0, function* (document, secondaryAttachmentKey, attachment, utis, deflate = false) {
|
|
679
|
+
const realDataSize = (0, binary_utils_1.ua2ab)(attachment).byteLength;
|
|
680
|
+
const { data: dataToUpload, algorithm: compressionAlgorithm } = deflate
|
|
681
|
+
? yield (0, compression_utils_1.compressData)(attachment, utis)
|
|
682
|
+
: { data: (0, binary_utils_1.ua2ab)(attachment), algorithm: undefined };
|
|
683
|
+
return (yield this.decrypt([
|
|
684
|
+
yield _super.setSecondaryAttachment.call(this, document.id, secondaryAttachmentKey, document.rev, dataToUpload, utis, false, compressionAlgorithm, (0, compression_utils_1.getCompressionVersion)(), realDataSize),
|
|
685
|
+
]))[0].entity;
|
|
664
686
|
});
|
|
665
687
|
}
|
|
666
688
|
/**
|
|
@@ -692,7 +714,17 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
692
714
|
getRawMainDocumentAttachment: { get: () => super.getRawMainDocumentAttachment }
|
|
693
715
|
});
|
|
694
716
|
return __awaiter(this, arguments, void 0, function* (document, validator = () => Promise.resolve(true)) {
|
|
695
|
-
|
|
717
|
+
var _a;
|
|
718
|
+
const compressionAlgorithm = (_a = document.extraMainAttachmentInfo) === null || _a === void 0 ? void 0 : _a.compressionAlgorithm;
|
|
719
|
+
return yield this.crypto.xapi.tryDecryptDataOf({ entity: document, type: utils_1.EntityWithDelegationTypeName.Document }, yield _super.getRawMainDocumentAttachment.call(this, document.id), (decrypted) => __awaiter(this, void 0, void 0, function* () {
|
|
720
|
+
try {
|
|
721
|
+
const data = compressionAlgorithm ? yield (0, compression_utils_1.decompressData)(decrypted, compressionAlgorithm) : decrypted;
|
|
722
|
+
return (yield validator(data)) ? data : undefined;
|
|
723
|
+
}
|
|
724
|
+
catch (_a) {
|
|
725
|
+
return undefined;
|
|
726
|
+
}
|
|
727
|
+
}));
|
|
696
728
|
});
|
|
697
729
|
}
|
|
698
730
|
/**
|
|
@@ -726,7 +758,17 @@ class IccDocumentXApi extends icc_api_1.IccDocumentApi {
|
|
|
726
758
|
getSecondaryAttachment: { get: () => super.getSecondaryAttachment }
|
|
727
759
|
});
|
|
728
760
|
return __awaiter(this, arguments, void 0, function* (document, secondaryAttachmentKey, validator = () => Promise.resolve(true)) {
|
|
729
|
-
|
|
761
|
+
var _a, _b;
|
|
762
|
+
const compressionAlgorithm = (_b = (_a = document.secondaryAttachments) === null || _a === void 0 ? void 0 : _a[secondaryAttachmentKey]) === null || _b === void 0 ? void 0 : _b.compressionAlgorithm;
|
|
763
|
+
return yield this.crypto.xapi.tryDecryptDataOf({ entity: document, type: utils_1.EntityWithDelegationTypeName.Document }, yield _super.getSecondaryAttachment.call(this, document.id, secondaryAttachmentKey), (decrypted) => __awaiter(this, void 0, void 0, function* () {
|
|
764
|
+
try {
|
|
765
|
+
const data = compressionAlgorithm ? yield (0, compression_utils_1.decompressData)(decrypted, compressionAlgorithm) : decrypted;
|
|
766
|
+
return (yield validator(data)) ? data : undefined;
|
|
767
|
+
}
|
|
768
|
+
catch (_a) {
|
|
769
|
+
return undefined;
|
|
770
|
+
}
|
|
771
|
+
}));
|
|
730
772
|
});
|
|
731
773
|
}
|
|
732
774
|
/**
|