@icure/api 8.0.0-RC.3 → 8.0.0-RC.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icc-api/api/IccInsuranceApi.d.ts +2 -0
- package/icc-api/api/IccInsuranceApi.js +12 -0
- package/icc-api/api/IccInsuranceApi.js.map +1 -1
- package/icc-api/api/{IccExchangeDataApi.d.ts → internal/IccExchangeDataApi.d.ts} +4 -4
- package/icc-api/api/{IccExchangeDataApi.js → internal/IccExchangeDataApi.js} +5 -5
- package/icc-api/api/internal/IccExchangeDataApi.js.map +1 -0
- package/icc-api/api/{IccExchangeDataMapApi.d.ts → internal/IccExchangeDataMapApi.d.ts} +4 -4
- package/icc-api/api/{IccExchangeDataMapApi.js → internal/IccExchangeDataMapApi.js} +5 -5
- package/icc-api/api/internal/IccExchangeDataMapApi.js.map +1 -0
- package/icc-api/api/internal/IccRecoveryDataApi.d.ts +19 -0
- package/icc-api/api/internal/IccRecoveryDataApi.js +83 -0
- package/icc-api/api/internal/IccRecoveryDataApi.js.map +1 -0
- package/icc-api/api/{IccSecureDelegationKeyMapApi.d.ts → internal/IccSecureDelegationKeyMapApi.d.ts} +6 -6
- package/icc-api/api/{IccSecureDelegationKeyMapApi.js → internal/IccSecureDelegationKeyMapApi.js} +5 -5
- package/icc-api/api/internal/IccSecureDelegationKeyMapApi.js.map +1 -0
- package/icc-api/model/PaginatedListInsurance.d.ts +20 -0
- package/icc-api/model/PaginatedListInsurance.js +10 -0
- package/icc-api/model/PaginatedListInsurance.js.map +1 -0
- package/icc-api/model/User.d.ts +19 -0
- package/icc-api/model/User.js +6 -0
- package/icc-api/model/User.js.map +1 -1
- package/icc-api/model/internal/ExchangeData.d.ts +20 -4
- package/icc-api/model/internal/ExchangeData.js +8 -2
- package/icc-api/model/internal/ExchangeData.js.map +1 -1
- package/icc-api/model/internal/RecoveryData.d.ts +47 -0
- package/icc-api/model/internal/RecoveryData.js +34 -0
- package/icc-api/model/internal/RecoveryData.js.map +1 -0
- package/icc-x-api/auth/JwtBridgedAuthService.d.ts +1 -0
- package/icc-x-api/auth/JwtBridgedAuthService.js +10 -3
- package/icc-x-api/auth/JwtBridgedAuthService.js.map +1 -1
- package/icc-x-api/crypto/BaseExchangeDataManager.d.ts +37 -25
- package/icc-x-api/crypto/BaseExchangeDataManager.js +123 -64
- package/icc-x-api/crypto/BaseExchangeDataManager.js.map +1 -1
- package/icc-x-api/crypto/CryptoPrimitives.d.ts +3 -0
- package/icc-x-api/crypto/CryptoPrimitives.js +5 -0
- package/icc-x-api/crypto/CryptoPrimitives.js.map +1 -1
- package/icc-x-api/crypto/DelegationsDeAnonymization.js +1 -1
- package/icc-x-api/crypto/DelegationsDeAnonymization.js.map +1 -1
- package/icc-x-api/crypto/ExchangeDataManager.js +14 -6
- package/icc-x-api/crypto/ExchangeDataManager.js.map +1 -1
- package/icc-x-api/crypto/ExchangeDataMapManager.d.ts +1 -1
- package/icc-x-api/crypto/ExchangeDataMapManager.js.map +1 -1
- package/icc-x-api/crypto/HMACUtils.d.ts +10 -0
- package/icc-x-api/crypto/HMACUtils.js +48 -0
- package/icc-x-api/crypto/HMACUtils.js.map +1 -0
- package/icc-x-api/crypto/SecureDelegationsManager.js +3 -0
- package/icc-x-api/crypto/SecureDelegationsManager.js.map +1 -1
- package/icc-x-api/icc-icure-maintenance-x-api.d.ts +1 -1
- package/icc-x-api/icc-icure-maintenance-x-api.js.map +1 -1
- package/icc-x-api/icc-recovery-x-api.d.ts +0 -0
- package/icc-x-api/icc-recovery-x-api.js +2 -0
- package/icc-x-api/icc-recovery-x-api.js.map +1 -0
- package/icc-x-api/index.js +2 -2
- package/icc-x-api/index.js.map +1 -1
- package/package.json +1 -1
- package/icc-api/api/IccExchangeDataApi.js.map +0 -1
- package/icc-api/api/IccExchangeDataMapApi.js.map +0 -1
- package/icc-api/api/IccSecureDelegationKeyMapApi.js.map +0 -1
|
@@ -14,6 +14,7 @@ import { DocIdentifier } from '../model/DocIdentifier';
|
|
|
14
14
|
import { Insurance } from '../model/Insurance';
|
|
15
15
|
import { ListOfIds } from '../model/ListOfIds';
|
|
16
16
|
import { AuthenticationProvider } from '../../icc-x-api';
|
|
17
|
+
import { PaginatedListInsurance } from '../model/PaginatedListInsurance';
|
|
17
18
|
export declare class IccInsuranceApi {
|
|
18
19
|
host: string;
|
|
19
20
|
headers: Array<XHR.Header>;
|
|
@@ -64,4 +65,5 @@ export declare class IccInsuranceApi {
|
|
|
64
65
|
* @param body
|
|
65
66
|
*/
|
|
66
67
|
modifyInsurance(body?: Insurance): Promise<Insurance>;
|
|
68
|
+
getAllInsurances(startDocumentId?: string, limit?: number): Promise<PaginatedListInsurance>;
|
|
67
69
|
}
|
|
@@ -26,6 +26,7 @@ const DocIdentifier_1 = require("../model/DocIdentifier");
|
|
|
26
26
|
const Insurance_1 = require("../model/Insurance");
|
|
27
27
|
const icc_x_api_1 = require("../../icc-x-api");
|
|
28
28
|
const IccRestApiPath_1 = require("./IccRestApiPath");
|
|
29
|
+
const PaginatedListInsurance_1 = require("../model/PaginatedListInsurance");
|
|
29
30
|
class IccInsuranceApi {
|
|
30
31
|
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
31
32
|
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
@@ -144,6 +145,17 @@ class IccInsuranceApi {
|
|
|
144
145
|
.catch((err) => this.handleError(err));
|
|
145
146
|
});
|
|
146
147
|
}
|
|
148
|
+
getAllInsurances(startDocumentId, limit) {
|
|
149
|
+
let _body = null;
|
|
150
|
+
const _url = this.host +
|
|
151
|
+
`/insurance?startDocumentId=${encodeURIComponent(String(startDocumentId))}&limit=${encodeURIComponent(String(limit))}` +
|
|
152
|
+
'&ts=' +
|
|
153
|
+
new Date().getTime();
|
|
154
|
+
let headers = this.headers;
|
|
155
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
156
|
+
.then((doc) => new PaginatedListInsurance_1.PaginatedListInsurance(doc.body))
|
|
157
|
+
.catch((err) => this.handleError(err));
|
|
158
|
+
}
|
|
147
159
|
}
|
|
148
160
|
exports.IccInsuranceApi = IccInsuranceApi;
|
|
149
161
|
//# sourceMappingURL=IccInsuranceApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IccInsuranceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccInsuranceApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,kDAA8C;AAE9C,+CAAkF;AAClF,qDAAiD;AAEjD,MAAa,eAAe;IAM1B,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,oCAAwB,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,eAAe,CAAC,IAAgB;;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACrE,IAAI,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C9C,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA/HD,0CA+HC","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 { DocIdentifier } from '../model/DocIdentifier'\nimport { Insurance } from '../model/Insurance'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api'\nimport { iccRestApiPath } from './IccRestApiPath'\n\nexport class IccInsuranceApi {\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 *\n * @summary Creates an insurance\n * @param body\n */\n async createInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Deletes an insurance\n * @param insuranceId\n */\n async deleteInsurance(insuranceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(insuranceId)}` + '?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 *\n * @summary Gets an insurance\n * @param insuranceId\n */\n async getInsurance(insuranceId: string): Promise<Insurance> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(String(insuranceId))}` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets insurances by id\n * @param body\n */\n async getInsurances(body?: ListOfIds): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceCode\n */\n async listInsurancesByCode(insuranceCode: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byCode/${encodeURIComponent(String(insuranceCode))}` + '?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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceName\n */\n async listInsurancesByName(insuranceName: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byName/${encodeURIComponent(String(insuranceName))}` + '?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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an insurance\n * @param body\n */\n async modifyInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IccInsuranceApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccInsuranceApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,0DAAsD;AACtD,kDAA8C;AAE9C,+CAAkF;AAClF,qDAAiD;AACjD,4EAAwE;AAExE,MAAa,eAAe;IAM1B,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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CACF;AA7ID,0CA6IC","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 { DocIdentifier } from '../model/DocIdentifier'\nimport { Insurance } from '../model/Insurance'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { PaginatedListInsurance } from '../model/PaginatedListInsurance'\n\nexport class IccInsuranceApi {\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 *\n * @summary Creates an insurance\n * @param body\n */\n async createInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Deletes an insurance\n * @param insuranceId\n */\n async deleteInsurance(insuranceId: string): Promise<DocIdentifier> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(insuranceId)}` + '?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 *\n * @summary Gets an insurance\n * @param insuranceId\n */\n async getInsurance(insuranceId: string): Promise<Insurance> {\n let _body = null\n\n const _url = this.host + `/insurance/${encodeURIComponent(String(insuranceId))}` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets insurances by id\n * @param body\n */\n async getInsurances(body?: ListOfIds): Promise<Array<Insurance>> {\n const _url = this.host + `/insurance/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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceCode\n */\n async listInsurancesByCode(insuranceCode: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byCode/${encodeURIComponent(String(insuranceCode))}` + '?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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets an insurance\n * @param insuranceName\n */\n async listInsurancesByName(insuranceName: string): Promise<Array<Insurance>> {\n let _body = null\n\n const _url = this.host + `/insurance/byName/${encodeURIComponent(String(insuranceName))}` + '?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 Insurance(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an insurance\n * @param body\n */\n async modifyInsurance(body?: Insurance): Promise<Insurance> {\n const _url = this.host + `/insurance` + '?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 Insurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n getAllInsurances(startDocumentId?: string, limit?: number): Promise<PaginatedListInsurance> {\n let _body = null\n\n const _url =\n this.host +\n `/insurance?startDocumentId=${encodeURIComponent(String(startDocumentId))}&limit=${encodeURIComponent(String(limit))}` +\n '&ts=' +\n 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 PaginatedListInsurance(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { XHR } from '
|
|
2
|
-
import { AuthenticationProvider } from '
|
|
3
|
-
import { ExchangeData } from '
|
|
4
|
-
import { PaginatedListExchangeData } from '
|
|
1
|
+
import { XHR } from '../XHR';
|
|
2
|
+
import { AuthenticationProvider } from '../../../icc-x-api';
|
|
3
|
+
import { ExchangeData } from '../../model/internal/ExchangeData';
|
|
4
|
+
import { PaginatedListExchangeData } from '../../model/PaginatedListExchangeData';
|
|
5
5
|
export declare class IccExchangeDataApi {
|
|
6
6
|
host: string;
|
|
7
7
|
headers: Array<XHR.Header>;
|
|
@@ -10,11 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.IccExchangeDataApi = void 0;
|
|
13
|
-
const XHR_1 = require("
|
|
14
|
-
const icc_x_api_1 = require("
|
|
15
|
-
const ExchangeData_1 = require("
|
|
16
|
-
const PaginatedListExchangeData_1 = require("
|
|
17
|
-
const IccRestApiPath_1 = require("
|
|
13
|
+
const XHR_1 = require("../XHR");
|
|
14
|
+
const icc_x_api_1 = require("../../../icc-x-api");
|
|
15
|
+
const ExchangeData_1 = require("../../model/internal/ExchangeData");
|
|
16
|
+
const PaginatedListExchangeData_1 = require("../../model/PaginatedListExchangeData");
|
|
17
|
+
const IccRestApiPath_1 = require("../IccRestApiPath");
|
|
18
18
|
class IccExchangeDataApi {
|
|
19
19
|
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
20
20
|
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IccExchangeDataApi.js","sourceRoot":"","sources":["../../../../icc-api/api/internal/IccExchangeDataApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA4B;AAC5B,kDAAqF;AACrF,oEAAgE;AAChE,qFAAiF;AACjF,sDAAkD;AAElD,MAAa,kBAAkB;IAM7B,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,C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AAgB,CAAC,CAAC,CAAA;YAC9C,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,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACxH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;iBACpF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA/FD,gDA+FC","sourcesContent":["import { XHR } from '../XHR'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../../icc-x-api'\nimport { ExchangeData } from '../../model/internal/ExchangeData'\nimport { PaginatedListExchangeData } from '../../model/PaginatedListExchangeData'\nimport { iccRestApiPath } from '../IccRestApiPath'\n\nexport class IccExchangeDataApi {\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 async createExchangeData(body?: ExchangeData): Promise<ExchangeData> {\n const _url = this.host + `/exchangedata` + '?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 ExchangeData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async modifyExchangeData(body?: ExchangeData): Promise<ExchangeData> {\n const _url = this.host + `/exchangedata` + '?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 ExchangeData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async getExchangeDataById(exchangeDataId: string): Promise<ExchangeData> {\n const _url = this.host + `/exchangedata/${encodeURIComponent(String(exchangeDataId))}` + '?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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ExchangeData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async getExchangeDataByDelegatorDelegate(delegatorId: string, delegateId: string): Promise<ExchangeData[]> {\n const _url =\n this.host +\n `/exchangedata/byDelegatorDelegate/${encodeURIComponent(String(delegatorId))}/${encodeURIComponent(String(delegateId))}` +\n '?ts=' +\n 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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new ExchangeData(it)))\n .catch((err) => this.handleError(err))\n }\n\n async getExchangeDataByParticipant(dataOwnerId: string, startDocumentId?: string, limit?: number): Promise<PaginatedListExchangeData> {\n const _url =\n this.host +\n `/exchangedata/byParticipant/${encodeURIComponent(String(dataOwnerId))}` +\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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListExchangeData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async getExchangeDataParticipantCounterparts(dataOwnerId: string, counterpartTypes: string): Promise<string[]> {\n const _url =\n this.host +\n `/exchangedata/byParticipant/${encodeURIComponent(String(dataOwnerId))}/counterparts` +\n '?ts=' +\n new Date().getTime() +\n '&counterpartsTypes=' +\n encodeURIComponent(String(counterpartTypes))\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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { XHR } from '
|
|
2
|
-
import { AuthenticationProvider } from '
|
|
3
|
-
import { ExchangeDataMap } from '
|
|
4
|
-
import { ExchangeDataMapCreationBatch } from '
|
|
1
|
+
import { XHR } from '../XHR';
|
|
2
|
+
import { AuthenticationProvider } from '../../../icc-x-api';
|
|
3
|
+
import { ExchangeDataMap } from '../../model/internal/ExchangeDataMap';
|
|
4
|
+
import { ExchangeDataMapCreationBatch } from '../../model/ExchangeDataMapCreationBatch';
|
|
5
5
|
export declare class IccExchangeDataMapApi {
|
|
6
6
|
host: string;
|
|
7
7
|
headers: Array<XHR.Header>;
|
|
@@ -10,11 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.IccExchangeDataMapApi = void 0;
|
|
13
|
-
const XHR_1 = require("
|
|
14
|
-
const icc_x_api_1 = require("
|
|
15
|
-
const IccRestApiPath_1 = require("
|
|
16
|
-
const ExchangeDataMap_1 = require("
|
|
17
|
-
const ListOfIds_1 = require("
|
|
13
|
+
const XHR_1 = require("../XHR");
|
|
14
|
+
const icc_x_api_1 = require("../../../icc-x-api");
|
|
15
|
+
const IccRestApiPath_1 = require("../IccRestApiPath");
|
|
16
|
+
const ExchangeDataMap_1 = require("../../model/internal/ExchangeDataMap");
|
|
17
|
+
const ListOfIds_1 = require("../../model/ListOfIds");
|
|
18
18
|
class IccExchangeDataMapApi {
|
|
19
19
|
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
20
20
|
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IccExchangeDataMapApi.js","sourceRoot":"","sources":["../../../../icc-api/api/internal/IccExchangeDataMapApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA4B;AAC5B,kDAAqF;AACrF,sDAAkD;AAClD,0EAAsE;AAEtE,qDAAiD;AAEjD,MAAa,qBAAqB;IAMhC,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAA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E,IAAqB;;YAC/E,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,2BAA2B,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,EAAE,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,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACxH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,iCAAe,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;iBACpD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAvED,sDAuEC","sourcesContent":["import { XHR } from '../XHR'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../../icc-x-api'\nimport { iccRestApiPath } from '../IccRestApiPath'\nimport { ExchangeDataMap } from '../../model/internal/ExchangeDataMap'\nimport { ExchangeDataMapCreationBatch } from '../../model/ExchangeDataMapCreationBatch'\nimport { ListOfIds } from '../../model/ListOfIds'\n\nexport class IccExchangeDataMapApi {\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 async getExchangeDataMapById(exchangeDataMapId: string): Promise<ExchangeDataMap> {\n const _url = this.host + `/exchangedatamap/${encodeURIComponent(String(exchangeDataMapId))}` + '?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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new ExchangeDataMap(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async getExchangeDataMapByBatch(ids: string[]): Promise<ExchangeDataMap[]> {\n const _url = this.host + `/exchangedatamap/batch` + '?ts=' + new Date().getTime()\n const body = new ListOfIds({ ids })\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 ExchangeDataMap[])\n .catch((err) => this.handleError(err))\n }\n\n async createExchangeDataMap(body: ExchangeDataMap): Promise<ExchangeDataMap> {\n const _url = this.host + `/exchangedatamap` + '?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 ExchangeDataMap(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async createExchangeDataMapBatch(body: ExchangeDataMapCreationBatch): Promise<string> {\n const _url = this.host + `/exchangedatamap/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 string)\n .catch((err) => this.handleError(err))\n }\n\n async modifyExchangeDataMapForKey(accessControlKey: string, body: ExchangeDataMap): Promise<ExchangeDataMap> {\n const _url = this.host + `/exchangedatamap/forKey/${encodeURIComponent(String(accessControlKey))}` + '?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 ExchangeDataMap(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { XHR } from '../XHR';
|
|
2
|
+
import { RecoveryData } from '../../model/internal/RecoveryData';
|
|
3
|
+
import { AuthenticationProvider } from '../../../icc-x-api';
|
|
4
|
+
import { DocIdentifier } from '../../model/DocIdentifier';
|
|
5
|
+
import { Content } from '../../model/Content';
|
|
6
|
+
export declare class IccRecoveryDataApi {
|
|
7
|
+
host: string;
|
|
8
|
+
headers: Array<XHR.Header>;
|
|
9
|
+
authenticationProvider: AuthenticationProvider;
|
|
10
|
+
fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
11
|
+
constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
|
|
12
|
+
setHeaders(h: Array<XHR.Header>): void;
|
|
13
|
+
handleError(e: XHR.XHRError): never;
|
|
14
|
+
createRecoveryData(body?: RecoveryData): Promise<RecoveryData>;
|
|
15
|
+
getRecoveryData(recoveryDataId: string): Promise<RecoveryData>;
|
|
16
|
+
deleteRecoveryData(recoveryDataId: string): Promise<DocIdentifier>;
|
|
17
|
+
deleteAllRecoveryDataForRecipient(recipientId: string): Promise<Content>;
|
|
18
|
+
deleteAllRecoveryDataOfTypeForRecipient(type: string, recipientId: string): Promise<Content>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.IccRecoveryDataApi = void 0;
|
|
13
|
+
const XHR_1 = require("../XHR");
|
|
14
|
+
const RecoveryData_1 = require("../../model/internal/RecoveryData");
|
|
15
|
+
const icc_x_api_1 = require("../../../icc-x-api");
|
|
16
|
+
const IccRestApiPath_1 = require("../IccRestApiPath");
|
|
17
|
+
const DocIdentifier_1 = require("../../model/DocIdentifier");
|
|
18
|
+
const Content_1 = require("../../model/Content");
|
|
19
|
+
class IccRecoveryDataApi {
|
|
20
|
+
constructor(host, headers, authenticationProvider, fetchImpl) {
|
|
21
|
+
this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
|
|
22
|
+
this.headers = Object.keys(headers).map((k) => new XHR_1.XHR.Header(k, headers[k]));
|
|
23
|
+
this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new icc_x_api_1.NoAuthenticationProvider();
|
|
24
|
+
this.fetchImpl = fetchImpl;
|
|
25
|
+
}
|
|
26
|
+
setHeaders(h) {
|
|
27
|
+
this.headers = h;
|
|
28
|
+
}
|
|
29
|
+
handleError(e) {
|
|
30
|
+
throw e;
|
|
31
|
+
}
|
|
32
|
+
createRecoveryData(body) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const _url = this.host + `/recoverydata` + '?ts=' + new Date().getTime();
|
|
35
|
+
let headers = this.headers;
|
|
36
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
37
|
+
return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
38
|
+
.then((doc) => new RecoveryData_1.RecoveryData(doc.body))
|
|
39
|
+
.catch((err) => this.handleError(err));
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
getRecoveryData(recoveryDataId) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const _url = this.host + `/recoverydata/${encodeURIComponent(String(recoveryDataId))}` + '?ts=' + new Date().getTime();
|
|
45
|
+
let headers = this.headers;
|
|
46
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
47
|
+
return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
48
|
+
.then((doc) => new RecoveryData_1.RecoveryData(doc.body))
|
|
49
|
+
.catch((err) => this.handleError(err));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
deleteRecoveryData(recoveryDataId) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const _url = this.host + `/recoverydata/${encodeURIComponent(String(recoveryDataId))}` + '?ts=' + new Date().getTime();
|
|
55
|
+
return XHR_1.XHR.sendCommand('DELETE', _url, this.headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
56
|
+
.then((doc) => new DocIdentifier_1.DocIdentifier(doc.body))
|
|
57
|
+
.catch((err) => this.handleError(err));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
deleteAllRecoveryDataForRecipient(recipientId) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const _url = this.host + `/recoverydata/forRecipient/${encodeURIComponent(String(recipientId))}` + '?ts=' + new Date().getTime();
|
|
63
|
+
let headers = this.headers;
|
|
64
|
+
headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
|
|
65
|
+
return XHR_1.XHR.sendCommand('DELETE', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
66
|
+
.then((doc) => new Content_1.Content(doc.body))
|
|
67
|
+
.catch((err) => this.handleError(err));
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
deleteAllRecoveryDataOfTypeForRecipient(type, recipientId) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const _url = this.host +
|
|
73
|
+
`/recoverydata/forRecipient/${encodeURIComponent(String(recipientId))}/ofType/${encodeURIComponent(String(type))}` +
|
|
74
|
+
'?ts=' +
|
|
75
|
+
new Date().getTime();
|
|
76
|
+
return XHR_1.XHR.sendCommand('DELETE', _url, this.headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
|
|
77
|
+
.then((doc) => new Content_1.Content(doc.body))
|
|
78
|
+
.catch((err) => this.handleError(err));
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.IccRecoveryDataApi = IccRecoveryDataApi;
|
|
83
|
+
//# sourceMappingURL=IccRecoveryDataApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IccRecoveryDataApi.js","sourceRoot":"","sources":["../../../../icc-api/api/internal/IccRecoveryDataApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA4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AAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;IAEK,uCAAuC,CAAC,IAAY,EAAE,WAAmB;;YAC7E,MAAM,IAAI,GACR,IAAI,CAAC,IAAI;gBACT,8BAA8B,kBAAkB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE;gBAClH,MAAM;gBACN,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACtB,OAAO,SAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAChI,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,iBAAO,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;iBAC5C,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAtED,gDAsEC","sourcesContent":["import { XHR } from '../XHR'\nimport { RecoveryData } from '../../model/internal/RecoveryData'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../../icc-x-api'\nimport { iccRestApiPath } from '../IccRestApiPath'\nimport { DocIdentifier } from '../../model/DocIdentifier'\nimport { Content } from '../../model/Content'\n\nexport class IccRecoveryDataApi {\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 async createRecoveryData(body?: RecoveryData): Promise<RecoveryData> {\n const _url = this.host + `/recoverydata` + '?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 RecoveryData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async getRecoveryData(recoveryDataId: string): Promise<RecoveryData> {\n const _url = this.host + `/recoverydata/${encodeURIComponent(String(recoveryDataId))}` + '?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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new RecoveryData(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async deleteRecoveryData(recoveryDataId: string): Promise<DocIdentifier> {\n const _url = this.host + `/recoverydata/${encodeURIComponent(String(recoveryDataId))}` + '?ts=' + new Date().getTime()\n return XHR.sendCommand('DELETE', _url, this.headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new DocIdentifier(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async deleteAllRecoveryDataForRecipient(recipientId: string): Promise<Content> {\n const _url = this.host + `/recoverydata/forRecipient/${encodeURIComponent(String(recipientId))}` + '?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('DELETE', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Content(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async deleteAllRecoveryDataOfTypeForRecipient(type: string, recipientId: string): Promise<Content> {\n const _url =\n this.host +\n `/recoverydata/forRecipient/${encodeURIComponent(String(recipientId))}/ofType/${encodeURIComponent(String(type))}` +\n '?ts=' +\n new Date().getTime()\n return XHR.sendCommand('DELETE', _url, this.headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Content(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
package/icc-api/api/{IccSecureDelegationKeyMapApi.d.ts → internal/IccSecureDelegationKeyMapApi.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EntityShareOrMetadataUpdateRequest } from '
|
|
2
|
-
import { EntityBulkShareResult } from '
|
|
3
|
-
import { XHR } from '
|
|
4
|
-
import { AuthenticationProvider } from '
|
|
5
|
-
import { SecureDelegationKeyMap } from '
|
|
6
|
-
import { ListOfIds } from '
|
|
1
|
+
import { EntityShareOrMetadataUpdateRequest } from '../../model/requests/EntityShareOrMetadataUpdateRequest';
|
|
2
|
+
import { EntityBulkShareResult } from '../../model/requests/EntityBulkShareResult';
|
|
3
|
+
import { XHR } from '../XHR';
|
|
4
|
+
import { AuthenticationProvider } from '../../../icc-x-api';
|
|
5
|
+
import { SecureDelegationKeyMap } from '../../model/internal/SecureDelegationKeyMap';
|
|
6
|
+
import { ListOfIds } from '../../model/ListOfIds';
|
|
7
7
|
/**
|
|
8
8
|
* @internal this class is for internal use only and may be changed without notice.
|
|
9
9
|
*/
|
package/icc-api/api/{IccSecureDelegationKeyMapApi.js → internal/IccSecureDelegationKeyMapApi.js}
RENAMED
|
@@ -10,11 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.IccSecureDelegationKeyMapApi = void 0;
|
|
13
|
-
const EntityBulkShareResult_1 = require("
|
|
14
|
-
const XHR_1 = require("
|
|
15
|
-
const icc_x_api_1 = require("
|
|
16
|
-
const IccRestApiPath_1 = require("
|
|
17
|
-
const SecureDelegationKeyMap_1 = require("
|
|
13
|
+
const EntityBulkShareResult_1 = require("../../model/requests/EntityBulkShareResult");
|
|
14
|
+
const XHR_1 = require("../XHR");
|
|
15
|
+
const icc_x_api_1 = require("../../../icc-x-api");
|
|
16
|
+
const IccRestApiPath_1 = require("../IccRestApiPath");
|
|
17
|
+
const SecureDelegationKeyMap_1 = require("../../model/internal/SecureDelegationKeyMap");
|
|
18
18
|
/**
|
|
19
19
|
* @internal this class is for internal use only and may be changed without notice.
|
|
20
20
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IccSecureDelegationKeyMapApi.js","sourceRoot":"","sources":["../../../../icc-api/api/internal/IccSecureDelegationKeyMapApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sFAAkF;AAClF,gCAA4B;AAC5B,kDAAqF;AACrF,sDAAkD;AAClD,wFAAoF;AAGpF;;GAEG;AACH,MAAa,4BAA4B;IAMvC,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,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;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,oCAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IA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AO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,6CAAqB,CAAyB,CAAC,EAAE,+CAAsB,CAAC,CAAC,CAAC;iBACjI,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAjED,oEAiEC","sourcesContent":["import { EntityShareOrMetadataUpdateRequest } from '../../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../../model/requests/EntityBulkShareResult'\nimport { XHR } from '../XHR'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../../icc-x-api'\nimport { iccRestApiPath } from '../IccRestApiPath'\nimport { SecureDelegationKeyMap } from '../../model/internal/SecureDelegationKeyMap'\nimport { ListOfIds } from '../../model/ListOfIds'\n\n/**\n * @internal this class is for internal use only and may be changed without notice.\n */\nexport class IccSecureDelegationKeyMapApi {\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 get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\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 async getByDelegationKeys(delegationKeys: ListOfIds, proofOfAccessHeaders: XHR.Header[]): Promise<SecureDelegationKeyMap[]> {\n let _body = delegationKeys\n\n const _url = this.host + `/securedelegationkeymap/bydelegationkeys` + '?ts=' + new Date().getTime()\n let headers = [...(await this.headers), ...proofOfAccessHeaders]\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 SecureDelegationKeyMap(it)))\n .catch((err) => this.handleError(err))\n }\n\n async create(delegationKeyMap: SecureDelegationKeyMap, proofOfAccessHeader: XHR.Header): Promise<SecureDelegationKeyMap> {\n let _body = delegationKeyMap\n\n const _url = this.host + `/securedelegationkeymap` + '?ts=' + new Date().getTime()\n let headers = [...(await this.headers), proofOfAccessHeader]\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 SecureDelegationKeyMap(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n async bulkShareSecureDelegationKeyMap(\n request: {\n [entityId: string]: { [requestId: string]: EntityShareOrMetadataUpdateRequest }\n },\n proofOfAccessHeaders: XHR.Header[]\n ): Promise<EntityBulkShareResult<SecureDelegationKeyMap>[]> {\n const _url = this.host + '/securedelegationkeymap/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = [...(await this.headers), ...proofOfAccessHeaders]\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<SecureDelegationKeyMap>(x, SecureDelegationKeyMap)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* iCure Data Stack API Documentation
|
|
3
|
+
* The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
9
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { PaginatedDocumentKeyIdPairObject } from './PaginatedDocumentKeyIdPairObject';
|
|
13
|
+
import { Insurance } from './Insurance';
|
|
14
|
+
export declare class PaginatedListInsurance {
|
|
15
|
+
constructor(json: JSON | any);
|
|
16
|
+
pageSize?: number;
|
|
17
|
+
totalSize?: number;
|
|
18
|
+
rows?: Array<Insurance>;
|
|
19
|
+
nextKeyPair?: PaginatedDocumentKeyIdPairObject;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaginatedListInsurance = void 0;
|
|
4
|
+
class PaginatedListInsurance {
|
|
5
|
+
constructor(json) {
|
|
6
|
+
Object.assign(this, json);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.PaginatedListInsurance = PaginatedListInsurance;
|
|
10
|
+
//# sourceMappingURL=PaginatedListInsurance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaginatedListInsurance.js","sourceRoot":"","sources":["../../../icc-api/model/PaginatedListInsurance.ts"],"names":[],"mappings":";;;AAcA,MAAa,sBAAsB;IACjC,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAA8B,EAAE,IAAI,CAAC,CAAA;IACrD,CAAC;CAMF;AATD,wDASC","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 { PaginatedDocumentKeyIdPairObject } from './PaginatedDocumentKeyIdPairObject'\nimport { Insurance } from './Insurance'\n\nexport class PaginatedListInsurance {\n constructor(json: JSON | any) {\n Object.assign(this as PaginatedListInsurance, json)\n }\n\n pageSize?: number\n totalSize?: number\n rows?: Array<Insurance>\n nextKeyPair?: PaginatedDocumentKeyIdPairObject\n}\n"]}
|
package/icc-api/model/User.d.ts
CHANGED
|
@@ -117,6 +117,10 @@ export declare class User {
|
|
|
117
117
|
authenticationTokens?: {
|
|
118
118
|
[key: string]: AuthenticationToken;
|
|
119
119
|
};
|
|
120
|
+
/**
|
|
121
|
+
* System metadata for the user: this configuration is read only, and defined only when using the cloud version of iCure.
|
|
122
|
+
*/
|
|
123
|
+
systemMetadata?: User.SystemMetadata;
|
|
120
124
|
}
|
|
121
125
|
export declare namespace User {
|
|
122
126
|
type TypeEnum = 'database' | 'ldap' | 'token';
|
|
@@ -153,4 +157,19 @@ export declare namespace User {
|
|
|
153
157
|
cdItemTreatment: AutoDelegationTagEnum;
|
|
154
158
|
cdItemVaccine: AutoDelegationTagEnum;
|
|
155
159
|
};
|
|
160
|
+
class SystemMetadata {
|
|
161
|
+
constructor(json: JSON | any);
|
|
162
|
+
/**
|
|
163
|
+
* The roles of the user that the cloud environment recognizes
|
|
164
|
+
*/
|
|
165
|
+
roles?: string[];
|
|
166
|
+
/**
|
|
167
|
+
* If the user is considered as an admin by the cloud environment
|
|
168
|
+
*/
|
|
169
|
+
isAdmin?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* True if the content of roles is inherited from the user's group configuration, false if the roles are defined specifically for the use
|
|
172
|
+
*/
|
|
173
|
+
inheritsRoles?: boolean;
|
|
174
|
+
}
|
|
156
175
|
}
|
package/icc-api/model/User.js
CHANGED
|
@@ -42,5 +42,11 @@ exports.User = User;
|
|
|
42
42
|
cdItemTreatment: 'cdItemTreatment',
|
|
43
43
|
cdItemVaccine: 'cdItemVaccine',
|
|
44
44
|
};
|
|
45
|
+
class SystemMetadata {
|
|
46
|
+
constructor(json) {
|
|
47
|
+
Object.assign(this, json);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
User.SystemMetadata = SystemMetadata;
|
|
45
51
|
})(User = exports.User || (exports.User = {}));
|
|
46
52
|
//# sourceMappingURL=User.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../icc-api/model/User.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH,MAAa,IAAI;IACf,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../icc-api/model/User.ts"],"names":[],"mappings":";;;AAeA;;GAEG;AACH,MAAa,IAAI;IACf,YAAY,IAAgB;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,IAAI,CAAC,CAAA;IACnC,CAAC;CAoGF;AAvGD,oBAuGC;AACD,WAAiB,IAAI;IAEN,aAAQ,GAAG;QACtB,QAAQ,EAAE,UAAsB;QAChC,IAAI,EAAE,MAAkB;QACxB,KAAK,EAAE,OAAmB;KAC3B,CAAA;IAEY,eAAU,GAAG;QACxB,MAAM,EAAE,QAAsB;QAC9B,QAAQ,EAAE,UAAwB;QAClC,WAAW,EAAE,aAA2B;KACzC,CAAA;IAqBY,0BAAqB,GAAG;QACnC,GAAG,EAAE,KAA8B;QACnC,kBAAkB,EAAE,oBAA6C;QACjE,kBAAkB,EAAE,oBAA6C;QACjE,oBAAoB,EAAE,sBAA+C;QACrE,kBAAkB,EAAE,oBAA6C;QACjE,oBAAoB,EAAE,sBAA+C;QACrE,uBAAuB,EAAE,yBAAkD;QAC3E,UAAU,EAAE,YAAqC;QACjD,gBAAgB,EAAE,kBAA2C;QAC7D,uBAAuB,EAAE,yBAAkD;QAC3E,wBAAwB,EAAE,0BAAmD;QAC7E,aAAa,EAAE,eAAwC;QACvD,eAAe,EAAE,iBAA0C;QAC3D,SAAS,EAAE,WAAoC;QAC/C,YAAY,EAAE,cAAuC;QACrD,eAAe,EAAE,iBAA0C;QAC3D,gBAAgB,EAAE,kBAA2C;QAC7D,eAAe,EAAE,iBAA0C;QAC3D,aAAa,EAAE,eAAwC;KACxD,CAAA;IAED,MAAa,cAAc;QACzB,YAAY,IAAgB;YAC1B,MAAM,CAAC,MAAM,CAAC,IAAY,EAAE,IAAI,CAAC,CAAA;QACnC,CAAC;KAcF;IAjBY,mBAAc,iBAiB1B,CAAA;AACH,CAAC,EAzEgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAyEpB","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 { AuthenticationToken } from './AuthenticationToken'\nimport { Permission } from './Permission'\nimport { PropertyStub } from './PropertyStub'\n\n/**\n * This entity is a root level object. It represents an user that can log in to the iCure platform. It is serialized in JSON and saved in the underlying icure-base CouchDB database.\n */\nexport class User {\n constructor(json: JSON | any) {\n Object.assign(this as User, json)\n }\n\n /**\n * the Id of the user. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * the revision of the user in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when deletePatient is called.\n */\n deletionDate?: number\n created?: number\n /**\n * Last name of the user. This is the official last name that should be used for official administrative purposes.\n */\n name?: string\n /**\n * Extra properties for the user. Those properties are typed (see class Property)\n */\n properties?: Array<PropertyStub>\n /**\n * If permission to modify patient data is granted or revoked\n */\n permissions?: Array<Permission>\n /**\n * Roles specified for the user\n */\n roles?: Array<string>\n /**\n * Authorization source for user. 'Database', 'ldap' or 'token'\n */\n type?: User.TypeEnum\n /**\n * State of user's activeness: 'Active', 'Disabled' or 'Registering'\n */\n status?: User.StatusEnum\n /**\n * Username for this user. We encourage using an email address\n */\n login?: string\n /**\n * Hashed version of the password (BCrypt is used for hashing)\n */\n passwordHash?: string\n /**\n * Secret token used to verify 2fa\n */\n secret?: string\n /**\n * Whether the user has activated two factors authentication\n */\n use2fa?: boolean\n /**\n * id of the group (practice/hospital) the user is member of\n */\n groupId?: string\n /**\n * Id of the healthcare party if the user is a healthcare party.\n */\n healthcarePartyId?: string\n /**\n * Id of the patient if the user is a patient\n */\n patientId?: string\n /**\n * Id of the device if the user is a device\n */\n deviceId?: string\n /**\n * Delegations that are automatically generated client side when a new database object is created by this user\n */\n autoDelegations?: { [key in User.AutoDelegationTagEnum]?: Array<string> }\n /**\n * the timestamp (unix epoch in ms) of creation of the user, will be filled automatically if missing. Not enforced by the application server.\n */\n createdDate?: number\n /**\n * the timestamp (unix epoch in ms) of the latest validation of the terms of use of the application\n */\n termsOfUseDate?: number\n /**\n * email address of the user (used for token exchange or password recovery).\n */\n email?: string\n /**\n * mobile phone of the user (used for token exchange or password recovery).\n */\n mobilePhone?: string\n applicationTokens?: { [key: string]: string }\n /**\n * Encrypted and time-limited Authentication tokens used for inter-applications authentication\n */\n authenticationTokens?: { [key: string]: AuthenticationToken }\n /**\n * System metadata for the user: this configuration is read only, and defined only when using the cloud version of iCure.\n */\n systemMetadata?: User.SystemMetadata\n}\nexport namespace User {\n export type TypeEnum = 'database' | 'ldap' | 'token'\n export const TypeEnum = {\n Database: 'database' as TypeEnum,\n Ldap: 'ldap' as TypeEnum,\n Token: 'token' as TypeEnum,\n }\n export type StatusEnum = 'ACTIVE' | 'DISABLED' | 'REGISTERING'\n export const StatusEnum = {\n ACTIVE: 'ACTIVE' as StatusEnum,\n DISABLED: 'DISABLED' as StatusEnum,\n REGISTERING: 'REGISTERING' as StatusEnum,\n }\n export type AutoDelegationTagEnum =\n | 'all'\n | 'administrativeData'\n | 'generalInformation'\n | 'financialInformation'\n | 'medicalInformation'\n | 'sensitiveInformation'\n | 'confidentialInformation'\n | 'cdItemRisk'\n | 'cdItemFamilyRisk'\n | 'cdItemHealthcareelement'\n | 'cdItemHealthcareapproach'\n | 'cdItemAllergy'\n | 'cdItemDiagnosis'\n | 'cdItemLab'\n | 'cdItemResult'\n | 'cdItemParameter'\n | 'cdItemMedication'\n | 'cdItemTreatment'\n | 'cdItemVaccine'\n export const AutoDelegationTagEnum = {\n all: 'all' as AutoDelegationTagEnum,\n administrativeData: 'administrativeData' as AutoDelegationTagEnum,\n generalInformation: 'generalInformation' as AutoDelegationTagEnum,\n financialInformation: 'financialInformation' as AutoDelegationTagEnum,\n medicalInformation: 'medicalInformation' as AutoDelegationTagEnum,\n sensitiveInformation: 'sensitiveInformation' as AutoDelegationTagEnum,\n confidentialInformation: 'confidentialInformation' as AutoDelegationTagEnum,\n cdItemRisk: 'cdItemRisk' as AutoDelegationTagEnum,\n cdItemFamilyRisk: 'cdItemFamilyRisk' as AutoDelegationTagEnum,\n cdItemHealthcareelement: 'cdItemHealthcareelement' as AutoDelegationTagEnum,\n cdItemHealthcareapproach: 'cdItemHealthcareapproach' as AutoDelegationTagEnum,\n cdItemAllergy: 'cdItemAllergy' as AutoDelegationTagEnum,\n cdItemDiagnosis: 'cdItemDiagnosis' as AutoDelegationTagEnum,\n cdItemLab: 'cdItemLab' as AutoDelegationTagEnum,\n cdItemResult: 'cdItemResult' as AutoDelegationTagEnum,\n cdItemParameter: 'cdItemParameter' as AutoDelegationTagEnum,\n cdItemMedication: 'cdItemMedication' as AutoDelegationTagEnum,\n cdItemTreatment: 'cdItemTreatment' as AutoDelegationTagEnum,\n cdItemVaccine: 'cdItemVaccine' as AutoDelegationTagEnum,\n }\n\n export class SystemMetadata {\n constructor(json: JSON | any) {\n Object.assign(this as User, json)\n }\n\n /**\n * The roles of the user that the cloud environment recognizes\n */\n roles?: string[]\n /**\n * If the user is considered as an admin by the cloud environment\n */\n isAdmin?: boolean\n /**\n * True if the content of roles is inherited from the user's group configuration, false if the roles are defined specifically for the use\n */\n inheritsRoles?: boolean\n }\n}\n"]}
|
|
@@ -50,13 +50,29 @@ export declare class ExchangeData {
|
|
|
50
50
|
[keyPairFingerprint: string]: string;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
54
|
-
* the
|
|
55
|
-
* will contain the signature by fingerprint of the public key to use for verification.
|
|
53
|
+
* Encrypted signature key (hmac-sha256) shared between delegate and delegator, to allow either of them to modify
|
|
54
|
+
* the exchange data, without voiding the authenticity guarantee.
|
|
56
55
|
*/
|
|
57
|
-
|
|
56
|
+
sharedSignatureKey: {
|
|
58
57
|
[keyPairFingerprint: string]: string;
|
|
59
58
|
};
|
|
59
|
+
/**
|
|
60
|
+
* Signature to ensure the key data has not been tampered with by third parties (any actor without access to the
|
|
61
|
+
* keypair of the delegator/delegate): when creating new exchange data the delegator will create a new hmac key and
|
|
62
|
+
* sign it with his own private key.
|
|
63
|
+
* This field will contain the signature by fingerprint of the public key to use for verification.
|
|
64
|
+
*/
|
|
65
|
+
delegatorSignature: {
|
|
66
|
+
[keyPairFingerprint: string]: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Base 64 signature of the exchange data, to ensure it was not tampered by third parties. This signature validates:
|
|
70
|
+
* - The (decrypted) exchange key
|
|
71
|
+
* - The (decrypted) access control secret
|
|
72
|
+
* - The delegator and delegates being part of the exchange data
|
|
73
|
+
* - The public keys used in the exchange data (allows to consider them as verified in a second moment).
|
|
74
|
+
*/
|
|
75
|
+
sharedSignature: string;
|
|
60
76
|
/**
|
|
61
77
|
* hard delete (unix epoch in ms) timestamp of the object. Filled automatically when the delete method is called.
|
|
62
78
|
*/
|
|
@@ -6,8 +6,14 @@ exports.ExchangeData = void 0;
|
|
|
6
6
|
*/
|
|
7
7
|
class ExchangeData {
|
|
8
8
|
constructor(json) {
|
|
9
|
-
if (!json.delegator ||
|
|
10
|
-
|
|
9
|
+
if (!json.delegator ||
|
|
10
|
+
!json.delegate ||
|
|
11
|
+
!json.exchangeKey ||
|
|
12
|
+
!json.accessControlSecret ||
|
|
13
|
+
!json.sharedSignatureKey ||
|
|
14
|
+
!json.sharedSignature ||
|
|
15
|
+
!json.delegatorSignature)
|
|
16
|
+
throw new Error(`Exchange data json is missing required properties.\n${JSON.stringify(json, undefined, 2)}`);
|
|
11
17
|
Object.assign(this, json);
|
|
12
18
|
}
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExchangeData.js","sourceRoot":"","sources":["../../../../icc-api/model/internal/ExchangeData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,
|
|
1
|
+
{"version":3,"file":"ExchangeData.js","sourceRoot":"","sources":["../../../../icc-api/model/internal/ExchangeData.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,YAAY;IACvB,YAAY,IAAgB;QAC1B,IACE,CAAC,IAAI,CAAC,SAAS;YACf,CAAC,IAAI,CAAC,QAAQ;YACd,CAAC,IAAI,CAAC,WAAW;YACjB,CAAC,IAAI,CAAC,mBAAmB;YACzB,CAAC,IAAI,CAAC,kBAAkB;YACxB,CAAC,IAAI,CAAC,eAAe;YACrB,CAAC,IAAI,CAAC,kBAAkB;YAExB,MAAM,IAAI,KAAK,CAAC,uDAAuD,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;QAC9G,MAAM,CAAC,MAAM,CAAC,IAAoB,EAAE,IAAI,CAAC,CAAA;IAC3C,CAAC;CAoEF;AAjFD,oCAiFC","sourcesContent":["/**\n * @internal this entity is meant for internal use only\n */\nexport class ExchangeData {\n constructor(json: JSON | any) {\n if (\n !json.delegator ||\n !json.delegate ||\n !json.exchangeKey ||\n !json.accessControlSecret ||\n !json.sharedSignatureKey ||\n !json.sharedSignature ||\n !json.delegatorSignature\n )\n throw new Error(`Exchange data json is missing required properties.\\n${JSON.stringify(json, undefined, 2)}`)\n Object.assign(this as ExchangeData, json)\n }\n\n /**\n * the Id of the exchange data. We encourage using either a v4 UUID or a HL7 Id.\n */\n id?: string\n /**\n * the revision of the exchange data in the database, used for conflict management / optimistic locking.\n */\n rev?: string\n /**\n * ID of the data owner which created this exchange data, in order to share some data with the [delegate].\n */\n delegator!: string\n /**\n * ID of a data owner which can use this exchange data to access data shared with him by [delegator].\n */\n delegate!: string\n /**\n * Aes key to use for sharing data from the delegator to the delegate, encrypted with the public keys of both delegate\n * and delegator. This key should never be sent decrypted to the server, as it allows to read medical data.\n */\n exchangeKey!: { [keyPairFingerprint: string]: string }\n /**\n * Key used for access control to data shared from the delegator to the delegate, encrypted with the public keys of both\n * delegate and delegator.\n *\n * This key will be used by the client to calculate the keys of [HasSecureDelegationsAccessControl.securityMetadata] which\n * allows to implement a form of access control where the identity of data owners with access to a specific entity can't be\n * deduced from the database alone. This is useful for example to allow patients to access their medical data without creating\n * a deducible link between the patient and the medical data in the database.\n *\n * There are no strict requirements on how the client should use this secret to create the security metadata key, but for\n * authentication the client must be able to provide a 128 bit long access control key (see [DataOwnerAuthenticationDetails.accessControlKeys])\n * which once hashed using sha256 will give the key of the security metadata.\n * However, in order to avoid introducing undesired links between entities which could be detrimental to the patients privacy\n * the access control keys should be created also using information on the entity class and confidentiality level of information\n * in applications where hcps share information using a hierarchical structure.\n * ```\n * accessControlKey = sha256Bytes(accessControlSecret + entityClass + confidentialityLevel).take(16)\n * securityMetadataKey = sha256Hex(accessControlKey)\n * ```\n */\n accessControlSecret!: { [keyPairFingerprint: string]: string }\n /**\n * Encrypted signature key (hmac-sha256) shared between delegate and delegator, to allow either of them to modify\n * the exchange data, without voiding the authenticity guarantee.\n */\n sharedSignatureKey!: { [keyPairFingerprint: string]: string }\n /**\n * Signature to ensure the key data has not been tampered with by third parties (any actor without access to the\n * keypair of the delegator/delegate): when creating new exchange data the delegator will create a new hmac key and\n * sign it with his own private key.\n * This field will contain the signature by fingerprint of the public key to use for verification.\n */\n delegatorSignature!: { [keyPairFingerprint: string]: string }\n /**\n * Base 64 signature of the exchange data, to ensure it was not tampered by third parties. This signature validates:\n * - The (decrypted) exchange key\n * - The (decrypted) access control secret\n * - The delegator and delegates being part of the exchange data\n * - The public keys used in the exchange data (allows to consider them as verified in a second moment).\n */\n sharedSignature!: string\n /**\n * hard delete (unix epoch in ms) timestamp of the object. Filled automatically when the delete method is called.\n */\n deletionDate?: number\n}\n"]}
|