@icure/api 6.0.1 → 6.0.3

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 (241) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +3 -1
  2. package/icc-api/api/IccAccesslogApi.js +9 -8
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccAgendaApi.d.ts +3 -1
  5. package/icc-api/api/IccAgendaApi.js +9 -8
  6. package/icc-api/api/IccAgendaApi.js.map +1 -1
  7. package/icc-api/api/IccAnonymousAccessApi.d.ts +3 -1
  8. package/icc-api/api/IccAnonymousAccessApi.js +5 -4
  9. package/icc-api/api/IccAnonymousAccessApi.js.map +1 -1
  10. package/icc-api/api/IccApplicationsettingsApi.d.ts +3 -1
  11. package/icc-api/api/IccApplicationsettingsApi.js +5 -4
  12. package/icc-api/api/IccApplicationsettingsApi.js.map +1 -1
  13. package/icc-api/api/IccArticleApi.d.ts +3 -1
  14. package/icc-api/api/IccArticleApi.js +7 -6
  15. package/icc-api/api/IccArticleApi.js.map +1 -1
  16. package/icc-api/api/IccAuthApi.d.ts +10 -0
  17. package/icc-api/api/IccAuthApi.js +25 -1
  18. package/icc-api/api/IccAuthApi.js.map +1 -1
  19. package/icc-api/api/IccBeefactApi.d.ts +3 -1
  20. package/icc-api/api/IccBeefactApi.js +3 -2
  21. package/icc-api/api/IccBeefactApi.js.map +1 -1
  22. package/icc-api/api/IccBekmehrApi.d.ts +3 -1
  23. package/icc-api/api/IccBekmehrApi.js +29 -28
  24. package/icc-api/api/IccBekmehrApi.js.map +1 -1
  25. package/icc-api/api/IccBemikronoApi.d.ts +3 -1
  26. package/icc-api/api/IccBemikronoApi.js +10 -9
  27. package/icc-api/api/IccBemikronoApi.js.map +1 -1
  28. package/icc-api/api/IccBeresultexportApi.d.ts +3 -1
  29. package/icc-api/api/IccBeresultexportApi.js +5 -4
  30. package/icc-api/api/IccBeresultexportApi.js.map +1 -1
  31. package/icc-api/api/IccBeresultimportApi.d.ts +3 -1
  32. package/icc-api/api/IccBeresultimportApi.js +5 -4
  33. package/icc-api/api/IccBeresultimportApi.js.map +1 -1
  34. package/icc-api/api/IccBesamv2Api.d.ts +3 -1
  35. package/icc-api/api/IccBesamv2Api.js +35 -34
  36. package/icc-api/api/IccBesamv2Api.js.map +1 -1
  37. package/icc-api/api/IccCalendarItemApi.d.ts +3 -1
  38. package/icc-api/api/IccCalendarItemApi.js +14 -13
  39. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  40. package/icc-api/api/IccCalendarItemTypeApi.d.ts +3 -1
  41. package/icc-api/api/IccCalendarItemTypeApi.js +8 -7
  42. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  43. package/icc-api/api/IccClassificationApi.d.ts +3 -1
  44. package/icc-api/api/IccClassificationApi.js +10 -9
  45. package/icc-api/api/IccClassificationApi.js.map +1 -1
  46. package/icc-api/api/IccClassificationTemplateApi.d.ts +3 -1
  47. package/icc-api/api/IccClassificationTemplateApi.js +10 -9
  48. package/icc-api/api/IccClassificationTemplateApi.js.map +1 -1
  49. package/icc-api/api/IccCodeApi.d.ts +3 -1
  50. package/icc-api/api/IccCodeApi.js +18 -17
  51. package/icc-api/api/IccCodeApi.js.map +1 -1
  52. package/icc-api/api/IccContactApi.d.ts +3 -2
  53. package/icc-api/api/IccContactApi.js +30 -32
  54. package/icc-api/api/IccContactApi.js.map +1 -1
  55. package/icc-api/api/IccDeviceApi.d.ts +3 -1
  56. package/icc-api/api/IccDeviceApi.js +20 -19
  57. package/icc-api/api/IccDeviceApi.js.map +1 -1
  58. package/icc-api/api/IccDoctemplateApi.d.ts +3 -1
  59. package/icc-api/api/IccDoctemplateApi.js +15 -14
  60. package/icc-api/api/IccDoctemplateApi.js.map +1 -1
  61. package/icc-api/api/IccDocumentApi.d.ts +3 -1
  62. package/icc-api/api/IccDocumentApi.js +22 -21
  63. package/icc-api/api/IccDocumentApi.js.map +1 -1
  64. package/icc-api/api/IccDocumentTemplateApi.d.ts +3 -1
  65. package/icc-api/api/IccDocumentTemplateApi.js +15 -14
  66. package/icc-api/api/IccDocumentTemplateApi.js.map +1 -1
  67. package/icc-api/api/IccEntityrefApi.d.ts +3 -1
  68. package/icc-api/api/IccEntityrefApi.js +4 -3
  69. package/icc-api/api/IccEntityrefApi.js.map +1 -1
  70. package/icc-api/api/IccEntitytemplateApi.d.ts +3 -1
  71. package/icc-api/api/IccEntitytemplateApi.js +13 -12
  72. package/icc-api/api/IccEntitytemplateApi.js.map +1 -1
  73. package/icc-api/api/IccFormApi.d.ts +3 -1
  74. package/icc-api/api/IccFormApi.js +26 -25
  75. package/icc-api/api/IccFormApi.js.map +1 -1
  76. package/icc-api/api/IccFrontendmigrationApi.d.ts +3 -1
  77. package/icc-api/api/IccFrontendmigrationApi.js +8 -7
  78. package/icc-api/api/IccFrontendmigrationApi.js.map +1 -1
  79. package/icc-api/api/IccGroupApi.d.ts +3 -1
  80. package/icc-api/api/IccGroupApi.js +18 -17
  81. package/icc-api/api/IccGroupApi.js.map +1 -1
  82. package/icc-api/api/IccHcpartyApi.d.ts +3 -1
  83. package/icc-api/api/IccHcpartyApi.js +24 -23
  84. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  85. package/icc-api/api/IccHelementApi.d.ts +3 -1
  86. package/icc-api/api/IccHelementApi.js +15 -14
  87. package/icc-api/api/IccHelementApi.js.map +1 -1
  88. package/icc-api/api/IccIcureApi.d.ts +3 -1
  89. package/icc-api/api/IccIcureApi.js +18 -17
  90. package/icc-api/api/IccIcureApi.js.map +1 -1
  91. package/icc-api/api/IccInsuranceApi.d.ts +3 -1
  92. package/icc-api/api/IccInsuranceApi.js +9 -8
  93. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  94. package/icc-api/api/IccInvoiceApi.d.ts +3 -1
  95. package/icc-api/api/IccInvoiceApi.js +33 -32
  96. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  97. package/icc-api/api/IccKeywordApi.d.ts +3 -1
  98. package/icc-api/api/IccKeywordApi.js +8 -7
  99. package/icc-api/api/IccKeywordApi.js.map +1 -1
  100. package/icc-api/api/IccMaintenanceTaskApi.d.ts +3 -1
  101. package/icc-api/api/IccMaintenanceTaskApi.js +7 -6
  102. package/icc-api/api/IccMaintenanceTaskApi.js.map +1 -1
  103. package/icc-api/api/IccMedexApi.d.ts +3 -1
  104. package/icc-api/api/IccMedexApi.js +3 -2
  105. package/icc-api/api/IccMedexApi.js.map +1 -1
  106. package/icc-api/api/IccMedicallocationApi.d.ts +3 -1
  107. package/icc-api/api/IccMedicallocationApi.js +7 -6
  108. package/icc-api/api/IccMedicallocationApi.js.map +1 -1
  109. package/icc-api/api/IccMessageApi.d.ts +3 -1
  110. package/icc-api/api/IccMessageApi.js +21 -20
  111. package/icc-api/api/IccMessageApi.js.map +1 -1
  112. package/icc-api/api/IccPatientApi.d.ts +3 -1
  113. package/icc-api/api/IccPatientApi.js +36 -35
  114. package/icc-api/api/IccPatientApi.js.map +1 -1
  115. package/icc-api/api/IccPermissionApi.d.ts +3 -1
  116. package/icc-api/api/IccPermissionApi.js +3 -2
  117. package/icc-api/api/IccPermissionApi.js.map +1 -1
  118. package/icc-api/api/IccPlaceApi.d.ts +3 -1
  119. package/icc-api/api/IccPlaceApi.js +7 -6
  120. package/icc-api/api/IccPlaceApi.js.map +1 -1
  121. package/icc-api/api/IccPubsubApi.d.ts +3 -1
  122. package/icc-api/api/IccPubsubApi.js +6 -5
  123. package/icc-api/api/IccPubsubApi.js.map +1 -1
  124. package/icc-api/api/IccReceiptApi.d.ts +3 -1
  125. package/icc-api/api/IccReceiptApi.js +9 -8
  126. package/icc-api/api/IccReceiptApi.js.map +1 -1
  127. package/icc-api/api/IccReplicationApi.d.ts +3 -1
  128. package/icc-api/api/IccReplicationApi.js +6 -5
  129. package/icc-api/api/IccReplicationApi.js.map +1 -1
  130. package/icc-api/api/IccTarificationApi.d.ts +3 -1
  131. package/icc-api/api/IccTarificationApi.js +10 -9
  132. package/icc-api/api/IccTarificationApi.js.map +1 -1
  133. package/icc-api/api/IccTimeTableApi.d.ts +3 -1
  134. package/icc-api/api/IccTimeTableApi.js +8 -7
  135. package/icc-api/api/IccTimeTableApi.js.map +1 -1
  136. package/icc-api/api/IccTmpApi.d.ts +3 -1
  137. package/icc-api/api/IccTmpApi.js +73 -72
  138. package/icc-api/api/IccTmpApi.js.map +1 -1
  139. package/icc-api/api/IccUserApi.d.ts +3 -1
  140. package/icc-api/api/IccUserApi.js +28 -27
  141. package/icc-api/api/IccUserApi.js.map +1 -1
  142. package/icc-api/api/XHR.d.ts +2 -1
  143. package/icc-api/api/XHR.js +45 -59
  144. package/icc-api/api/XHR.js.map +1 -1
  145. package/icc-api/model/AuthenticationResponse.d.ts +2 -0
  146. package/icc-api/model/AuthenticationResponse.js.map +1 -1
  147. package/icc-api/model/Group.d.ts +6 -0
  148. package/icc-api/model/Group.js.map +1 -1
  149. package/icc-api/model/RefreshTokenExpiredError.d.ts +3 -0
  150. package/icc-api/model/RefreshTokenExpiredError.js +10 -0
  151. package/icc-api/model/RefreshTokenExpiredError.js.map +1 -0
  152. package/icc-api/model/RegistrationInformation.d.ts +1 -0
  153. package/icc-api/model/RegistrationInformation.js.map +1 -1
  154. package/icc-api/model/TimeTableItem.d.ts +2 -1
  155. package/icc-api/model/TimeTableItem.js.map +1 -1
  156. package/icc-x-api/auth/AuthService.d.ts +16 -0
  157. package/icc-x-api/auth/AuthService.js +3 -0
  158. package/icc-x-api/auth/AuthService.js.map +1 -0
  159. package/icc-x-api/auth/AuthenticationProvider.d.ts +22 -0
  160. package/icc-x-api/auth/AuthenticationProvider.js +41 -0
  161. package/icc-x-api/auth/AuthenticationProvider.js.map +1 -0
  162. package/icc-x-api/auth/BasicAuthService.d.ts +12 -0
  163. package/icc-x-api/auth/BasicAuthService.js +27 -0
  164. package/icc-x-api/auth/BasicAuthService.js.map +1 -0
  165. package/icc-x-api/auth/EnsembleAuthService.d.ts +17 -0
  166. package/icc-x-api/auth/EnsembleAuthService.js +60 -0
  167. package/icc-x-api/auth/EnsembleAuthService.js.map +1 -0
  168. package/icc-x-api/auth/JwtAuthService.d.ts +19 -0
  169. package/icc-x-api/auth/JwtAuthService.js +97 -0
  170. package/icc-x-api/auth/JwtAuthService.js.map +1 -0
  171. package/icc-x-api/auth/NoAuthService.d.ts +8 -0
  172. package/icc-x-api/auth/NoAuthService.js +30 -0
  173. package/icc-x-api/auth/NoAuthService.js.map +1 -0
  174. package/icc-x-api/icc-accesslog-x-api.d.ts +2 -1
  175. package/icc-x-api/icc-accesslog-x-api.js +2 -2
  176. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  177. package/icc-x-api/icc-bekmehr-x-api.d.ts +2 -1
  178. package/icc-x-api/icc-bekmehr-x-api.js +2 -2
  179. package/icc-x-api/icc-bekmehr-x-api.js.map +1 -1
  180. package/icc-x-api/icc-calendar-item-x-api.d.ts +2 -1
  181. package/icc-x-api/icc-calendar-item-x-api.js +2 -2
  182. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  183. package/icc-x-api/icc-classification-x-api.d.ts +2 -1
  184. package/icc-x-api/icc-classification-x-api.js +2 -2
  185. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  186. package/icc-x-api/icc-code-x-api.d.ts +2 -1
  187. package/icc-x-api/icc-code-x-api.js +2 -2
  188. package/icc-x-api/icc-code-x-api.js.map +1 -1
  189. package/icc-x-api/icc-contact-x-api.d.ts +2 -1
  190. package/icc-x-api/icc-contact-x-api.js +2 -2
  191. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  192. package/icc-x-api/icc-crypto-x-api.d.ts +1 -1
  193. package/icc-x-api/icc-crypto-x-api.js +10 -12
  194. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  195. package/icc-x-api/icc-doctemplate-x-api.d.ts +3 -1
  196. package/icc-x-api/icc-doctemplate-x-api.js +4 -3
  197. package/icc-x-api/icc-doctemplate-x-api.js.map +1 -1
  198. package/icc-x-api/icc-document-x-api.d.ts +3 -1
  199. package/icc-x-api/icc-document-x-api.js +4 -3
  200. package/icc-x-api/icc-document-x-api.js.map +1 -1
  201. package/icc-x-api/icc-form-x-api.d.ts +2 -1
  202. package/icc-x-api/icc-form-x-api.js +2 -2
  203. package/icc-x-api/icc-form-x-api.js.map +1 -1
  204. package/icc-x-api/icc-hcparty-x-api.d.ts +2 -1
  205. package/icc-x-api/icc-hcparty-x-api.js +2 -2
  206. package/icc-x-api/icc-hcparty-x-api.js.map +1 -1
  207. package/icc-x-api/icc-helement-x-api.d.ts +2 -1
  208. package/icc-x-api/icc-helement-x-api.js +2 -2
  209. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  210. package/icc-x-api/icc-invoice-x-api.d.ts +2 -1
  211. package/icc-x-api/icc-invoice-x-api.js +2 -2
  212. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  213. package/icc-x-api/icc-maintenance-task-x-api.d.ts +2 -1
  214. package/icc-x-api/icc-maintenance-task-x-api.js +2 -2
  215. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  216. package/icc-x-api/icc-message-x-api.d.ts +2 -1
  217. package/icc-x-api/icc-message-x-api.js +2 -2
  218. package/icc-x-api/icc-message-x-api.js.map +1 -1
  219. package/icc-x-api/icc-patient-x-api.d.ts +2 -1
  220. package/icc-x-api/icc-patient-x-api.js +2 -2
  221. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  222. package/icc-x-api/icc-receipt-x-api.d.ts +2 -1
  223. package/icc-x-api/icc-receipt-x-api.js +2 -2
  224. package/icc-x-api/icc-receipt-x-api.js.map +1 -1
  225. package/icc-x-api/icc-time-table-x-api.d.ts +2 -1
  226. package/icc-x-api/icc-time-table-x-api.js +2 -2
  227. package/icc-x-api/icc-time-table-x-api.js.map +1 -1
  228. package/icc-x-api/icc-user-x-api.d.ts +2 -1
  229. package/icc-x-api/icc-user-x-api.js +2 -2
  230. package/icc-x-api/icc-user-x-api.js.map +1 -1
  231. package/icc-x-api/index.d.ts +0 -4
  232. package/icc-x-api/index.js +31 -34
  233. package/icc-x-api/index.js.map +1 -1
  234. package/icc-x-api/storage/KeyStorageImpl.js +3 -1
  235. package/icc-x-api/storage/KeyStorageImpl.js.map +1 -1
  236. package/icc-x-api/storage/LocalStorageImpl.d.ts +1 -1
  237. package/icc-x-api/storage/LocalStorageImpl.js +10 -2
  238. package/icc-x-api/storage/LocalStorageImpl.js.map +1 -1
  239. package/icc-x-api/storage/StorageFacade.d.ts +1 -1
  240. package/icc-x-api/storage/StorageFacade.js.map +1 -1
  241. package/package.json +1 -1
@@ -21,9 +21,10 @@ const PaginatedListPatient_1 = require("../model/PaginatedListPatient");
21
21
  const PaginatedListString_1 = require("../model/PaginatedListString");
22
22
  const Patient_1 = require("../model/Patient");
23
23
  class IccPatientApi {
24
- constructor(host, headers, fetchImpl) {
24
+ constructor(host, headers, authenticationProvider, fetchImpl) {
25
25
  this.host = host;
26
26
  this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
27
+ this.authenticationProvider = authenticationProvider;
27
28
  this.fetchImpl = fetchImpl;
28
29
  }
29
30
  setHeaders(h) {
@@ -43,7 +44,7 @@ class IccPatientApi {
43
44
  const _url = this.host + `/patient/batch` + '?ts=' + new Date().getTime();
44
45
  let headers = this.headers;
45
46
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
46
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
47
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
47
48
  .then((doc) => doc.body.map((it) => new IdWithRev_1.IdWithRev(it)))
48
49
  .catch((err) => this.handleError(err));
49
50
  }
@@ -58,7 +59,7 @@ class IccPatientApi {
58
59
  const _url = this.host + `/patient/bulk` + '?ts=' + new Date().getTime();
59
60
  let headers = this.headers;
60
61
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
61
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
62
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
62
63
  .then((doc) => doc.body.map((it) => new IdWithRev_1.IdWithRev(it)))
63
64
  .catch((err) => this.handleError(err));
64
65
  }
@@ -73,7 +74,7 @@ class IccPatientApi {
73
74
  const _url = this.host + `/patient/batch` + '?ts=' + new Date().getTime();
74
75
  let headers = this.headers;
75
76
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
76
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
77
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
77
78
  .then((doc) => doc.body.map((it) => new IdWithRev_1.IdWithRev(it)))
78
79
  .catch((err) => this.handleError(err));
79
80
  }
@@ -88,7 +89,7 @@ class IccPatientApi {
88
89
  const _url = this.host + `/patient/bulk` + '?ts=' + new Date().getTime();
89
90
  let headers = this.headers;
90
91
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
91
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
92
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
92
93
  .then((doc) => doc.body.map((it) => new IdWithRev_1.IdWithRev(it)))
93
94
  .catch((err) => this.handleError(err));
94
95
  }
@@ -101,7 +102,7 @@ class IccPatientApi {
101
102
  let _body = null;
102
103
  const _url = this.host + `/patient/hcParty/${encodeURIComponent(String(hcPartyId))}/count` + '?ts=' + new Date().getTime();
103
104
  let headers = this.headers;
104
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
105
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
105
106
  .then((doc) => new Content_1.Content(doc.body))
106
107
  .catch((err) => this.handleError(err));
107
108
  }
@@ -116,7 +117,7 @@ class IccPatientApi {
116
117
  const _url = this.host + `/patient` + '?ts=' + new Date().getTime();
117
118
  let headers = this.headers;
118
119
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
119
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
120
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
120
121
  .then((doc) => new Patient_1.Patient(doc.body))
121
122
  .catch((err) => this.handleError(err));
122
123
  }
@@ -129,7 +130,7 @@ class IccPatientApi {
129
130
  let _body = null;
130
131
  const _url = this.host + `/patient/${encodeURIComponent(String(patientIds))}` + '?ts=' + new Date().getTime();
131
132
  let headers = this.headers;
132
- return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl)
133
+ return XHR_1.XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
133
134
  .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
134
135
  .catch((err) => this.handleError(err));
135
136
  }
@@ -159,7 +160,7 @@ class IccPatientApi {
159
160
  (desc ? '&desc=' + encodeURIComponent(String(desc)) : '');
160
161
  let headers = this.headers;
161
162
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
162
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
163
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
163
164
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
164
165
  .catch((err) => this.handleError(err));
165
166
  }
@@ -185,7 +186,7 @@ class IccPatientApi {
185
186
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
186
187
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
187
188
  let headers = this.headers;
188
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
189
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
189
190
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
190
191
  .catch((err) => this.handleError(err));
191
192
  }
@@ -198,7 +199,7 @@ class IccPatientApi {
198
199
  let _body = null;
199
200
  const _url = this.host + `/patient/byExternalId/${encodeURIComponent(String(externalId))}` + '?ts=' + new Date().getTime();
200
201
  let headers = this.headers;
201
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
202
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
202
203
  .then((doc) => new Patient_1.Patient(doc.body))
203
204
  .catch((err) => this.handleError(err));
204
205
  }
@@ -225,7 +226,7 @@ class IccPatientApi {
225
226
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
226
227
  (sortDirection ? '&sortDirection=' + encodeURIComponent(String(sortDirection)) : '');
227
228
  let headers = this.headers;
228
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
229
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
229
230
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
230
231
  .catch((err) => this.handleError(err));
231
232
  }
@@ -248,7 +249,7 @@ class IccPatientApi {
248
249
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
249
250
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
250
251
  let headers = this.headers;
251
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
252
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
252
253
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
253
254
  .catch((err) => this.handleError(err));
254
255
  }
@@ -271,7 +272,7 @@ class IccPatientApi {
271
272
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
272
273
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
273
274
  let headers = this.headers;
274
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
275
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
275
276
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
276
277
  .catch((err) => this.handleError(err));
277
278
  }
@@ -292,7 +293,7 @@ class IccPatientApi {
292
293
  (lastName ? '&lastName=' + encodeURIComponent(String(lastName)) : '') +
293
294
  (dateOfBirth ? '&dateOfBirth=' + encodeURIComponent(String(dateOfBirth)) : '');
294
295
  let headers = this.headers;
295
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
296
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
296
297
  .then((doc) => doc.body.map((it) => new Patient_1.Patient(it)))
297
298
  .catch((err) => this.handleError(err));
298
299
  }
@@ -305,7 +306,7 @@ class IccPatientApi {
305
306
  let _body = null;
306
307
  const _url = this.host + `/patient/${encodeURIComponent(String(patientId))}` + '?ts=' + new Date().getTime();
307
308
  let headers = this.headers;
308
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
309
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
309
310
  .then((doc) => new Patient_1.Patient(doc.body))
310
311
  .catch((err) => this.handleError(err));
311
312
  }
@@ -318,7 +319,7 @@ class IccPatientApi {
318
319
  let _body = null;
319
320
  const _url = this.host + `/patient/${encodeURIComponent(String(patientId))}/aesExchangeKeys` + '?ts=' + new Date().getTime();
320
321
  let headers = this.headers;
321
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
322
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
322
323
  .then((doc) => JSON.parse(JSON.stringify(doc.body)))
323
324
  .catch((err) => this.handleError(err));
324
325
  }
@@ -337,7 +338,7 @@ class IccPatientApi {
337
338
  new Date().getTime() +
338
339
  (system ? '&system=' + encodeURIComponent(String(system)) : '');
339
340
  let headers = this.headers;
340
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
341
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
341
342
  .then((doc) => new Patient_1.Patient(doc.body))
342
343
  .catch((err) => this.handleError(err));
343
344
  }
@@ -350,7 +351,7 @@ class IccPatientApi {
350
351
  let _body = null;
351
352
  const _url = this.host + `/patient/${encodeURIComponent(String(patientId))}/keys` + '?ts=' + new Date().getTime();
352
353
  let headers = this.headers;
353
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
354
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
354
355
  .then((doc) => JSON.parse(JSON.stringify(doc.body)))
355
356
  .catch((err) => this.handleError(err));
356
357
  }
@@ -365,7 +366,7 @@ class IccPatientApi {
365
366
  const _url = this.host + `/patient/byIds` + '?ts=' + new Date().getTime();
366
367
  let headers = this.headers;
367
368
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
368
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
369
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
369
370
  .then((doc) => doc.body.map((it) => new Patient_1.Patient(it)))
370
371
  .catch((err) => this.handleError(err));
371
372
  }
@@ -390,7 +391,7 @@ class IccPatientApi {
390
391
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
391
392
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
392
393
  let headers = this.headers;
393
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
394
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
394
395
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
395
396
  .catch((err) => this.handleError(err));
396
397
  }
@@ -409,7 +410,7 @@ class IccPatientApi {
409
410
  (firstName ? '&firstName=' + encodeURIComponent(String(firstName)) : '') +
410
411
  (lastName ? '&lastName=' + encodeURIComponent(String(lastName)) : '');
411
412
  let headers = this.headers;
412
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
413
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
413
414
  .then((doc) => doc.body.map((it) => new Patient_1.Patient(it)))
414
415
  .catch((err) => this.handleError(err));
415
416
  }
@@ -422,7 +423,7 @@ class IccPatientApi {
422
423
  let _body = null;
423
424
  const _url = this.host + `/patient/merges/${encodeURIComponent(String(date))}` + '?ts=' + new Date().getTime();
424
425
  let headers = this.headers;
425
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
426
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
426
427
  .then((doc) => doc.body.map((it) => new Patient_1.Patient(it)))
427
428
  .catch((err) => this.handleError(err));
428
429
  }
@@ -444,7 +445,7 @@ class IccPatientApi {
444
445
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
445
446
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
446
447
  let headers = this.headers;
447
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
448
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
448
449
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
449
450
  .catch((err) => this.handleError(err));
450
451
  }
@@ -471,7 +472,7 @@ class IccPatientApi {
471
472
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
472
473
  (sortDirection ? '&sortDirection=' + encodeURIComponent(String(sortDirection)) : '');
473
474
  let headers = this.headers;
474
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
475
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
475
476
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
476
477
  .catch((err) => this.handleError(err));
477
478
  }
@@ -497,7 +498,7 @@ class IccPatientApi {
497
498
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
498
499
  (sortDirection ? '&sortDirection=' + encodeURIComponent(String(sortDirection)) : '');
499
500
  let headers = this.headers;
500
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
501
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
501
502
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
502
503
  .catch((err) => this.handleError(err));
503
504
  }
@@ -520,7 +521,7 @@ class IccPatientApi {
520
521
  (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +
521
522
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '');
522
523
  let headers = this.headers;
523
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
524
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
524
525
  .then((doc) => new PaginatedListString_1.PaginatedListString(doc.body))
525
526
  .catch((err) => this.handleError(err));
526
527
  }
@@ -546,7 +547,7 @@ class IccPatientApi {
546
547
  (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +
547
548
  (sortDirection ? '&sortDirection=' + encodeURIComponent(String(sortDirection)) : '');
548
549
  let headers = this.headers;
549
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl)
550
+ return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
550
551
  .then((doc) => new PaginatedListPatient_1.PaginatedListPatient(doc.body))
551
552
  .catch((err) => this.handleError(err));
552
553
  }
@@ -561,7 +562,7 @@ class IccPatientApi {
561
562
  const _url = this.host + `/patient/match` + '?ts=' + new Date().getTime();
562
563
  let headers = this.headers;
563
564
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
564
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
565
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
565
566
  .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
566
567
  .catch((err) => this.handleError(err));
567
568
  }
@@ -575,7 +576,7 @@ class IccPatientApi {
575
576
  let _body = null;
576
577
  const _url = this.host + `/patient/mergeInto/${encodeURIComponent(String(toId))}/from/${encodeURIComponent(String(fromIds))}` + '?ts=' + new Date().getTime();
577
578
  let headers = this.headers;
578
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
579
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
579
580
  .then((doc) => new Patient_1.Patient(doc.body))
580
581
  .catch((err) => this.handleError(err));
581
582
  }
@@ -590,7 +591,7 @@ class IccPatientApi {
590
591
  const _url = this.host + `/patient` + '?ts=' + new Date().getTime();
591
592
  let headers = this.headers;
592
593
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
593
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
594
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
594
595
  .then((doc) => new Patient_1.Patient(doc.body))
595
596
  .catch((err) => this.handleError(err));
596
597
  }
@@ -611,7 +612,7 @@ class IccPatientApi {
611
612
  (start ? '&start=' + encodeURIComponent(String(start)) : '') +
612
613
  (end ? '&end=' + encodeURIComponent(String(end)) : '');
613
614
  let headers = this.headers;
614
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
615
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
615
616
  .then((doc) => new Patient_1.Patient(doc.body))
616
617
  .catch((err) => this.handleError(err));
617
618
  }
@@ -627,7 +628,7 @@ class IccPatientApi {
627
628
  const _url = this.host + `/patient/${encodeURIComponent(String(patientId))}/delegate` + '?ts=' + new Date().getTime();
628
629
  let headers = this.headers;
629
630
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
630
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
631
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
631
632
  .then((doc) => new Patient_1.Patient(doc.body))
632
633
  .catch((err) => this.handleError(err));
633
634
  }
@@ -651,7 +652,7 @@ class IccPatientApi {
651
652
  (useShortToken ? '&useShortToken=' + encodeURIComponent(String(useShortToken)) : '');
652
653
  let headers = this.headers;
653
654
  headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
654
- return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl)
655
+ return XHR_1.XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
655
656
  .then((doc) => new DataOwnerRegistrationSuccess_1.DataOwnerRegistrationSuccess(doc.body))
656
657
  .catch((err) => this.handleError(err));
657
658
  }
@@ -664,7 +665,7 @@ class IccPatientApi {
664
665
  let _body = null;
665
666
  const _url = this.host + `/patient/undelete/${encodeURIComponent(String(patientIds))}` + '?ts=' + new Date().getTime();
666
667
  let headers = this.headers;
667
- return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl)
668
+ return XHR_1.XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
668
669
  .then((doc) => doc.body.map((it) => new DocIdentifier_1.DocIdentifier(it)))
669
670
  .catch((err) => this.handleError(err));
670
671
  }