@icure/api 8.8.0 → 8.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +48 -0
  2. package/icc-api/api/IccAccesslogApi.js +100 -0
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccAgendaApi.d.ts +25 -0
  5. package/icc-api/api/IccAgendaApi.js +49 -0
  6. package/icc-api/api/IccAgendaApi.js.map +1 -1
  7. package/icc-api/api/IccCalendarItemApi.d.ts +25 -0
  8. package/icc-api/api/IccCalendarItemApi.js +49 -0
  9. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  10. package/icc-api/api/IccCalendarItemTypeApi.d.ts +25 -0
  11. package/icc-api/api/IccCalendarItemTypeApi.js +49 -0
  12. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  13. package/icc-api/api/IccCodeApi.d.ts +25 -0
  14. package/icc-api/api/IccCodeApi.js +49 -0
  15. package/icc-api/api/IccCodeApi.js.map +1 -1
  16. package/icc-api/api/IccContactApi.d.ts +48 -0
  17. package/icc-api/api/IccContactApi.js +100 -0
  18. package/icc-api/api/IccContactApi.js.map +1 -1
  19. package/icc-api/api/IccDeviceApi.d.ts +48 -0
  20. package/icc-api/api/IccDeviceApi.js +100 -0
  21. package/icc-api/api/IccDeviceApi.js.map +1 -1
  22. package/icc-api/api/IccDocumentApi.d.ts +48 -0
  23. package/icc-api/api/IccDocumentApi.js +100 -0
  24. package/icc-api/api/IccDocumentApi.js.map +1 -1
  25. package/icc-api/api/IccFormApi.d.ts +48 -0
  26. package/icc-api/api/IccFormApi.js +101 -4
  27. package/icc-api/api/IccFormApi.js.map +1 -1
  28. package/icc-api/api/IccHcpartyApi.d.ts +48 -0
  29. package/icc-api/api/IccHcpartyApi.js +100 -0
  30. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  31. package/icc-api/api/IccHelementApi.d.ts +48 -0
  32. package/icc-api/api/IccHelementApi.js +100 -0
  33. package/icc-api/api/IccHelementApi.js.map +1 -1
  34. package/icc-api/api/IccInsuranceApi.d.ts +50 -2
  35. package/icc-api/api/IccInsuranceApi.js +100 -0
  36. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  37. package/icc-api/api/IccInvoiceApi.d.ts +48 -0
  38. package/icc-api/api/IccInvoiceApi.js +100 -0
  39. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  40. package/icc-api/api/IccMessageApi.d.ts +48 -0
  41. package/icc-api/api/IccMessageApi.js +100 -0
  42. package/icc-api/api/IccMessageApi.js.map +1 -1
  43. package/icc-api/api/IccPatientApi.d.ts +48 -0
  44. package/icc-api/api/IccPatientApi.js +100 -0
  45. package/icc-api/api/IccPatientApi.js.map +1 -1
  46. package/icc-api/api/IccPlaceApi.d.ts +25 -0
  47. package/icc-api/api/IccPlaceApi.js +49 -0
  48. package/icc-api/api/IccPlaceApi.js.map +1 -1
  49. package/icc-api/api/IccReceiptApi.d.ts +25 -0
  50. package/icc-api/api/IccReceiptApi.js +49 -0
  51. package/icc-api/api/IccReceiptApi.js.map +1 -1
  52. package/icc-api/api/IccTopicApi.d.ts +48 -0
  53. package/icc-api/api/IccTopicApi.js +100 -0
  54. package/icc-api/api/IccTopicApi.js.map +1 -1
  55. package/icc-api/api/IccUserApi.d.ts +25 -0
  56. package/icc-api/api/IccUserApi.js +49 -0
  57. package/icc-api/api/IccUserApi.js.map +1 -1
  58. package/icc-api/model/ConflictResolutionRequest.d.ts +18 -0
  59. package/icc-api/model/ConflictResolutionRequest.js +17 -0
  60. package/icc-api/model/ConflictResolutionRequest.js.map +1 -0
  61. package/icc-api/model/ConflictResolutionResult.d.ts +22 -0
  62. package/icc-api/model/ConflictResolutionResult.js +24 -0
  63. package/icc-api/model/ConflictResolutionResult.js.map +1 -0
  64. package/icc-api/model/models.d.ts +2 -0
  65. package/icc-api/model/models.js +2 -0
  66. package/icc-api/model/models.js.map +1 -1
  67. package/icc-x-api/icc-accesslog-x-api.d.ts +31 -0
  68. package/icc-x-api/icc-accesslog-x-api.js +57 -0
  69. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  70. package/icc-x-api/icc-calendar-item-x-api.d.ts +15 -0
  71. package/icc-x-api/icc-calendar-item-x-api.js +28 -0
  72. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  73. package/icc-x-api/icc-contact-x-api.d.ts +31 -0
  74. package/icc-x-api/icc-contact-x-api.js +60 -1
  75. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  76. package/icc-x-api/icc-document-x-api.d.ts +31 -0
  77. package/icc-x-api/icc-document-x-api.js +64 -0
  78. package/icc-x-api/icc-document-x-api.js.map +1 -1
  79. package/icc-x-api/icc-form-x-api.d.ts +31 -0
  80. package/icc-x-api/icc-form-x-api.js +58 -0
  81. package/icc-x-api/icc-form-x-api.js.map +1 -1
  82. package/icc-x-api/icc-helement-x-api.d.ts +31 -0
  83. package/icc-x-api/icc-helement-x-api.js +57 -0
  84. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  85. package/icc-x-api/icc-invoice-x-api.d.ts +31 -0
  86. package/icc-x-api/icc-invoice-x-api.js +58 -0
  87. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  88. package/icc-x-api/icc-message-x-api.d.ts +31 -0
  89. package/icc-x-api/icc-message-x-api.js +64 -0
  90. package/icc-x-api/icc-message-x-api.js.map +1 -1
  91. package/icc-x-api/icc-patient-x-api.d.ts +31 -0
  92. package/icc-x-api/icc-patient-x-api.js +57 -0
  93. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  94. package/icc-x-api/icc-topic-x-api.d.ts +31 -0
  95. package/icc-x-api/icc-topic-x-api.js +58 -0
  96. package/icc-x-api/icc-topic-x-api.js.map +1 -1
  97. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IccDeviceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccDeviceApi.ts"],"names":[],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AS,CAAC,EAAE,CAAC,CAAC,CAAC;aACvE,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;IAED;;;;OAIG;IACH,cAAc,CAAC,IAAoB;QACjC,IAAI,KAAK,GAAG,IAAI,CAAA;QAChB,KAAK,GAAG,IAAI,CAAA;QAEZ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,cAAc,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;QACvE,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;QACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;aACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,qBAAS,CAAC,EAAE,CAAC,CAAC,CAAC;aACvE,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AA9TD,oCA8TC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { AbstractFilterDevice } from '../model/AbstractFilterDevice'\nimport { Device } from '../model/Device'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { FilterChainDevice } from '../model/FilterChainDevice'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListDevice } from '../model/PaginatedListDevice'\nimport { TimingInfo } from '../model/TimingInfo'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\n\nexport class IccDeviceApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Name, last name, date of birth, and gender are required. After creation of the device and obtaining the ID, you need to create an initial delegation.\n * @summary Create a device\n * @param body\n */\n async createDevice(body?: Device): Promise<Device> {\n const _url = this.host + `/device` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * One of Name or Last name+First name, Nihii, and Public key are required.\n * @summary Create a device\n * @param body\n * @param groupId\n */\n async createDeviceInGroup(groupId: string, body?: Device): Promise<Device> {\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of created devices\n * @summary Create devices in bulk\n * @param body\n */\n createDevices(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of created devices\n * @summary Create devices in bulk\n * @param body\n */\n createDevices1(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/bulk` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Response contains the id/rev of deleted device.\n * @summary Delete device.\n * @param deviceId\n */\n async deleteDevice(deviceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Response is an array containing the id/rev of deleted devices.\n * @summary Delete devices.\n * @param body\n */\n async deleteDevices(body?: ListOfIds): Promise<Array<DocIdentifier>> {\n const _url = this.host + `/device/delete/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deleting a device. Response is an array containing the id of deleted device.\n * @summary Delete a device\n * @param groupId\n * @param deviceIds\n */\n deleteDevicesInGroup(groupId: string, deviceIds: string): Promise<Array<DocIdentifier>> {\n let _body = null\n\n const _url =\n this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(deviceIds))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of devices along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.\n * @summary Filter devices for the current user (HcParty)\n * @param body\n * @param startDocumentId A device document ID\n * @param limit Number of rows\n * @param collectTiming if true, include server-side filter timing information in the response\n */\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: false): Promise<PaginatedListDevice>\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: true): Promise<PaginatedListDevice & TimingInfo>\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming: boolean = false): Promise<PaginatedListDevice> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/device/filter` +\n '?ts=' +\n new Date().getTime() +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService(), undefined, false, collectTiming ? ['x-filter-timing-*'] : [])\n .then((doc) => Object.assign(new PaginatedListDevice(doc.body as JSON), collectTiming ? { responseHeaders: doc.responseHeaders } : {}))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It gets device administrative data.\n * @summary Get Device\n * @param deviceId\n */\n getDevice(deviceId: string): Promise<Device> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES keys)\n * @summary Get the HcParty encrypted AES keys indexed by owner.\n * @param deviceId\n */\n getDeviceAesExchangeKeysForDelegate(\n deviceId: string\n ): Promise<{ [delegatorId: string]: { [delegatorPubKeyFingerprint: string]: { [delegatePubKeyFingerprint: string]: string } } }> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}/aesExchangeKeys` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It gets device administrative data.\n * @summary Get devices by id\n * @param body\n */\n getDevices(body?: ListOfIds): Promise<Array<Device>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * General information about the device\n * @summary Get devices by their IDs\n * @param body\n * @param groupId\n */\n getDevicesInGroup(groupId: string, body?: ListOfIds): Promise<Array<Device>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get ids of devices matching the provided filter for the current user (HcParty)\n * @param body\n * @param collectTiming add timing information to the response\n */\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: false): Promise<Array<string>>\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: true): Promise<Array<string> & TimingInfo>\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming: boolean = false): Promise<Array<string>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/match` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService(), undefined, false, collectTiming ? ['x-filter-timing-*'] : [])\n .then((doc) => Object.assign((doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))), collectTiming ? { responseHeaders: doc.responseHeaders } : {}))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * No particular return value. It's just a message.\n * @summary Modify a Device.\n * @param body\n * @param groupId\n */\n modifyDeviceInGroup(groupId: string, body?: Device): Promise<Device> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the updated device\n * @summary Modify a device\n * @param body\n */\n updateDevice(body?: Device): Promise<Device> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of modified devices\n * @summary Modify devices in bulk\n * @param body\n */\n updateDevices(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of modified devices\n * @summary Modify devices in bulk\n * @param body\n */\n updateDevices1(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/bulk` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccDeviceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccDeviceApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,4CAAwC;AACxC,0DAAsD;AAEtD,kDAA8C;AAE9C,sEAAkE;AAElE,wFAA8G;AAC9G,qDAAiD;AAEjD,gFAA4E;AAE5E,MAAa,YAAY;IAMvB,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACG,YAAY,CAAC,IAAa;;YAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO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AM,CAAC,OAAO,CAAC,CAAC,mBAAmB,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YAClI,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;YAC1B,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mDAAwB,CAAS,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,eAAM,CAAC,CAAC,CAAC,CAAC,CAAC;iBACnF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAvbD,oCAubC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { AbstractFilterDevice } from '../model/AbstractFilterDevice'\nimport { Device } from '../model/Device'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { FilterChainDevice } from '../model/FilterChainDevice'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListDevice } from '../model/PaginatedListDevice'\nimport { TimingInfo } from '../model/TimingInfo'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'\nimport { ConflictResolutionResult } from '../model/ConflictResolutionResult'\n\nexport class IccDeviceApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this.headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this.headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Name, last name, date of birth, and gender are required. After creation of the device and obtaining the ID, you need to create an initial delegation.\n * @summary Create a device\n * @param body\n */\n async createDevice(body?: Device): Promise<Device> {\n const _url = this.host + `/device` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * One of Name or Last name+First name, Nihii, and Public key are required.\n * @summary Create a device\n * @param body\n * @param groupId\n */\n async createDeviceInGroup(groupId: string, body?: Device): Promise<Device> {\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of created devices\n * @summary Create devices in bulk\n * @param body\n */\n createDevices(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of created devices\n * @summary Create devices in bulk\n * @param body\n */\n createDevices1(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/bulk` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Response contains the id/rev of deleted device.\n * @summary Delete device.\n * @param deviceId\n */\n async deleteDevice(deviceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Response is an array containing the id/rev of deleted devices.\n * @summary Delete devices.\n * @param body\n */\n async deleteDevices(body?: ListOfIds): Promise<Array<DocIdentifier>> {\n const _url = this.host + `/device/delete/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Deleting a device. Response is an array containing the id of deleted device.\n * @summary Delete a device\n * @param groupId\n * @param deviceIds\n */\n deleteDevicesInGroup(groupId: string, deviceIds: string): Promise<Array<DocIdentifier>> {\n let _body = null\n\n const _url =\n this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/${encodeURIComponent(String(deviceIds))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('DELETE', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns a list of devices along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.\n * @summary Filter devices for the current user (HcParty)\n * @param body\n * @param startDocumentId A device document ID\n * @param limit Number of rows\n * @param collectTiming if true, include server-side filter timing information in the response\n */\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: false): Promise<PaginatedListDevice>\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: true): Promise<PaginatedListDevice & TimingInfo>\n filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming: boolean = false): Promise<PaginatedListDevice> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/device/filter` +\n '?ts=' +\n new Date().getTime() +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n _url,\n headers,\n _body,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService(),\n undefined,\n false,\n collectTiming ? ['x-filter-timing-*'] : []\n )\n .then((doc) => Object.assign(new PaginatedListDevice(doc.body as JSON), collectTiming ? { responseHeaders: doc.responseHeaders } : {}))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It gets device administrative data.\n * @summary Get Device\n * @param deviceId\n */\n getDevice(deviceId: string): Promise<Device> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES keys)\n * @summary Get the HcParty encrypted AES keys indexed by owner.\n * @param deviceId\n */\n getDeviceAesExchangeKeysForDelegate(\n deviceId: string\n ): Promise<{ [delegatorId: string]: { [delegatorPubKeyFingerprint: string]: { [delegatePubKeyFingerprint: string]: string } } }> {\n let _body = null\n\n const _url = this.host + `/device/${encodeURIComponent(String(deviceId))}/aesExchangeKeys` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => JSON.parse(JSON.stringify(doc.body)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It gets device administrative data.\n * @summary Get devices by id\n * @param body\n */\n getDevices(body?: ListOfIds): Promise<Array<Device>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * General information about the device\n * @summary Get devices by their IDs\n * @param body\n * @param groupId\n */\n getDevicesInGroup(groupId: string, body?: ListOfIds): Promise<Array<Device>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/byIds` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get ids of devices matching the provided filter for the current user (HcParty)\n * @param body\n * @param collectTiming add timing information to the response\n */\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: false): Promise<Array<string>>\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: true): Promise<Array<string> & TimingInfo>\n matchDevicesBy(body?: AbstractFilterDevice, collectTiming: boolean = false): Promise<Array<string>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/match` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n _url,\n headers,\n _body,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService(),\n undefined,\n false,\n collectTiming ? ['x-filter-timing-*'] : []\n )\n .then((doc) =>\n Object.assign(\n (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))),\n collectTiming ? { responseHeaders: doc.responseHeaders } : {}\n )\n )\n .catch((err) => this.handleError(err))\n }\n\n /**\n * No particular return value. It's just a message.\n * @summary Modify a Device.\n * @param body\n * @param groupId\n */\n modifyDeviceInGroup(groupId: string, body?: Device): Promise<Device> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the updated device\n * @summary Modify a device\n * @param body\n */\n updateDevice(body?: Device): Promise<Device> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Device(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of modified devices\n * @summary Modify devices in bulk\n * @param body\n */\n updateDevices(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/batch` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the id and _rev of modified devices\n * @summary Modify devices in bulk\n * @param body\n */\n updateDevices1(body?: Array<Device>): Promise<Array<IdWithRev>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/device/bulk` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IdWithRev(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves the ids of all the devices that currently have conflicting revisions and therefore need to\n * be resolved.\n * @summary List the ids of the devices that have conflicts.\n * @return the ids of the devices with unresolved conflicts.\n */\n async getConflictingEntitiesIds(): Promise<Array<string>> {\n const _url = this.host + `/device/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves all the conflicting revisions of the device with the given id (the current revision is not\n * included). The returned entities are still encrypted.\n * @summary Get the conflicting revisions of a device.\n * @param entityId the id of the device to retrieve the conflicts for.\n * @return the conflicting revisions of the device.\n */\n async getConflictsForEntity(entityId: string): Promise<Array<Device>> {\n const _url = this.host + `/device/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Resolves a conflict by declaring which revision of the device should be kept as winner and which\n * conflicting revisions should be purged. The provided document must already be encrypted.\n * @summary Declare the winning revision of a conflicting device.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinner(body: ConflictResolutionRequest<Device>): Promise<ConflictResolutionResult<Device>> {\n const _url = this.host + `/device/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Device>(doc.body, (x) => new Device(x)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id.\n * @summary List the ids of the devices that have conflicts, in the given group.\n * @param groupId the id of the group to look into.\n * @return the ids of the devices with unresolved conflicts in the group.\n */\n async getConflictingEntitiesIdsInGroup(groupId: string): Promise<Array<string>> {\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link getConflictsForEntity} but targets the entity of the group with the given id.\n * @summary Get the conflicting revisions of a device, in the given group.\n * @param groupId the id of the group the device belongs to.\n * @param entityId the id of the device to retrieve the conflicts for.\n * @return the conflicting revisions of the device.\n */\n async getConflictsForEntityInGroup(groupId: string, entityId: string): Promise<Array<Device>> {\n const _url =\n this.host +\n `/device/inGroup/${encodeURIComponent(String(groupId))}/conflicts/${encodeURIComponent(String(entityId))}` +\n '?ts=' +\n new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Device(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Like {@link declareConflictWinner} but targets the entity of the group with the given id.\n * @summary Declare the winning revision of a conflicting device, in the given group.\n * @param groupId the id of the group the device belongs to.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Device>): Promise<ConflictResolutionResult<Device>> {\n const _url = this.host + `/device/inGroup/${encodeURIComponent(String(groupId))}/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ConflictResolutionResult<Device>(doc.body, (x) => new Device(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -19,6 +19,8 @@ import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUp
19
19
  import { PaginatedListDocument } from '../model/PaginatedListDocument';
20
20
  import { AbstractFilterDocument } from '../model/AbstractFilterDocument';
21
21
  import { TimingInfo } from '../model/TimingInfo';
22
+ import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest';
23
+ import { ConflictResolutionResult } from '../model/ConflictResolutionResult';
22
24
  export declare class IccDocumentApi {
23
25
  host: string;
24
26
  _headers: Array<XHR.Header>;
@@ -217,4 +219,50 @@ export declare class IccDocumentApi {
217
219
  bulkShareDocument(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Document>[]>;
218
220
  matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: false): Promise<Array<string>>;
219
221
  matchDocumentsBy(body?: AbstractFilterDocument, collectTiming?: true): Promise<Array<string> & TimingInfo>;
222
+ /**
223
+ * Retrieves the ids of all the documents that currently have conflicting revisions and therefore need to
224
+ * be resolved.
225
+ * @summary List the ids of the documents that have conflicts.
226
+ * @return the ids of the documents with unresolved conflicts.
227
+ */
228
+ getConflictingEntitiesIds(): Promise<Array<string>>;
229
+ /**
230
+ * Retrieves all the conflicting revisions of the document with the given id (the current revision is not
231
+ * included). The returned entities are still encrypted.
232
+ * @summary Get the conflicting revisions of a document.
233
+ * @param entityId the id of the document to retrieve the conflicts for.
234
+ * @return the conflicting revisions of the document.
235
+ */
236
+ getConflictsForEntity(entityId: string): Promise<Array<Document>>;
237
+ /**
238
+ * Resolves a conflict by declaring which revision of the document should be kept as winner and which
239
+ * conflicting revisions should be purged. The provided document must already be encrypted.
240
+ * @summary Declare the winning revision of a conflicting document.
241
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
242
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
243
+ */
244
+ declareConflictWinner(body: ConflictResolutionRequest<Document>): Promise<ConflictResolutionResult<Document>>;
245
+ /**
246
+ * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id.
247
+ * @summary List the ids of the documents that have conflicts, in the given group.
248
+ * @param groupId the id of the group to look into.
249
+ * @return the ids of the documents with unresolved conflicts in the group.
250
+ */
251
+ getConflictingEntitiesIdsInGroup(groupId: string): Promise<Array<string>>;
252
+ /**
253
+ * Like {@link getConflictsForEntity} but targets the entity of the group with the given id.
254
+ * @summary Get the conflicting revisions of a document, in the given group.
255
+ * @param groupId the id of the group the document belongs to.
256
+ * @param entityId the id of the document to retrieve the conflicts for.
257
+ * @return the conflicting revisions of the document.
258
+ */
259
+ getConflictsForEntityInGroup(groupId: string, entityId: string): Promise<Array<Document>>;
260
+ /**
261
+ * Like {@link declareConflictWinner} but targets the entity of the group with the given id.
262
+ * @summary Declare the winning revision of a conflicting document, in the given group.
263
+ * @param groupId the id of the group the document belongs to.
264
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
265
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
266
+ */
267
+ declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest<Document>): Promise<ConflictResolutionResult<Document>>;
220
268
  }
@@ -29,6 +29,7 @@ const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationPro
29
29
  const IccRestApiPath_1 = require("./IccRestApiPath");
30
30
  const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
31
31
  const PaginatedListDocument_1 = require("../model/PaginatedListDocument");
32
+ const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
32
33
  class IccDocumentApi {
33
34
  get headers() {
34
35
  return Promise.resolve(this._headers);
@@ -537,6 +538,105 @@ class IccDocumentApi {
537
538
  .catch((err) => this.handleError(err));
538
539
  });
539
540
  }
541
+ /**
542
+ * Retrieves the ids of all the documents that currently have conflicting revisions and therefore need to
543
+ * be resolved.
544
+ * @summary List the ids of the documents that have conflicts.
545
+ * @return the ids of the documents with unresolved conflicts.
546
+ */
547
+ getConflictingEntitiesIds() {
548
+ return __awaiter(this, void 0, void 0, function* () {
549
+ const _url = this.host + `/document/conflicts` + '?ts=' + new Date().getTime();
550
+ let headers = yield this.headers;
551
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
552
+ .then((doc) => doc.body)
553
+ .catch((err) => this.handleError(err));
554
+ });
555
+ }
556
+ /**
557
+ * Retrieves all the conflicting revisions of the document with the given id (the current revision is not
558
+ * included). The returned entities are still encrypted.
559
+ * @summary Get the conflicting revisions of a document.
560
+ * @param entityId the id of the document to retrieve the conflicts for.
561
+ * @return the conflicting revisions of the document.
562
+ */
563
+ getConflictsForEntity(entityId) {
564
+ return __awaiter(this, void 0, void 0, function* () {
565
+ const _url = this.host + `/document/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime();
566
+ let headers = yield this.headers;
567
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
568
+ .then((doc) => doc.body.map((it) => new Document_1.Document(it)))
569
+ .catch((err) => this.handleError(err));
570
+ });
571
+ }
572
+ /**
573
+ * Resolves a conflict by declaring which revision of the document should be kept as winner and which
574
+ * conflicting revisions should be purged. The provided document must already be encrypted.
575
+ * @summary Declare the winning revision of a conflicting document.
576
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
577
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
578
+ */
579
+ declareConflictWinner(body) {
580
+ return __awaiter(this, void 0, void 0, function* () {
581
+ const _url = this.host + `/document/conflicts/winner` + '?ts=' + new Date().getTime();
582
+ let headers = yield this.headers;
583
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
584
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
585
+ .then((doc) => new ConflictResolutionResult_1.ConflictResolutionResult(doc.body, (x) => new Document_1.Document(x)))
586
+ .catch((err) => this.handleError(err));
587
+ });
588
+ }
589
+ /**
590
+ * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id.
591
+ * @summary List the ids of the documents that have conflicts, in the given group.
592
+ * @param groupId the id of the group to look into.
593
+ * @return the ids of the documents with unresolved conflicts in the group.
594
+ */
595
+ getConflictingEntitiesIdsInGroup(groupId) {
596
+ return __awaiter(this, void 0, void 0, function* () {
597
+ const _url = this.host + `/document/inGroup/${encodeURIComponent(String(groupId))}/conflicts` + '?ts=' + new Date().getTime();
598
+ let headers = yield this.headers;
599
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
600
+ .then((doc) => doc.body)
601
+ .catch((err) => this.handleError(err));
602
+ });
603
+ }
604
+ /**
605
+ * Like {@link getConflictsForEntity} but targets the entity of the group with the given id.
606
+ * @summary Get the conflicting revisions of a document, in the given group.
607
+ * @param groupId the id of the group the document belongs to.
608
+ * @param entityId the id of the document to retrieve the conflicts for.
609
+ * @return the conflicting revisions of the document.
610
+ */
611
+ getConflictsForEntityInGroup(groupId, entityId) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ const _url = this.host +
614
+ `/document/inGroup/${encodeURIComponent(String(groupId))}/conflicts/${encodeURIComponent(String(entityId))}` +
615
+ '?ts=' +
616
+ new Date().getTime();
617
+ let headers = yield this.headers;
618
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
619
+ .then((doc) => doc.body.map((it) => new Document_1.Document(it)))
620
+ .catch((err) => this.handleError(err));
621
+ });
622
+ }
623
+ /**
624
+ * Like {@link declareConflictWinner} but targets the entity of the group with the given id.
625
+ * @summary Declare the winning revision of a conflicting document, in the given group.
626
+ * @param groupId the id of the group the document belongs to.
627
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
628
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
629
+ */
630
+ declareConflictWinnerInGroup(groupId, body) {
631
+ return __awaiter(this, void 0, void 0, function* () {
632
+ const _url = this.host + `/document/inGroup/${encodeURIComponent(String(groupId))}/conflicts/winner` + '?ts=' + new Date().getTime();
633
+ let headers = yield this.headers;
634
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
635
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
636
+ .then((doc) => new ConflictResolutionResult_1.ConflictResolutionResult(doc.body, (x) => new Document_1.Document(x)))
637
+ .catch((err) => this.handleError(err));
638
+ });
639
+ }
540
640
  }
541
641
  exports.IccDocumentApi = IccDocumentApi;
542
642
  //# sourceMappingURL=IccDocumentApi.js.map