Comparing version 1.0.11 to 1.0.12
@@ -45,2 +45,35 @@ /** | ||
confirmUsingPUT( | ||
nihii: string, | ||
language: string, | ||
xFHCKeystoreId: string, | ||
xFHCTokenId: string, | ||
xFHCPassPhrase: string, | ||
ssin: string, | ||
firstName: string, | ||
lastName: string, | ||
valueHashes: Array<string> | ||
): Promise<boolean | any> { | ||
let _body = null | ||
_body = valueHashes | ||
const _url = | ||
this.host + | ||
"/efact/confirm".replace("{nihii}", nihii + "").replace("{language}", language + "") + | ||
"?ts=" + | ||
new Date().getTime() + | ||
(ssin ? "&ssin=" + ssin : "") + | ||
(firstName ? "&firstName=" + firstName : "") + | ||
(lastName ? "&lastName=" + lastName : "") | ||
let headers = this.headers | ||
headers = headers | ||
.filter(h => h.header !== "Content-Type") | ||
.concat(new XHR.Header("Content-Type", "application/json")) | ||
headers = headers.concat(new XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)) | ||
headers = headers.concat(new XHR.Header("X-FHC-tokenId", xFHCTokenId)) | ||
headers = headers.concat(new XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)) | ||
return XHR.sendCommand("PUT", _url, headers, _body) | ||
.then(doc => JSON.parse(JSON.stringify(doc.body))) | ||
.catch(err => this.handleError(err)) | ||
} | ||
loadMessagesUsingGET( | ||
@@ -47,0 +80,0 @@ nihii: string, |
@@ -32,2 +32,3 @@ /** | ||
handleError(e: XHR.Data): void; | ||
confirmUsingPUT(nihii: string, language: string, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, ssin: string, firstName: string, lastName: string, valueHashes: Array<string>): Promise<boolean | any>; | ||
loadMessagesUsingGET(nihii: string, language: string, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, ssin: string, firstName: string, lastName: string): Promise<Array<models.EfactMessage> | any>; | ||
@@ -34,0 +35,0 @@ makeFlatFileTestUsingPOST(batch: models.InvoicesBatch): Promise<string | any>; |
@@ -40,2 +40,23 @@ /** | ||
} | ||
confirmUsingPUT(nihii, language, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, ssin, firstName, lastName, valueHashes) { | ||
let _body = null; | ||
_body = valueHashes; | ||
const _url = this.host + | ||
"/efact/confirm".replace("{nihii}", nihii + "").replace("{language}", language + "") + | ||
"?ts=" + | ||
new Date().getTime() + | ||
(ssin ? "&ssin=" + ssin : "") + | ||
(firstName ? "&firstName=" + firstName : "") + | ||
(lastName ? "&lastName=" + lastName : ""); | ||
let headers = this.headers; | ||
headers = headers | ||
.filter(h => h.header !== "Content-Type") | ||
.concat(new XHR.Header("Content-Type", "application/json")); | ||
headers = headers.concat(new XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)); | ||
headers = headers.concat(new XHR.Header("X-FHC-tokenId", xFHCTokenId)); | ||
headers = headers.concat(new XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)); | ||
return XHR.sendCommand("PUT", _url, headers, _body) | ||
.then(doc => JSON.parse(JSON.stringify(doc.body))) | ||
.catch(err => this.handleError(err)); | ||
} | ||
loadMessagesUsingGET(nihii, language, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, ssin, firstName, lastName) { | ||
@@ -42,0 +63,0 @@ let _body = null; |
@@ -28,2 +28,3 @@ /** | ||
detail?: string; | ||
hashValue?: string; | ||
id?: string; | ||
@@ -30,0 +31,0 @@ message?: models.Message; |
@@ -33,2 +33,4 @@ /** | ||
hashValue?: string | ||
id?: string | ||
@@ -35,0 +37,0 @@ |
{ | ||
"name": "fhc-api", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Typescript version of Freehealth Connector standalone API client", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
15971771
20016