@icure/api 8.0.0-RC.2 → 8.0.0-RC.4

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.
Files changed (213) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +12 -4
  2. package/icc-api/api/IccAccesslogApi.js +23 -18
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccAgendaApi.d.ts +13 -4
  5. package/icc-api/api/IccAgendaApi.js +42 -19
  6. package/icc-api/api/IccAgendaApi.js.map +1 -1
  7. package/icc-api/api/IccApplicationsettingsApi.d.ts +1 -1
  8. package/icc-api/api/IccApplicationsettingsApi.js +2 -2
  9. package/icc-api/api/IccApplicationsettingsApi.js.map +1 -1
  10. package/icc-api/api/IccArticleApi.d.ts +13 -4
  11. package/icc-api/api/IccArticleApi.js +50 -26
  12. package/icc-api/api/IccArticleApi.js.map +1 -1
  13. package/icc-api/api/IccAuthApi.d.ts +1 -1
  14. package/icc-api/api/IccAuthApi.js +2 -2
  15. package/icc-api/api/IccAuthApi.js.map +1 -1
  16. package/icc-api/api/IccCalendarItemApi.d.ts +8 -4
  17. package/icc-api/api/IccCalendarItemApi.js +15 -22
  18. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  19. package/icc-api/api/IccCalendarItemTypeApi.d.ts +6 -4
  20. package/icc-api/api/IccCalendarItemTypeApi.js +60 -45
  21. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  22. package/icc-api/api/IccClassificationApi.d.ts +14 -5
  23. package/icc-api/api/IccClassificationApi.js +22 -12
  24. package/icc-api/api/IccClassificationApi.js.map +1 -1
  25. package/icc-api/api/IccClassificationTemplateApi.d.ts +14 -5
  26. package/icc-api/api/IccClassificationTemplateApi.js +102 -70
  27. package/icc-api/api/IccClassificationTemplateApi.js.map +1 -1
  28. package/icc-api/api/IccCodeApi.d.ts +1 -1
  29. package/icc-api/api/IccCodeApi.js +2 -2
  30. package/icc-api/api/IccCodeApi.js.map +1 -1
  31. package/icc-api/api/IccContactApi.d.ts +11 -4
  32. package/icc-api/api/IccContactApi.js +20 -13
  33. package/icc-api/api/IccContactApi.js.map +1 -1
  34. package/icc-api/api/IccDataownerApi.d.ts +1 -1
  35. package/icc-api/api/IccDataownerApi.js +44 -27
  36. package/icc-api/api/IccDataownerApi.js.map +1 -1
  37. package/icc-api/api/IccDeviceApi.d.ts +1 -1
  38. package/icc-api/api/IccDeviceApi.js +43 -32
  39. package/icc-api/api/IccDeviceApi.js.map +1 -1
  40. package/icc-api/api/IccDoctemplateApi.d.ts +10 -8
  41. package/icc-api/api/IccDoctemplateApi.js +121 -101
  42. package/icc-api/api/IccDoctemplateApi.js.map +1 -1
  43. package/icc-api/api/IccDocumentApi.d.ts +13 -5
  44. package/icc-api/api/IccDocumentApi.js +24 -14
  45. package/icc-api/api/IccDocumentApi.js.map +1 -1
  46. package/icc-api/api/IccEntityrefApi.d.ts +1 -1
  47. package/icc-api/api/IccEntityrefApi.js +27 -16
  48. package/icc-api/api/IccEntityrefApi.js.map +1 -1
  49. package/icc-api/api/IccEntitytemplateApi.d.ts +6 -4
  50. package/icc-api/api/IccEntitytemplateApi.js +118 -97
  51. package/icc-api/api/IccEntitytemplateApi.js.map +1 -1
  52. package/icc-api/api/IccFormApi.d.ts +13 -5
  53. package/icc-api/api/IccFormApi.js +24 -18
  54. package/icc-api/api/IccFormApi.js.map +1 -1
  55. package/icc-api/api/IccFrontendmigrationApi.d.ts +1 -1
  56. package/icc-api/api/IccFrontendmigrationApi.js +19 -10
  57. package/icc-api/api/IccFrontendmigrationApi.js.map +1 -1
  58. package/icc-api/api/IccGroupApi.d.ts +16 -2
  59. package/icc-api/api/IccGroupApi.js +29 -3
  60. package/icc-api/api/IccGroupApi.js.map +1 -1
  61. package/icc-api/api/IccHcpartyApi.d.ts +25 -10
  62. package/icc-api/api/IccHcpartyApi.js +84 -53
  63. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  64. package/icc-api/api/IccHelementApi.d.ts +13 -5
  65. package/icc-api/api/IccHelementApi.js +25 -21
  66. package/icc-api/api/IccHelementApi.js.map +1 -1
  67. package/icc-api/api/IccIcureApi.d.ts +1 -1
  68. package/icc-api/api/IccIcureApi.js +2 -2
  69. package/icc-api/api/IccIcureApi.js.map +1 -1
  70. package/icc-api/api/IccInsuranceApi.d.ts +3 -1
  71. package/icc-api/api/IccInsuranceApi.js +76 -47
  72. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  73. package/icc-api/api/IccInvoiceApi.d.ts +1 -1
  74. package/icc-api/api/IccInvoiceApi.js +5 -11
  75. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  76. package/icc-api/api/IccKeywordApi.d.ts +6 -5
  77. package/icc-api/api/IccKeywordApi.js +59 -45
  78. package/icc-api/api/IccKeywordApi.js.map +1 -1
  79. package/icc-api/api/IccMaintenanceTaskApi.d.ts +13 -4
  80. package/icc-api/api/IccMaintenanceTaskApi.js +22 -12
  81. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  82. package/icc-api/api/IccMedexApi.d.ts +1 -1
  83. package/icc-api/api/IccMedexApi.js +19 -10
  84. package/icc-api/api/IccMedexApi.js.map +1 -1
  85. package/icc-api/api/IccMedicallocationApi.d.ts +6 -4
  86. package/icc-api/api/IccMedicallocationApi.js +52 -39
  87. package/icc-api/api/IccMedicallocationApi.js.map +1 -1
  88. package/icc-api/api/IccMessageApi.d.ts +9 -7
  89. package/icc-api/api/IccMessageApi.js +14 -21
  90. package/icc-api/api/IccMessageApi.js.map +1 -1
  91. package/icc-api/api/IccPatientApi.d.ts +13 -5
  92. package/icc-api/api/IccPatientApi.js +23 -13
  93. package/icc-api/api/IccPatientApi.js.map +1 -1
  94. package/icc-api/api/IccPermissionApi.d.ts +1 -1
  95. package/icc-api/api/IccPermissionApi.js +19 -10
  96. package/icc-api/api/IccPermissionApi.js.map +1 -1
  97. package/icc-api/api/IccPlaceApi.d.ts +7 -5
  98. package/icc-api/api/IccPlaceApi.js +53 -40
  99. package/icc-api/api/IccPlaceApi.js.map +1 -1
  100. package/icc-api/api/IccReceiptApi.d.ts +13 -4
  101. package/icc-api/api/IccReceiptApi.js +23 -13
  102. package/icc-api/api/IccReceiptApi.js.map +1 -1
  103. package/icc-api/api/IccReplicationApi.d.ts +1 -1
  104. package/icc-api/api/IccReplicationApi.js +3 -5
  105. package/icc-api/api/IccReplicationApi.js.map +1 -1
  106. package/icc-api/api/IccRoleApi.d.ts +16 -0
  107. package/icc-api/api/IccRoleApi.js +42 -0
  108. package/icc-api/api/IccRoleApi.js.map +1 -0
  109. package/icc-api/api/IccTarificationApi.d.ts +1 -1
  110. package/icc-api/api/IccTarificationApi.js +19 -10
  111. package/icc-api/api/IccTarificationApi.js.map +1 -1
  112. package/icc-api/api/IccTimeTableApi.d.ts +13 -4
  113. package/icc-api/api/IccTimeTableApi.js +21 -9
  114. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  115. package/icc-api/api/IccTopicApi.d.ts +13 -6
  116. package/icc-api/api/IccTopicApi.js +18 -3
  117. package/icc-api/api/IccTopicApi.js.map +1 -1
  118. package/icc-api/api/IccUserApi.d.ts +31 -1
  119. package/icc-api/api/IccUserApi.js +65 -2
  120. package/icc-api/api/IccUserApi.js.map +1 -1
  121. package/icc-api/api/{IccExchangeDataApi.d.ts → internal/IccExchangeDataApi.d.ts} +4 -4
  122. package/icc-api/api/internal/IccExchangeDataApi.js +106 -0
  123. package/icc-api/api/internal/IccExchangeDataApi.js.map +1 -0
  124. package/icc-api/api/{IccExchangeDataMapApi.d.ts → internal/IccExchangeDataMapApi.d.ts} +4 -4
  125. package/icc-api/api/internal/IccExchangeDataMapApi.js +84 -0
  126. package/icc-api/api/internal/IccExchangeDataMapApi.js.map +1 -0
  127. package/icc-api/api/internal/IccRecoveryDataApi.d.ts +19 -0
  128. package/icc-api/api/internal/IccRecoveryDataApi.js +83 -0
  129. package/icc-api/api/internal/IccRecoveryDataApi.js.map +1 -0
  130. package/icc-api/api/{IccSecureDelegationKeyMapApi.d.ts → internal/IccSecureDelegationKeyMapApi.d.ts} +6 -6
  131. package/icc-api/api/{IccSecureDelegationKeyMapApi.js → internal/IccSecureDelegationKeyMapApi.js} +5 -5
  132. package/icc-api/api/internal/IccSecureDelegationKeyMapApi.js.map +1 -0
  133. package/icc-api/model/Group.d.ts +4 -0
  134. package/icc-api/model/Group.js.map +1 -1
  135. package/icc-api/model/Message.d.ts +5 -0
  136. package/icc-api/model/Message.js.map +1 -1
  137. package/icc-api/model/MessageAttachment.d.ts +10 -0
  138. package/icc-api/model/MessageAttachment.js +10 -0
  139. package/icc-api/model/MessageAttachment.js.map +1 -0
  140. package/icc-api/model/PaginatedListInsurance.d.ts +20 -0
  141. package/icc-api/model/PaginatedListInsurance.js +10 -0
  142. package/icc-api/model/PaginatedListInsurance.js.map +1 -0
  143. package/icc-api/model/Role.d.ts +11 -0
  144. package/icc-api/model/Role.js +10 -0
  145. package/icc-api/model/Role.js.map +1 -0
  146. package/icc-api/model/RoleConfiguration.d.ts +6 -0
  147. package/icc-api/model/RoleConfiguration.js +10 -0
  148. package/icc-api/model/RoleConfiguration.js.map +1 -0
  149. package/icc-api/model/RoleSourceEnum.d.ts +11 -0
  150. package/icc-api/model/RoleSourceEnum.js +16 -0
  151. package/icc-api/model/RoleSourceEnum.js.map +1 -0
  152. package/icc-api/model/User.d.ts +19 -0
  153. package/icc-api/model/User.js +6 -0
  154. package/icc-api/model/User.js.map +1 -1
  155. package/icc-api/model/UserTypeEnum.d.ts +9 -0
  156. package/icc-api/model/UserTypeEnum.js +14 -0
  157. package/icc-api/model/UserTypeEnum.js.map +1 -0
  158. package/icc-api/model/internal/ExchangeData.d.ts +20 -4
  159. package/icc-api/model/internal/ExchangeData.js +8 -2
  160. package/icc-api/model/internal/ExchangeData.js.map +1 -1
  161. package/icc-api/model/internal/RecoveryData.d.ts +47 -0
  162. package/icc-api/model/internal/RecoveryData.js +34 -0
  163. package/icc-api/model/internal/RecoveryData.js.map +1 -0
  164. package/icc-api/model/models.d.ts +6 -1
  165. package/icc-api/model/models.js +5 -0
  166. package/icc-api/model/models.js.map +1 -1
  167. package/icc-x-api/auth/JwtBridgedAuthService.d.ts +1 -0
  168. package/icc-x-api/auth/JwtBridgedAuthService.js +10 -3
  169. package/icc-x-api/auth/JwtBridgedAuthService.js.map +1 -1
  170. package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +37 -25
  171. package/icc-x-api/crypto/BaseExchangeDataManager.js +123 -64
  172. package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -1
  173. package/icc-x-api/crypto/CryptoPrimitives.d.ts +3 -0
  174. package/icc-x-api/crypto/CryptoPrimitives.js +5 -0
  175. package/icc-x-api/crypto/CryptoPrimitives.js.map +1 -1
  176. package/icc-x-api/crypto/DelegationsDeAnonymization.js +1 -1
  177. package/icc-x-api/crypto/DelegationsDeAnonymization.js.map +1 -1
  178. package/icc-x-api/crypto/ExchangeDataManager.js +14 -6
  179. package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -1
  180. package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +1 -1
  181. package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -1
  182. package/icc-x-api/crypto/HMACUtils.d.ts +10 -0
  183. package/icc-x-api/crypto/HMACUtils.js +48 -0
  184. package/icc-x-api/crypto/HMACUtils.js.map +1 -0
  185. package/icc-x-api/crypto/SecureDelegationsManager.js +3 -0
  186. package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -1
  187. package/icc-x-api/crypto/UserSignatureKeysManager.d.ts +1 -1
  188. package/icc-x-api/crypto/UserSignatureKeysManager.js +2 -2
  189. package/icc-x-api/crypto/UserSignatureKeysManager.js.map +1 -1
  190. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  191. package/icc-x-api/icc-icure-maintenance-x-api.d.ts +1 -1
  192. package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
  193. package/icc-x-api/icc-maintenance-task-x-api.d.ts +5 -3
  194. package/icc-x-api/icc-maintenance-task-x-api.js +7 -1
  195. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  196. package/icc-x-api/icc-recovery-x-api.d.ts +0 -0
  197. package/icc-x-api/icc-recovery-x-api.js +2 -0
  198. package/icc-x-api/icc-recovery-x-api.js.map +1 -0
  199. package/icc-x-api/index.d.ts +2 -0
  200. package/icc-x-api/index.js +7 -2
  201. package/icc-x-api/index.js.map +1 -1
  202. package/icc-x-api/storage/KeyStorageImpl.d.ts +1 -0
  203. package/icc-x-api/storage/KeyStorageImpl.js +20 -12
  204. package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
  205. package/package.json +1 -1
  206. package/icc-api/api/IccDocumentTemplateApi.d.ts +0 -106
  207. package/icc-api/api/IccDocumentTemplateApi.js +0 -223
  208. package/icc-api/api/IccDocumentTemplateApi.js.map +0 -1
  209. package/icc-api/api/IccExchangeDataApi.js +0 -85
  210. package/icc-api/api/IccExchangeDataApi.js.map +0 -1
  211. package/icc-api/api/IccExchangeDataMapApi.js +0 -65
  212. package/icc-api/api/IccExchangeDataMapApi.js.map +0 -1
  213. package/icc-api/api/IccSecureDelegationKeyMapApi.js.map +0 -1
@@ -14,7 +14,7 @@ import { Patient } from './Patient';
14
14
  import { Delegation } from './Delegation';
15
15
  import { SecurityMetadata } from './SecurityMetadata';
16
16
  import { IcureStub } from './IcureStub';
17
- import { Topic } from "./Topic";
17
+ import { Topic } from './Topic';
18
18
  export * from './AbstractFilterCode';
19
19
  export * from './AbstractFilterContact';
20
20
  export * from './AbstractFilterDevice';
@@ -154,6 +154,7 @@ export * from './Medication';
154
154
  export * from './MedicationSchemeExportInfo';
155
155
  export * from './Medicinalproduct';
156
156
  export * from './Message';
157
+ export * from './MessageAttachment';
157
158
  export * from './MessageReadStatus';
158
159
  export * from './MessageWithBatch';
159
160
  export * from './MessagesReadStatusUpdate';
@@ -228,6 +229,9 @@ export * from './ReplicatorDocument';
228
229
  export * from './ReplicatorResponse';
229
230
  export * from './ResultInfo';
230
231
  export * from './Right';
232
+ export * from './Role';
233
+ export * from './RoleConfiguration';
234
+ export * from './RoleSourceEnum';
231
235
  export * from './RouteOfAdministration';
232
236
  export * from './SamText';
233
237
  export * from './SamVersion';
@@ -262,6 +266,7 @@ export * from './Unit';
262
266
  export * from './User';
263
267
  export * from './UserAndHealthcareParty';
264
268
  export * from './UserGroup';
269
+ export * from './UserTypeEnum';
265
270
  export * from './Valorisation';
266
271
  export * from './Verse';
267
272
  export * from './VirtualForm';
@@ -153,6 +153,7 @@ __exportStar(require("./Medication"), exports);
153
153
  __exportStar(require("./MedicationSchemeExportInfo"), exports);
154
154
  __exportStar(require("./Medicinalproduct"), exports);
155
155
  __exportStar(require("./Message"), exports);
156
+ __exportStar(require("./MessageAttachment"), exports);
156
157
  __exportStar(require("./MessageReadStatus"), exports);
157
158
  __exportStar(require("./MessageWithBatch"), exports);
158
159
  __exportStar(require("./MessagesReadStatusUpdate"), exports);
@@ -227,6 +228,9 @@ __exportStar(require("./ReplicatorDocument"), exports);
227
228
  __exportStar(require("./ReplicatorResponse"), exports);
228
229
  __exportStar(require("./ResultInfo"), exports);
229
230
  __exportStar(require("./Right"), exports);
231
+ __exportStar(require("./Role"), exports);
232
+ __exportStar(require("./RoleConfiguration"), exports);
233
+ __exportStar(require("./RoleSourceEnum"), exports);
230
234
  __exportStar(require("./RouteOfAdministration"), exports);
231
235
  __exportStar(require("./SamText"), exports);
232
236
  __exportStar(require("./SamVersion"), exports);
@@ -261,6 +265,7 @@ __exportStar(require("./Unit"), exports);
261
265
  __exportStar(require("./User"), exports);
262
266
  __exportStar(require("./UserAndHealthcareParty"), exports);
263
267
  __exportStar(require("./UserGroup"), exports);
268
+ __exportStar(require("./UserTypeEnum"), exports);
264
269
  __exportStar(require("./Valorisation"), exports);
265
270
  __exportStar(require("./Verse"), exports);
266
271
  __exportStar(require("./VirtualForm"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","s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yCAAsB;AACtB,2DAAwC;AACxC,8CAA2B;AAC3B,iDAA8B;AAC9B,0CAAuB;AACvB,gDAA6B;AAC7B,sDAAmC;AACnC,wCAAqB;AACrB,iDAA8B;AAC9B,6CAA0B;AAC1B,iDAA8B;AAC9B,4CAAyB;AACzB,wCAAqB;AACrB,yCAAsB;AACtB,4CAAyB;AACzB,qDAAkC;AAClC,qDAAkC;AAClC,0CAAuB;AACvB,+CAA4B;AAC5B,6CAA0B","sourcesContent":["import { AccessLog } from './AccessLog'\nimport { Article } from './Article'\nimport { Classification } from './Classification'\nimport { Document } from './Document'\nimport { HealthElement } from './HealthElement'\nimport { Invoice } from './Invoice'\nimport { Form } from './Form'\nimport { Contact } from './Contact'\nimport { CalendarItem } from './CalendarItem'\nimport { MaintenanceTask } from './MaintenanceTask'\nimport { Message } from './Message'\nimport { Receipt } from './Receipt'\nimport { Patient } from './Patient'\nimport { Delegation } from './Delegation'\nimport { SecurityMetadata } from './SecurityMetadata'\nimport { IcureStub } from './IcureStub'\nimport {Topic} from \"./Topic\";\n\nexport * from './AbstractFilterCode'\nexport * from './AbstractFilterContact'\nexport * from './AbstractFilterDevice'\nexport * from './AbstractFilterHealthElement'\nexport * from './AbstractFilterHealthcareParty'\nexport * from './AbstractFilterInvoice'\nexport * from './AbstractFilterMaintenanceTask'\nexport * from './AbstractFilterPatient'\nexport * from './AbstractFilterService'\nexport * from './AbstractFilterUser'\nexport * from './AccessLog'\nexport * from './AddedDocument'\nexport * from './Address'\nexport * from './AdministrationQuantity'\nexport * from './Agenda'\nexport * from './AgreementAppendix'\nexport * from './Amp'\nexport * from './AmpComponent'\nexport * from './Ampp'\nexport * from './AmppComponent'\nexport * from './Annotation'\nexport * from './ApplicationSettings'\nexport * from './AppointmentTypeAndPlace'\nexport * from './Article'\nexport * from './Atc'\nexport * from './AttachmentMetadata'\nexport * from './AuthenticationResponse'\nexport * from './AuthenticationToken'\nexport * from './Basic'\nexport * from './Body'\nexport * from './BulkAttachmentUpdateOptions'\nexport * from './CalendarItem'\nexport * from './CalendarItemTag'\nexport * from './CalendarItemType'\nexport * from './CareTeamMember'\nexport * from './CareTeamMembership'\nexport * from './CheckSMFPatientResult'\nexport * from './Classification'\nexport * from './ClassificationTemplate'\nexport * from './Code'\nexport * from './CodeStub'\nexport * from './CodeType'\nexport * from './CommentedClassification'\nexport * from './Commercialization'\nexport * from './Company'\nexport * from './Contact'\nexport * from './Content'\nexport * from './Copayment'\nexport * from './Data'\nexport * from './DataAttachment'\nexport * from './DataOwnerRegistrationSuccess'\nexport * from './DataOwnerWithType'\nexport * from './DatabaseInfo'\nexport * from './DatabaseInitialisation'\nexport * from './DatabaseSynchronization'\nexport * from './Delegation'\nexport * from './DeletedAttachment'\nexport * from './Device'\nexport * from './DeviceType'\nexport * from './DiaryNoteExportInfo'\nexport * from './Dmpp'\nexport * from './DocIdentifier'\nexport * from './Document'\nexport * from './DocumentGroup'\nexport * from './DocumentTemplate'\nexport * from './Duration'\nexport * from './EIDItem'\nexport * from './Editor'\nexport * from './EfactInvoice'\nexport * from './Employer'\nexport * from './EmploymentInfo'\nexport * from './EntityReference'\nexport * from './EntityTemplate'\nexport * from './Episode'\nexport * from './FilterChainCode'\nexport * from './FilterChainContact'\nexport * from './FilterChainDevice'\nexport * from './FilterChainHealthElement'\nexport * from './FilterChainHealthcareParty'\nexport * from './FilterChainInvoice'\nexport * from './FilterChainMaintenanceTask'\nexport * from './FilterChainPatient'\nexport * from './FilterChainService'\nexport * from './FilterChainUser'\nexport * from './FinancialInstitutionInformation'\nexport * from './FlatRateTarification'\nexport * from './FlowItem'\nexport * from './Form'\nexport * from './FormColumn'\nexport * from './FormDataOption'\nexport * from './FormLayout'\nexport * from './FormLayoutData'\nexport * from './FormPlanning'\nexport * from './FormSection'\nexport * from './FormTemplate'\nexport * from './FormTemplateLayout'\nexport * from './Formula'\nexport * from './FrontEndMigration'\nexport * from './Group'\nexport * from './GroupDatabasesInfo'\nexport * from './GuiCode'\nexport * from './GuiCodeType'\nexport * from './GroupDeletionReport'\nexport * from './HealthElement'\nexport * from './HealthcareParty'\nexport * from './HealthcarePartyHistoryStatus'\nexport * from './IcureStub'\nexport * from './IdWithRev'\nexport * from './Identifier'\nexport * from './IdentityDocumentReader'\nexport * from './ImportMapping'\nexport * from './ImportResult'\nexport * from './IncapacityExportInfo'\nexport * from './IndexingInfo'\nexport * from './Ingredient'\nexport * from './Insurability'\nexport * from './Insurance'\nexport * from './Invoice'\nexport * from './InvoiceItem'\nexport * from './InvoiceSender'\nexport * from './InvoicesBatch'\nexport * from './InvoicingCode'\nexport * from './Keyword'\nexport * from './KeywordSubword'\nexport * from './LabelledOccurence'\nexport * from './LetterValue'\nexport * from './ListOfIds'\nexport * from './ListOfProperties'\nexport * from './LoginCredentials'\nexport * from './MaintenanceTask'\nexport * from './MapOfIds'\nexport * from './Measure'\nexport * from './MedexInfo'\nexport * from './MedicalHouseContract'\nexport * from './MedicalLocation'\nexport * from './Medication'\nexport * from './MedicationSchemeExportInfo'\nexport * from './Medicinalproduct'\nexport * from './Message'\nexport * from './MessageReadStatus'\nexport * from './MessageWithBatch'\nexport * from './MessagesReadStatusUpdate'\nexport * from './MimeAttachment'\nexport * from './Nmp'\nexport * from './NoGenericPrescriptionReason'\nexport * from './NoSwitchReason'\nexport * from './NumeratorRange'\nexport * from './PackagingType'\nexport * from './PaginatedDocumentKeyIdPairObject'\nexport * from './PaginatedListAccessLog'\nexport * from './PaginatedListAmp'\nexport * from './PaginatedListClassification'\nexport * from './PaginatedListClassificationTemplate'\nexport * from './PaginatedListCode'\nexport * from './PaginatedListContact'\nexport * from './PaginatedListDevice'\nexport * from './PaginatedListDocument'\nexport * from './PaginatedListEntityTemplate'\nexport * from './PaginatedListForm'\nexport * from './PaginatedListGroup'\nexport * from './PaginatedListHealthElement'\nexport * from './PaginatedListHealthcareParty'\nexport * from './PaginatedListInvoice'\nexport * from './PaginatedListMaintenanceTask'\nexport * from './PaginatedListMessage'\nexport * from './PaginatedListNmp'\nexport * from './PaginatedListPatient'\nexport * from './PaginatedListService'\nexport * from './PaginatedListString'\nexport * from './PaginatedListTarification'\nexport * from './PaginatedListTopic'\nexport * from './PaginatedListUser'\nexport * from './PaginatedListVmp'\nexport * from './PaginatedListVmpGroup'\nexport * from './Paragraph'\nexport * from './ParagraphAgreement'\nexport * from './Part'\nexport * from './Partnership'\nexport * from './Patient'\nexport * from './PatientHealthCareParty'\nexport * from './Payment'\nexport * from './Periodicity'\nexport * from './Permission'\nexport * from './PermissionItem'\nexport * from './PersonName'\nexport * from './PharmaceuticalForm'\nexport * from './PharmaceuticalFormStub'\nexport * from './Place'\nexport * from './PlanOfAction'\nexport * from './Predicate'\nexport * from './Pricing'\nexport * from './PropertyStub'\nexport * from './PropertyTypeStub'\nexport * from './PublicKey'\nexport * from './Quantity'\nexport * from './Receipt'\nexport * from './ReferralPeriod'\nexport * from './RegimenItem'\nexport * from './RegistrationInformation'\nexport * from './RegistrationSuccess'\nexport * from './Reimbursement'\nexport * from './ReimbursementCriterion'\nexport * from './Remote'\nexport * from './RemoteAuthentication'\nexport * from './Renewal'\nexport * from './Replication'\nexport * from './ReplicateCommand'\nexport * from './ReplicationInfo'\nexport * from './ReplicationStats'\nexport * from './ReplicatorDocument'\nexport * from './ReplicatorResponse'\nexport * from './ResultInfo'\nexport * from './Right'\nexport * from './RouteOfAdministration'\nexport * from './SamText'\nexport * from './SamVersion'\nexport * from './SchoolingInfo'\nexport * from './Section'\nexport * from './Service'\nexport * from './ServiceLink'\nexport * from './SoftwareMedicalFileExport'\nexport * from './StandardSubstance'\nexport * from './StrengthRange'\nexport * from './StructureElement'\nexport * from './SubContact'\nexport * from './Substance'\nexport * from './SubstanceStub'\nexport * from './Substanceproduct'\nexport * from './Suggest'\nexport * from './SumehrContent'\nexport * from './SumehrExportInfo'\nexport * from './SumehrValidity'\nexport * from './SupplyProblem'\nexport * from './Suspension'\nexport * from './Tag'\nexport * from './Tarification'\nexport * from './Telecom'\nexport * from './TimeSeries'\nexport * from './TimeTable'\nexport * from './TimeTableHour'\nexport * from './TimeTableItem'\nexport * from './TokenWithGroup'\nexport * from './TypedValueObject'\nexport * from './Unit'\nexport * from './User'\nexport * from './UserAndHealthcareParty'\nexport * from './UserGroup'\nexport * from './Valorisation'\nexport * from './Verse'\nexport * from './VirtualForm'\nexport * from './VirtualIngredient'\nexport * from './Vmp'\nexport * from './VmpComponent'\nexport * from './VmpGroup'\nexport * from './VmpGroupStub'\nexport * from './VmpStub'\nexport * from './Vtm'\nexport * from './Wada'\nexport * from './Weekday'\nexport * from './SecurityMetadata'\nexport * from './SecureDelegation'\nexport * from './Topic'\nexport * from './Connection'\nexport * from './ISO639_1'\n\nexport type EncryptedEntity =\n | AccessLog\n | Article\n | CalendarItem\n | Classification\n | Contact\n | Document\n | Form\n | HealthElement\n | Invoice\n | MaintenanceTask\n | Message\n | Patient\n | Receipt\n | Topic\n\nexport type EncryptedEntityStub =\n | {\n // When changing remember to also update icc-x-api/crypto/utils/encryptedStubEquals\n id?: string\n secretForeignKeys?: Array<string>\n cryptedForeignKeys?: { [key: string]: Delegation[] }\n delegations?: { [key: string]: Delegation[] }\n encryptionKeys?: { [key: string]: Delegation[] }\n encryptedSelf?: string\n securityMetadata?: SecurityMetadata\n }\n | IcureStub\n\nexport type EncryptedParentEntity = Message | Patient\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../icc-api/model/models.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,uDAAoC;AACpC,0DAAuC;AACvC,yDAAsC;AACtC,gEAA6C;AAC7C,kEAA+C;AAC/C,0DAAuC;AACvC,kEAA+C;AAC/C,0DAAuC;AACvC,0DAAuC;AACvC,uDAAoC;AACpC,8CAA2B;AAC3B,kDAA+B;AAC/B,4CAAyB;AACzB,2DAAwC;AACxC,2CAAwB;AACxB,sDAAmC;AACnC,wCAAqB;AACrB,iDAA8B;AAC9B,yCAAsB;AACtB,kDAA+B;AAC/B,+CAA4B;AAC5B,wDA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ccessLog } from './AccessLog'\nimport { Article } from './Article'\nimport { Classification } from './Classification'\nimport { Document } from './Document'\nimport { HealthElement } from './HealthElement'\nimport { Invoice } from './Invoice'\nimport { Form } from './Form'\nimport { Contact } from './Contact'\nimport { CalendarItem } from './CalendarItem'\nimport { MaintenanceTask } from './MaintenanceTask'\nimport { Message } from './Message'\nimport { Receipt } from './Receipt'\nimport { Patient } from './Patient'\nimport { Delegation } from './Delegation'\nimport { SecurityMetadata } from './SecurityMetadata'\nimport { IcureStub } from './IcureStub'\nimport { Topic } from './Topic'\n\nexport * from './AbstractFilterCode'\nexport * from './AbstractFilterContact'\nexport * from './AbstractFilterDevice'\nexport * from './AbstractFilterHealthElement'\nexport * from './AbstractFilterHealthcareParty'\nexport * from './AbstractFilterInvoice'\nexport * from './AbstractFilterMaintenanceTask'\nexport * from './AbstractFilterPatient'\nexport * from './AbstractFilterService'\nexport * from './AbstractFilterUser'\nexport * from './AccessLog'\nexport * from './AddedDocument'\nexport * from './Address'\nexport * from './AdministrationQuantity'\nexport * from './Agenda'\nexport * from './AgreementAppendix'\nexport * from './Amp'\nexport * from './AmpComponent'\nexport * from './Ampp'\nexport * from './AmppComponent'\nexport * from './Annotation'\nexport * from './ApplicationSettings'\nexport * from './AppointmentTypeAndPlace'\nexport * from './Article'\nexport * from './Atc'\nexport * from './AttachmentMetadata'\nexport * from './AuthenticationResponse'\nexport * from './AuthenticationToken'\nexport * from './Basic'\nexport * from './Body'\nexport * from './BulkAttachmentUpdateOptions'\nexport * from './CalendarItem'\nexport * from './CalendarItemTag'\nexport * from './CalendarItemType'\nexport * from './CareTeamMember'\nexport * from './CareTeamMembership'\nexport * from './CheckSMFPatientResult'\nexport * from './Classification'\nexport * from './ClassificationTemplate'\nexport * from './Code'\nexport * from './CodeStub'\nexport * from './CodeType'\nexport * from './CommentedClassification'\nexport * from './Commercialization'\nexport * from './Company'\nexport * from './Contact'\nexport * from './Content'\nexport * from './Copayment'\nexport * from './Data'\nexport * from './DataAttachment'\nexport * from './DataOwnerRegistrationSuccess'\nexport * from './DataOwnerWithType'\nexport * from './DatabaseInfo'\nexport * from './DatabaseInitialisation'\nexport * from './DatabaseSynchronization'\nexport * from './Delegation'\nexport * from './DeletedAttachment'\nexport * from './Device'\nexport * from './DeviceType'\nexport * from './DiaryNoteExportInfo'\nexport * from './Dmpp'\nexport * from './DocIdentifier'\nexport * from './Document'\nexport * from './DocumentGroup'\nexport * from './DocumentTemplate'\nexport * from './Duration'\nexport * from './EIDItem'\nexport * from './Editor'\nexport * from './EfactInvoice'\nexport * from './Employer'\nexport * from './EmploymentInfo'\nexport * from './EntityReference'\nexport * from './EntityTemplate'\nexport * from './Episode'\nexport * from './FilterChainCode'\nexport * from './FilterChainContact'\nexport * from './FilterChainDevice'\nexport * from './FilterChainHealthElement'\nexport * from './FilterChainHealthcareParty'\nexport * from './FilterChainInvoice'\nexport * from './FilterChainMaintenanceTask'\nexport * from './FilterChainPatient'\nexport * from './FilterChainService'\nexport * from './FilterChainUser'\nexport * from './FinancialInstitutionInformation'\nexport * from './FlatRateTarification'\nexport * from './FlowItem'\nexport * from './Form'\nexport * from './FormColumn'\nexport * from './FormDataOption'\nexport * from './FormLayout'\nexport * from './FormLayoutData'\nexport * from './FormPlanning'\nexport * from './FormSection'\nexport * from './FormTemplate'\nexport * from './FormTemplateLayout'\nexport * from './Formula'\nexport * from './FrontEndMigration'\nexport * from './Group'\nexport * from './GroupDatabasesInfo'\nexport * from './GuiCode'\nexport * from './GuiCodeType'\nexport * from './GroupDeletionReport'\nexport * from './HealthElement'\nexport * from './HealthcareParty'\nexport * from './HealthcarePartyHistoryStatus'\nexport * from './IcureStub'\nexport * from './IdWithRev'\nexport * from './Identifier'\nexport * from './IdentityDocumentReader'\nexport * from './ImportMapping'\nexport * from './ImportResult'\nexport * from './IncapacityExportInfo'\nexport * from './IndexingInfo'\nexport * from './Ingredient'\nexport * from './Insurability'\nexport * from './Insurance'\nexport * from './Invoice'\nexport * from './InvoiceItem'\nexport * from './InvoiceSender'\nexport * from './InvoicesBatch'\nexport * from './InvoicingCode'\nexport * from './Keyword'\nexport * from './KeywordSubword'\nexport * from './LabelledOccurence'\nexport * from './LetterValue'\nexport * from './ListOfIds'\nexport * from './ListOfProperties'\nexport * from './LoginCredentials'\nexport * from './MaintenanceTask'\nexport * from './MapOfIds'\nexport * from './Measure'\nexport * from './MedexInfo'\nexport * from './MedicalHouseContract'\nexport * from './MedicalLocation'\nexport * from './Medication'\nexport * from './MedicationSchemeExportInfo'\nexport * from './Medicinalproduct'\nexport * from './Message'\nexport * from './MessageAttachment'\nexport * from './MessageReadStatus'\nexport * from './MessageWithBatch'\nexport * from './MessagesReadStatusUpdate'\nexport * from './MimeAttachment'\nexport * from './Nmp'\nexport * from './NoGenericPrescriptionReason'\nexport * from './NoSwitchReason'\nexport * from './NumeratorRange'\nexport * from './PackagingType'\nexport * from './PaginatedDocumentKeyIdPairObject'\nexport * from './PaginatedListAccessLog'\nexport * from './PaginatedListAmp'\nexport * from './PaginatedListClassification'\nexport * from './PaginatedListClassificationTemplate'\nexport * from './PaginatedListCode'\nexport * from './PaginatedListContact'\nexport * from './PaginatedListDevice'\nexport * from './PaginatedListDocument'\nexport * from './PaginatedListEntityTemplate'\nexport * from './PaginatedListForm'\nexport * from './PaginatedListGroup'\nexport * from './PaginatedListHealthElement'\nexport * from './PaginatedListHealthcareParty'\nexport * from './PaginatedListInvoice'\nexport * from './PaginatedListMaintenanceTask'\nexport * from './PaginatedListMessage'\nexport * from './PaginatedListNmp'\nexport * from './PaginatedListPatient'\nexport * from './PaginatedListService'\nexport * from './PaginatedListString'\nexport * from './PaginatedListTarification'\nexport * from './PaginatedListTopic'\nexport * from './PaginatedListUser'\nexport * from './PaginatedListVmp'\nexport * from './PaginatedListVmpGroup'\nexport * from './Paragraph'\nexport * from './ParagraphAgreement'\nexport * from './Part'\nexport * from './Partnership'\nexport * from './Patient'\nexport * from './PatientHealthCareParty'\nexport * from './Payment'\nexport * from './Periodicity'\nexport * from './Permission'\nexport * from './PermissionItem'\nexport * from './PersonName'\nexport * from './PharmaceuticalForm'\nexport * from './PharmaceuticalFormStub'\nexport * from './Place'\nexport * from './PlanOfAction'\nexport * from './Predicate'\nexport * from './Pricing'\nexport * from './PropertyStub'\nexport * from './PropertyTypeStub'\nexport * from './PublicKey'\nexport * from './Quantity'\nexport * from './Receipt'\nexport * from './ReferralPeriod'\nexport * from './RegimenItem'\nexport * from './RegistrationInformation'\nexport * from './RegistrationSuccess'\nexport * from './Reimbursement'\nexport * from './ReimbursementCriterion'\nexport * from './Remote'\nexport * from './RemoteAuthentication'\nexport * from './Renewal'\nexport * from './Replication'\nexport * from './ReplicateCommand'\nexport * from './ReplicationInfo'\nexport * from './ReplicationStats'\nexport * from './ReplicatorDocument'\nexport * from './ReplicatorResponse'\nexport * from './ResultInfo'\nexport * from './Right'\nexport * from './Role'\nexport * from './RoleConfiguration'\nexport * from './RoleSourceEnum'\nexport * from './RouteOfAdministration'\nexport * from './SamText'\nexport * from './SamVersion'\nexport * from './SchoolingInfo'\nexport * from './Section'\nexport * from './Service'\nexport * from './ServiceLink'\nexport * from './SoftwareMedicalFileExport'\nexport * from './StandardSubstance'\nexport * from './StrengthRange'\nexport * from './StructureElement'\nexport * from './SubContact'\nexport * from './Substance'\nexport * from './SubstanceStub'\nexport * from './Substanceproduct'\nexport * from './Suggest'\nexport * from './SumehrContent'\nexport * from './SumehrExportInfo'\nexport * from './SumehrValidity'\nexport * from './SupplyProblem'\nexport * from './Suspension'\nexport * from './Tag'\nexport * from './Tarification'\nexport * from './Telecom'\nexport * from './TimeSeries'\nexport * from './TimeTable'\nexport * from './TimeTableHour'\nexport * from './TimeTableItem'\nexport * from './TokenWithGroup'\nexport * from './TypedValueObject'\nexport * from './Unit'\nexport * from './User'\nexport * from './UserAndHealthcareParty'\nexport * from './UserGroup'\nexport * from './UserTypeEnum'\nexport * from './Valorisation'\nexport * from './Verse'\nexport * from './VirtualForm'\nexport * from './VirtualIngredient'\nexport * from './Vmp'\nexport * from './VmpComponent'\nexport * from './VmpGroup'\nexport * from './VmpGroupStub'\nexport * from './VmpStub'\nexport * from './Vtm'\nexport * from './Wada'\nexport * from './Weekday'\nexport * from './SecurityMetadata'\nexport * from './SecureDelegation'\nexport * from './Topic'\nexport * from './Connection'\nexport * from './ISO639_1'\n\nexport type EncryptedEntity =\n | AccessLog\n | Article\n | CalendarItem\n | Classification\n | Contact\n | Document\n | Form\n | HealthElement\n | Invoice\n | MaintenanceTask\n | Message\n | Patient\n | Receipt\n | Topic\n\nexport type EncryptedEntityStub =\n | {\n // When changing remember to also update icc-x-api/crypto/utils/encryptedStubEquals\n id?: string\n secretForeignKeys?: Array<string>\n cryptedForeignKeys?: { [key: string]: Delegation[] }\n delegations?: { [key: string]: Delegation[] }\n encryptionKeys?: { [key: string]: Delegation[] }\n encryptedSelf?: string\n securityMetadata?: SecurityMetadata\n }\n | IcureStub\n\nexport type EncryptedParentEntity = Message | Patient\n"]}
@@ -20,6 +20,7 @@ export declare class JwtBridgedAuthService implements AuthService {
20
20
  token: string;
21
21
  refreshToken: string;
22
22
  } | undefined>;
23
+ getJWT(): Promise<string | undefined>;
23
24
  getAuthHeaders(): Promise<Array<Header>>;
24
25
  private _refreshAuthJwt;
25
26
  private _loginAndGetTokens;
@@ -32,7 +32,7 @@ class JwtBridgedAuthService {
32
32
  getIcureTokens() {
33
33
  return this.getAuthHeaders().then(() => this._currentPromise.then(({ authJwt, refreshJwt }) => ({ token: authJwt, refreshToken: refreshJwt })));
34
34
  }
35
- getAuthHeaders() {
35
+ getJWT() {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
37
  return this._currentPromise
38
38
  .then(({ authJwt, refreshJwt }) => {
@@ -52,8 +52,15 @@ class JwtBridgedAuthService {
52
52
  throw this._error;
53
53
  }
54
54
  return this._currentPromise;
55
- })
56
- .then(({ authJwt }) => {
55
+ }).then(({ authJwt }) => {
56
+ return authJwt;
57
+ });
58
+ });
59
+ }
60
+ getAuthHeaders() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return this.getJWT()
63
+ .then((authJwt) => {
57
64
  return [new XHR_1.XHR.Header('Authorization', `Bearer ${authJwt}`)];
58
65
  });
59
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"JwtBridgedAuthService.js","sourceRoot":"","sources":["../../../icc-x-api/auth/JwtBridgedAuthService.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+CAA2C;AAE3C,2EAAuE;AAEvE,oCAA8B;AAE9B,IAAO,QAAQ,GAAG,SAAG,CAAC,QAAQ,CAAA;AAE9B;;GAEG;AACH,MAAa,qBAAqB;IAIhC,YACU,OAAmB,EACnB,QAAgB,EAChB,QAAgB,EAChB,mBAAqD,EAAE;QAHvD,YAAO,GAAP,OAAO,CAAY;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,qBAAgB,GAAhB,gBAAgB,CAAuC;QAPzD,WAAM,GAAiB,IAAI,CAAA;QAC3B,oBAAe,GAAuD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAO9F,CAAC;IAEJ,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAiB,CAAC,CAAA;IAC9D,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,OAAQ,EAAE,YAAY,EAAE,UAAW,EAAE,CAAC,CAAC,CAAC,CAAA;IACnJ,CAAC;IAEK,cAAc;;YAClB,OAAO,IAAI,CAAC,eAAe;iBACxB,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;gBAChC,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AAK;gBAC3B,UAAU,EAAE,YAAY,CAAC,YAAY;aACtC,CAAA;QACH,CAAC;KAAA;IAEO,sBAAsB,CAAC,GAAW;QACxC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,IAAI,CAAA;SACZ;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;QAC5C,mGAAmG;QACnG,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;IAC5E,CAAC;IAEO,aAAa,CAAC,aAAqB;QACzC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,WAAG,EAAC,aAAa,CAAC,CAAC,CAAA;IACvC,CAAC;IAED,gBAAgB,CAAC,KAAY;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;IACtB,CAAC;CACF;AAzHD,sDAyHC","sourcesContent":["import { AuthService } from './AuthService'\nimport { XHR } from '../../icc-api/api/XHR'\nimport { IccAuthApi, OAuthThirdParty } from '../../icc-api'\nimport { LoginCredentials } from '../../icc-api/model/LoginCredentials'\nimport Header = XHR.Header\nimport { a2b } from '../utils'\nimport { AuthenticationResponse } from '../../icc-api/model/AuthenticationResponse'\nimport XHRError = XHR.XHRError\n\n/**\n * Differs from JwtAuthService in that it can create new refresh tokens if the old one is expired\n */\nexport class JwtBridgedAuthService implements AuthService {\n private _error: Error | null = null\n private _currentPromise: Promise<{ authJwt?: string; refreshJwt?: string }> = Promise.resolve({})\n\n constructor(\n private authApi: IccAuthApi,\n private username: string,\n private password: string,\n private thirdPartyTokens: { [thirdParty: string]: string } = {}\n ) {}\n\n get refreshToken(): Promise<string | undefined> {\n return this._currentPromise.then((x) => x.refreshJwt as any)\n }\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined> {\n return this.getAuthHeaders().then(() => this._currentPromise.then(({ authJwt, refreshJwt }) => ({ token: authJwt!, refreshToken: refreshJwt! })))\n }\n\n async getAuthHeaders(): Promise<Array<Header>> {\n return this._currentPromise\n .then(({ authJwt, refreshJwt }) => {\n if (!authJwt || this._isJwtInvalidOrExpired(authJwt)) {\n // If it does not have the JWT, tries to get it\n // If the JWT is expired, tries to refresh it\n\n this._currentPromise = this._refreshAuthJwt(refreshJwt).then((updatedTokens) => {\n // If here the token is null,\n // it goes in a suspension status\n if (!updatedTokens.authJwt) {\n throw new Error('Your iCure back-end version does not support JWT authentication')\n }\n\n return updatedTokens\n })\n } else if (!!this._error) {\n throw this._error\n }\n return this._currentPromise\n })\n .then(({ authJwt }) => {\n return [new XHR.Header('Authorization', `Bearer ${authJwt}`)]\n })\n }\n\n private async _refreshAuthJwt(refreshJwt: string | undefined): Promise<{ authJwt?: string; refreshJwt?: string }> {\n // If I do not have a refresh JWT or the refresh JWT is expired,\n // I have to log in again\n if (!refreshJwt || this._isJwtInvalidOrExpired(refreshJwt)) {\n return this._loginAndGetTokens()\n } else {\n return this.authApi.refreshAuthenticationJWT(refreshJwt).then((refreshResponse) => ({\n authJwt: refreshResponse.token,\n refreshJwt: refreshJwt,\n }))\n }\n }\n\n private async _loginAndGetTokens(): Promise<{ authJwt?: string; refreshJwt?: string }> {\n let authResponse: AuthenticationResponse | undefined\n let firstError: XHRError | undefined\n if (this.username && this.password) {\n try {\n authResponse = await this.authApi.login(\n new LoginCredentials({\n username: this.username,\n password: this.password,\n })\n )\n } catch (e) {\n firstError = e as XHRError\n }\n }\n if (!authResponse) {\n authResponse = await (Object.entries(this.thirdPartyTokens) as [OAuthThirdParty, string][]).reduce(async (acc, [thirdParty, token]) => {\n const prev = await acc\n return (\n prev ??\n (token\n ? this.authApi.loginWithThirdPartyToken(thirdParty, token).catch((e) => {\n if (!firstError) {\n firstError = e as XHRError\n }\n return Promise.resolve() as Promise<undefined>\n })\n : undefined)\n )\n }, Promise.resolve() as Promise<AuthenticationResponse | undefined>)\n }\n\n if (!authResponse) {\n if (firstError) throw firstError\n throw new XHRError('', 'Unknown error', 401, 'Unauthorized', new Headers())\n }\n\n return {\n authJwt: authResponse.token,\n refreshJwt: authResponse.refreshToken,\n }\n }\n\n private _isJwtInvalidOrExpired(jwt: string): boolean {\n const parts = jwt.split('.')\n if (parts.length !== 3) {\n return true\n }\n const payload = this._base64Decode(parts[1])\n // Using the 'exp' string is safe to use as it is part of the JWT RFC and cannot be modified by us.\n return !('exp' in payload) || payload['exp'] * 1000 < new Date().getTime()\n }\n\n private _base64Decode(encodedString: string): any {\n return JSON.parse(a2b(encodedString))\n }\n\n invalidateHeader(error: Error): void {\n this._error = error\n }\n\n isInErrorState(): boolean {\n return !!this._error\n }\n}\n"]}
1
+ {"version":3,"file":"JwtBridgedAuthService.js","sourceRoot":"","sources":["../../../icc-x-api/auth/JwtBridgedAuthService.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+CAA2C;AAE3C,2EAAuE;AAEvE,oCAA8B;AAE9B,IAAO,QAAQ,GAAG,SAAG,CAAC,QAAQ,CAAA;AAE9B;;GAEG;AACH,MAAa,qBAAqB;IAIhC,YACU,OAAmB,EACnB,QAAgB,EAChB,QAAgB,EAChB,mBAAqD,EAAE;QAHvD,YAAO,GAAP,OAAO,CAAY;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,qBAAgB,GAAhB,gBAAgB,CAAuC;QAPzD,WAAM,GAAiB,IAAI,CAAA;QAC3B,oBAAe,GAAuD,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IAO9F,CAAC;IAEJ,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,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BAAgB,CAAC,KAAY;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACrB,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAA;IACtB,CAAC;CACF;AA/HD,sDA+HC","sourcesContent":["import { AuthService } from './AuthService'\nimport { XHR } from '../../icc-api/api/XHR'\nimport { IccAuthApi, OAuthThirdParty } from '../../icc-api'\nimport { LoginCredentials } from '../../icc-api/model/LoginCredentials'\nimport Header = XHR.Header\nimport { a2b } from '../utils'\nimport { AuthenticationResponse } from '../../icc-api/model/AuthenticationResponse'\nimport XHRError = XHR.XHRError\n\n/**\n * Differs from JwtAuthService in that it can create new refresh tokens if the old one is expired\n */\nexport class JwtBridgedAuthService implements AuthService {\n private _error: Error | null = null\n private _currentPromise: Promise<{ authJwt?: string; refreshJwt?: string }> = Promise.resolve({})\n\n constructor(\n private authApi: IccAuthApi,\n private username: string,\n private password: string,\n private thirdPartyTokens: { [thirdParty: string]: string } = {}\n ) {}\n\n get refreshToken(): Promise<string | undefined> {\n return this._currentPromise.then((x) => x.refreshJwt as any)\n }\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined> {\n return this.getAuthHeaders().then(() => this._currentPromise.then(({ authJwt, refreshJwt }) => ({ token: authJwt!, refreshToken: refreshJwt! })))\n }\n\n async getJWT(): Promise<string | undefined> {\n return this._currentPromise\n .then(({ authJwt, refreshJwt }) => {\n if (!authJwt || this._isJwtInvalidOrExpired(authJwt)) {\n // If it does not have the JWT, tries to get it\n // If the JWT is expired, tries to refresh it\n\n this._currentPromise = this._refreshAuthJwt(refreshJwt).then((updatedTokens) => {\n // If here the token is null,\n // it goes in a suspension status\n if (!updatedTokens.authJwt) {\n throw new Error('Your iCure back-end version does not support JWT authentication')\n }\n\n return updatedTokens\n })\n } else if (!!this._error) {\n throw this._error\n }\n return this._currentPromise\n }).then(({authJwt}) => {\n return authJwt\n })\n }\n\n async getAuthHeaders(): Promise<Array<Header>> {\n return this.getJWT()\n .then((authJwt) => {\n return [new XHR.Header('Authorization', `Bearer ${authJwt}`)]\n })\n }\n\n private async _refreshAuthJwt(refreshJwt: string | undefined): Promise<{ authJwt?: string; refreshJwt?: string }> {\n // If I do not have a refresh JWT or the refresh JWT is expired,\n // I have to log in again\n if (!refreshJwt || this._isJwtInvalidOrExpired(refreshJwt)) {\n return this._loginAndGetTokens()\n } else {\n return this.authApi.refreshAuthenticationJWT(refreshJwt).then((refreshResponse) => ({\n authJwt: refreshResponse.token,\n refreshJwt: refreshJwt,\n }))\n }\n }\n\n private async _loginAndGetTokens(): Promise<{ authJwt?: string; refreshJwt?: string }> {\n let authResponse: AuthenticationResponse | undefined\n let firstError: XHRError | undefined\n if (this.username && this.password) {\n try {\n authResponse = await this.authApi.login(\n new LoginCredentials({\n username: this.username,\n password: this.password,\n })\n )\n } catch (e) {\n firstError = e as XHRError\n }\n }\n if (!authResponse) {\n authResponse = await (Object.entries(this.thirdPartyTokens) as [OAuthThirdParty, string][]).reduce(async (acc, [thirdParty, token]) => {\n const prev = await acc\n return (\n prev ??\n (token\n ? this.authApi.loginWithThirdPartyToken(thirdParty, token).catch((e) => {\n if (!firstError) {\n firstError = e as XHRError\n }\n return Promise.resolve() as Promise<undefined>\n })\n : undefined)\n )\n }, Promise.resolve() as Promise<AuthenticationResponse | undefined>)\n }\n\n if (!authResponse) {\n if (firstError) throw firstError\n throw new XHRError('', 'Unknown error', 401, 'Unauthorized', new Headers())\n }\n\n return {\n authJwt: authResponse.token,\n refreshJwt: authResponse.refreshToken,\n }\n }\n\n private _isJwtInvalidOrExpired(jwt: string): boolean {\n const parts = jwt.split('.')\n if (parts.length !== 3) {\n return true\n }\n const payload = this._base64Decode(parts[1])\n // Using the 'exp' string is safe to use as it is part of the JWT RFC and cannot be modified by us.\n return !('exp' in payload) || payload['exp'] * 1000 < new Date().getTime()\n }\n\n private _base64Decode(encodedString: string): any {\n return JSON.parse(a2b(encodedString))\n }\n\n invalidateHeader(error: Error): void {\n this._error = error\n }\n\n isInErrorState(): boolean {\n return !!this._error\n }\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { IccDataOwnerXApi } from '../icc-data-owner-x-api';
2
2
  import { KeyPair } from './RSA';
3
3
  import { ExchangeData } from '../../icc-api/model/internal/ExchangeData';
4
- import { IccExchangeDataApi } from '../../icc-api/api/IccExchangeDataApi';
4
+ import { IccExchangeDataApi } from '../../icc-api/api/internal/IccExchangeDataApi';
5
5
  import { CryptoPrimitives } from './CryptoPrimitives';
6
6
  /**
7
7
  * @internal this class is intended for internal use only and may be modified without notice
@@ -35,27 +35,27 @@ export declare class BaseExchangeDataManager {
35
35
  * @return the exchange data with the provided id or undefined if no exchange data with such id could be found.
36
36
  */
37
37
  getExchangeDataById(exchangeDataId: string): Promise<ExchangeData | undefined>;
38
- /**
39
- * Filters exchange data returning only the instances that could be verified using their signature and the provided verification
40
- * keys.
41
- * Note that all exchange data created by data owners other than the current data owner (including members of his hierarchy)
42
- * will always be unverified.
43
- * @param exchangeData the exchange data to verify.
44
- * @param getVerificationKey function to retrieve keys to use for verification by fingerprint.
45
- * @return the exchange data which could be verified given his signature and the available verification keys.
46
- * @throws if any of the provided exchange data has been created by a data owner other than the current data owner.
47
- */
48
- filterVerifiedExchangeData(exchangeData: ExchangeData[], getVerificationKey: (publicKeyFingerprint: string) => Promise<CryptoKey | undefined>): Promise<ExchangeData[]>;
49
38
  /**
50
39
  * Verifies the authenticity of the exchange data by checking the signature.
51
40
  * Note that all exchange data created by data owners other than the current data owner (including members of his hierarchy)
52
41
  * will always be unverified.
53
- * @param exchangeData the exchange data to verify.
42
+ * @param data collects the following information about the exchange data being verified:
43
+ * - exchangeData the exchange data to verify.
44
+ * - decryptedAccessControlSecret the access control secret decrypted from the exchange data.
45
+ * - decryptedExchangeKey the exchange key decrypted from the exchange data.
46
+ * - decryptedSharedSignatureKey the shared signature key decrypted from the exchange data.
54
47
  * @param getVerificationKey function to retrieve keys to use for verification by fingerprint.
48
+ * @param verifyAsDelegator if true the method will also verify that the hmac key used for the signature was created by the delegator of the
49
+ * exchange data. If true and the data was not created by the current data owner this method will return false.
55
50
  * @return the exchange data which could be verified given his signature and the available verification keys.
56
51
  * @throws if any of the provided exchange data has been created by a data owner other than the current data owner.
57
52
  */
58
- verifyExchangeData(exchangeData: ExchangeData, getVerificationKey: (publicKeyFingerprint: string) => Promise<CryptoKey | undefined>): Promise<boolean>;
53
+ verifyExchangeData(data: {
54
+ exchangeData: ExchangeData;
55
+ decryptedAccessControlSecret: string;
56
+ decryptedExchangeKey: CryptoKey;
57
+ decryptedSharedSignatureKey: CryptoKey;
58
+ }, getVerificationKey: (publicKeyFingerprint: string) => Promise<CryptoKey | undefined>, verifyAsDelegator: boolean): Promise<boolean>;
59
59
  /**
60
60
  * Extracts and decrypts the access control secret from the provided exchange data.
61
61
  * These need to be hashed together with the entity class and confidentiality level in order to get the actual access control key
@@ -86,6 +86,20 @@ export declare class BaseExchangeDataManager {
86
86
  successfulDecryptions: CryptoKey[];
87
87
  failedDecryptions: ExchangeData[];
88
88
  }>;
89
+ /**
90
+ * Extract and decrypts the shared signature key from the provided exchange data.
91
+ * @param exchangeData the exchange data from which to extract exchange keys.
92
+ * @param decryptionKeys rsa key pairs to use for the decryption of the exchange keys.
93
+ * @return an object composed of:
94
+ * - successfulDecryptions: array containing the successfully decrypted exchange keys.
95
+ * - failedDecryptions: array containing all exchange data for which the access control key could not be decrypted (using the provided keys).
96
+ */
97
+ tryDecryptSharedSignatureKeys(exchangeData: ExchangeData[], decryptionKeys: {
98
+ [publicKeyFingerprint: string]: KeyPair<CryptoKey>;
99
+ }): Promise<{
100
+ successfulDecryptions: CryptoKey[];
101
+ failedDecryptions: ExchangeData[];
102
+ }>;
89
103
  private tryDecryptExchangeData;
90
104
  private tryDecrypt;
91
105
  /**
@@ -113,15 +127,9 @@ export declare class BaseExchangeDataManager {
113
127
  * where one of the data owners involved in the exchange data has lost one of his keys.
114
128
  * If the content of the exchange data could not be decrypted using the provided keys the method will not update anything and will return undefined.
115
129
  * This method assumes that the new encryption keys have been verified.
116
- * If the current data owner is also the delegator of the provided exchange data and at least one of the verification keys can be used to
117
- * validate the current exchange data then the signature will be updated using the signature keys.
118
- * Instead, if the current data owner is not the delegator of the provided exchange data, or the exchange data could not be verified using
119
- * the provided verification keys then the updated exchange data will become unverified, and won't ever be verifiable again.
120
130
  * @param exchangeData exchange data to update.
121
131
  * @param decryptionKeys keys to use to extract the content of the exchange data which will be shared with the new keys.
122
- * @param signatureKeys keys to use for the new signature of the updated exchange data.
123
132
  * @param newEncryptionKeys new keys to add to the exchange data.
124
- * @param getVerificationKey function to retrieve keys to use for verification by fingerprint.
125
133
  * @return the updated exchange data, and its decrypted exchange key and access control secret, or undefined if the exchange data content could not
126
134
  * be decrypted and the exchange data could not be updated.
127
135
  */
@@ -129,18 +137,22 @@ export declare class BaseExchangeDataManager {
129
137
  [publicKeyFingerprint: string]: KeyPair<CryptoKey>;
130
138
  }, newEncryptionKeys: {
131
139
  [keyPairFingerprint: string]: CryptoKey;
132
- }, signatureKeys: {
133
- [keyPairFingerprint: string]: CryptoKey;
134
- }, getVerificationKey: (publicKeyFingerprint: string) => Promise<CryptoKey | undefined>): Promise<{
140
+ }): Promise<{
135
141
  exchangeData: ExchangeData;
136
142
  exchangeKey: CryptoKey;
137
143
  accessControlSecret: string;
138
144
  } | undefined>;
139
- private bytesToSign;
145
+ private bytesToSignForSharedSignature;
146
+ private bytesToSignForDelegatorSignature;
140
147
  private generateExchangeKey;
141
148
  private importExchangeKey;
149
+ private generateSharedSignatureKey;
150
+ private importSharedSignatureKey;
142
151
  private generateAccessControlSecret;
143
152
  private importAccessControlSecret;
144
153
  private encryptDataWithKeys;
145
- private signDataWithKeys;
154
+ private signDataWithDelegatorKeys;
155
+ private verifyDelegatorSignature;
156
+ private signDataWithSharedKey;
157
+ private verifyDataWithSharedKey;
146
158
  }