@unimaze/billing 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/ApiUtility.js +21 -3
- package/package.json +1 -1
package/lib/utils/ApiUtility.js
CHANGED
|
@@ -32,10 +32,28 @@ var initialiseMessageApi = function (mapiBaseUrl) {
|
|
|
32
32
|
return new api_clients_1.mapi.MessageApi(initiatedConfig);
|
|
33
33
|
};
|
|
34
34
|
var submitDocument = function (data, attachDocument, mapiBaseUrl, apiKey) {
|
|
35
|
-
var messageApi = initialiseMessageApi(mapiBaseUrl);
|
|
36
35
|
var messageId = attachDocument.messageId, name = attachDocument.name, contentType = attachDocument.contentType, more = attachDocument.more;
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
return axios_1.default.post(mapiBaseUrl + "/api/v1/messages/" + messageId + "/documents", data, {
|
|
37
|
+
params: {
|
|
38
|
+
name: name,
|
|
39
|
+
contentType: contentType,
|
|
40
|
+
more: more
|
|
41
|
+
},
|
|
42
|
+
headers: __assign({}, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) }), { "Content-Type": "application/octet-stream" })
|
|
43
|
+
});
|
|
44
|
+
// const messageApi = initialiseMessageApi(mapiBaseUrl);
|
|
45
|
+
//
|
|
46
|
+
// const options = createOptionsData(data, apiKey)
|
|
47
|
+
// return messageApi.addDocuments(
|
|
48
|
+
// messageId,
|
|
49
|
+
// name,
|
|
50
|
+
// contentType,
|
|
51
|
+
// more,
|
|
52
|
+
// undefined,
|
|
53
|
+
// undefined,
|
|
54
|
+
// undefined,
|
|
55
|
+
// options
|
|
56
|
+
// )
|
|
39
57
|
};
|
|
40
58
|
exports.submitDocument = submitDocument;
|
|
41
59
|
var submitInvoice = function (createSubmitInvoice, mapiBaseUrl, apiKey, callName, language) {
|