@icure/be-fhc-api 0.5.10 → 0.5.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/be-fhc-api",
3
- "version": "0.5.10",
3
+ "version": "0.5.12",
4
4
  "description": "Typescript version of Freehealth Connector standalone API client",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -50,7 +50,7 @@ class MessageXApi {
50
50
  name: `${msg.subject}_content.json`
51
51
  })
52
52
  .then(doc => this.documentXApi.createDocument(doc))
53
- .then(doc => this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(req))), ["public.json"]))
53
+ .then(doc => this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(req))), ["public.json"]))
54
54
  .then(() => msg);
55
55
  });
56
56
  }
@@ -359,7 +359,7 @@ class MessageXApi {
359
359
  name: `${msg.subject}_content.json`
360
360
  })
361
361
  .then(doc => docXApi.createDocument(doc))
362
- .then(doc => docXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(dmgMessage))), ["public.json"]))
362
+ .then(doc => docXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(dmgMessage))), ["public.json"]))
363
363
  .then(() => msg);
364
364
  });
365
365
  }
@@ -489,7 +489,7 @@ class MessageXApi {
489
489
  efactMessage.tack.reference
490
490
  ].filter(x => x != null)
491
491
  }))
492
- .then((rcpt) => this.receiptXApi.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "tack", (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(efactMessage)))))
492
+ .then((rcpt) => this.receiptXApi.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "tack", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(efactMessage)))))
493
493
  .then(() => {
494
494
  parentMessage.status = parentMessage.status | (1 << 8); /*STATUS_SUBMITTED*/
495
495
  // Reset error
@@ -645,9 +645,9 @@ class MessageXApi {
645
645
  this.documentXApi.createDocument(jsonParsedDoc)
646
646
  ]))
647
647
  .then(([doc, jsonDoc, jsonParsedDoc]) => Promise.all([
648
- this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(efactMessage.detail)), ["public.plain-text"]),
649
- this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(efactMessage))), ["public.json"]),
650
- this.documentXApi.setClearDocumentAttachment(jsonParsedDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(parsedRecords))), ["public.json"])
648
+ this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(efactMessage.detail)), ["public.plain-text"]),
649
+ this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(efactMessage))), ["public.json"]),
650
+ this.documentXApi.setClearDocumentAttachment(jsonParsedDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(parsedRecords))), ["public.json"])
651
651
  ]))
652
652
  .then(() => ["920999", "920099", "920900"].includes(messageType)
653
653
  ? this.invoiceXApi.getInvoices(new api_1.ListOfIds({ ids: parentMessage.invoiceIds }))
@@ -911,8 +911,8 @@ class MessageXApi {
911
911
  this.documentXApi.createDocument(doc)
912
912
  ]))
913
913
  .then(([jsonDoc, doc]) => Promise.all([
914
- this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(res.records))), ["public.json"]),
915
- this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.string2ua)(res.detail)), [
914
+ this.documentXApi.setClearDocumentAttachment(jsonDoc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(res.records))), ["public.json"]),
915
+ this.documentXApi.setClearDocumentAttachment(doc, (0, api_1.ua2ab)((0, api_1.utf8_2ua)(res.detail)), [
916
916
  "public.plain-text"
917
917
  ])
918
918
  ]))
@@ -920,7 +920,7 @@ class MessageXApi {
920
920
  `mycarenet:efact:inputReference:${res.inputReference}`,
921
921
  res.tack.appliesTo,
922
922
  res.tack.reference
923
- ].filter(x => x != null), "tack", (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(res.tack)))));
923
+ ].filter(x => x != null), "tack", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(res.tack)))));
924
924
  }
925
925
  }
926
926
  exports.MessageXApi = MessageXApi;
@@ -37,7 +37,7 @@ class ReceiptXApi {
37
37
  throw new Error(`Receipt has no rev: ${rcpt}`);
38
38
  }
39
39
  else {
40
- return this.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "soapConversation", (0, api_1.ua2ab)((0, api_1.string2ua)(JSON.stringify(object.mycarenetConversation))));
40
+ return this.iccApi.setReceiptAttachmentForBlobType(rcpt.id, rcpt.rev, "soapConversation", (0, api_1.ua2ab)((0, api_1.utf8_2ua)(JSON.stringify(object.mycarenetConversation))));
41
41
  }
42
42
  });
43
43
  }