@icure/api 6.4.2 → 6.4.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 (57) hide show
  1. package/icc-api/api/IccAuthApi.d.ts +19 -0
  2. package/icc-api/api/IccAuthApi.js +46 -1
  3. package/icc-api/api/IccAuthApi.js.map +1 -1
  4. package/icc-api/api/IccBesamv2Api.d.ts +6 -0
  5. package/icc-api/api/IccBesamv2Api.js +13 -0
  6. package/icc-api/api/IccBesamv2Api.js.map +1 -1
  7. package/icc-api/api/IccGroupApi.d.ts +6 -0
  8. package/icc-api/api/IccGroupApi.js +13 -0
  9. package/icc-api/api/IccGroupApi.js.map +1 -1
  10. package/icc-api/index.d.ts +0 -1
  11. package/icc-api/index.js +0 -1
  12. package/icc-api/index.js.map +1 -1
  13. package/icc-api/model/AuthenticationToken.d.ts +1 -0
  14. package/icc-api/model/AuthenticationToken.js.map +1 -1
  15. package/icc-api/model/CalendarItem.d.ts +1 -0
  16. package/icc-api/model/CalendarItem.js.map +1 -1
  17. package/icc-api/model/FlatRateTarification.d.ts +4 -1
  18. package/icc-api/model/FlatRateTarification.js +3 -0
  19. package/icc-api/model/FlatRateTarification.js.map +1 -1
  20. package/icc-api/model/ModelHelper.js +5 -4
  21. package/icc-api/model/ModelHelper.js.map +1 -1
  22. package/icc-api/model/UserGroup.d.ts +1 -0
  23. package/icc-api/model/UserGroup.js.map +1 -1
  24. package/icc-api/model/models.d.ts +2 -2
  25. package/icc-x-api/auth/AuthenticationProvider.d.ts +34 -2
  26. package/icc-x-api/auth/AuthenticationProvider.js +28 -6
  27. package/icc-x-api/auth/AuthenticationProvider.js.map +1 -1
  28. package/icc-x-api/auth/EnsembleAuthService.d.ts +6 -2
  29. package/icc-x-api/auth/EnsembleAuthService.js +9 -0
  30. package/icc-x-api/auth/EnsembleAuthService.js.map +1 -1
  31. package/icc-x-api/auth/JwtAuthService.d.ts +6 -5
  32. package/icc-x-api/auth/JwtAuthService.js +11 -23
  33. package/icc-x-api/auth/JwtAuthService.js.map +1 -1
  34. package/icc-x-api/auth/JwtBridgedAuthService.d.ts +26 -0
  35. package/icc-x-api/auth/JwtBridgedAuthService.js +129 -0
  36. package/icc-x-api/auth/JwtBridgedAuthService.js.map +1 -0
  37. package/icc-x-api/crypto/AES.js +3 -3
  38. package/icc-x-api/crypto/AES.js.map +1 -1
  39. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.d.ts +1 -0
  40. package/icc-x-api/filters/ServiceByHcPartyTagCodeDateFilter.js.map +1 -1
  41. package/icc-x-api/filters/filters.d.ts +1 -1
  42. package/icc-x-api/icc-bekmehr-x-api.d.ts +1 -1
  43. package/icc-x-api/icc-crypto-x-api.d.ts +4 -6
  44. package/icc-x-api/icc-crypto-x-api.js +74 -75
  45. package/icc-x-api/icc-crypto-x-api.js.map +1 -1
  46. package/icc-x-api/icc-maintenance-task-x-api.js +1 -1
  47. package/icc-x-api/icc-maintenance-task-x-api.js.map +1 -1
  48. package/icc-x-api/index.d.ts +7 -2
  49. package/icc-x-api/index.js +6 -4
  50. package/icc-x-api/index.js.map +1 -1
  51. package/icc-x-api/utils/asn1-packer.d.ts +1 -1
  52. package/icc-x-api/utils/asn1-parser.d.ts +1 -1
  53. package/icc-x-api/utils/net-utils.d.ts +2 -2
  54. package/package.json +1 -1
  55. package/icc-api/api/IccBemikronoApi.d.ts +0 -81
  56. package/icc-api/api/IccBemikronoApi.js +0 -162
  57. package/icc-api/api/IccBemikronoApi.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"IccGroupApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccGroupApi.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,0CAAsC;AACtC,oEAAgE;AAChE,sEAAkE;AAClE,kDAA8C;AAG9C,oEAAgE;AAEhE,sEAAkE;AAClE,8DAA0D;AAC1D,wCAAoC;AACpC,wFAA8G;AAE9G,MAAa,WAA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AAG,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;AAtXD,kCAsXC","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 { DatabaseInitialisation } from '../model/DatabaseInitialisation'\nimport { Group } from '../model/Group'\nimport { GroupDatabasesInfo } from '../model/GroupDatabasesInfo'\nimport { GroupDeletionReport } from '../model/GroupDeletionReport'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { ListOfProperties } from '../model/ListOfProperties'\nimport { PaginatedListGroup } from '../model/PaginatedListGroup'\nimport { RegistrationInformation } from '../model/RegistrationInformation'\nimport { RegistrationSuccess } from '../model/RegistrationSuccess'\nimport { ReplicationInfo } from '../model/ReplicationInfo'\nimport { Unit } from '../model/Unit'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\n\nexport class IccGroupApi {\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 = 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 * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation\n * @summary Create a group\n * @param body\n * @param id The id of the group, also used for subsequent authentication against the db (can only contain digits, letters, - and _)\n * @param name The name of the group\n * @param type The type of the group.\n * @param password The password of the group (can only contain digits, letters, - and _)\n * @param server The server on which the group dbs will be created\n * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value\n * @param n The number of replications for dbs : 3 is a recommended value\n * @param superGroup Group parent\n */\n createGroup(\n id: string,\n name: string,\n password: string,\n server?: string,\n q?: number,\n n?: number,\n superGroup?: string,\n type?: string,\n body?: DatabaseInitialisation\n ): Promise<Group> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}` +\n '?ts=' +\n new Date().getTime() +\n (name ? '&name=' + encodeURIComponent(String(name)) : '') +\n (type ? '&type=' + encodeURIComponent(String(type)) : '') +\n (server ? '&server=' + encodeURIComponent(String(server)) : '') +\n (q ? '&q=' + encodeURIComponent(String(q)) : '') +\n (n ? '&n=' + encodeURIComponent(String(n)) : '') +\n (superGroup ? '&superGroup=' + encodeURIComponent(String(superGroup)) : '')\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n password && (headers = headers.concat(new XHR.Header('password', password)))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Delete group without reset or deleteing storage\n * @summary Delete group\n * @param id The id of group to delete\n */\n deleteGroup(id: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List groups that are the children of the group with the provided parent id\n * @summary Find groups by parent\n * @param id The id of the group\n * @param startDocumentId A group document ID used as a cursor for pagination\n * @param limit Number of rows\n */\n findGroups(id: string, startDocumentId?: string, limit?: number): Promise<PaginatedListGroup> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/children` +\n '?ts=' +\n new Date().getTime() +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListGroup(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List groups that are the children of the group with the provided parent id and that match the provided search string\n * @summary Find groups by parent and content\n * @param id The id of the group\n * @param searchString The string to search for in the group. Properties, name and id are scanned for the provided search string.\n * @param startKey The start key for pagination, depends on the filters used\n * @param startDocumentId A group document ID used as a cursor for pagination\n * @param limit Number of rows\n */\n findGroupsWithContent(id: string, searchString: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListGroup> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/children/search` +\n '?ts=' +\n new Date().getTime() +\n (searchString ? '&searchString=' + encodeURIComponent(String(searchString)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListGroup(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get a group by id\n * @summary Get a group by id\n * @param id The id of the group\n */\n getGroup(id: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Reset storage\n * @summary Reset storage for group\n * @param body\n */\n getGroupsStorageInfos(body?: ListOfIds): Promise<Array<GroupDatabasesInfo>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/group/storage/info` + '?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 GroupDatabasesInfo(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get index info\n * @param id The id of the group\n */\n getReplicationInfo1(id: string): Promise<ReplicationInfo> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/r` + '?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 ReplicationInfo(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Hard deletes the provided group from CouchDB. This operation can only be done by an admin user\n * @summary Hard delete group\n * @param id The id of group to delete\n */\n hardDeleteGroup(id: string): Promise<Array<GroupDeletionReport>> {\n let _body = null\n\n const _url = this.host + `/group/hard/${encodeURIComponent(String(id))}` + '?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 GroupDeletionReport(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Init design docs for provided group\n * @summary Init design docs\n * @param id The id of the group\n * @param clazz The class of the design doc\n * @param warmup Warmup the design doc\n */\n initDesignDocs(id: string, clazz?: string, warmup?: boolean): Promise<Unit> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/dd` +\n '?ts=' +\n new Date().getTime() +\n (clazz ? '&clazz=' + encodeURIComponent(String(clazz)) : '') +\n (warmup ? '&warmup=' + encodeURIComponent(String(warmup)) : '')\n let headers = this.headers\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Unit(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List available apps for user\n * @summary List apps\n */\n listApps(): Promise<Array<Group>> {\n let _body = null\n\n const _url = this.host + `/group/apps` + '?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) => (doc.body as Array<JSON>).map((it) => new Group(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List existing groups\n * @summary List groups\n */\n listGroups(): Promise<Array<Group>> {\n let _body = null\n\n const _url = this.host + `/group` + '?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) => (doc.body as Array<JSON>).map((it) => new Group(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update existing group name\n * @summary Update group name\n * @param id The id of the group\n * @param name The new name for the group\n */\n modifyGroupName(id: string, name: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/name/${encodeURIComponent(String(name))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update existing group properties\n * @summary Update group properties\n * @param body\n * @param id The id of the group\n */\n modifyGroupProperties(id: string, body?: ListOfProperties): Promise<Group> {\n let _body = null\n _body = body\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/properties` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation\n * @summary Create a group\n * @param body\n * @param type The tyoe of the group (default: root)\n * @param role The role of the user (default: admin)\n */\n registerNewGroupAdministrator(type?: string, role?: string, body?: RegistrationInformation): Promise<RegistrationSuccess> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/register/trial` +\n '?ts=' +\n new Date().getTime() +\n (type ? '&type=' + encodeURIComponent(String(type)) : '') +\n (role ? '&role=' + encodeURIComponent(String(role)) : '')\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 RegistrationSuccess(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Reset storage\n * @summary Reset storage for group\n * @param body\n * @param id The id of the group\n * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value\n * @param n The number of replications for dbs : 3 is a recommended value\n */\n resetStorage(id: string, q?: number, n?: number, body?: ListOfIds): Promise<Unit> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/reset/storage` +\n '?ts=' +\n new Date().getTime() +\n (q ? '&q=' + encodeURIComponent(String(q)) : '') +\n (n ? '&n=' + encodeURIComponent(String(n)) : '')\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 Unit(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update password for provided group\n * @summary Set group password\n * @param id The id of the group\n * @param password The new password for the group (can only contain digits, letters, - and _)\n */\n setGroupPassword(id: string, password: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/password` + '?ts=' + new Date().getTime()\n let headers = this.headers\n password && (headers = headers.concat(new XHR.Header('password', password)))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Solve conflicts for group\n * @summary Solve conflicts for group\n * @param id The id of the group\n * @param limit Solve at most limit conflicts\n * @param warmup Warmup the design doc\n */\n solveConflicts(id: string, limit?: number, warmup?: boolean): Promise<Array<IdWithRev>> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/conflicts` +\n '?ts=' +\n new Date().getTime() +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (warmup ? '&warmup=' + encodeURIComponent(String(warmup)) : '')\n let headers = this.headers\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"]}
1
+ {"version":3,"file":"IccGroupApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccGroupApi.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAE3B,0CAAsC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C;IAED;;;;;;OAMG;IACH,cAAc,CAAC,EAAU,EAAE,KAAc,EAAE,MAAgB;QACzD,IAAI,KAAK,GAAG,IAAI,CAAA;QAEhB,MAAM,IAAI,GACR,IAAI,CAAC,IAAI;YACT,UAAU,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,YAAY;YACpD,MAAM;YACN,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;YACpB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;QACjE,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAC1B,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;aAC1H,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;AArYD,kCAqYC","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 { DatabaseInitialisation } from '../model/DatabaseInitialisation'\nimport { Group } from '../model/Group'\nimport { GroupDatabasesInfo } from '../model/GroupDatabasesInfo'\nimport { GroupDeletionReport } from '../model/GroupDeletionReport'\nimport { IdWithRev } from '../model/IdWithRev'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { ListOfProperties } from '../model/ListOfProperties'\nimport { PaginatedListGroup } from '../model/PaginatedListGroup'\nimport { RegistrationInformation } from '../model/RegistrationInformation'\nimport { RegistrationSuccess } from '../model/RegistrationSuccess'\nimport { ReplicationInfo } from '../model/ReplicationInfo'\nimport { Unit } from '../model/Unit'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\n\nexport class IccGroupApi {\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 = 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 * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation\n * @summary Create a group\n * @param body\n * @param id The id of the group, also used for subsequent authentication against the db (can only contain digits, letters, - and _)\n * @param name The name of the group\n * @param type The type of the group.\n * @param password The password of the group (can only contain digits, letters, - and _)\n * @param server The server on which the group dbs will be created\n * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value\n * @param n The number of replications for dbs : 3 is a recommended value\n * @param superGroup Group parent\n */\n createGroup(\n id: string,\n name: string,\n password: string,\n server?: string,\n q?: number,\n n?: number,\n superGroup?: string,\n type?: string,\n body?: DatabaseInitialisation\n ): Promise<Group> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}` +\n '?ts=' +\n new Date().getTime() +\n (name ? '&name=' + encodeURIComponent(String(name)) : '') +\n (type ? '&type=' + encodeURIComponent(String(type)) : '') +\n (server ? '&server=' + encodeURIComponent(String(server)) : '') +\n (q ? '&q=' + encodeURIComponent(String(q)) : '') +\n (n ? '&n=' + encodeURIComponent(String(n)) : '') +\n (superGroup ? '&superGroup=' + encodeURIComponent(String(superGroup)) : '')\n let headers = this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n password && (headers = headers.concat(new XHR.Header('password', password)))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Delete group without reset or deleteing storage\n * @summary Delete group\n * @param id The id of group to delete\n */\n deleteGroup(id: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List groups that are the children of the group with the provided parent id\n * @summary Find groups by parent\n * @param id The id of the group\n * @param startDocumentId A group document ID used as a cursor for pagination\n * @param limit Number of rows\n */\n findGroups(id: string, startDocumentId?: string, limit?: number): Promise<PaginatedListGroup> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/children` +\n '?ts=' +\n new Date().getTime() +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListGroup(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List groups that are the children of the group with the provided parent id and that match the provided search string\n * @summary Find groups by parent and content\n * @param id The id of the group\n * @param searchString The string to search for in the group. Properties, name and id are scanned for the provided search string.\n * @param startKey The start key for pagination, depends on the filters used\n * @param startDocumentId A group document ID used as a cursor for pagination\n * @param limit Number of rows\n */\n findGroupsWithContent(id: string, searchString: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListGroup> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/children/search` +\n '?ts=' +\n new Date().getTime() +\n (searchString ? '&searchString=' + encodeURIComponent(String(searchString)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListGroup(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get the name of the parent of the group identified by id\n * @summary Get a parent group name by id of the child\n * @param id The id of the child group\n */\n getNameOfParentGroup(id: string): Promise<string> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/parent/name` + '?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) => doc.body as string)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Get a group by id\n * @summary Get a group by id\n * @param id The id of the group\n */\n getGroup(id: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Reset storage\n * @summary Reset storage for group\n * @param body\n */\n getGroupsStorageInfos(body?: ListOfIds): Promise<Array<GroupDatabasesInfo>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/group/storage/info` + '?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 GroupDatabasesInfo(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get index info\n * @param id The id of the group\n */\n getReplicationInfo1(id: string): Promise<ReplicationInfo> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/r` + '?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 ReplicationInfo(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Hard deletes the provided group from CouchDB. This operation can only be done by an admin user\n * @summary Hard delete group\n * @param id The id of group to delete\n */\n hardDeleteGroup(id: string): Promise<Array<GroupDeletionReport>> {\n let _body = null\n\n const _url = this.host + `/group/hard/${encodeURIComponent(String(id))}` + '?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 GroupDeletionReport(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Init design docs for provided group\n * @summary Init design docs\n * @param id The id of the group\n * @param clazz The class of the design doc\n * @param warmup Warmup the design doc\n */\n initDesignDocs(id: string, clazz?: string, warmup?: boolean): Promise<Unit> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/dd` +\n '?ts=' +\n new Date().getTime() +\n (clazz ? '&clazz=' + encodeURIComponent(String(clazz)) : '') +\n (warmup ? '&warmup=' + encodeURIComponent(String(warmup)) : '')\n let headers = this.headers\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Unit(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List available apps for user\n * @summary List apps\n */\n listApps(): Promise<Array<Group>> {\n let _body = null\n\n const _url = this.host + `/group/apps` + '?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) => (doc.body as Array<JSON>).map((it) => new Group(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * List existing groups\n * @summary List groups\n */\n listGroups(): Promise<Array<Group>> {\n let _body = null\n\n const _url = this.host + `/group` + '?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) => (doc.body as Array<JSON>).map((it) => new Group(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update existing group name\n * @summary Update group name\n * @param id The id of the group\n * @param name The new name for the group\n */\n modifyGroupName(id: string, name: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/name/${encodeURIComponent(String(name))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update existing group properties\n * @summary Update group properties\n * @param body\n * @param id The id of the group\n */\n modifyGroupProperties(id: string, body?: ListOfProperties): Promise<Group> {\n let _body = null\n _body = body\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/properties` + '?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 Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Create a new group and associated dbs. The created group will be manageable by the users that belong to the same group as the one that called createGroup. Several tasks can be executed during the group creation like DB replications towards the created DBs, users creation and healthcare parties creation\n * @summary Create a group\n * @param body\n * @param type The tyoe of the group (default: root)\n * @param role The role of the user (default: admin)\n */\n registerNewGroupAdministrator(type?: string, role?: string, body?: RegistrationInformation): Promise<RegistrationSuccess> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/register/trial` +\n '?ts=' +\n new Date().getTime() +\n (type ? '&type=' + encodeURIComponent(String(type)) : '') +\n (role ? '&role=' + encodeURIComponent(String(role)) : '')\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 RegistrationSuccess(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Reset storage\n * @summary Reset storage for group\n * @param body\n * @param id The id of the group\n * @param q The number of shards for patient and healthdata dbs : 3-8 is a recommended range of value\n * @param n The number of replications for dbs : 3 is a recommended value\n */\n resetStorage(id: string, q?: number, n?: number, body?: ListOfIds): Promise<Unit> {\n let _body = null\n _body = body\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/reset/storage` +\n '?ts=' +\n new Date().getTime() +\n (q ? '&q=' + encodeURIComponent(String(q)) : '') +\n (n ? '&n=' + encodeURIComponent(String(n)) : '')\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 Unit(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Update password for provided group\n * @summary Set group password\n * @param id The id of the group\n * @param password The new password for the group (can only contain digits, letters, - and _)\n */\n setGroupPassword(id: string, password: string): Promise<Group> {\n let _body = null\n\n const _url = this.host + `/group/${encodeURIComponent(String(id))}/password` + '?ts=' + new Date().getTime()\n let headers = this.headers\n password && (headers = headers.concat(new XHR.Header('password', password)))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Group(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Solve conflicts for group\n * @summary Solve conflicts for group\n * @param id The id of the group\n * @param limit Solve at most limit conflicts\n * @param warmup Warmup the design doc\n */\n solveConflicts(id: string, limit?: number, warmup?: boolean): Promise<Array<IdWithRev>> {\n let _body = null\n\n const _url =\n this.host +\n `/group/${encodeURIComponent(String(id))}/conflicts` +\n '?ts=' +\n new Date().getTime() +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (warmup ? '&warmup=' + encodeURIComponent(String(warmup)) : '')\n let headers = this.headers\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"]}
@@ -6,7 +6,6 @@ export * from './api/IccArticleApi';
6
6
  export * from './api/IccAuthApi';
7
7
  export * from './api/IccBeefactApi';
8
8
  export * from './api/IccBekmehrApi';
9
- export * from './api/IccBemikronoApi';
10
9
  export * from './api/IccBeresultexportApi';
11
10
  export * from './api/IccBeresultimportApi';
12
11
  export * from './api/IccBesamv2Api';
package/icc-api/index.js CHANGED
@@ -22,7 +22,6 @@ __exportStar(require("./api/IccArticleApi"), exports);
22
22
  __exportStar(require("./api/IccAuthApi"), exports);
23
23
  __exportStar(require("./api/IccBeefactApi"), exports);
24
24
  __exportStar(require("./api/IccBekmehrApi"), exports);
25
- __exportStar(require("./api/IccBemikronoApi"), exports);
26
25
  __exportStar(require("./api/IccBeresultexportApi"), exports);
27
26
  __exportStar(require("./api/IccBeresultimportApi"), exports);
28
27
  __exportStar(require("./api/IccBesamv2Api"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,qDAAkC;AAClC,8DAA2C;AAC3C,kEAA+C;AAC/C,sDAAmC;AACnC,mDAAgC;AAChC,sDAAmC;AACnC,sDAAmC;AACnC,wDAAqC;AACrC,6DAA0C;AAC1C,6DAA0C;AAC1C,sDAAmC;AACnC,2DAAwC;AACxC,+DAA4C;AAC5C,6DAA0C;AAC1C,qEAAkD;AAClD,mDAAgC;AAChC,sDAAmC;AACnC,qDAAkC;AAClC,0DAAuC;AACvC,uDAAoC;AACpC,wDAAqC;AACrC,6DAA0C;AAC1C,mDAAgC;AAChC,gEAA6C;AAC7C,oDAAiC;AACjC,sDAAmC;AACnC,uDAAoC;AACpC,oDAAiC;AACjC,wDAAqC;AACrC,sDAAmC;AACnC,sDAAmC;AACnC,oDAAiC;AACjC,8DAA2C;AAC3C,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,oDAAiC;AACjC,qDAAkC;AAClC,sDAAmC;AACnC,0DAAuC;AACvC,2DAAwC;AACxC,wDAAqC;AACrC,kDAA+B;AAC/B,mDAAgC","sourcesContent":["export * from './api/IccAccesslogApi'\nexport * from './api/IccAgendaApi'\nexport * from './api/IccAnonymousAccessApi'\nexport * from './api/IccApplicationsettingsApi'\nexport * from './api/IccArticleApi'\nexport * from './api/IccAuthApi'\nexport * from './api/IccBeefactApi'\nexport * from './api/IccBekmehrApi'\nexport * from './api/IccBemikronoApi'\nexport * from './api/IccBeresultexportApi'\nexport * from './api/IccBeresultimportApi'\nexport * from './api/IccBesamv2Api'\nexport * from './api/IccCalendarItemApi'\nexport * from './api/IccCalendarItemTypeApi'\nexport * from './api/IccClassificationApi'\nexport * from './api/IccClassificationTemplateApi'\nexport * from './api/IccCodeApi'\nexport * from './api/IccContactApi'\nexport * from './api/IccDeviceApi'\nexport * from './api/IccDoctemplateApi'\nexport * from './api/IccDocumentApi'\nexport * from './api/IccEntityrefApi'\nexport * from './api/IccEntitytemplateApi'\nexport * from './api/IccFormApi'\nexport * from './api/IccFrontendmigrationApi'\nexport * from './api/IccGroupApi'\nexport * from './api/IccHcpartyApi'\nexport * from './api/IccHelementApi'\nexport * from './api/IccIcureApi'\nexport * from './api/IccInsuranceApi'\nexport * from './api/IccInvoiceApi'\nexport * from './api/IccKeywordApi'\nexport * from './api/IccMedexApi'\nexport * from './api/IccMedicallocationApi'\nexport * from './api/IccMessageApi'\nexport * from './api/IccPatientApi'\nexport * from './api/IccPermissionApi'\nexport * from './api/IccPlaceApi'\nexport * from './api/IccPubsubApi'\nexport * from './api/IccReceiptApi'\nexport * from './api/IccReplicationApi'\nexport * from './api/IccTarificationApi'\nexport * from './api/IccTimeTableApi'\nexport * from './api/IccTmpApi'\nexport * from './api/IccUserApi'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../icc-api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,qDAAkC;AAClC,8DAA2C;AAC3C,kEAA+C;AAC/C,sDAAmC;AACnC,mDAAgC;AAChC,sDAAmC;AACnC,sDAAmC;AACnC,6DAA0C;AAC1C,6DAA0C;AAC1C,sDAAmC;AACnC,2DAAwC;AACxC,+DAA4C;AAC5C,6DAA0C;AAC1C,qEAAkD;AAClD,mDAAgC;AAChC,sDAAmC;AACnC,qDAAkC;AAClC,0DAAuC;AACvC,uDAAoC;AACpC,wDAAqC;AACrC,6DAA0C;AAC1C,mDAAgC;AAChC,gEAA6C;AAC7C,oDAAiC;AACjC,sDAAmC;AACnC,uDAAoC;AACpC,oDAAiC;AACjC,wDAAqC;AACrC,sDAAmC;AACnC,sDAAmC;AACnC,oDAAiC;AACjC,8DAA2C;AAC3C,sDAAmC;AACnC,sDAAmC;AACnC,yDAAsC;AACtC,oDAAiC;AACjC,qDAAkC;AAClC,sDAAmC;AACnC,0DAAuC;AACvC,2DAAwC;AACxC,wDAAqC;AACrC,kDAA+B;AAC/B,mDAAgC","sourcesContent":["export * from './api/IccAccesslogApi'\nexport * from './api/IccAgendaApi'\nexport * from './api/IccAnonymousAccessApi'\nexport * from './api/IccApplicationsettingsApi'\nexport * from './api/IccArticleApi'\nexport * from './api/IccAuthApi'\nexport * from './api/IccBeefactApi'\nexport * from './api/IccBekmehrApi'\nexport * from './api/IccBeresultexportApi'\nexport * from './api/IccBeresultimportApi'\nexport * from './api/IccBesamv2Api'\nexport * from './api/IccCalendarItemApi'\nexport * from './api/IccCalendarItemTypeApi'\nexport * from './api/IccClassificationApi'\nexport * from './api/IccClassificationTemplateApi'\nexport * from './api/IccCodeApi'\nexport * from './api/IccContactApi'\nexport * from './api/IccDeviceApi'\nexport * from './api/IccDoctemplateApi'\nexport * from './api/IccDocumentApi'\nexport * from './api/IccEntityrefApi'\nexport * from './api/IccEntitytemplateApi'\nexport * from './api/IccFormApi'\nexport * from './api/IccFrontendmigrationApi'\nexport * from './api/IccGroupApi'\nexport * from './api/IccHcpartyApi'\nexport * from './api/IccHelementApi'\nexport * from './api/IccIcureApi'\nexport * from './api/IccInsuranceApi'\nexport * from './api/IccInvoiceApi'\nexport * from './api/IccKeywordApi'\nexport * from './api/IccMedexApi'\nexport * from './api/IccMedicallocationApi'\nexport * from './api/IccMessageApi'\nexport * from './api/IccPatientApi'\nexport * from './api/IccPermissionApi'\nexport * from './api/IccPlaceApi'\nexport * from './api/IccPubsubApi'\nexport * from './api/IccReceiptApi'\nexport * from './api/IccReplicationApi'\nexport * from './api/IccTarificationApi'\nexport * from './api/IccTimeTableApi'\nexport * from './api/IccTmpApi'\nexport * from './api/IccUserApi'\n"]}
@@ -26,4 +26,5 @@ export declare class AuthenticationToken {
26
26
  * Token validity in seconds
27
27
  */
28
28
  validity?: number;
29
+ deletionDate?: number;
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationToken.js","sourceRoot":"","sources":["../../../icc-api/model/AuthenticationToken.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH;;GAEG;AACH,MAAa,mBAAmB;IAC9B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA2B,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;CAcF;AAjBD,kDAiBC","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 */\n\n/**\n * Encrypted and time-limited Authentication tokens used for inter-applications authentication\n */\nexport class AuthenticationToken {\n constructor(json: JSON | any) {\n Object.assign(this as AuthenticationToken, json)\n }\n\n /**\n * Encrypted token\n */\n token?: string\n /**\n * Validity starting time of the token\n */\n creationTime?: number\n /**\n * Token validity in seconds\n */\n validity?: number\n}\n"]}
1
+ {"version":3,"file":"AuthenticationToken.js","sourceRoot":"","sources":["../../../icc-api/model/AuthenticationToken.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH;;GAEG;AACH,MAAa,mBAAmB;IAC9B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA2B,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;CAgBF;AAnBD,kDAmBC","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 */\n\n/**\n * Encrypted and time-limited Authentication tokens used for inter-applications authentication\n */\nexport class AuthenticationToken {\n constructor(json: JSON | any) {\n Object.assign(this as AuthenticationToken, json)\n }\n\n /**\n * Encrypted token\n */\n token?: string\n /**\n * Validity starting time of the token\n */\n creationTime?: number\n /**\n * Token validity in seconds\n */\n validity?: number\n\n deletionDate?: number\n}\n"]}
@@ -67,6 +67,7 @@ export declare class CalendarItem {
67
67
  startTime?: number;
68
68
  endTime?: number;
69
69
  confirmationTime?: number;
70
+ cancellationTimestamp?: number;
70
71
  confirmationId?: string;
71
72
  duration?: number;
72
73
  allDay?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarItem.js","sourceRoot":"","sources":["../../../icc-api/model/CalendarItem.ts"],"names":[],"mappings":";;;AAiBA,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CAkFF;AArFD,oCAqFC","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 { Address } from './Address'\nimport { CalendarItemTag } from './CalendarItemTag'\nimport { CodeStub } from './CodeStub'\nimport { Delegation } from './Delegation'\nimport { FlowItem } from './FlowItem'\n\nexport class CalendarItem {\n constructor(json: JSON | any) {\n Object.assign(this as CalendarItem, json)\n }\n\n id?: string\n rev?: string\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: number\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n title?: string\n calendarItemTypeId?: string\n masterCalendarItemId?: string\n patientId?: string\n important?: boolean\n homeVisit?: boolean\n phoneNumber?: string\n placeId?: string\n address?: Address\n addressText?: string\n startTime?: number\n endTime?: number\n confirmationTime?: number\n confirmationId?: string\n duration?: number\n allDay?: boolean\n details?: string\n wasMigrated?: boolean\n agendaId?: string\n recurrenceId?: string\n meetingTags?: Array<CalendarItemTag>\n flowItem?: FlowItem\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n}\n"]}
1
+ {"version":3,"file":"CalendarItem.js","sourceRoot":"","sources":["../../../icc-api/model/CalendarItem.ts"],"names":[],"mappings":";;;AAiBA,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CAmFF;AAtFD,oCAsFC","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 { Address } from './Address'\nimport { CalendarItemTag } from './CalendarItemTag'\nimport { CodeStub } from './CodeStub'\nimport { Delegation } from './Delegation'\nimport { FlowItem } from './FlowItem'\n\nexport class CalendarItem {\n constructor(json: JSON | any) {\n Object.assign(this as CalendarItem, json)\n }\n\n id?: string\n rev?: string\n /**\n * The timestamp (unix epoch in ms) of creation of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n created?: number\n /**\n * The date (unix epoch in ms) of the latest modification of this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n modified?: number\n /**\n * The id of the User that has created this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n author?: string\n /**\n * The id of the HealthcareParty that is responsible for this entity, will be filled automatically if missing. Not enforced by the application server.\n */\n responsible?: string\n /**\n * The id of the medical location where this entity was created.\n */\n medicalLocationId?: string\n /**\n * A tag is an item from a codification system that qualifies an entity as being member of a certain class, whatever the value it might have taken. If the tag qualifies the content of a field, it means that whatever the content of the field, the tag will always apply. For example, the label of a field is qualified using a tag. LOINC is a codification system typically used for tags.\n */\n tags?: Array<CodeStub>\n /**\n * A code is an item from a codification system that qualifies the content of this entity. SNOMED-CT, ICPC-2 or ICD-10 codifications systems can be used for codes\n */\n codes?: Array<CodeStub>\n /**\n * Soft delete (unix epoch in ms) timestamp of the object.\n */\n endOfLife?: number\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n title?: string\n calendarItemTypeId?: string\n masterCalendarItemId?: string\n patientId?: string\n important?: boolean\n homeVisit?: boolean\n phoneNumber?: string\n placeId?: string\n address?: Address\n addressText?: string\n startTime?: number\n endTime?: number\n confirmationTime?: number\n cancellationTimestamp?: number\n confirmationId?: string\n duration?: number\n allDay?: boolean\n details?: string\n wasMigrated?: boolean\n agendaId?: string\n recurrenceId?: string\n meetingTags?: Array<CalendarItemTag>\n flowItem?: FlowItem\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find all contacts for a specific patient. These keys are in clear. You can have several to partition the medical document space.\n */\n secretForeignKeys?: Array<string>\n /**\n * The secretForeignKeys are filled at the to many end of a one to many relationship (for example inside Contact for the Patient -> Contacts relationship). Used when we want to find the patient for a specific contact. These keys are the encrypted id (using the hcParty key for the delegate) that can be found in clear inside the patient. ids encrypted using the hcParty keys.\n */\n cryptedForeignKeys?: { [key: string]: Array<Delegation> }\n /**\n * When a document is created, the responsible generates a cryptographically random master key (never to be used for something else than referencing from other entities). He/she encrypts it using his own AES exchange key and stores it as a delegation. The responsible is thus always in the delegations as well\n */\n delegations?: { [key: string]: Array<Delegation> }\n /**\n * When a document needs to be encrypted, the responsible generates a cryptographically random master key (different from the delegation key, never to appear in clear anywhere in the db. He/she encrypts it using his own AES exchange key and stores it as a delegation\n */\n encryptionKeys?: { [key: string]: Array<Delegation> }\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n}\n"]}
@@ -24,11 +24,14 @@ export declare class FlatRateTarification {
24
24
  encryptedSelf?: string;
25
25
  }
26
26
  export declare namespace FlatRateTarification {
27
- type FlatRateTypeEnum = 'physician' | 'physiotherapist' | 'nurse' | 'ptd';
27
+ type FlatRateTypeEnum = 'physician' | 'physiotherapist' | 'nurse' | 'ptd' | 'ivgFlatRate1' | 'ivgFlatRate2' | 'ivgPersonalIntervention';
28
28
  const FlatRateTypeEnum: {
29
29
  Physician: FlatRateTypeEnum;
30
30
  Physiotherapist: FlatRateTypeEnum;
31
31
  Nurse: FlatRateTypeEnum;
32
32
  Ptd: FlatRateTypeEnum;
33
+ IvgFlatRate1: FlatRateTypeEnum;
34
+ IvgFlatRate2: FlatRateTypeEnum;
35
+ IvgPersonalIntervention: FlatRateTypeEnum;
33
36
  };
34
37
  }
@@ -13,6 +13,9 @@ exports.FlatRateTarification = FlatRateTarification;
13
13
  Physiotherapist: 'physiotherapist',
14
14
  Nurse: 'nurse',
15
15
  Ptd: 'ptd',
16
+ IvgFlatRate1: 'ivgFlatRate1',
17
+ IvgFlatRate2: 'ivgFlatRate2',
18
+ IvgPersonalIntervention: 'ivgPersonalIntervention',
16
19
  };
17
20
  })(FlatRateTarification = exports.FlatRateTarification || (exports.FlatRateTarification = {}));
18
21
  //# sourceMappingURL=FlatRateTarification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlatRateTarification.js","sourceRoot":"","sources":["../../../icc-api/model/FlatRateTarification.ts"],"names":[],"mappings":";;;AAaA,MAAa,oBAAoB;IAC/B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA4B,EAAE,IAAI,CAAC,CAAA;IACnD,CAAC;CAUF;AAbD,oDAaC;AACD,WAAiB,oBAAoB;IAEtB,qCAAgB,GAAG;QAC9B,SAAS,EAAE,WAA+B;QAC1C,eAAe,EAAE,iBAAqC;QACtD,KAAK,EAAE,OAA2B;QAClC,GAAG,EAAE,KAAyB;KAC/B,CAAA;AACH,CAAC,EARgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAQpC","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 { Valorisation } from './Valorisation'\n\nexport class FlatRateTarification {\n constructor(json: JSON | any) {\n Object.assign(this as FlatRateTarification, json)\n }\n\n code?: string\n flatRateType?: FlatRateTarification.FlatRateTypeEnum\n label?: { [key: string]: string }\n valorisations?: Array<Valorisation>\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n}\nexport namespace FlatRateTarification {\n export type FlatRateTypeEnum = 'physician' | 'physiotherapist' | 'nurse' | 'ptd'\n export const FlatRateTypeEnum = {\n Physician: 'physician' as FlatRateTypeEnum,\n Physiotherapist: 'physiotherapist' as FlatRateTypeEnum,\n Nurse: 'nurse' as FlatRateTypeEnum,\n Ptd: 'ptd' as FlatRateTypeEnum,\n }\n}\n"]}
1
+ {"version":3,"file":"FlatRateTarification.js","sourceRoot":"","sources":["../../../icc-api/model/FlatRateTarification.ts"],"names":[],"mappings":";;;AAaA,MAAa,oBAAoB;IAC/B,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA4B,EAAE,IAAI,CAAC,CAAA;IACnD,CAAC;CAUF;AAbD,oDAaC;AACD,WAAiB,oBAAoB;IAEtB,qCAAgB,GAAG;QAC9B,SAAS,EAAE,WAA+B;QAC1C,eAAe,EAAE,iBAAqC;QACtD,KAAK,EAAE,OAA2B;QAClC,GAAG,EAAE,KAAyB;QAC9B,YAAY,EAAE,cAAkC;QAChD,YAAY,EAAE,cAAkC;QAChD,uBAAuB,EAAE,yBAA6C;KACvE,CAAA;AACH,CAAC,EAXgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAWpC","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 { Valorisation } from './Valorisation'\n\nexport class FlatRateTarification {\n constructor(json: JSON | any) {\n Object.assign(this as FlatRateTarification, json)\n }\n\n code?: string\n flatRateType?: FlatRateTarification.FlatRateTypeEnum\n label?: { [key: string]: string }\n valorisations?: Array<Valorisation>\n /**\n * The base64 encoded data of this object, formatted as JSON and encrypted in AES using the random master key from encryptionKeys.\n */\n encryptedSelf?: string\n}\nexport namespace FlatRateTarification {\n export type FlatRateTypeEnum = 'physician' | 'physiotherapist' | 'nurse' | 'ptd' | 'ivgFlatRate1' | 'ivgFlatRate2' | 'ivgPersonalIntervention'\n export const FlatRateTypeEnum = {\n Physician: 'physician' as FlatRateTypeEnum,\n Physiotherapist: 'physiotherapist' as FlatRateTypeEnum,\n Nurse: 'nurse' as FlatRateTypeEnum,\n Ptd: 'ptd' as FlatRateTypeEnum,\n IvgFlatRate1: 'ivgFlatRate1' as FlatRateTypeEnum,\n IvgFlatRate2: 'ivgFlatRate2' as FlatRateTypeEnum,\n IvgPersonalIntervention: 'ivgPersonalIntervention' as FlatRateTypeEnum,\n }\n}\n"]}
@@ -68,23 +68,24 @@ function b2a(a) {
68
68
  }
69
69
  exports.b2a = b2a;
70
70
  function a2b(s) {
71
+ const urlUnsafeString = s.replace(/_/g, '/').replace(/-/g, '+');
71
72
  if (typeof window !== 'undefined') {
72
73
  //Favour atob in browser
73
74
  if (typeof atob !== 'undefined') {
74
- return atob(s);
75
+ return atob(urlUnsafeString);
75
76
  }
76
77
  if (typeof Buffer !== 'undefined') {
77
- const buf = new Buffer(s, 'base64');
78
+ const buf = new Buffer(urlUnsafeString, 'base64');
78
79
  return buf.toString('latin1');
79
80
  }
80
81
  }
81
82
  else {
82
83
  if (typeof Buffer !== 'undefined') {
83
- const buf = new Buffer(s, 'base64');
84
+ const buf = new Buffer(urlUnsafeString, 'base64');
84
85
  return buf.toString('latin1');
85
86
  }
86
87
  if (typeof atob !== 'undefined') {
87
- return atob(s);
88
+ return atob(urlUnsafeString);
88
89
  }
89
90
  }
90
91
  throw new Error('Unsupported operation a2b');
@@ -1 +1 @@
1
- {"version":3,"file":"ModelHelper.js","sourceRoot":"","sources":["../../../icc-api/model/ModelHelper.ts"],"names":[],"mappings":";;;AAAA,SAAgB,SAAS,CAAC,GAA6B;IACrD,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAA;IAC9B,MAAM,KAAK,GAAG,EAAE,CAAC,MAAM,CAAA;IACvB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACjC,IAAI,MAAM,EAAE,GAAG,EAAE,KAAK,CAAA;IACtB,KAAK,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE;QACrD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,GAAG,MAAM,CAAC,CAAA;QAC1C,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,CAAA;QACzC,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,KAAY,CAAC,CAAA;KACrD;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAZD,8BAYC;AAED,SAAgB,SAAS,CAAC,CAAS;IACjC,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CA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AO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;KACF;SAAM;QACL,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;YACpC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;QACD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;SACf;KACF;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAC9C,CAAC;AApBD,kBAoBC;AAED,SAAgB,GAAG,CAAC,CAAS;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,wBAAwB;QACxB,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;SACf;QACD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;YACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;KACF;SAAM;QACL,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;YACnC,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;QACD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;SACf;KACF;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAC9C,CAAC;AApBD,kBAoBC","sourcesContent":["export function ua2string(_ua: Uint8Array | ArrayBuffer): string {\n let str = ''\n const ab = new Uint8Array(_ua)\n const abLen = ab.length\n const CHUNK_SIZE = Math.pow(2, 8)\n let offset, len, subab\n for (offset = 0; offset < abLen; offset += CHUNK_SIZE) {\n len = Math.min(CHUNK_SIZE, abLen - offset)\n subab = ab.subarray(offset, offset + len)\n str += String.fromCharCode.apply(null, subab as any)\n }\n return str\n}\n\nexport function string2ua(s: string): Uint8Array {\n const ua = new Uint8Array(s.length)\n for (let i = 0; i < s.length; i++) {\n ua[i] = s.charCodeAt(i) & 0xff\n }\n return ua\n}\n\nexport function string2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(s))\n}\n\nexport function ua2ab(ua: Uint8Array): ArrayBuffer {\n const buffer = ua.buffer\n return (buffer.byteLength > ua.byteLength ? buffer.slice(0, ua.byteLength) : buffer) as ArrayBuffer\n}\n\nexport function b64_2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(a2b(s)))\n}\n\nexport function b64_2ua(s: string): Uint8Array {\n return string2ua(a2b(s))\n}\n\nexport function ua2b64(_ua: Uint8Array | ArrayBuffer): string {\n return b2a(ua2string(_ua))\n}\n\nexport function b2a(a: string): string {\n if (typeof window !== 'undefined') {\n //Favour btoa in browser\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n }\n throw new Error('Unsupported operation b2a')\n}\n\nexport function a2b(s: string): string {\n if (typeof window !== 'undefined') {\n //Favour atob in browser\n if (typeof atob !== 'undefined') {\n return atob(s)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(s, 'base64')\n return buf.toString('latin1')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(s, 'base64')\n return buf.toString('latin1')\n }\n if (typeof atob !== 'undefined') {\n return atob(s)\n }\n }\n throw new Error('Unsupported operation a2b')\n}\n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AAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAA;SACf;KACF;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAC9C,CAAC;AApBD,kBAoBC;AAED,SAAgB,GAAG,CAAC,CAAS;IAC3B,MAAM,eAAe,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC/D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,wBAAwB;QACxB,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,eAAe,CAAC,CAAA;SAC7B;QACD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;YACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;KACF;SAAM;QACL,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAA;YACjD,OAAO,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;SAC9B;QACD,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,eAAe,CAAC,CAAA;SAC7B;KACF;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;AAC9C,CAAC;AArBD,kBAqBC","sourcesContent":["export function ua2string(_ua: Uint8Array | ArrayBuffer): string {\n let str = ''\n const ab = new Uint8Array(_ua)\n const abLen = ab.length\n const CHUNK_SIZE = Math.pow(2, 8)\n let offset, len, subab\n for (offset = 0; offset < abLen; offset += CHUNK_SIZE) {\n len = Math.min(CHUNK_SIZE, abLen - offset)\n subab = ab.subarray(offset, offset + len)\n str += String.fromCharCode.apply(null, subab as any)\n }\n return str\n}\n\nexport function string2ua(s: string): Uint8Array {\n const ua = new Uint8Array(s.length)\n for (let i = 0; i < s.length; i++) {\n ua[i] = s.charCodeAt(i) & 0xff\n }\n return ua\n}\n\nexport function string2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(s))\n}\n\nexport function ua2ab(ua: Uint8Array): ArrayBuffer {\n const buffer = ua.buffer\n return (buffer.byteLength > ua.byteLength ? buffer.slice(0, ua.byteLength) : buffer) as ArrayBuffer\n}\n\nexport function b64_2ab(s: string): ArrayBuffer {\n return ua2ab(string2ua(a2b(s)))\n}\n\nexport function b64_2ua(s: string): Uint8Array {\n return string2ua(a2b(s))\n}\n\nexport function ua2b64(_ua: Uint8Array | ArrayBuffer): string {\n return b2a(ua2string(_ua))\n}\n\nexport function b2a(a: string): string {\n if (typeof window !== 'undefined') {\n //Favour btoa in browser\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = Buffer.from(a, 'latin1')\n return buf.toString('base64')\n }\n if (typeof btoa !== 'undefined') {\n return btoa(a)\n }\n }\n throw new Error('Unsupported operation b2a')\n}\n\nexport function a2b(s: string): string {\n const urlUnsafeString = s.replace(/_/g, '/').replace(/-/g, '+')\n if (typeof window !== 'undefined') {\n //Favour atob in browser\n if (typeof atob !== 'undefined') {\n return atob(urlUnsafeString)\n }\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(urlUnsafeString, 'base64')\n return buf.toString('latin1')\n }\n } else {\n if (typeof Buffer !== 'undefined') {\n const buf = new Buffer(urlUnsafeString, 'base64')\n return buf.toString('latin1')\n }\n if (typeof atob !== 'undefined') {\n return atob(urlUnsafeString)\n }\n }\n throw new Error('Unsupported operation a2b')\n}\n"]}
@@ -23,4 +23,5 @@ export declare class UserGroup {
23
23
  patientId?: string;
24
24
  healthcarePartyId?: string;
25
25
  deviceId?: string;
26
+ nameOfParentOfTopmostGroupInHierarchy?: string;
26
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UserGroup.js","sourceRoot":"","sources":["../../../icc-api/model/UserGroup.ts"],"names":[],"mappings":";;;AAaA,MAAa,SAAS;IACpB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAiB,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;CAaF;AAhBD,8BAgBC","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 { Group } from './Group'\n\nexport class UserGroup {\n constructor(json: JSON | any) {\n Object.assign(this as UserGroup, json)\n }\n\n groupId?: string\n groupName?: string\n groupsHierarchy?: Array<Group>\n userId?: string\n login?: string\n name?: string\n email?: string\n phone?: string\n patientId?: string\n healthcarePartyId?: string\n deviceId?: string\n}\n"]}
1
+ {"version":3,"file":"UserGroup.js","sourceRoot":"","sources":["../../../icc-api/model/UserGroup.ts"],"names":[],"mappings":";;;AAaA,MAAa,SAAS;IACpB,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAiB,EAAE,IAAI,CAAC,CAAA;IACxC,CAAC;CAcF;AAjBD,8BAiBC","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 { Group } from './Group'\n\nexport class UserGroup {\n constructor(json: JSON | any) {\n Object.assign(this as UserGroup, json)\n }\n\n groupId?: string\n groupName?: string\n groupsHierarchy?: Array<Group>\n userId?: string\n login?: string\n name?: string\n email?: string\n phone?: string\n patientId?: string\n healthcarePartyId?: string\n deviceId?: string\n nameOfParentOfTopmostGroupInHierarchy?: string\n}\n"]}
@@ -269,5 +269,5 @@ export * from './VmpStub';
269
269
  export * from './Vtm';
270
270
  export * from './Wada';
271
271
  export * from './Weekday';
272
- export declare type EncryptedEntity = AccessLog | Article | CalendarItem | Classification | Contact | Document | Form | HealthElement | Invoice | MaintenanceTask | Message | Patient | Receipt;
273
- export declare type EncryptedParentEntity = Message | Patient;
272
+ export type EncryptedEntity = AccessLog | Article | CalendarItem | Classification | Contact | Document | Form | HealthElement | Invoice | MaintenanceTask | Message | Patient | Receipt;
273
+ export type EncryptedParentEntity = Message | Patient;
@@ -2,6 +2,10 @@ import { AuthService } from './AuthService';
2
2
  import { IccAuthApi } from '../../icc-api';
3
3
  export interface AuthenticationProvider {
4
4
  getAuthService(): AuthService;
5
+ getIcureTokens(): Promise<{
6
+ token: string;
7
+ refreshToken: string;
8
+ } | undefined>;
5
9
  }
6
10
  export declare class EnsembleAuthenticationProvider implements AuthenticationProvider {
7
11
  private authApi;
@@ -11,20 +15,48 @@ export declare class EnsembleAuthenticationProvider implements AuthenticationPro
11
15
  private readonly basicAuth;
12
16
  private jwtAuth;
13
17
  private suspensionEnd;
14
- constructor(authApi: IccAuthApi, username: string, password: string, jwtTimeout?: number);
18
+ constructor(authApi: IccAuthApi, username: string, password: string, jwtTimeout?: number, thirdPartyTokens?: {
19
+ [thirdParty: string]: string;
20
+ });
21
+ getIcureTokens(): Promise<{
22
+ token: string;
23
+ refreshToken: string;
24
+ } | undefined>;
15
25
  getAuthService(): AuthService;
16
26
  }
17
27
  export declare class JwtAuthenticationProvider implements AuthenticationProvider {
28
+ getIcureTokens(): Promise<{
29
+ token: string;
30
+ refreshToken: string;
31
+ }>;
18
32
  private readonly jwtAuth;
19
- constructor(authApi: IccAuthApi, username: string, password: string);
33
+ /**
34
+ * @internal
35
+ * @param authApi
36
+ * @param username
37
+ * @param password
38
+ * @param icureToken
39
+ */
40
+ constructor(authApi: IccAuthApi, username?: string, password?: string, icureToken?: {
41
+ token: string;
42
+ refreshToken: string;
43
+ });
20
44
  getAuthService(): AuthService;
21
45
  }
22
46
  export declare class BasicAuthenticationProvider implements AuthenticationProvider {
23
47
  private username;
24
48
  private password;
49
+ getIcureTokens(): Promise<{
50
+ token: string;
51
+ refreshToken: string;
52
+ } | undefined>;
25
53
  constructor(username: string, password: string);
26
54
  getAuthService(): AuthService;
27
55
  }
28
56
  export declare class NoAuthenticationProvider implements AuthenticationProvider {
29
57
  getAuthService(): AuthService;
58
+ getIcureTokens(): Promise<{
59
+ token: string;
60
+ refreshToken: string;
61
+ } | undefined>;
30
62
  }
@@ -2,24 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NoAuthenticationProvider = exports.BasicAuthenticationProvider = exports.JwtAuthenticationProvider = exports.EnsembleAuthenticationProvider = void 0;
4
4
  const EnsembleAuthService_1 = require("./EnsembleAuthService");
5
- const JwtAuthService_1 = require("./JwtAuthService");
5
+ const JwtBridgedAuthService_1 = require("./JwtBridgedAuthService");
6
6
  const NoAuthService_1 = require("./NoAuthService");
7
7
  const BasicAuthService_1 = require("./BasicAuthService");
8
+ const JwtAuthService_1 = require("./JwtAuthService");
8
9
  class EnsembleAuthenticationProvider {
9
- constructor(authApi, username, password, jwtTimeout = 3600) {
10
+ constructor(authApi, username, password, jwtTimeout = 3600, thirdPartyTokens = {}) {
10
11
  this.authApi = authApi;
11
12
  this.username = username;
12
13
  this.password = password;
13
14
  this.jwtTimeout = jwtTimeout;
14
- this.jwtAuth = new JwtAuthService_1.JwtAuthService(this.authApi, this.username, this.password);
15
+ this.jwtAuth = new JwtBridgedAuthService_1.JwtBridgedAuthService(this.authApi, this.username, this.password, thirdPartyTokens);
15
16
  this.basicAuth = new BasicAuthService_1.BasicAuthService(this.username, this.password);
16
17
  }
18
+ getIcureTokens() {
19
+ return this.jwtAuth.getIcureTokens();
20
+ }
17
21
  getAuthService() {
18
22
  // If the jwtAuth is in an error state, it instantiates a new one,
19
23
  // but it will not use it until the suspension ends
20
24
  if (this.jwtAuth.isInErrorState()) {
21
25
  console.warn('Error state in JWT, I will skip it');
22
- this.jwtAuth = new JwtAuthService_1.JwtAuthService(this.authApi, this.username, this.password);
26
+ this.jwtAuth = new JwtBridgedAuthService_1.JwtBridgedAuthService(this.authApi, this.username, this.password);
23
27
  this.suspensionEnd = new Date(new Date().getTime() + this.jwtTimeout * 1000);
24
28
  }
25
29
  return !!this.suspensionEnd && new Date() <= this.suspensionEnd
@@ -29,8 +33,20 @@ class EnsembleAuthenticationProvider {
29
33
  }
30
34
  exports.EnsembleAuthenticationProvider = EnsembleAuthenticationProvider;
31
35
  class JwtAuthenticationProvider {
32
- constructor(authApi, username, password) {
33
- this.jwtAuth = new JwtAuthService_1.JwtAuthService(authApi, username, password);
36
+ getIcureTokens() {
37
+ return Promise.resolve({ refreshToken: '', token: '' });
38
+ }
39
+ /**
40
+ * @internal
41
+ * @param authApi
42
+ * @param username
43
+ * @param password
44
+ * @param icureToken
45
+ */
46
+ constructor(authApi, username, password, icureToken) {
47
+ this.jwtAuth = icureToken
48
+ ? new JwtAuthService_1.JwtAuthService(authApi, icureToken.token, icureToken.refreshToken)
49
+ : new JwtBridgedAuthService_1.JwtBridgedAuthService(authApi, username, password);
34
50
  }
35
51
  getAuthService() {
36
52
  return this.jwtAuth;
@@ -38,6 +54,9 @@ class JwtAuthenticationProvider {
38
54
  }
39
55
  exports.JwtAuthenticationProvider = JwtAuthenticationProvider;
40
56
  class BasicAuthenticationProvider {
57
+ getIcureTokens() {
58
+ return Promise.resolve();
59
+ }
41
60
  constructor(username, password) {
42
61
  this.username = username;
43
62
  this.password = password;
@@ -51,6 +70,9 @@ class NoAuthenticationProvider {
51
70
  getAuthService() {
52
71
  return new NoAuthService_1.NoAuthService();
53
72
  }
73
+ getIcureTokens() {
74
+ return Promise.resolve();
75
+ }
54
76
  }
55
77
  exports.NoAuthenticationProvider = NoAuthenticationProvider;
56
78
  //# sourceMappingURL=AuthenticationProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AuthenticationProvider.js","sourceRoot":"","sources":["../../../icc-x-api/auth/AuthenticationProvider.ts"],"names":[],"mappings":";;;AAEA,+DAA2D;AAC3D,qDAAiD;AACjD,mDAA+C;AAC/C,yDAAqD;AAMrD,MAAa,8BAA8B;IAKzC,YAAoB,OAAmB,EAAU,QAAgB,EAAU,QAAgB,EAAU,aAAqB,IAAI;QAA1G,YAAO,GAAP,OAAO,CAAY;QAAU,aAAQ,GAAR,QAAQ,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAQ;QAAU,eAAU,GAAV,UAAU,CAAe;QAC5H,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC7E,IAAI,CAAC,SAAS,GAAG,IAAI,mCAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACrE,CAAC;IAED,cAAc;QACZ,kEAAkE;QAClE,mDAAmD;QACnD,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE;YACjC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;YAClD,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;YAC7E,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;SAC7E;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,CAAC,aAAa;YAC7D,CAAC,CAAC,IAAI,yCAAmB,CAAC,IAAI,EAAE,IAAI,6BAAa,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC;YACpE,CAAC,CAAC,IAAI,yCAAmB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,6BAAa,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAChF,CAAC;CACF;AAvBD,wEAuBC;AAED,MAAa,yBAAyB;IAGpC,YAAY,OAAmB,EAAE,QAAgB,EAAE,QAAgB;QACjE,IAAI,CAAC,OAAO,GAAG,IAAI,+BAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAChE,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAVD,8DAUC;AAED,MAAa,2BAA2B;IACtC,YAAoB,QAAgB,EAAU,QAAgB;QAA1C,aAAQ,GAAR,QAAQ,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAElE,cAAc;QACZ,OAAO,IAAI,mCAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC3D,CAAC;CACF;AAND,kEAMC;AAED,MAAa,wBAAwB;IACnC,cAAc;QACZ,OAAO,IAAI,6BAAa,EAAE,CAAA;IAC5B,CAAC;CACF;AAJD,4DAIC","sourcesContent":["import { AuthService } from './AuthService'\nimport { IccAuthApi } from '../../icc-api'\nimport { EnsembleAuthService } from './EnsembleAuthService'\nimport { JwtAuthService } from './JwtAuthService'\nimport { NoAuthService } from './NoAuthService'\nimport { BasicAuthService } from './BasicAuthService'\n\nexport interface AuthenticationProvider {\n getAuthService(): AuthService\n}\n\nexport class EnsembleAuthenticationProvider implements AuthenticationProvider {\n private readonly basicAuth: BasicAuthService\n private jwtAuth: JwtAuthService\n private suspensionEnd: Date | undefined\n\n constructor(private authApi: IccAuthApi, private username: string, private password: string, private jwtTimeout: number = 3600) {\n this.jwtAuth = new JwtAuthService(this.authApi, this.username, this.password)\n this.basicAuth = new BasicAuthService(this.username, this.password)\n }\n\n getAuthService(): AuthService {\n // If the jwtAuth is in an error state, it instantiates a new one,\n // but it will not use it until the suspension ends\n if (this.jwtAuth.isInErrorState()) {\n console.warn('Error state in JWT, I will skip it')\n this.jwtAuth = new JwtAuthService(this.authApi, this.username, this.password)\n this.suspensionEnd = new Date(new Date().getTime() + this.jwtTimeout * 1000)\n }\n\n return !!this.suspensionEnd && new Date() <= this.suspensionEnd\n ? new EnsembleAuthService(null, new NoAuthService(), this.basicAuth)\n : new EnsembleAuthService(this.jwtAuth, new NoAuthService(), this.basicAuth)\n }\n}\n\nexport class JwtAuthenticationProvider implements AuthenticationProvider {\n private readonly jwtAuth: JwtAuthService\n\n constructor(authApi: IccAuthApi, username: string, password: string) {\n this.jwtAuth = new JwtAuthService(authApi, username, password)\n }\n\n getAuthService(): AuthService {\n return this.jwtAuth\n }\n}\n\nexport class BasicAuthenticationProvider implements AuthenticationProvider {\n constructor(private username: string, private password: string) {}\n\n getAuthService(): AuthService {\n return new BasicAuthService(this.username, this.password)\n }\n}\n\nexport class NoAuthenticationProvider implements AuthenticationProvider {\n getAuthService(): AuthService {\n return new NoAuthService()\n }\n}\n"]}
1
+ {"version":3,"file":"AuthenticationProvider.js","sourceRoot":"","sources":["../../../icc-x-api/auth/AuthenticationProvider.ts"],"names":[],"mappings":";;;AAEA,+DAA2D;AAC3D,mEAA+D;AAC/D,mDAA+C;AAC/C,yDAAqD;AACrD,qDAAiD;AAOjD,MAAa,8BAA8B;IAKzC,YACU,OAAmB,EACnB,QAAgB,EAChB,QAAgB,EAChB,aAAqB,IAAI,EACjC,mBAAqD,EAAE;QAJ/C,YAAO,GAAP,OAAO,CAAY;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAe;QAGjC,IAAI,CAAC,OAAO,GAAG,IAAI,6CAAqB,CAAC,IAAI,CAAC,OAAO,EA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B,EAAE,UAAoD;QACzH,IAAI,CAAC,OAAO,GAAG,UAAU;YACvB,CAAC,CAAC,IAAI,+BAAc,CAAC,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC;YACxE,CAAC,CAAC,IAAI,6CAAqB,CAAC,OAAO,EAAE,QAAS,EAAE,QAAS,CAAC,CAAA;IAC9D,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;CACF;AAtBD,8DAsBC;AAED,MAAa,2BAA2B;IACtC,cAAc;QACZ,OAAO,OAAO,CAAC,OAAO,EAAwB,CAAA;IAChD,CAAC;IACD,YAAoB,QAAgB,EAAU,QAAgB;QAA1C,aAAQ,GAAR,QAAQ,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAQ;IAAG,CAAC;IAElE,cAAc;QACZ,OAAO,IAAI,mCAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAC3D,CAAC;CACF;AATD,kEASC;AAED,MAAa,wBAAwB;IACnC,cAAc;QACZ,OAAO,IAAI,6BAAa,EAAE,CAAA;IAC5B,CAAC;IAED,cAAc;QACZ,OAAO,OAAO,CAAC,OAAO,EAAwB,CAAA;IAChD,CAAC;CACF;AARD,4DAQC","sourcesContent":["import { AuthService } from './AuthService'\nimport { IccAuthApi, OAuthThirdParty } from '../../icc-api'\nimport { EnsembleAuthService } from './EnsembleAuthService'\nimport { JwtBridgedAuthService } from './JwtBridgedAuthService'\nimport { NoAuthService } from './NoAuthService'\nimport { BasicAuthService } from './BasicAuthService'\nimport { JwtAuthService } from './JwtAuthService'\n\nexport interface AuthenticationProvider {\n getAuthService(): AuthService\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined>\n}\n\nexport class EnsembleAuthenticationProvider implements AuthenticationProvider {\n private readonly basicAuth: BasicAuthService\n private jwtAuth: JwtBridgedAuthService\n private suspensionEnd: Date | undefined\n\n constructor(\n private authApi: IccAuthApi,\n private username: string,\n private password: string,\n private jwtTimeout: number = 3600,\n thirdPartyTokens: { [thirdParty: string]: string } = {}\n ) {\n this.jwtAuth = new JwtBridgedAuthService(this.authApi, this.username, this.password, thirdPartyTokens)\n this.basicAuth = new BasicAuthService(this.username, this.password)\n }\n\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined> {\n return this.jwtAuth.getIcureTokens()\n }\n\n getAuthService(): AuthService {\n // If the jwtAuth is in an error state, it instantiates a new one,\n // but it will not use it until the suspension ends\n if (this.jwtAuth.isInErrorState()) {\n console.warn('Error state in JWT, I will skip it')\n this.jwtAuth = new JwtBridgedAuthService(this.authApi, this.username, this.password)\n this.suspensionEnd = new Date(new Date().getTime() + this.jwtTimeout * 1000)\n }\n\n return !!this.suspensionEnd && new Date() <= this.suspensionEnd\n ? new EnsembleAuthService(null, new NoAuthService(), this.basicAuth)\n : new EnsembleAuthService(this.jwtAuth, new NoAuthService(), this.basicAuth)\n }\n}\n\nexport class JwtAuthenticationProvider implements AuthenticationProvider {\n getIcureTokens(): Promise<{ token: string; refreshToken: string }> {\n return Promise.resolve({ refreshToken: '', token: '' })\n }\n private readonly jwtAuth: AuthService\n\n /**\n * @internal\n * @param authApi\n * @param username\n * @param password\n * @param icureToken\n */\n constructor(authApi: IccAuthApi, username?: string, password?: string, icureToken?: { token: string; refreshToken: string }) {\n this.jwtAuth = icureToken\n ? new JwtAuthService(authApi, icureToken.token, icureToken.refreshToken)\n : new JwtBridgedAuthService(authApi, username!, password!)\n }\n\n getAuthService(): AuthService {\n return this.jwtAuth\n }\n}\n\nexport class BasicAuthenticationProvider implements AuthenticationProvider {\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined> {\n return Promise.resolve() as Promise<undefined>\n }\n constructor(private username: string, private password: string) {}\n\n getAuthService(): AuthService {\n return new BasicAuthService(this.username, this.password)\n }\n}\n\nexport class NoAuthenticationProvider implements AuthenticationProvider {\n getAuthService(): AuthService {\n return new NoAuthService()\n }\n\n getIcureTokens(): Promise<{ token: string; refreshToken: string } | undefined> {\n return Promise.resolve() as Promise<undefined>\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { AuthService } from './AuthService';
2
2
  import { XHR } from '../../icc-api/api/XHR';
3
- import { JwtAuthService } from './JwtAuthService';
3
+ import { JwtBridgedAuthService } from './JwtBridgedAuthService';
4
4
  import { NoAuthService } from './NoAuthService';
5
5
  import { BasicAuthService } from './BasicAuthService';
6
6
  import Header = XHR.Header;
@@ -11,7 +11,11 @@ export declare class EnsembleAuthService implements AuthService {
11
11
  private currentState;
12
12
  private error;
13
13
  private stateMap;
14
- constructor(jwtAuth: JwtAuthService | null, sessionAuth: NoAuthService, basicAuth: BasicAuthService);
14
+ constructor(jwtAuth: JwtBridgedAuthService | null, sessionAuth: NoAuthService, basicAuth: BasicAuthService);
15
+ getIcureTokens(): Promise<{
16
+ token: string;
17
+ refreshToken: string;
18
+ } | undefined>;
15
19
  getAuthHeaders(): Promise<Array<Header>>;
16
20
  invalidateHeader(error: Error): void;
17
21
  }
@@ -10,6 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EnsembleAuthService = void 0;
13
+ const XHR_1 = require("../../icc-api/api/XHR");
14
+ var XHRError = XHR_1.XHR.XHRError;
13
15
  class EnsembleAuthService {
14
16
  constructor(jwtAuth, sessionAuth, basicAuth) {
15
17
  this.jwtAuth = jwtAuth;
@@ -24,6 +26,10 @@ class EnsembleAuthService {
24
26
  };
25
27
  this.currentState = 'start';
26
28
  }
29
+ getIcureTokens() {
30
+ var _a, _b;
31
+ return (_b = (_a = this.jwtAuth) === null || _a === void 0 ? void 0 : _a.getIcureTokens()) !== null && _b !== void 0 ? _b : Promise.resolve();
32
+ }
27
33
  getAuthHeaders() {
28
34
  return __awaiter(this, void 0, void 0, function* () {
29
35
  this.currentState = !!this.currentState ? this.stateMap[this.currentState].next : this.currentState;
@@ -32,6 +38,9 @@ class EnsembleAuthService {
32
38
  // And delegate the responsibility of handling the error to the next call
33
39
  return !!this.stateMap[this.currentState].state
34
40
  ? this.stateMap[this.currentState].state.getAuthHeaders().catch((e) => {
41
+ if (e instanceof XHRError && e.statusCode === 417) {
42
+ throw e;
43
+ }
35
44
  // If I get an error, it is also responsibility of the next call, but I give a warning
36
45
  console.warn(e.message);
37
46
  this.error = e;