@zeniai/client-epic-state 4.19.40 → 4.19.41-beta6ND
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/esm/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +3 -5
- package/lib/esm/zeniAPI.js +6 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js +3 -5
- package/lib/zeniAPI.js +6 -0
- package/package.json +1 -1
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import fetch from 'cross-fetch';
|
|
2
2
|
import { zeniAPI } from '../../../../init';
|
|
3
|
-
export default async function uploadAccountStatementIntoDocumentAI(
|
|
3
|
+
export default async function uploadAccountStatementIntoDocumentAI(fileBlob, authParams) {
|
|
4
4
|
let statementUpload;
|
|
5
|
-
const urlEndPoint = `${zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/statement`;
|
|
5
|
+
const urlEndPoint = `${zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/bank-statement`;
|
|
6
6
|
const data = new FormData();
|
|
7
7
|
data.append('attachment_file_0', fileBlob);
|
|
8
8
|
const attachment_json = JSON.stringify({
|
|
9
|
-
document_type:
|
|
10
|
-
? 'reconciliation_card_statement_upload'
|
|
11
|
-
: 'reconciliation_bank_statement_upload',
|
|
9
|
+
document_type: 'reconciliation_bank_statement_upload',
|
|
12
10
|
purpose_id: 'reconciliation',
|
|
13
11
|
});
|
|
14
12
|
data.append('attachment_json_0', attachment_json);
|
package/lib/esm/zeniAPI.js
CHANGED
|
@@ -50,6 +50,7 @@ export class ZeniAPIClient {
|
|
|
50
50
|
const promise = fetch(restEndPoint, {
|
|
51
51
|
method: 'GET',
|
|
52
52
|
headers: this.apiHeaders(headers),
|
|
53
|
+
credentials: 'include',
|
|
53
54
|
signal,
|
|
54
55
|
}).then((response) => this.processJsonResponse(response));
|
|
55
56
|
return from(promise);
|
|
@@ -62,6 +63,7 @@ export class ZeniAPIClient {
|
|
|
62
63
|
'Content-Type': 'application/json',
|
|
63
64
|
...this.apiHeaders(headers),
|
|
64
65
|
},
|
|
66
|
+
credentials: 'include',
|
|
65
67
|
signal,
|
|
66
68
|
});
|
|
67
69
|
return from(promise);
|
|
@@ -74,6 +76,7 @@ export class ZeniAPIClient {
|
|
|
74
76
|
'Content-Type': 'application/json',
|
|
75
77
|
...this.apiHeaders(headers),
|
|
76
78
|
},
|
|
79
|
+
credentials: 'include',
|
|
77
80
|
signal,
|
|
78
81
|
}).then((response) => this.processJsonResponse(response));
|
|
79
82
|
return from(promise);
|
|
@@ -103,6 +106,7 @@ export class ZeniAPIClient {
|
|
|
103
106
|
method: 'DELETE',
|
|
104
107
|
body: body != null ? JSON.stringify(body) : undefined,
|
|
105
108
|
headers: apiHeaders,
|
|
109
|
+
credentials: 'include',
|
|
106
110
|
signal,
|
|
107
111
|
}).then((response) => this.processJsonResponse(response));
|
|
108
112
|
return from(promise);
|
|
@@ -115,6 +119,7 @@ export class ZeniAPIClient {
|
|
|
115
119
|
'Content-Type': 'application/json',
|
|
116
120
|
...this.apiHeaders(headers),
|
|
117
121
|
},
|
|
122
|
+
credentials: 'include',
|
|
118
123
|
signal,
|
|
119
124
|
}).then((response) => this.processJsonResponse(response));
|
|
120
125
|
return from(promise);
|
|
@@ -127,6 +132,7 @@ export class ZeniAPIClient {
|
|
|
127
132
|
'Content-Type': 'application/json',
|
|
128
133
|
...this.apiHeaders(headers),
|
|
129
134
|
},
|
|
135
|
+
credentials: 'include',
|
|
130
136
|
signal,
|
|
131
137
|
}).then((response) => this.processJsonResponse(response));
|
|
132
138
|
return from(promise);
|