@unimaze/billing 0.8.1 → 0.8.2-rc.0

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.
@@ -34,7 +34,8 @@ var initialiseMessageApi = function (mapiBaseUrl) {
34
34
  var submitDocument = function (data, attachDocument, mapiBaseUrl, apiKey) {
35
35
  var messageApi = initialiseMessageApi(mapiBaseUrl);
36
36
  var messageId = attachDocument.messageId, name = attachDocument.name, contentType = attachDocument.contentType, more = attachDocument.more;
37
- return messageApi.addDocuments(messageId, name, contentType, more, undefined, undefined, undefined, createOptionsData(data, apiKey));
37
+ var options = createOptionsData(data, apiKey);
38
+ return messageApi.addDocuments(messageId, name, contentType, more, undefined, undefined, undefined, options);
38
39
  };
39
40
  exports.submitDocument = submitDocument;
40
41
  var submitInvoice = function (createSubmitInvoice, mapiBaseUrl, apiKey, callName, language) {
@@ -47,7 +48,10 @@ var createOptions = function (apiKey, callName, language) {
47
48
  return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) })) }, (callName && { cancelToken: getCancelToken(callName) }));
48
49
  };
49
50
  var createOptionsData = function (data, apiKey, callName, language) {
50
- return __assign({ headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) }), { "Content-Type": "application/octet-stream" }) }, (callName && { cancelToken: getCancelToken(callName) }), { data: data });
51
+ var options = __assign({}, (callName && { cancelToken: getCancelToken(callName) }), { data: data, headers: __assign({ "Accept-Language": language ? language : "en" }, (apiKey && { Authorization: "Bearer " + window.btoa(apiKey) }), { "Content-Type": "application/octet-stream" }) });
52
+ // tslint:disable-next-line:no-console
53
+ console.log(options);
54
+ return options;
51
55
  };
52
56
  var getCancelToken = function (callName) {
53
57
  var cancelTokenSource = window[callName];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unimaze/billing",
3
- "version": "0.8.1",
3
+ "version": "0.8.2-rc.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",