@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,4 +1,3 @@
|
|
|
1
|
-
import { AccountType } from '../../../../entity/account/accountState';
|
|
2
1
|
import { UploadStatementDocumentAIPayload } from '../../payload/reconciliationPayload';
|
|
3
2
|
export interface AuthParams {
|
|
4
3
|
sessionId: string;
|
|
@@ -10,4 +9,4 @@ export interface AuthParamsPayload {
|
|
|
10
9
|
zeni_tenant_id: string;
|
|
11
10
|
zeni_user_id: string;
|
|
12
11
|
}
|
|
13
|
-
export default function uploadAccountStatementIntoDocumentAI(
|
|
12
|
+
export default function uploadAccountStatementIntoDocumentAI(fileBlob: Blob, authParams: AuthParams): Promise<UploadStatementDocumentAIPayload | undefined>;
|
package/lib/view/expenseAutomationView/epics/accountRecon/uploadAccountStatementDocumentAIHelper.js
CHANGED
|
@@ -6,15 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.default = uploadAccountStatementIntoDocumentAI;
|
|
7
7
|
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
8
8
|
const init_1 = require("../../../../init");
|
|
9
|
-
async function uploadAccountStatementIntoDocumentAI(
|
|
9
|
+
async function uploadAccountStatementIntoDocumentAI(fileBlob, authParams) {
|
|
10
10
|
let statementUpload;
|
|
11
|
-
const urlEndPoint = `${init_1.zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/statement`;
|
|
11
|
+
const urlEndPoint = `${init_1.zeniAPI.apiEndPoints.documentAIMicroServiceBaseUrl}/1.0/processors/bank-statement`;
|
|
12
12
|
const data = new FormData();
|
|
13
13
|
data.append('attachment_file_0', fileBlob);
|
|
14
14
|
const attachment_json = JSON.stringify({
|
|
15
|
-
document_type:
|
|
16
|
-
? 'reconciliation_card_statement_upload'
|
|
17
|
-
: 'reconciliation_bank_statement_upload',
|
|
15
|
+
document_type: 'reconciliation_bank_statement_upload',
|
|
18
16
|
purpose_id: 'reconciliation',
|
|
19
17
|
});
|
|
20
18
|
data.append('attachment_json_0', attachment_json);
|
package/lib/zeniAPI.js
CHANGED
|
@@ -53,6 +53,7 @@ class ZeniAPIClient {
|
|
|
53
53
|
const promise = (0, cross_fetch_1.fetch)(restEndPoint, {
|
|
54
54
|
method: 'GET',
|
|
55
55
|
headers: this.apiHeaders(headers),
|
|
56
|
+
credentials: 'include',
|
|
56
57
|
signal,
|
|
57
58
|
}).then((response) => this.processJsonResponse(response));
|
|
58
59
|
return (0, rxjs_1.from)(promise);
|
|
@@ -65,6 +66,7 @@ class ZeniAPIClient {
|
|
|
65
66
|
'Content-Type': 'application/json',
|
|
66
67
|
...this.apiHeaders(headers),
|
|
67
68
|
},
|
|
69
|
+
credentials: 'include',
|
|
68
70
|
signal,
|
|
69
71
|
});
|
|
70
72
|
return (0, rxjs_1.from)(promise);
|
|
@@ -77,6 +79,7 @@ class ZeniAPIClient {
|
|
|
77
79
|
'Content-Type': 'application/json',
|
|
78
80
|
...this.apiHeaders(headers),
|
|
79
81
|
},
|
|
82
|
+
credentials: 'include',
|
|
80
83
|
signal,
|
|
81
84
|
}).then((response) => this.processJsonResponse(response));
|
|
82
85
|
return (0, rxjs_1.from)(promise);
|
|
@@ -106,6 +109,7 @@ class ZeniAPIClient {
|
|
|
106
109
|
method: 'DELETE',
|
|
107
110
|
body: body != null ? JSON.stringify(body) : undefined,
|
|
108
111
|
headers: apiHeaders,
|
|
112
|
+
credentials: 'include',
|
|
109
113
|
signal,
|
|
110
114
|
}).then((response) => this.processJsonResponse(response));
|
|
111
115
|
return (0, rxjs_1.from)(promise);
|
|
@@ -118,6 +122,7 @@ class ZeniAPIClient {
|
|
|
118
122
|
'Content-Type': 'application/json',
|
|
119
123
|
...this.apiHeaders(headers),
|
|
120
124
|
},
|
|
125
|
+
credentials: 'include',
|
|
121
126
|
signal,
|
|
122
127
|
}).then((response) => this.processJsonResponse(response));
|
|
123
128
|
return (0, rxjs_1.from)(promise);
|
|
@@ -130,6 +135,7 @@ class ZeniAPIClient {
|
|
|
130
135
|
'Content-Type': 'application/json',
|
|
131
136
|
...this.apiHeaders(headers),
|
|
132
137
|
},
|
|
138
|
+
credentials: 'include',
|
|
133
139
|
signal,
|
|
134
140
|
}).then((response) => this.processJsonResponse(response));
|
|
135
141
|
return (0, rxjs_1.from)(promise);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.41-beta6ND",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|