@yuno-payments/dashboard-api-mfe 1.11.3 → 1.11.4
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/build/cjs/index.js +6 -6
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/types/api/api.d.ts +18 -11
- package/build/cjs/types/mutations/index.d.ts +0 -1
- package/build/cjs/types/mutations/notifications/notifications.mutation.d.ts +3 -2
- package/build/cjs/types/mutations/recipients/recipients.mutation.d.ts +7 -14
- package/build/cjs/types/queries/checkouts/checkouts.query.d.ts +1 -105
- package/build/cjs/types/queries/cms/cms.query.d.ts +14 -0
- package/build/cjs/types/queries/cms/index.d.ts +1 -0
- package/build/cjs/types/queries/data-report/data-report.query.d.ts +4 -0
- package/build/cjs/types/queries/dialogs/dialogs.query.d.ts +2 -0
- package/build/cjs/types/queries/dialogs/index.d.ts +1 -0
- package/build/cjs/types/queries/index.d.ts +2 -0
- package/build/cjs/types/queries/mfa/organization-settings.query.d.ts +1 -4
- package/build/cjs/types/queries/payment-links/payment-links.query.d.ts +1 -0
- package/build/cjs/types/queries/recipients/recipients.query.d.ts +1 -6
- package/build/cjs/types/types/audit/audit.d.ts +0 -2
- package/build/cjs/types/types/cms/cms.d.ts +47 -0
- package/build/cjs/types/types/cms/index.d.ts +1 -0
- package/build/cjs/types/types/data-report/data-report.d.ts +1 -4
- package/build/cjs/types/types/index.d.ts +1 -1
- package/build/cjs/types/types/installments/installments.d.ts +0 -4
- package/build/cjs/types/types/mfa/mfa.d.ts +0 -4
- package/build/cjs/types/types/recipients/index.d.ts +0 -1
- package/build/cjs/types/types/reports/reports.d.ts +0 -1
- package/build/cjs/types/types/subscriptions/subscriptions.d.ts +0 -7
- package/build/cjs/types/types/template-reporting/template.types.d.ts +0 -4
- package/build/cjs/types/utils/enums.d.ts +143 -0
- package/build/esm/index.js +6 -6
- package/build/esm/index.js.map +1 -1
- package/build/esm/types/api/api.d.ts +18 -11
- package/build/esm/types/mutations/index.d.ts +0 -1
- package/build/esm/types/mutations/notifications/notifications.mutation.d.ts +3 -2
- package/build/esm/types/mutations/recipients/recipients.mutation.d.ts +7 -14
- package/build/esm/types/queries/checkouts/checkouts.query.d.ts +1 -105
- package/build/esm/types/queries/cms/cms.query.d.ts +14 -0
- package/build/esm/types/queries/cms/index.d.ts +1 -0
- package/build/esm/types/queries/data-report/data-report.query.d.ts +4 -0
- package/build/esm/types/queries/dialogs/dialogs.query.d.ts +2 -0
- package/build/esm/types/queries/dialogs/index.d.ts +1 -0
- package/build/esm/types/queries/index.d.ts +2 -0
- package/build/esm/types/queries/mfa/organization-settings.query.d.ts +1 -4
- package/build/esm/types/queries/payment-links/payment-links.query.d.ts +1 -0
- package/build/esm/types/queries/recipients/recipients.query.d.ts +1 -6
- package/build/esm/types/types/audit/audit.d.ts +0 -2
- package/build/esm/types/types/cms/cms.d.ts +47 -0
- package/build/esm/types/types/cms/index.d.ts +1 -0
- package/build/esm/types/types/data-report/data-report.d.ts +1 -4
- package/build/esm/types/types/index.d.ts +1 -1
- package/build/esm/types/types/installments/installments.d.ts +0 -4
- package/build/esm/types/types/mfa/mfa.d.ts +0 -4
- package/build/esm/types/types/recipients/index.d.ts +0 -1
- package/build/esm/types/types/reports/reports.d.ts +0 -1
- package/build/esm/types/types/subscriptions/subscriptions.d.ts +0 -7
- package/build/esm/types/types/template-reporting/template.types.d.ts +0 -4
- package/build/esm/types/utils/enums.d.ts +143 -0
- package/build/index.d.ts +97 -249
- package/build/main.0ef469d30ac1f73e.hot-update.js +46 -0
- package/build/main.0ef469d30ac1f73e.hot-update.js.map +1 -0
- package/build/main.0ef469d30ac1f73e.hot-update.json +1 -0
- package/build/main.12ba9763a5af2867.hot-update.js +4178 -0
- package/build/main.12ba9763a5af2867.hot-update.js.map +1 -0
- package/build/main.12ba9763a5af2867.hot-update.json +1 -0
- package/build/main.2f0bb65f361bc9aa.hot-update.js +2575 -0
- package/build/main.2f0bb65f361bc9aa.hot-update.js.map +1 -0
- package/build/main.2f0bb65f361bc9aa.hot-update.json +1 -0
- package/build/main.31b800bdfc7bcf66.hot-update.js +23 -0
- package/build/main.31b800bdfc7bcf66.hot-update.js.map +1 -0
- package/build/main.31b800bdfc7bcf66.hot-update.json +1 -0
- package/build/main.31ef41183a0357fd.hot-update.js +23 -0
- package/build/main.31ef41183a0357fd.hot-update.js.map +1 -0
- package/build/main.31ef41183a0357fd.hot-update.json +1 -0
- package/build/main.39b804b4f223333f.hot-update.js +142 -0
- package/build/main.39b804b4f223333f.hot-update.js.map +1 -0
- package/build/main.39b804b4f223333f.hot-update.json +1 -0
- package/build/main.3ca3490681942ed0.hot-update.js +10 -0
- package/build/main.3ca3490681942ed0.hot-update.js.map +1 -0
- package/build/main.3ca3490681942ed0.hot-update.json +1 -0
- package/build/main.3e4059ad01b911d5.hot-update.js +10 -0
- package/build/main.3e4059ad01b911d5.hot-update.js.map +1 -0
- package/build/main.3e4059ad01b911d5.hot-update.json +1 -0
- package/build/main.4ead4321633f87fd.hot-update.js +10 -0
- package/build/main.4ead4321633f87fd.hot-update.js.map +1 -0
- package/build/main.4ead4321633f87fd.hot-update.json +1 -0
- package/build/main.5231ec959bfdd54a.hot-update.js +823 -0
- package/build/main.5231ec959bfdd54a.hot-update.js.map +1 -0
- package/build/main.5231ec959bfdd54a.hot-update.json +1 -0
- package/build/main.60642e2056d40cbc.hot-update.js +23 -0
- package/build/main.60642e2056d40cbc.hot-update.js.map +1 -0
- package/build/main.60642e2056d40cbc.hot-update.json +1 -0
- package/build/main.7504b5e28de88b4d.hot-update.js +10 -0
- package/build/main.7504b5e28de88b4d.hot-update.js.map +1 -0
- package/build/main.7504b5e28de88b4d.hot-update.json +1 -0
- package/build/main.75fac631457c8400.hot-update.js +937 -0
- package/build/main.75fac631457c8400.hot-update.js.map +1 -0
- package/build/main.75fac631457c8400.hot-update.json +1 -0
- package/build/main.7654b5e519accc5a.hot-update.js +10 -0
- package/build/main.7654b5e519accc5a.hot-update.js.map +1 -0
- package/build/main.7654b5e519accc5a.hot-update.json +1 -0
- package/build/main.7734f96d14c3c07a.hot-update.js +10 -0
- package/build/main.7734f96d14c3c07a.hot-update.js.map +1 -0
- package/build/main.7734f96d14c3c07a.hot-update.json +1 -0
- package/build/main.79d0dd0a059cf3d2.hot-update.js +10 -0
- package/build/main.79d0dd0a059cf3d2.hot-update.js.map +1 -0
- package/build/main.79d0dd0a059cf3d2.hot-update.json +1 -0
- package/build/main.9a3105c0515511e6.hot-update.js +952 -0
- package/build/main.9a3105c0515511e6.hot-update.js.map +1 -0
- package/build/main.9a3105c0515511e6.hot-update.json +1 -0
- package/build/main.9a70cae7efc29065.hot-update.js +39 -0
- package/build/main.9a70cae7efc29065.hot-update.js.map +1 -0
- package/build/main.9a70cae7efc29065.hot-update.json +1 -0
- package/build/main.9b33c6fcc8fd3f57.hot-update.js +10 -0
- package/build/main.9b33c6fcc8fd3f57.hot-update.js.map +1 -0
- package/build/main.9b33c6fcc8fd3f57.hot-update.json +1 -0
- package/build/main.9c87c39ff7873bca.hot-update.js +10 -0
- package/build/main.9c87c39ff7873bca.hot-update.js.map +1 -0
- package/build/main.9c87c39ff7873bca.hot-update.json +1 -0
- package/build/main.9f7159d52fd04a7d.hot-update.js +3749 -0
- package/build/main.9f7159d52fd04a7d.hot-update.js.map +1 -0
- package/build/main.9f7159d52fd04a7d.hot-update.json +1 -0
- package/build/main.a0a0faaf03061b21.hot-update.js +23 -0
- package/build/main.a0a0faaf03061b21.hot-update.js.map +1 -0
- package/build/main.a0a0faaf03061b21.hot-update.json +1 -0
- package/build/main.b58cc596e947fb5b.hot-update.js +34 -0
- package/build/main.b58cc596e947fb5b.hot-update.js.map +1 -0
- package/build/main.b58cc596e947fb5b.hot-update.json +1 -0
- package/build/main.b659381d4f13795e.hot-update.js +10 -0
- package/build/main.b659381d4f13795e.hot-update.js.map +1 -0
- package/build/main.b659381d4f13795e.hot-update.json +1 -0
- package/build/main.bbb650ecadb0a13b.hot-update.js +61 -0
- package/build/main.bbb650ecadb0a13b.hot-update.js.map +1 -0
- package/build/main.bbb650ecadb0a13b.hot-update.json +1 -0
- package/build/main.bf97cc6dbbb3cdb1.hot-update.js +10 -0
- package/build/main.bf97cc6dbbb3cdb1.hot-update.js.map +1 -0
- package/build/main.bf97cc6dbbb3cdb1.hot-update.json +1 -0
- package/build/main.d62d5a57d5bc6614.hot-update.js +4236 -0
- package/build/main.d62d5a57d5bc6614.hot-update.js.map +1 -0
- package/build/main.d62d5a57d5bc6614.hot-update.json +1 -0
- package/build/main.e0010fdb661814be.hot-update.js +10 -0
- package/build/main.e0010fdb661814be.hot-update.js.map +1 -0
- package/build/main.e0010fdb661814be.hot-update.json +1 -0
- package/build/main.ecc2159bd4dc7d54.hot-update.js +23 -0
- package/build/main.ecc2159bd4dc7d54.hot-update.js.map +1 -0
- package/build/main.ecc2159bd4dc7d54.hot-update.json +1 -0
- package/build/main.f921adce709bfd01.hot-update.js +50871 -0
- package/build/main.f921adce709bfd01.hot-update.js.map +1 -0
- package/build/main.f921adce709bfd01.hot-update.json +1 -0
- package/build/yuno-dashboard-api-mfe.js +55915 -0
- package/build/yuno-dashboard-api-mfe.js.map +1 -0
- package/package.json +6 -6
- package/build/cjs/types/msw/handlers/mfa.d.ts +0 -1
- package/build/cjs/types/mutations/playground/index.d.ts +0 -1
- package/build/cjs/types/mutations/playground/playground.mutation.d.ts +0 -7
- package/build/cjs/types/types/playground/index.d.ts +0 -1
- package/build/cjs/types/types/playground/playground.d.ts +0 -33
- package/build/cjs/types/types/recipients/recipients-export.d.ts +0 -52
- package/build/esm/types/msw/handlers/mfa.d.ts +0 -1
- package/build/esm/types/mutations/playground/index.d.ts +0 -1
- package/build/esm/types/mutations/playground/playground.mutation.d.ts +0 -7
- package/build/esm/types/types/playground/index.d.ts +0 -1
- package/build/esm/types/types/playground/playground.d.ts +0 -33
- package/build/esm/types/types/recipients/recipients-export.d.ts +0 -52
|
@@ -0,0 +1,2575 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
self["webpackHotUpdatedashboard_api_mfe"]("main", {
|
|
3
|
+
"./src/api/api.ts"(module, __webpack_exports__, __webpack_require__) {
|
|
4
|
+
__webpack_require__.r(__webpack_exports__);
|
|
5
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
6
|
+
Api: () => (Api)
|
|
7
|
+
});
|
|
8
|
+
/* import */ var _swc_helpers_async_to_generator__rspack_import_7 = __webpack_require__("./node_modules/@swc/helpers/esm/_async_to_generator.js");
|
|
9
|
+
/* import */ var _swc_helpers_object_spread__rspack_import_4 = __webpack_require__("./node_modules/@swc/helpers/esm/_object_spread.js");
|
|
10
|
+
/* import */ var _swc_helpers_object_spread_props__rspack_import_3 = __webpack_require__("./node_modules/@swc/helpers/esm/_object_spread_props.js");
|
|
11
|
+
/* import */ var _swc_helpers_object_without_properties__rspack_import_5 = __webpack_require__("./node_modules/@swc/helpers/esm/_object_without_properties.js");
|
|
12
|
+
/* import */ var _swc_helpers_ts_generator__rspack_import_8 = __webpack_require__("./node_modules/@swc/helpers/esm/_ts_generator.js");
|
|
13
|
+
/* import */ var _lib_http_client__rspack_import_0 = __webpack_require__("./src/lib/http-client/index.ts");
|
|
14
|
+
/* import */ var _types__rspack_import_1 = __webpack_require__("./src/types/index.ts");
|
|
15
|
+
/* import */ var _utils_enums__rspack_import_2 = __webpack_require__("./src/utils/enums.ts");
|
|
16
|
+
/* import */ var uuid__rspack_import_6 = __webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js");
|
|
17
|
+
/* provided dependency */ var $ReactRefreshRuntime$ = __webpack_require__("./node_modules/@rspack/plugin-react-refresh/client/reactRefresh.js");
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
var getAccounts = (paramsAccountCode)=>({
|
|
28
|
+
account_codes: paramsAccountCode && (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.length) > 0 ? paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',') : []
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Transforms frontend metadata format into backend metadata_filters format.
|
|
32
|
+
* Returns an empty object when metadata is undefined or empty, allowing safe spreading into request bodies.
|
|
33
|
+
*
|
|
34
|
+
* @param metadata - Array of metadata fields from frontend (field, type, values)
|
|
35
|
+
* @returns Object with metadata_filters property or empty object
|
|
36
|
+
*/ function buildMetadataFiltersBody(metadata) {
|
|
37
|
+
if (!metadata || metadata.length === 0) return {};
|
|
38
|
+
return {
|
|
39
|
+
metadata_filters: metadata.map((param)=>{
|
|
40
|
+
var field = param.field, type = param.type, values = param.values;
|
|
41
|
+
return {
|
|
42
|
+
key: field,
|
|
43
|
+
conditional: type,
|
|
44
|
+
values: Array.isArray(values) ? values : [
|
|
45
|
+
values
|
|
46
|
+
]
|
|
47
|
+
};
|
|
48
|
+
})
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
class Api extends _lib_http_client__rspack_import_0.HttpClient {
|
|
52
|
+
// When u need mock the error component or page, u can use this
|
|
53
|
+
// use: if (true) return this.simulateAxiosError()
|
|
54
|
+
simulateAxiosError() {
|
|
55
|
+
return new Promise((_, reject)=>{
|
|
56
|
+
reject({
|
|
57
|
+
name: 'AxiosError'
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
// #region RECONCILIATIONS
|
|
62
|
+
updateReconciliationReportTemplate(payload) {
|
|
63
|
+
var reportType = payload.type === _types__rspack_import_1.ReconciliationReportType.TRANSACTIONS ? 'TRANSACTIONS' : payload.type;
|
|
64
|
+
var _payload = (0,_swc_helpers_object_spread_props__rspack_import_3._)((0,_swc_helpers_object_spread__rspack_import_4._)({}, payload), {
|
|
65
|
+
type: reportType
|
|
66
|
+
});
|
|
67
|
+
return this.put(`/v1/reconciliation/reports/templates`, _payload);
|
|
68
|
+
}
|
|
69
|
+
createReconciliationReportTemplate(payload) {
|
|
70
|
+
var reportType = payload.type === _types__rspack_import_1.ReconciliationReportType.TRANSACTIONS ? 'TRANSACTIONS' : payload.type;
|
|
71
|
+
var _payload = (0,_swc_helpers_object_spread_props__rspack_import_3._)((0,_swc_helpers_object_spread__rspack_import_4._)({}, payload), {
|
|
72
|
+
type: reportType
|
|
73
|
+
});
|
|
74
|
+
return this.post(`/v1/reconciliation/reports/templates`, _payload);
|
|
75
|
+
}
|
|
76
|
+
getReconciliationTransactions(params) {
|
|
77
|
+
var paramsAccountCode = params.account_code;
|
|
78
|
+
delete params.account_code;
|
|
79
|
+
return this.post(`v2/reconciliation/transactions`, {
|
|
80
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
81
|
+
}, {
|
|
82
|
+
params
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
getReconciliationSettlements(params) {
|
|
86
|
+
var paramsAccountCode = params.account_code;
|
|
87
|
+
delete params.account_code;
|
|
88
|
+
return this.post(`/reconciliation/settlements`, {
|
|
89
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
90
|
+
}, {
|
|
91
|
+
params
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
getReconciliationMetrics(params) {
|
|
95
|
+
var paramsAccountCode = params.account_code;
|
|
96
|
+
delete params.account_code;
|
|
97
|
+
return this.post('/reconciliation/reports', {
|
|
98
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
99
|
+
}, {
|
|
100
|
+
params
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
getReconciliationFilters() {
|
|
104
|
+
return this.get('/reconciliation/filters');
|
|
105
|
+
}
|
|
106
|
+
getReconciliationsReportColumns(templateType, reportType) {
|
|
107
|
+
return this.get(`/v1/reconciliation/reports/columns/${templateType}/${reportType}`);
|
|
108
|
+
}
|
|
109
|
+
getReconciliationReportTemplates() {
|
|
110
|
+
return this.get(`/v1/reconciliation/reports/templates`);
|
|
111
|
+
}
|
|
112
|
+
getAllTableColumns(tableType) {
|
|
113
|
+
return this.get(`/v1/reconciliation/table/${tableType}/columns`);
|
|
114
|
+
}
|
|
115
|
+
getReconciliationActive() {
|
|
116
|
+
return this.get('/v1/reconciliation/status');
|
|
117
|
+
}
|
|
118
|
+
// #region RECONCILIATIONS - ALERTS
|
|
119
|
+
getReconciliationAlerts(body, params) {
|
|
120
|
+
return this.post('/reconciliation/alerts/list', body, {
|
|
121
|
+
params
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
postReconciliationAlert(payload) {
|
|
125
|
+
return this.post('/reconciliation/alerts', payload);
|
|
126
|
+
}
|
|
127
|
+
updateReconciliationAlert(payload) {
|
|
128
|
+
return this.patch('/reconciliation/alerts', payload);
|
|
129
|
+
}
|
|
130
|
+
deleteReconciliationAlert(params) {
|
|
131
|
+
return this.delete('/reconciliation/alerts', {
|
|
132
|
+
params
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
// #region RECONCILIATIONS - AGENDA
|
|
136
|
+
getReconciliationAgenda(body, params) {
|
|
137
|
+
return this.post('/reconciliation/agenda/list', body, {
|
|
138
|
+
params
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
getReconciliationAgendaInsightByKey(body, params) {
|
|
142
|
+
return this.post('/reconciliation/agenda/insights', body, {
|
|
143
|
+
params
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
// #region RECONCILIATIONS - SALES
|
|
147
|
+
getReconciliationSales(body, params) {
|
|
148
|
+
return this.post('/reconciliation/sales/list', body, {
|
|
149
|
+
params
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
// #region RECONCILIATIONS - ADVANCEMENTS
|
|
153
|
+
getReconciliationAdvancements(body, params) {
|
|
154
|
+
return this.post('/reconciliation/advancements/list', body, {
|
|
155
|
+
params
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// #region RECONCILIATIONS - FEES
|
|
159
|
+
getReconciliationFees(body, params) {
|
|
160
|
+
return this.post('/reconciliation/fees/list', body, {
|
|
161
|
+
params
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// #region RECONCILIATION INSIGHTS
|
|
165
|
+
// 1. Conflicts Summary
|
|
166
|
+
getReconciliationInsightsConflictsSummary(body) {
|
|
167
|
+
return this.post('/reconciliations/insights/conflicts/summary', body);
|
|
168
|
+
}
|
|
169
|
+
// 2. Not Reconciled - Aggregators
|
|
170
|
+
getReconciliationInsightsNotReconciledAggregators(body) {
|
|
171
|
+
return this.post('/reconciliations/insights/not-reconciled/aggregators', body);
|
|
172
|
+
}
|
|
173
|
+
// 3. Not Reconciled - List
|
|
174
|
+
getReconciliationInsightsNotReconciledList(body) {
|
|
175
|
+
return this.post('/reconciliations/insights/not-reconciled/list', body);
|
|
176
|
+
}
|
|
177
|
+
// 4. Status Conflict - Aggregators
|
|
178
|
+
getReconciliationInsightsStatusConflictAggregators(body) {
|
|
179
|
+
return this.post('/reconciliations/insights/status-conflict/aggregators', body);
|
|
180
|
+
}
|
|
181
|
+
// 5. Status Conflict - List
|
|
182
|
+
getReconciliationInsightsStatusConflictList(body) {
|
|
183
|
+
return this.post('/reconciliations/insights/status-conflict/list', body);
|
|
184
|
+
}
|
|
185
|
+
// 6. Amount Conflict - Aggregators
|
|
186
|
+
getReconciliationInsightsAmountConflictAggregators(body) {
|
|
187
|
+
return this.post('/reconciliations/insights/amount-conflict/aggregators', body);
|
|
188
|
+
}
|
|
189
|
+
// 7. Amount Conflict - List
|
|
190
|
+
getReconciliationInsightsAmountConflictList(body) {
|
|
191
|
+
return this.post('/reconciliations/insights/amount-conflict/list', body);
|
|
192
|
+
}
|
|
193
|
+
// 8. Conflict Date - Summary
|
|
194
|
+
getReconciliationInsightsConflictDateSummary(body) {
|
|
195
|
+
return this.post('/reconciliations/insights/conflict-date/summary', body);
|
|
196
|
+
}
|
|
197
|
+
// 9. Conflict Date - Aggregators
|
|
198
|
+
getReconciliationInsightsConflictDateAggregators(body) {
|
|
199
|
+
return this.post('/reconciliations/insights/conflict-date/aggregators', body);
|
|
200
|
+
}
|
|
201
|
+
// 10. Conflict Date - List
|
|
202
|
+
getReconciliationInsightsConflictDateList(body) {
|
|
203
|
+
return this.post('/reconciliations/insights/conflict-date/list', body);
|
|
204
|
+
}
|
|
205
|
+
// 11. Incorrect Fees - Summary (with date_filter param)
|
|
206
|
+
getReconciliationInsightsIncorrectFeesSummary(body, dateFilter) {
|
|
207
|
+
return this.post('/reconciliations/insights/incorrect-fees/summary', body, dateFilter ? {
|
|
208
|
+
params: {
|
|
209
|
+
date_filter: dateFilter
|
|
210
|
+
}
|
|
211
|
+
} : undefined);
|
|
212
|
+
}
|
|
213
|
+
// 12. Incorrect Fees - Aggregators (with date_filter param)
|
|
214
|
+
getReconciliationInsightsIncorrectFeesAggregators(body, dateFilter) {
|
|
215
|
+
return this.post('/reconciliations/insights/incorrect-fees/aggregators', body, dateFilter ? {
|
|
216
|
+
params: {
|
|
217
|
+
date_filter: dateFilter
|
|
218
|
+
}
|
|
219
|
+
} : undefined);
|
|
220
|
+
}
|
|
221
|
+
// 13. Incorrect Fees - List (with date_filter param)
|
|
222
|
+
getReconciliationInsightsIncorrectFeesList(body, dateFilter) {
|
|
223
|
+
return this.post('/reconciliations/insights/incorrect-fees/list', body, dateFilter ? {
|
|
224
|
+
params: {
|
|
225
|
+
date_filter: dateFilter
|
|
226
|
+
}
|
|
227
|
+
} : undefined);
|
|
228
|
+
}
|
|
229
|
+
// 14. Fees Charged - Summary (with date_filter param)
|
|
230
|
+
getReconciliationInsightsFeesChargedSummary(body, dateFilter) {
|
|
231
|
+
return this.post('/reconciliations/insights/fees-charged/summary', body, dateFilter ? {
|
|
232
|
+
params: {
|
|
233
|
+
date_filter: dateFilter
|
|
234
|
+
}
|
|
235
|
+
} : undefined);
|
|
236
|
+
}
|
|
237
|
+
// 15. Reconciled - Summary (with date_filter param)
|
|
238
|
+
getReconciliationInsightsReconciledSummary(body, dateFilter) {
|
|
239
|
+
return this.post('/reconciliations/insights/reconciled/summary', body, dateFilter ? {
|
|
240
|
+
params: {
|
|
241
|
+
date_filter: dateFilter
|
|
242
|
+
}
|
|
243
|
+
} : undefined);
|
|
244
|
+
}
|
|
245
|
+
// 16. Reconciled - Aggregators
|
|
246
|
+
getReconciliationInsightsReconciledAggregators(body, dateFilter, transactionType) {
|
|
247
|
+
var params = {};
|
|
248
|
+
if (dateFilter) params.date_filter = dateFilter;
|
|
249
|
+
if (transactionType) params.type = transactionType;
|
|
250
|
+
return this.post('/reconciliations/insights/reconciled/aggregators', body, Object.keys(params).length > 0 ? {
|
|
251
|
+
params
|
|
252
|
+
} : undefined);
|
|
253
|
+
}
|
|
254
|
+
// 17. Reconciled - List
|
|
255
|
+
getReconciliationInsightsReconciledList(body, dateFilter, transactionType) {
|
|
256
|
+
var params = {};
|
|
257
|
+
if (dateFilter) params.date_filter = dateFilter;
|
|
258
|
+
if (transactionType) params.type = transactionType;
|
|
259
|
+
return this.post('/reconciliations/insights/reconciled/list', body, Object.keys(params).length > 0 ? {
|
|
260
|
+
params
|
|
261
|
+
} : undefined);
|
|
262
|
+
}
|
|
263
|
+
// 18. Not Confirm - Summary
|
|
264
|
+
getReconciliationInsightsNotConfirmSummary(body) {
|
|
265
|
+
return this.post('/reconciliations/insights/not-confirm/summary', body);
|
|
266
|
+
}
|
|
267
|
+
// 19. Not Confirm - Aggregators
|
|
268
|
+
getReconciliationInsightsNotConfirmAggregators(body) {
|
|
269
|
+
return this.post('/reconciliations/insights/not-confirm/aggregators', body);
|
|
270
|
+
}
|
|
271
|
+
// 20. Not Confirm - List
|
|
272
|
+
getReconciliationInsightsNotConfirmList(body) {
|
|
273
|
+
return this.post('/reconciliations/insights/not-confirm/list', body);
|
|
274
|
+
}
|
|
275
|
+
// 21. Amount To Be Settled - Summary
|
|
276
|
+
getReconciliationInsightsAmountToBeSettledSummary(body) {
|
|
277
|
+
return this.post('/reconciliations/insights/amount-to-be-settled/summary', body);
|
|
278
|
+
}
|
|
279
|
+
// 22. Reconciliation Rate - By Provider
|
|
280
|
+
getReconciliationInsightsReconciliationRateByProvider(body) {
|
|
281
|
+
return this.post('/reconciliations/insights/reconciliation-rate/summary/by-provider', body);
|
|
282
|
+
}
|
|
283
|
+
// 23. Reconciliation Rate - By Account
|
|
284
|
+
getReconciliationInsightsReconciliationRateByAccount(body) {
|
|
285
|
+
return this.post('/reconciliations/insights/reconciliation-rate/summary/by-account', body);
|
|
286
|
+
}
|
|
287
|
+
// 24. Reconciliation Rate - By Currency
|
|
288
|
+
getReconciliationInsightsReconciliationRateByCurrency(body) {
|
|
289
|
+
return this.post('/reconciliations/insights/reconciliation-rate/summary/by-currency', body);
|
|
290
|
+
}
|
|
291
|
+
// #endregion RECONCILIATION INSIGHTS
|
|
292
|
+
// #region PAYMENTS
|
|
293
|
+
postPaymentsLazy(params) {
|
|
294
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
295
|
+
"account_code",
|
|
296
|
+
"metadata"
|
|
297
|
+
]);
|
|
298
|
+
if (!restParams.start_date) restParams.start_date = new Date();
|
|
299
|
+
if (!restParams.end_date) restParams.end_date = new Date();
|
|
300
|
+
return this.post(`/payments/lazy`, (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
301
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
302
|
+
}, buildMetadataFiltersBody(metadata)), {
|
|
303
|
+
params: restParams
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
postPayouts(params) {
|
|
307
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
308
|
+
"account_code",
|
|
309
|
+
"metadata"
|
|
310
|
+
]);
|
|
311
|
+
if (!restParams.start_date) restParams.start_date = new Date();
|
|
312
|
+
if (!restParams.end_date) restParams.end_date = new Date();
|
|
313
|
+
return this.post(`/payouts`, (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
314
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
315
|
+
}, buildMetadataFiltersBody(metadata)), {
|
|
316
|
+
params: restParams
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
getPayoutsFilters(organizationCode) {
|
|
320
|
+
return this.get('/payouts/filters', {
|
|
321
|
+
headers: {
|
|
322
|
+
'x-organization-code': organizationCode
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
postPaymentsEvaluated(params) {
|
|
327
|
+
var account_code = params.account_code, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
328
|
+
"account_code"
|
|
329
|
+
]);
|
|
330
|
+
if (!restParams.start_date) restParams.start_date = new Date();
|
|
331
|
+
if (!restParams.end_date) restParams.end_date = new Date();
|
|
332
|
+
return this.post(`/payments/evaluated`, restParams);
|
|
333
|
+
}
|
|
334
|
+
getPaymentV2(paymentCode) {
|
|
335
|
+
return this.get(`/payments/v2/${paymentCode}`);
|
|
336
|
+
}
|
|
337
|
+
postTransactions(params) {
|
|
338
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
339
|
+
"account_code",
|
|
340
|
+
"metadata"
|
|
341
|
+
]);
|
|
342
|
+
return this.post(`/v2/transactions`, (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
343
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
344
|
+
}, buildMetadataFiltersBody(metadata)), {
|
|
345
|
+
params: restParams
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
postFraudTransactions(params) {
|
|
349
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
350
|
+
"account_code",
|
|
351
|
+
"metadata"
|
|
352
|
+
]);
|
|
353
|
+
return this.post(`/fraud-transactions`, (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
354
|
+
account_codes: (paramsAccountCode === null || paramsAccountCode === void 0 ? void 0 : paramsAccountCode.split(',')) || []
|
|
355
|
+
}, buildMetadataFiltersBody(metadata)), {
|
|
356
|
+
params: restParams
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
getPayoutDetails(params) {
|
|
360
|
+
var headers = {
|
|
361
|
+
'x-organization-code': params.organization_code
|
|
362
|
+
};
|
|
363
|
+
return this.get(`/payouts/detail/${params.payout_code}`, {
|
|
364
|
+
headers
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
getPayoutTransactionDetails(params) {
|
|
368
|
+
var headers = {
|
|
369
|
+
'x-organization-code': params.organization_code
|
|
370
|
+
};
|
|
371
|
+
return this.get(`/payouts/${params.payout_code}/transaction/${params.transaction_code}/detail`, {
|
|
372
|
+
headers
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
getPayoutHistoryDetails(params, organizationCode) {
|
|
376
|
+
var headers = {
|
|
377
|
+
'x-organization-code': organizationCode
|
|
378
|
+
};
|
|
379
|
+
return this.get(`/payouts/${params.payout_code}/history`, {
|
|
380
|
+
headers
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
getPayoutTimeline(payoutCode, organizationCode) {
|
|
384
|
+
var headers = {
|
|
385
|
+
'x-organization-code': organizationCode
|
|
386
|
+
};
|
|
387
|
+
return this.get(`/payouts/${payoutCode}/timeline`, {
|
|
388
|
+
headers
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
getPaymentMethodsByCountry(param, organizationCodeFromAccount) {
|
|
392
|
+
var provider_id = param.provider_id, country = param.country;
|
|
393
|
+
var organizationCodeMerlin = localStorage.getItem('x-organization-code');
|
|
394
|
+
var headers = {
|
|
395
|
+
'x-organization-code': organizationCodeFromAccount
|
|
396
|
+
};
|
|
397
|
+
return this.get(`/organizations/provider-params/${provider_id}/${country}`, !organizationCodeMerlin ? {
|
|
398
|
+
headers
|
|
399
|
+
} : {});
|
|
400
|
+
}
|
|
401
|
+
getOrgByName(name) {
|
|
402
|
+
return this.post(`/organizations/get-by-name`, {
|
|
403
|
+
org_name: name
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
createOperationTransaction(payload, transactionId, paymentId, action) {
|
|
407
|
+
return this.post(`/payments/${paymentId}/transactions/${transactionId}/${action}`, payload);
|
|
408
|
+
}
|
|
409
|
+
getPaymentMethodsAndProviders() {
|
|
410
|
+
return this.get(`/payments/payment-methods/providers`);
|
|
411
|
+
}
|
|
412
|
+
getTransactionDetailsV2(params) {
|
|
413
|
+
return this.get(`/payments/${params.payment_code}/transactions/details`, {
|
|
414
|
+
params: {
|
|
415
|
+
payment_code: params.payment_code,
|
|
416
|
+
size: 99
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
getTransactionRawResponse(params) {
|
|
421
|
+
return this.get(`/transactions/${params.transaction_code}/raw-response`);
|
|
422
|
+
}
|
|
423
|
+
postProviderRawResponse(transactionCode, payload) {
|
|
424
|
+
return this.post(`/provider-raw-response/${transactionCode}`, payload);
|
|
425
|
+
}
|
|
426
|
+
uploadChargebacks(payload, paymentId, transactionId, handleSetProgress) {
|
|
427
|
+
return this.post(`/chargebacks/upload-file/payment/${paymentId}/transaction/${transactionId}`, payload, {
|
|
428
|
+
onUploadProgress: (ev)=>{
|
|
429
|
+
handleSetProgress(ev.total ? Math.round(ev.loaded * 100 / ev.total) : 0);
|
|
430
|
+
},
|
|
431
|
+
headers: {
|
|
432
|
+
'x-account-code': payload === null || payload === void 0 ? void 0 : payload.account_id,
|
|
433
|
+
'x-idempotency-key': (0,uuid__rspack_import_6["default"])()
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
getPaymentTransactionsDetails(param) {
|
|
438
|
+
var transaction_code = param.transaction_code;
|
|
439
|
+
return this.get(`/transactions/${transaction_code}/details`);
|
|
440
|
+
}
|
|
441
|
+
getTransactionHistoryByPaymentCode(param) {
|
|
442
|
+
var payment_code = param.payment_code;
|
|
443
|
+
return this.get(`/transactions/by-payment/${payment_code}/history`);
|
|
444
|
+
}
|
|
445
|
+
getDeveloperCredentials(password, accountCode, otp, mfaToken) {
|
|
446
|
+
var headers = {};
|
|
447
|
+
if (password) {
|
|
448
|
+
headers['x-password'] = password;
|
|
449
|
+
}
|
|
450
|
+
if (accountCode) {
|
|
451
|
+
headers['x-account-code'] = accountCode;
|
|
452
|
+
}
|
|
453
|
+
if (otp) {
|
|
454
|
+
headers['x-otp'] = otp;
|
|
455
|
+
}
|
|
456
|
+
if (mfaToken) {
|
|
457
|
+
headers['x-mfa-token'] = mfaToken;
|
|
458
|
+
}
|
|
459
|
+
return this.get(`/v2/developers/credentials`, {
|
|
460
|
+
headers
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
getDeveloperCredentialsValidatePassword(password) {
|
|
464
|
+
return this.get(`/validate-password`, {
|
|
465
|
+
headers: {
|
|
466
|
+
'x-password': password
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
getDeveloperCredentialsValidatePasswordRegularUser(password) {
|
|
471
|
+
return this.get(`/validate-password-regular`, {
|
|
472
|
+
headers: {
|
|
473
|
+
'x-password': password
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
getAllowedIps() {
|
|
478
|
+
return this.get(`/allowlist-ips`);
|
|
479
|
+
}
|
|
480
|
+
patchAllowedIps(request) {
|
|
481
|
+
return this.patch(`/allowlist-ips`, request);
|
|
482
|
+
}
|
|
483
|
+
getOrganization() {
|
|
484
|
+
var headers = {
|
|
485
|
+
'x-organization-code': ''
|
|
486
|
+
};
|
|
487
|
+
return this.get(`/organizations`, {
|
|
488
|
+
headers
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
getAllOrganization() {
|
|
492
|
+
return this.get(`/organizations/all`);
|
|
493
|
+
}
|
|
494
|
+
getProviderParams(param, organizationCodeFromAccount) {
|
|
495
|
+
var _JSON_parse;
|
|
496
|
+
var organizationCodeMerlin = localStorage.getItem('x-organization-code');
|
|
497
|
+
var headers = {
|
|
498
|
+
'x-organization-code': organizationCodeMerlin ? (_JSON_parse = JSON.parse(organizationCodeMerlin)) === null || _JSON_parse === void 0 ? void 0 : _JSON_parse.value : organizationCodeFromAccount
|
|
499
|
+
};
|
|
500
|
+
return this.get(`/organizations/provider-params/${param.id}`, {
|
|
501
|
+
headers
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
getIntegrationByAccountV2(param) {
|
|
505
|
+
var accountCode = param.accountCode, organizationCode = param.organizationCode;
|
|
506
|
+
var headers = {
|
|
507
|
+
'x-organization-code': organizationCode,
|
|
508
|
+
'x-account-code': accountCode
|
|
509
|
+
};
|
|
510
|
+
return this.post(`/connections/my-connections`, {
|
|
511
|
+
account_code: accountCode
|
|
512
|
+
}, {
|
|
513
|
+
headers
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
putCosts(payload) {
|
|
517
|
+
return (0,_swc_helpers_async_to_generator__rspack_import_7._)(function() {
|
|
518
|
+
return (0,_swc_helpers_ts_generator__rspack_import_8._)(this, function(_state) {
|
|
519
|
+
return [
|
|
520
|
+
2,
|
|
521
|
+
this.put(`/connections/costs`, {
|
|
522
|
+
costs: [
|
|
523
|
+
payload
|
|
524
|
+
]
|
|
525
|
+
})
|
|
526
|
+
];
|
|
527
|
+
});
|
|
528
|
+
}).call(this);
|
|
529
|
+
}
|
|
530
|
+
updateOrganizationStatus() {
|
|
531
|
+
return (0,_swc_helpers_async_to_generator__rspack_import_7._)(function() {
|
|
532
|
+
return (0,_swc_helpers_ts_generator__rspack_import_8._)(this, function(_state) {
|
|
533
|
+
return [
|
|
534
|
+
2,
|
|
535
|
+
this.patch(`/organizations/status`)
|
|
536
|
+
];
|
|
537
|
+
});
|
|
538
|
+
}).call(this);
|
|
539
|
+
}
|
|
540
|
+
addToRiskList(paymentId, payload) {
|
|
541
|
+
return this.post(`/payments/${paymentId}/add-to-risk-list`, payload);
|
|
542
|
+
}
|
|
543
|
+
// #region ORGANIZATION CONFIG
|
|
544
|
+
getOrganizationConfigs() {
|
|
545
|
+
return this.get('/organization-config/configs');
|
|
546
|
+
}
|
|
547
|
+
postOrganizationConfigs(payload) {
|
|
548
|
+
return this.post('/organization-config/configs-by-account', payload);
|
|
549
|
+
}
|
|
550
|
+
putOrganizationConfigsByAccount(payload) {
|
|
551
|
+
return this.put('/organization-config/configs-by-account', payload);
|
|
552
|
+
}
|
|
553
|
+
// #endregion
|
|
554
|
+
getIntegrationParams(param) {
|
|
555
|
+
var accountCode = param.accountCode, integration_code = param.integration_code;
|
|
556
|
+
return this.get(`/connections/integration-params/${integration_code}`, accountCode ? {
|
|
557
|
+
headers: {
|
|
558
|
+
'x-account-code': accountCode
|
|
559
|
+
}
|
|
560
|
+
} : {});
|
|
561
|
+
}
|
|
562
|
+
getConnectionsByPaymentMethod(_0, _1) {
|
|
563
|
+
return (0,_swc_helpers_async_to_generator__rspack_import_7._)(function(accountCode, paymentMethod) {
|
|
564
|
+
var basePath;
|
|
565
|
+
var _arguments = arguments;
|
|
566
|
+
return (0,_swc_helpers_ts_generator__rspack_import_8._)(this, function(_state) {
|
|
567
|
+
basePath = _arguments.length > 2 && _arguments[2] !== void 0 ? _arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
568
|
+
return [
|
|
569
|
+
2,
|
|
570
|
+
this.get(`/organizations/connections/${accountCode}/${paymentMethod}${basePath === 'routing-payouts' ? '?flow_type=PAYOUT' : ''}`)
|
|
571
|
+
];
|
|
572
|
+
});
|
|
573
|
+
}).apply(this, arguments);
|
|
574
|
+
}
|
|
575
|
+
getHashPylon() {
|
|
576
|
+
return this.get('/pylon-hash');
|
|
577
|
+
}
|
|
578
|
+
getConnections() {
|
|
579
|
+
return this.get('/connections');
|
|
580
|
+
}
|
|
581
|
+
getOnboardingStatus(accountCode) {
|
|
582
|
+
return this.get(`/onboarding/status/${accountCode}`);
|
|
583
|
+
}
|
|
584
|
+
postValidateStatusConnection(param) {
|
|
585
|
+
var payload = param.payload, accountCode = param.accountCode;
|
|
586
|
+
var headers = {
|
|
587
|
+
'x-account-code': accountCode
|
|
588
|
+
};
|
|
589
|
+
return this.post(`/connections/validate-status`, payload, {
|
|
590
|
+
headers
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
postChangeStatusConnection(param) {
|
|
594
|
+
var payload = param.payload, accountCode = param.accountCode;
|
|
595
|
+
var url = '/connections/change-status';
|
|
596
|
+
if (payload.status == _utils_enums__rspack_import_2.connectionsActionsValues.DELETED) {
|
|
597
|
+
delete payload.status;
|
|
598
|
+
return this.delete(url, {
|
|
599
|
+
data: payload
|
|
600
|
+
});
|
|
601
|
+
} else if (Object.values(_utils_enums__rspack_import_2.connectionsActions).includes(payload === null || payload === void 0 ? void 0 : payload.status)) {
|
|
602
|
+
url = `${url}/${_utils_enums__rspack_import_2.connectionsActionsUrl[payload.status]}`;
|
|
603
|
+
delete payload.status;
|
|
604
|
+
}
|
|
605
|
+
var headers = {
|
|
606
|
+
'x-account-code': accountCode
|
|
607
|
+
};
|
|
608
|
+
return this.post(url, payload, {
|
|
609
|
+
headers
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
postMultiConnection(param) {
|
|
613
|
+
var payload = param.payload;
|
|
614
|
+
return this.post(`/connections/multi-accounts`, payload);
|
|
615
|
+
}
|
|
616
|
+
postMultiConnectionValidate() {
|
|
617
|
+
return this.get(`/connection/valid-accounts`);
|
|
618
|
+
}
|
|
619
|
+
patchConnection(param) {
|
|
620
|
+
var payload = param.payload, connectionCode = param.connectionCode;
|
|
621
|
+
var _JSON_parse_value;
|
|
622
|
+
var accountCodeCache = localStorage.getItem('account');
|
|
623
|
+
var accountCode = accountCodeCache ? (_JSON_parse_value = JSON.parse(accountCodeCache).value) === null || _JSON_parse_value === void 0 ? void 0 : _JSON_parse_value.code : '';
|
|
624
|
+
return this.patch(`/connections/${connectionCode}`, (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
625
|
+
account_code: accountCode
|
|
626
|
+
}, payload));
|
|
627
|
+
}
|
|
628
|
+
postDefaultRoutes(param) {
|
|
629
|
+
var payload = param.payload;
|
|
630
|
+
return this.post(`/connections/default-routes`, payload);
|
|
631
|
+
}
|
|
632
|
+
// #region WEBHOOKS V2
|
|
633
|
+
getWebhookParamsV2() {
|
|
634
|
+
return this.get(`/accounts/webhooks-v2/params-catalog`);
|
|
635
|
+
}
|
|
636
|
+
getWebhooksV3(param) {
|
|
637
|
+
var accountCode = param.accountCode, name = param.name;
|
|
638
|
+
return this.post(`/accounts/webhooks-v2/search`, {
|
|
639
|
+
name
|
|
640
|
+
}, {
|
|
641
|
+
headers: {
|
|
642
|
+
'x-account-code': accountCode
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
getWebhooksV2Detail(param) {
|
|
647
|
+
var accountCode = param.accountCode;
|
|
648
|
+
return this.get(`/accounts/webhooks-v2/detail/${accountCode}`);
|
|
649
|
+
}
|
|
650
|
+
postWebhookV2MultiAccount(param) {
|
|
651
|
+
var payload = param.payload;
|
|
652
|
+
return this.post(`/accounts/webhooks/multi-account`, payload);
|
|
653
|
+
}
|
|
654
|
+
deleteWebhookV2(code, accountCode) {
|
|
655
|
+
return this.delete(`/accounts/webhooks-v2/${code}/${accountCode}`);
|
|
656
|
+
}
|
|
657
|
+
updateWebhookV2(code, payload, accountCode) {
|
|
658
|
+
return this.patch(`/accounts/webhooks-v2/${code}/${accountCode}`, payload);
|
|
659
|
+
}
|
|
660
|
+
// #region WEBHOOK LOGS
|
|
661
|
+
postWebhookLogs(_0) {
|
|
662
|
+
var _ref = _0.payload, account_code = _ref.account_code, rest = (0,_swc_helpers_object_without_properties__rspack_import_5._)(_ref, [
|
|
663
|
+
"account_code"
|
|
664
|
+
]);
|
|
665
|
+
var body = {
|
|
666
|
+
account_codes: account_code
|
|
667
|
+
};
|
|
668
|
+
return this.post(`/v2/webhooks/organization`, body, {
|
|
669
|
+
params: rest,
|
|
670
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
postResendWebhooks(param) {
|
|
674
|
+
var codes = param.codes;
|
|
675
|
+
return this.post(`/v2/webhooks/organization/resend`, {
|
|
676
|
+
codes
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
postExportApiLogs(payload) {
|
|
680
|
+
var body = {
|
|
681
|
+
account_codes: payload.account_code
|
|
682
|
+
};
|
|
683
|
+
delete payload.account_code;
|
|
684
|
+
delete payload.size;
|
|
685
|
+
delete payload.page;
|
|
686
|
+
return this.post(`/v2/api-logs/organization/export-csv`, body, {
|
|
687
|
+
params: payload,
|
|
688
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
postExportWebhooksLogs(payload) {
|
|
692
|
+
var body = {
|
|
693
|
+
account_codes: payload.account_code
|
|
694
|
+
};
|
|
695
|
+
delete payload.account_code;
|
|
696
|
+
delete payload.size;
|
|
697
|
+
delete payload.page;
|
|
698
|
+
return this.post(`/v2/webhooks/organization/export-csv`, body, {
|
|
699
|
+
params: payload,
|
|
700
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
// #region API LOGS V3
|
|
704
|
+
getApiLogsV3(paymentCode) {
|
|
705
|
+
return this.get(`/v3/api-logs/payment/${paymentCode}`);
|
|
706
|
+
}
|
|
707
|
+
// #region WEBHOOK TIMELINE V3
|
|
708
|
+
getWebhookTimeline(paymentCode) {
|
|
709
|
+
return this.get(`/v3/webhooks/payment/${paymentCode}`);
|
|
710
|
+
}
|
|
711
|
+
postExportDashboardLogs(payload) {
|
|
712
|
+
var body = {
|
|
713
|
+
account_codes: payload.account_code,
|
|
714
|
+
event: payload.event,
|
|
715
|
+
source: payload.source,
|
|
716
|
+
search: payload.search
|
|
717
|
+
};
|
|
718
|
+
var params = {
|
|
719
|
+
report_name: payload.report_name,
|
|
720
|
+
start_date: payload.start_date,
|
|
721
|
+
end_date: payload.end_date,
|
|
722
|
+
time_zone: payload.time_zone
|
|
723
|
+
};
|
|
724
|
+
return this.post(`/v2/events/organization/export-csv`, body, {
|
|
725
|
+
params,
|
|
726
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
postExportMonitorsLogs(payload) {
|
|
730
|
+
var body = {
|
|
731
|
+
account_codes: payload.account_codes,
|
|
732
|
+
status: payload.status,
|
|
733
|
+
payment_methods: payload.payment_methods,
|
|
734
|
+
providers: payload.providers,
|
|
735
|
+
traffic_redistribution: payload.traffic_redistribution
|
|
736
|
+
};
|
|
737
|
+
var params = {
|
|
738
|
+
report_name: payload.report_name,
|
|
739
|
+
start_date: payload.start_date,
|
|
740
|
+
end_date: payload.end_date,
|
|
741
|
+
time_zone: payload.time_zone
|
|
742
|
+
};
|
|
743
|
+
return this.post(`/routing-monitor/audit/export-csv`, body, {
|
|
744
|
+
params,
|
|
745
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
getAuditExportsList(reportType) {
|
|
749
|
+
return this.get(`/audit/reports`, {
|
|
750
|
+
params: {
|
|
751
|
+
report_type: reportType
|
|
752
|
+
}
|
|
753
|
+
});
|
|
754
|
+
}
|
|
755
|
+
getAuditExportDownload(reportId) {
|
|
756
|
+
return this.get(`/audit/reports/${reportId}/download`);
|
|
757
|
+
}
|
|
758
|
+
// ============================================
|
|
759
|
+
// New unified export endpoints for all 4 tabs
|
|
760
|
+
// ============================================
|
|
761
|
+
getUnifiedExportsPath(tab) {
|
|
762
|
+
return `/v1/${tab}/exports`;
|
|
763
|
+
}
|
|
764
|
+
postUnifiedExport(tab, payload) {
|
|
765
|
+
return this.post(this.getUnifiedExportsPath(tab), payload);
|
|
766
|
+
}
|
|
767
|
+
getUnifiedExportStatus(tab, exportId) {
|
|
768
|
+
var basePath = this.getUnifiedExportsPath(tab);
|
|
769
|
+
return this.get(`${basePath}/${exportId}`);
|
|
770
|
+
}
|
|
771
|
+
getUnifiedExportsList(tab) {
|
|
772
|
+
var page = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, size = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 10;
|
|
773
|
+
return this.get(this.getUnifiedExportsPath(tab), {
|
|
774
|
+
params: {
|
|
775
|
+
page,
|
|
776
|
+
size
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
postApiLogs(_0) {
|
|
781
|
+
var _ref = _0.payload, account_code = _ref.account_code, rest = (0,_swc_helpers_object_without_properties__rspack_import_5._)(_ref, [
|
|
782
|
+
"account_code"
|
|
783
|
+
]);
|
|
784
|
+
var body = {
|
|
785
|
+
account_codes: account_code
|
|
786
|
+
};
|
|
787
|
+
return this.post(`/v2/api-logs/organization`, body, {
|
|
788
|
+
params: rest,
|
|
789
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
getApiLogsDetailByPaymentCode(paymentCode, createdAtFrom) {
|
|
793
|
+
return this.get(`/v3/api-logs/payment/${paymentCode}`, {
|
|
794
|
+
params: createdAtFrom ? {
|
|
795
|
+
created_at_from: createdAtFrom
|
|
796
|
+
} : undefined
|
|
797
|
+
});
|
|
798
|
+
}
|
|
799
|
+
getApiLogsByTransactionCode(transactionCode, accountCode) {
|
|
800
|
+
return this.get(`/v2/api-logs/transaction/${transactionCode}`, {
|
|
801
|
+
headers: {
|
|
802
|
+
'x-account-code': accountCode
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
postApiLogsStatsRequests(payload) {
|
|
807
|
+
return this.post('/v3/api-logs/organization/stats/requests', payload);
|
|
808
|
+
}
|
|
809
|
+
postApiLogsStatsErrors(payload) {
|
|
810
|
+
return this.post('/v3/api-logs/organization/stats/errors', payload);
|
|
811
|
+
}
|
|
812
|
+
postApiLogsStatsErrorsByEndpoint(payload) {
|
|
813
|
+
return this.post('/v3/api-logs/organization/stats/errors-by-endpoint', payload);
|
|
814
|
+
}
|
|
815
|
+
postApiLogsList(payload) {
|
|
816
|
+
return this.post('/v3/api-logs/organization/list', payload);
|
|
817
|
+
}
|
|
818
|
+
getApiLogsV3ByPaymentCode(paymentCode, createdAtFrom) {
|
|
819
|
+
return this.get(`/v3/api-logs/payment/${paymentCode}`, {
|
|
820
|
+
params: createdAtFrom ? {
|
|
821
|
+
created_at_from: createdAtFrom
|
|
822
|
+
} : undefined
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
useGetCountriesConfig() {
|
|
826
|
+
return this.get(`/country-data-api/v1/config`);
|
|
827
|
+
}
|
|
828
|
+
useGetCountriesConfigV2(acceptLanguage) {
|
|
829
|
+
var params = acceptLanguage ? {
|
|
830
|
+
'accept-language': acceptLanguage
|
|
831
|
+
} : {};
|
|
832
|
+
return this.get(`/country-data/v2/config`, {
|
|
833
|
+
params
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
// #region SMART-ROUTING
|
|
837
|
+
getSmartRoutingMethods(accountCode) {
|
|
838
|
+
var routingType = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
839
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/config/withdrawal-methods` : `/${routingType}/methods/${accountCode}`;
|
|
840
|
+
return this.get(path);
|
|
841
|
+
}
|
|
842
|
+
putSmartRoutingToggleMethod(accountCode, paymentMethod, active) {
|
|
843
|
+
var routingType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
844
|
+
var path = `/${routingType}/methods/${accountCode}/${paymentMethod}`;
|
|
845
|
+
return this.put(path, {
|
|
846
|
+
active
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
getSmartRoutingConditionTypes(accountCode, paymentMethod) {
|
|
850
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
851
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/config/condition-types/${paymentMethod}` : `/${routingType}/condition-types/${accountCode}/${paymentMethod}`;
|
|
852
|
+
return this.get(path);
|
|
853
|
+
}
|
|
854
|
+
getSmartRoutingConditionPaymentMethod(accountCode, paymentMethod) {
|
|
855
|
+
var headers = {
|
|
856
|
+
'x-account-code': accountCode
|
|
857
|
+
};
|
|
858
|
+
return this.get(`/smart-routing/payment-methods/${paymentMethod}/conditions`, {
|
|
859
|
+
headers
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
getSmartRoutingConditionTypesValues(accountCode, index) {
|
|
863
|
+
return this.get(`/smart-routing/condition-types-values/${accountCode}/${index}`);
|
|
864
|
+
}
|
|
865
|
+
getSmartRoutingNextSteps(accountCode, stepType, status) {
|
|
866
|
+
var routingType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
867
|
+
if (routingType === 'routing-payouts') {
|
|
868
|
+
// POST /routing-payouts/config/next-steps with body
|
|
869
|
+
return this.post(`/${routingType}/config/next-steps`, {
|
|
870
|
+
step_type: stepType,
|
|
871
|
+
status
|
|
872
|
+
});
|
|
873
|
+
} else {
|
|
874
|
+
// GET /smart-routing/next-route/:accountCode/:stepType/:status
|
|
875
|
+
return this.get(`/${routingType}/next-route/${accountCode}/${stepType}/${status}`);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
getSmartRoutingWorkflowVersion(accountCode, workflowVersionId) {
|
|
879
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
880
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflow-version/${workflowVersionId}` : `/${routingType}/workflow-version/${accountCode}/${workflowVersionId}`;
|
|
881
|
+
return this.get(path);
|
|
882
|
+
}
|
|
883
|
+
getSmartRoutingWorkflow(accountCode, paymentName) {
|
|
884
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
885
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/${paymentName}` : `/${routingType}/workflow/${accountCode}/${paymentName}`;
|
|
886
|
+
return this.get(path);
|
|
887
|
+
}
|
|
888
|
+
putSmartRoutingUpdateWorkflow(accountCode, data) {
|
|
889
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
890
|
+
if (routingType === 'routing-payouts') {
|
|
891
|
+
var _data_version;
|
|
892
|
+
var workflowCode = ((_data_version = data.version) === null || _data_version === void 0 ? void 0 : _data_version.code) || data.code;
|
|
893
|
+
return this.put(`/${routingType}/workflows/${workflowCode}`, data);
|
|
894
|
+
} else {
|
|
895
|
+
return this.put(`/${routingType}/update-workflow/${accountCode}`, data);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
putSmartRoutingUpdateWorkflowName(accountCode, data) {
|
|
899
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
900
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/name/${data.code}` : `/${routingType}/workflow/${accountCode}/edit-name`;
|
|
901
|
+
return this.put(path, data);
|
|
902
|
+
}
|
|
903
|
+
postSmartRoutingCreateWorkflow(accountCode, data) {
|
|
904
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
905
|
+
if (routingType === 'routing-payouts') {
|
|
906
|
+
return this.post(`/${routingType}/workflows`, data);
|
|
907
|
+
} else {
|
|
908
|
+
return this.post(`/${routingType}/create-workflow/${accountCode}`, data);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
postSmartRoutingPublishVersion(accountCode, versionCode, organizationCode) {
|
|
912
|
+
var routingType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
913
|
+
var headers = {
|
|
914
|
+
'x-organization-code': organizationCode
|
|
915
|
+
};
|
|
916
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/${versionCode}/publish` : `/${routingType}/publish-version/${accountCode}/${versionCode}`;
|
|
917
|
+
return this.post(path, {}, {
|
|
918
|
+
headers
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
deleteSmartRoutingVersion(accountCode, versionCode) {
|
|
922
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
923
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/${versionCode}` : `/${routingType}/delete-version/${accountCode}/${versionCode}`;
|
|
924
|
+
return this.delete(path);
|
|
925
|
+
}
|
|
926
|
+
postSmartRoutingDuplicateVersion(accountCode, versionCode) {
|
|
927
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
928
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/${versionCode}/duplicate` : `/${routingType}/duplicate-version/${accountCode}/${versionCode}`;
|
|
929
|
+
return this.post(path, {});
|
|
930
|
+
}
|
|
931
|
+
getSmartRoutingDeclinedGroup(accountCode) {
|
|
932
|
+
var routingType = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
933
|
+
return this.get(`/${routingType}/declined-groups/${accountCode}`);
|
|
934
|
+
}
|
|
935
|
+
updateSmartRoutingDeclinedGroup(accountCode, declineId, payload) {
|
|
936
|
+
return this.put(`/smart-routing/declined-groups/${accountCode}/${declineId}`, payload);
|
|
937
|
+
}
|
|
938
|
+
createSmartRoutingDeclinedGroup(accountCode, payload) {
|
|
939
|
+
return this.post(`/smart-routing/declined-groups/${accountCode}`, payload);
|
|
940
|
+
}
|
|
941
|
+
getSmartRoutingPaymentRoute(accountCode, paymentId) {
|
|
942
|
+
var routingType = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
943
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/payments/${paymentId}/route` : `/${routingType}/payment-route/${accountCode}/${paymentId}`;
|
|
944
|
+
return this.get(path);
|
|
945
|
+
}
|
|
946
|
+
updateSmartRoutingFavorite(accountCode, versionCode, favorite) {
|
|
947
|
+
var routingType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
948
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/favorite/${versionCode}` : `/${routingType}/favorite/${accountCode}/${versionCode}`;
|
|
949
|
+
return this.put(path, {
|
|
950
|
+
favorite
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
getSmartRoutingSimulateConditionTypeValues(accountCode) {
|
|
954
|
+
var routingType = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
955
|
+
return this.get(`/${routingType}/condition-types-values-list/${accountCode}`);
|
|
956
|
+
}
|
|
957
|
+
simulateSmartRoutingTransaction(accountCode, workflowVersionCode, values) {
|
|
958
|
+
var routingType = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _types__rspack_import_1.SmartRouting.DEFAULT_ROUTING_TYPE;
|
|
959
|
+
var path = routingType === 'routing-payouts' ? `/${routingType}/workflows/${workflowVersionCode}/simulate` : `/${routingType}/simulate-transaction/${accountCode}/${workflowVersionCode}`;
|
|
960
|
+
return this.post(path, values);
|
|
961
|
+
}
|
|
962
|
+
getSmartRoutingSearchConditionValues(conditionType, text) {
|
|
963
|
+
return this.get(`/smart-routing/search-condition-values/${conditionType}/${text}`);
|
|
964
|
+
}
|
|
965
|
+
getProviderConversionRatesData() {
|
|
966
|
+
return this.get('/smart-routing/conversion-rates/all');
|
|
967
|
+
}
|
|
968
|
+
updateMonitorRedistribution(organizationCode, values) {
|
|
969
|
+
var headers = {
|
|
970
|
+
'x-organization-code': organizationCode
|
|
971
|
+
};
|
|
972
|
+
return this.post(`/smart-routing/monitor-redistribution`, values, {
|
|
973
|
+
headers
|
|
974
|
+
});
|
|
975
|
+
}
|
|
976
|
+
removeDeclinedGroup(organizationCode, declinedGroupCode) {
|
|
977
|
+
var headers = {
|
|
978
|
+
'x-organization-code': organizationCode
|
|
979
|
+
};
|
|
980
|
+
return this.delete(`/smart-routing/declined-groups/${declinedGroupCode}`, {
|
|
981
|
+
headers
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
multiAccountDeclinedGroupCreate(organizationCode, payload) {
|
|
985
|
+
var headers = {
|
|
986
|
+
'x-organization-code': organizationCode
|
|
987
|
+
};
|
|
988
|
+
return this.post(`/smart-routing/declined-groups/massive/create`, payload, {
|
|
989
|
+
headers
|
|
990
|
+
});
|
|
991
|
+
}
|
|
992
|
+
// #region AI
|
|
993
|
+
generateAIWorkflowRoutes(organizationCode, payload) {
|
|
994
|
+
var headers = {
|
|
995
|
+
'x-organization-code': organizationCode
|
|
996
|
+
};
|
|
997
|
+
return this.post(`/ai/generate-route`, payload, {
|
|
998
|
+
headers
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
postAIGenerationFeedback(payload) {
|
|
1002
|
+
return this.post(`/ai/generation-feedback`, payload);
|
|
1003
|
+
}
|
|
1004
|
+
// #region ROUTING MONITORS
|
|
1005
|
+
getRoutingMonitorsTemplates(organizationCode) {
|
|
1006
|
+
var headers = {
|
|
1007
|
+
'x-organization-code': organizationCode
|
|
1008
|
+
};
|
|
1009
|
+
return this.get(`/routing-monitor/templates`, {
|
|
1010
|
+
headers
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
getRoutingMonitorsTemplate(code, organizationCode) {
|
|
1014
|
+
var headers = {
|
|
1015
|
+
'x-organization-code': organizationCode
|
|
1016
|
+
};
|
|
1017
|
+
return this.get(`/routing-monitor/template/${code}`, {
|
|
1018
|
+
headers
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
createMonitorThreshold(data, organizationCode) {
|
|
1022
|
+
var headers = {
|
|
1023
|
+
'x-organization-code': organizationCode
|
|
1024
|
+
};
|
|
1025
|
+
return this.post(`/routing-monitor/threshold`, data, {
|
|
1026
|
+
headers
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
createMonitorTemplate(data, organizationCode) {
|
|
1030
|
+
var headers = {
|
|
1031
|
+
'x-organization-code': organizationCode
|
|
1032
|
+
};
|
|
1033
|
+
return this.post(`/routing-monitor/template`, data, {
|
|
1034
|
+
headers
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
// DATA REPORTS
|
|
1038
|
+
getSmartRoutingDataReport(params) {
|
|
1039
|
+
return this.get(`/data-report`, {
|
|
1040
|
+
params
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
getInsightsMetricsConversionRateV2(params, path) {
|
|
1044
|
+
var paramsAccountCode = params.account_code, paramsConnectionName = params.connection_name, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1045
|
+
"account_code",
|
|
1046
|
+
"connection_name",
|
|
1047
|
+
"metadata"
|
|
1048
|
+
]);
|
|
1049
|
+
var body = getAccounts(paramsAccountCode);
|
|
1050
|
+
if (paramsConnectionName) {
|
|
1051
|
+
body.connection_name = paramsConnectionName.split(',');
|
|
1052
|
+
}
|
|
1053
|
+
if (metadata) {
|
|
1054
|
+
body = (0,_swc_helpers_object_spread__rspack_import_4._)({}, body, buildMetadataFiltersBody(metadata));
|
|
1055
|
+
}
|
|
1056
|
+
return this.post(`/insights/conversion-rate/${path}`, body, {
|
|
1057
|
+
params: restParams
|
|
1058
|
+
});
|
|
1059
|
+
}
|
|
1060
|
+
getInsightsMetricsConversionRateViewMore(params, type) {
|
|
1061
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1062
|
+
"account_code",
|
|
1063
|
+
"metadata"
|
|
1064
|
+
]);
|
|
1065
|
+
var body = getAccounts(paramsAccountCode);
|
|
1066
|
+
if (metadata) {
|
|
1067
|
+
body = (0,_swc_helpers_object_spread__rspack_import_4._)({}, body, buildMetadataFiltersBody(metadata));
|
|
1068
|
+
}
|
|
1069
|
+
return this.post(`/insights/conversion-rate/cards/metrics/${type}`, body, {
|
|
1070
|
+
params: restParams
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
getInsightFallbackMetrics(params) {
|
|
1074
|
+
var paramsAccountCode = params.account_code, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1075
|
+
"account_code",
|
|
1076
|
+
"metadata"
|
|
1077
|
+
]);
|
|
1078
|
+
var body = getAccounts(paramsAccountCode);
|
|
1079
|
+
if (metadata) {
|
|
1080
|
+
body = (0,_swc_helpers_object_spread__rspack_import_4._)({}, body, buildMetadataFiltersBody(metadata));
|
|
1081
|
+
}
|
|
1082
|
+
return this.post(`/insights/conversion-rate/fallback`, body, {
|
|
1083
|
+
params: restParams
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
getInsightsMetricsVolumeV2(account_codes, path, params) {
|
|
1087
|
+
var connection_name = params.connection_name, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1088
|
+
"connection_name",
|
|
1089
|
+
"metadata"
|
|
1090
|
+
]);
|
|
1091
|
+
var body = {
|
|
1092
|
+
account_codes: (account_codes === null || account_codes === void 0 ? void 0 : account_codes.length) ? account_codes === null || account_codes === void 0 ? void 0 : account_codes.split(',') : []
|
|
1093
|
+
};
|
|
1094
|
+
if (connection_name) {
|
|
1095
|
+
body = (0,_swc_helpers_object_spread_props__rspack_import_3._)((0,_swc_helpers_object_spread__rspack_import_4._)({}, body), {
|
|
1096
|
+
connection_name: connection_name === null || connection_name === void 0 ? void 0 : connection_name.split(',')
|
|
1097
|
+
});
|
|
1098
|
+
}
|
|
1099
|
+
if (metadata) {
|
|
1100
|
+
body = (0,_swc_helpers_object_spread__rspack_import_4._)({}, body, buildMetadataFiltersBody(metadata));
|
|
1101
|
+
}
|
|
1102
|
+
return this.post(`/insights/volume/${path}`, body, {
|
|
1103
|
+
params: restParams
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
// #region FRAUD INSIGHTS
|
|
1107
|
+
getInsightsFraudScreeningVolumeAndCountTx(body, params) {
|
|
1108
|
+
return this.post('/insights/fraud-screening/volume-and-count-tx', body, {
|
|
1109
|
+
params
|
|
1110
|
+
});
|
|
1111
|
+
}
|
|
1112
|
+
getInsightsFraudScreeningConversionRate(body, params) {
|
|
1113
|
+
return this.post('/insights/fraud-screening/conversion-rate', body, {
|
|
1114
|
+
params
|
|
1115
|
+
});
|
|
1116
|
+
}
|
|
1117
|
+
getInsights3dsVolumeAndCountTx(body, params) {
|
|
1118
|
+
return this.post('/insights/3ds/volume-and-count-tx', body, {
|
|
1119
|
+
params
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
getInsights3dsConversionRateAndEvolution(body, params) {
|
|
1123
|
+
return this.post('/insights/3ds/conversion-rate-and-evolution', body, {
|
|
1124
|
+
params
|
|
1125
|
+
});
|
|
1126
|
+
}
|
|
1127
|
+
getInsights3dsDeclineReasons(body, params) {
|
|
1128
|
+
return this.post('/insights/3ds/decline-reasons', body, {
|
|
1129
|
+
params
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
getInsights3dsFrictionlessVsChallenge(body, params) {
|
|
1133
|
+
return this.post('/insights/3ds/frictionless-vs-challenge', body, {
|
|
1134
|
+
params
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
getInsightsChargebacksVolumeAndCountTx(body, params) {
|
|
1138
|
+
return this.post('/insights/chargebacks/volume-and-count-tx', body, {
|
|
1139
|
+
params
|
|
1140
|
+
});
|
|
1141
|
+
}
|
|
1142
|
+
getInsightsChargebacksTotalRateAndEvolution(body, params) {
|
|
1143
|
+
return this.post('/insights/chargebacks/total-rate-and-evolution', body, {
|
|
1144
|
+
params
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
getInsightsChargebacksWinRate(body, params) {
|
|
1148
|
+
return this.post('/insights/chargebacks/win-rate', body, {
|
|
1149
|
+
params
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
getInsightsChargebacksDisputed(body, params) {
|
|
1153
|
+
return this.post('/insights/chargebacks/disputed', body, {
|
|
1154
|
+
params
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
getInsightsChargebacksByProviderAndCardBrand(body, params) {
|
|
1158
|
+
return this.post('/insights/chargebacks/by-provider-and-card-brand', body, {
|
|
1159
|
+
params
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
getInsightsChargebacksReasonsDistribution(body, params) {
|
|
1163
|
+
return this.post('/insights/chargebacks/reasons-distribution', body, {
|
|
1164
|
+
params
|
|
1165
|
+
});
|
|
1166
|
+
}
|
|
1167
|
+
getInsightsChargebacksStatusDistribution(body, params) {
|
|
1168
|
+
return this.post('/insights/chargebacks/status-distribution', body, {
|
|
1169
|
+
params
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1172
|
+
getInsightsChargebacksByCardBrand(body, params) {
|
|
1173
|
+
return this.post('/insights/chargebacks/by-card-brand', body, {
|
|
1174
|
+
params
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
// #endregion
|
|
1178
|
+
getInsightOverviewV3(params, type) {
|
|
1179
|
+
var paramsAccountCode = params.account_code, connectionName = params.connection_name, metadata = params.metadata, restParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1180
|
+
"account_code",
|
|
1181
|
+
"connection_name",
|
|
1182
|
+
"metadata"
|
|
1183
|
+
]);
|
|
1184
|
+
var body = getAccounts(paramsAccountCode);
|
|
1185
|
+
if (connectionName) {
|
|
1186
|
+
body = (0,_swc_helpers_object_spread_props__rspack_import_3._)((0,_swc_helpers_object_spread__rspack_import_4._)({}, body), {
|
|
1187
|
+
connection_name: connectionName === null || connectionName === void 0 ? void 0 : connectionName.split(',')
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
if (metadata) {
|
|
1191
|
+
body = (0,_swc_helpers_object_spread__rspack_import_4._)({}, body, buildMetadataFiltersBody(metadata));
|
|
1192
|
+
}
|
|
1193
|
+
return this.post(`/insights/overview/${type}`, body, {
|
|
1194
|
+
params: restParams
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
// #region CHART INSIGHTS IN HOME MFE
|
|
1198
|
+
getInsighstHomeMetrics(params) {
|
|
1199
|
+
return this.post(`/insights/dashboard-home-metrics`, params);
|
|
1200
|
+
}
|
|
1201
|
+
// #region CHECKOUTS
|
|
1202
|
+
getCheckouts(param) {
|
|
1203
|
+
var accountCode = param.accountCode;
|
|
1204
|
+
return this.get(`/checkouts/${accountCode}`);
|
|
1205
|
+
}
|
|
1206
|
+
getNameAndIcon(param) {
|
|
1207
|
+
var paymentMethodType = param.paymentMethodType, type = param.type;
|
|
1208
|
+
return this.get(`/checkouts/payment-methods/${paymentMethodType}/icon-name?type=${type}`);
|
|
1209
|
+
}
|
|
1210
|
+
getRequiredFields(param) {
|
|
1211
|
+
var paymentMethodType = param.paymentMethodType, type = param.type;
|
|
1212
|
+
return this.get(`/checkouts/payment-methods/${paymentMethodType}/required-fields?type=${type}`);
|
|
1213
|
+
}
|
|
1214
|
+
getPaymentMethodAccounts(param) {
|
|
1215
|
+
var paymentMethod = param.paymentMethod, organizationCode = param.organizationCode;
|
|
1216
|
+
var headers = {
|
|
1217
|
+
'x-organization-code': organizationCode
|
|
1218
|
+
};
|
|
1219
|
+
return this.get(`/checkouts/payment-methods/${paymentMethod}/accounts`, {
|
|
1220
|
+
headers
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* @deprecated since v0.28.6. Use changeStylingSettings instead
|
|
1225
|
+
*/ updateCheckoutTemplate(param) {
|
|
1226
|
+
var accountCode = param.accountCode, template = param.template;
|
|
1227
|
+
return this.post(`/v2/checkouts/template`, {
|
|
1228
|
+
account_code: accountCode,
|
|
1229
|
+
template
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
updateIsActiveCheckout(args) {
|
|
1233
|
+
var accountCode = args.accountCode, body = (0,_swc_helpers_object_without_properties__rspack_import_5._)(args, [
|
|
1234
|
+
"accountCode"
|
|
1235
|
+
]);
|
|
1236
|
+
return this.patch(`/checkouts/publish`, body, {
|
|
1237
|
+
headers: {
|
|
1238
|
+
'x-account-code': accountCode
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
getCountryData(param) {
|
|
1243
|
+
var accountCode = param.accountCode;
|
|
1244
|
+
return this.get(`/country-data/v1/country-documents`, {
|
|
1245
|
+
headers: {
|
|
1246
|
+
'x-account-code': accountCode
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1250
|
+
publishCheckout(args) {
|
|
1251
|
+
var accountCode = args.accountCode, body = (0,_swc_helpers_object_without_properties__rspack_import_5._)(args, [
|
|
1252
|
+
"accountCode"
|
|
1253
|
+
]);
|
|
1254
|
+
return this.patch(`/checkouts/publish`, body, {
|
|
1255
|
+
headers: {
|
|
1256
|
+
'x-account-code': accountCode
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
// #region CHECKOUT STYLING
|
|
1261
|
+
getStylingSdkDynamic(param) {
|
|
1262
|
+
var accountCode = param.accountCode;
|
|
1263
|
+
var headers = {
|
|
1264
|
+
'x-account-code': accountCode
|
|
1265
|
+
};
|
|
1266
|
+
return this.get(`/checkout/settings`, {
|
|
1267
|
+
headers
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
getStylingSettingsV2(param) {
|
|
1271
|
+
var accountCode = param.accountCode;
|
|
1272
|
+
var headers = {
|
|
1273
|
+
'x-account-code': accountCode
|
|
1274
|
+
};
|
|
1275
|
+
return this.get(`/v1/checkouts/builder/settings`, {
|
|
1276
|
+
headers
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
changeStylingSettings(param) {
|
|
1280
|
+
var accountCode = param.accountCode, payload = param.payload;
|
|
1281
|
+
var headers = {
|
|
1282
|
+
'x-account-code': accountCode,
|
|
1283
|
+
'Content-Type': 'application/json'
|
|
1284
|
+
};
|
|
1285
|
+
return this.patch(`/v1/checkouts/builder/settings`, payload, {
|
|
1286
|
+
headers
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
// #region CHANGE PASSWORD
|
|
1290
|
+
emailVerification(email) {
|
|
1291
|
+
return this.get(`/user/email-verification/${email}`);
|
|
1292
|
+
}
|
|
1293
|
+
// #region REPORTS
|
|
1294
|
+
createReconciliationsReportV2(payload) {
|
|
1295
|
+
return this.post(`/v2/reports/create`, payload);
|
|
1296
|
+
}
|
|
1297
|
+
createReconciliationsReportV3(payload) {
|
|
1298
|
+
return this.post(`/v3/reports/create`, payload);
|
|
1299
|
+
}
|
|
1300
|
+
createReportV2(payload) {
|
|
1301
|
+
return this.post(`/reports`, payload);
|
|
1302
|
+
}
|
|
1303
|
+
getTotalRowsForExport(payload) {
|
|
1304
|
+
return this.post(`/reports/count`, payload);
|
|
1305
|
+
}
|
|
1306
|
+
reportsList() {
|
|
1307
|
+
return this.get(`/reports`);
|
|
1308
|
+
}
|
|
1309
|
+
reportsListMultiEnv() {
|
|
1310
|
+
return this.get(`/reports/multi-environment`);
|
|
1311
|
+
}
|
|
1312
|
+
downloadReports(reportId) {
|
|
1313
|
+
return this.get(`/reports-redirect/${reportId}`);
|
|
1314
|
+
}
|
|
1315
|
+
cancelReport(reportId) {
|
|
1316
|
+
return this.patch(`/reports/${reportId}`);
|
|
1317
|
+
}
|
|
1318
|
+
getReportTemplates() {
|
|
1319
|
+
return this.get(`/reports/templates`);
|
|
1320
|
+
}
|
|
1321
|
+
createReportTemplate(payload) {
|
|
1322
|
+
return this.post(`/reports/templates`, payload);
|
|
1323
|
+
}
|
|
1324
|
+
updateReportTemplate(payload) {
|
|
1325
|
+
return this.put(`/reports/templates`, payload);
|
|
1326
|
+
}
|
|
1327
|
+
deletePaymentsReportTemplate(payload) {
|
|
1328
|
+
return this.delete(`/reports/templates`, {
|
|
1329
|
+
data: payload
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
getReportColumns(templateType, reportType) {
|
|
1333
|
+
return this.get(`/reports/columns/${templateType}/${reportType}`);
|
|
1334
|
+
}
|
|
1335
|
+
// ========= TEMPLATE REPORTING API METHODS =========
|
|
1336
|
+
// Template endpoints
|
|
1337
|
+
searchReportTemplates(payload) {
|
|
1338
|
+
return this.post('/template-reporting/report-templates/search', payload);
|
|
1339
|
+
}
|
|
1340
|
+
searchReportTemplateById(templateId, payload) {
|
|
1341
|
+
return this.post(`/template-reporting/report-templates/search/${templateId}`, payload);
|
|
1342
|
+
}
|
|
1343
|
+
createTemplateReporting(payload) {
|
|
1344
|
+
return this.post('/template-reporting/report-templates', payload);
|
|
1345
|
+
}
|
|
1346
|
+
cloneReportTemplate(templateId, payload) {
|
|
1347
|
+
return this.post(`/template-reporting/report-templates/${templateId}/clone`, payload);
|
|
1348
|
+
}
|
|
1349
|
+
updateTemplateSelection(templateId, payload) {
|
|
1350
|
+
return this.patch(`/template-reporting/report-templates/${templateId}/selection`, payload);
|
|
1351
|
+
}
|
|
1352
|
+
changeTemplateStatus(templateId, payload) {
|
|
1353
|
+
return this.patch(`/template-reporting/report-templates/${templateId}/status`, payload);
|
|
1354
|
+
}
|
|
1355
|
+
deleteReportTemplate(templateId, payload) {
|
|
1356
|
+
return this.delete(`/template-reporting/report-templates/${templateId}`, {
|
|
1357
|
+
data: payload
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
// Schedule endpoints
|
|
1361
|
+
searchReportSchedules(payload) {
|
|
1362
|
+
return this.post('/template-reporting/report-schedules/search', payload);
|
|
1363
|
+
}
|
|
1364
|
+
searchReportScheduleById(scheduleId, payload) {
|
|
1365
|
+
return this.post(`/template-reporting/report-schedules/search/${scheduleId}`, payload);
|
|
1366
|
+
}
|
|
1367
|
+
createReportSchedule(payload) {
|
|
1368
|
+
return this.post('/template-reporting/report-schedules', payload);
|
|
1369
|
+
}
|
|
1370
|
+
disableReportSchedule(scheduleId, payload) {
|
|
1371
|
+
return this.patch(`/template-reporting/report-schedules/${scheduleId}/disable`, payload);
|
|
1372
|
+
}
|
|
1373
|
+
deleteReportSchedule(scheduleId, payload) {
|
|
1374
|
+
return this.delete(`/template-reporting/report-schedules/${scheduleId}`, {
|
|
1375
|
+
data: payload
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
getRefundPdf(transactionCode, organizationCode, accountCode) {
|
|
1379
|
+
var headers = {
|
|
1380
|
+
'x-organization-code': organizationCode,
|
|
1381
|
+
'x-account-code': accountCode
|
|
1382
|
+
};
|
|
1383
|
+
return this.get(`/refund-pdf/${transactionCode}`, {
|
|
1384
|
+
headers
|
|
1385
|
+
});
|
|
1386
|
+
}
|
|
1387
|
+
getProofOfCancel(transactionCode, organizationCode, accountCode) {
|
|
1388
|
+
var headers = {
|
|
1389
|
+
'x-organization-code': organizationCode,
|
|
1390
|
+
'x-account-code': accountCode
|
|
1391
|
+
};
|
|
1392
|
+
return this.get(`/transactions/${transactionCode}/proof-of-cancel`, {
|
|
1393
|
+
headers
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
getProofOfPayment(transactionCode, organizationCode, accountCode) {
|
|
1397
|
+
var headers = {
|
|
1398
|
+
'x-organization-code': organizationCode,
|
|
1399
|
+
'x-account-code': accountCode
|
|
1400
|
+
};
|
|
1401
|
+
return this.get(`/transactions/${transactionCode}/proof-of-payment`, {
|
|
1402
|
+
headers
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
// #region Scheduled reports
|
|
1406
|
+
getScheduledReport(reportType) {
|
|
1407
|
+
return this.get(`/scheduled-reports?reportType=${reportType}`);
|
|
1408
|
+
}
|
|
1409
|
+
postScheduledReport(payload) {
|
|
1410
|
+
return this.post(`/scheduled-reports`, payload);
|
|
1411
|
+
}
|
|
1412
|
+
updateScheduledReport(reportCode, payload) {
|
|
1413
|
+
return this.patch(`/scheduled-reports/${reportCode}`, payload);
|
|
1414
|
+
}
|
|
1415
|
+
deleteScheduledReport(reportCode) {
|
|
1416
|
+
return this.delete(`/scheduled-reports/${reportCode}`);
|
|
1417
|
+
}
|
|
1418
|
+
// #region profile
|
|
1419
|
+
getProfile() {
|
|
1420
|
+
return this.get(`/user`);
|
|
1421
|
+
}
|
|
1422
|
+
getUserFull() {
|
|
1423
|
+
return this.get(`/user-full`);
|
|
1424
|
+
}
|
|
1425
|
+
getImpersonationUsers() {
|
|
1426
|
+
return this.get(`/impersonation/user`);
|
|
1427
|
+
}
|
|
1428
|
+
getImpersonationEnabled() {
|
|
1429
|
+
return this.get(`/impersonation/enabled`);
|
|
1430
|
+
}
|
|
1431
|
+
getUsersToImpersonate(organizationCode, accountCodes) {
|
|
1432
|
+
var page = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, pageSize = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 10, searchValue = arguments.length > 4 ? arguments[4] : void 0, roleIds = arguments.length > 5 ? arguments[5] : void 0;
|
|
1433
|
+
var payload = (0,_swc_helpers_object_spread__rspack_import_4._)({
|
|
1434
|
+
account_codes: accountCodes || [],
|
|
1435
|
+
page,
|
|
1436
|
+
page_size: pageSize
|
|
1437
|
+
}, searchValue && {
|
|
1438
|
+
search_value: searchValue
|
|
1439
|
+
}, (roleIds === null || roleIds === void 0 ? void 0 : roleIds.length) && {
|
|
1440
|
+
role_ids: roleIds
|
|
1441
|
+
});
|
|
1442
|
+
return this.post(`/impersonation/user/organization/${organizationCode}/users-to-impersonate`, payload);
|
|
1443
|
+
}
|
|
1444
|
+
getAccountsForImpersonation(organizationCode) {
|
|
1445
|
+
return this.get(`/impersonation/user/organization/${organizationCode}/accounts`);
|
|
1446
|
+
}
|
|
1447
|
+
getRolesForImpersonation(organizationCode) {
|
|
1448
|
+
return this.get(`/impersonation/user/organization/${organizationCode}/roles`);
|
|
1449
|
+
}
|
|
1450
|
+
updateProfile(payload) {
|
|
1451
|
+
return this.patch(`/user`, payload);
|
|
1452
|
+
}
|
|
1453
|
+
inviteUsersMassive(data, organizationCode) {
|
|
1454
|
+
var headers = {
|
|
1455
|
+
'x-organization-code': organizationCode
|
|
1456
|
+
};
|
|
1457
|
+
return this.post(`user/invite/massive`, data, {
|
|
1458
|
+
headers
|
|
1459
|
+
});
|
|
1460
|
+
}
|
|
1461
|
+
inviteUsersMassiveV2(data) {
|
|
1462
|
+
return this.post(`user/invite/massive/v2`, data);
|
|
1463
|
+
}
|
|
1464
|
+
unInviteUsersV2(param) {
|
|
1465
|
+
var userCode = param.userCode, organizationCode = param.organizationCode;
|
|
1466
|
+
var headers = {
|
|
1467
|
+
'x-organization-code': organizationCode
|
|
1468
|
+
};
|
|
1469
|
+
return this.delete(`/v2/user/uninvite/${userCode}`, {
|
|
1470
|
+
headers
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
getAccounts(organizationCode) {
|
|
1474
|
+
var headers = {
|
|
1475
|
+
'x-organization-code': organizationCode
|
|
1476
|
+
};
|
|
1477
|
+
return this.get(`/accounts-user`, {
|
|
1478
|
+
headers
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
getAccountsV2() {
|
|
1482
|
+
return this.get(`/accounts-user`);
|
|
1483
|
+
}
|
|
1484
|
+
getAccountsByUser(userCode) {
|
|
1485
|
+
return this.get(`/accounts-user/user/${userCode}`);
|
|
1486
|
+
}
|
|
1487
|
+
putAccountsUserMassive(organizationCode, userCode, payload) {
|
|
1488
|
+
var headers = {
|
|
1489
|
+
'x-organization-code': organizationCode
|
|
1490
|
+
};
|
|
1491
|
+
return this.put(`/accounts-user/role/massive/user/${userCode}`, payload, {
|
|
1492
|
+
headers: headers
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
deleteAccountsUserMassive(organizationCode, userCode, payload) {
|
|
1496
|
+
var headers = {
|
|
1497
|
+
'x-organization-code': organizationCode
|
|
1498
|
+
};
|
|
1499
|
+
return this.delete(`/accounts-user/role/massive/user/${userCode}`, {
|
|
1500
|
+
data: payload,
|
|
1501
|
+
headers: headers
|
|
1502
|
+
});
|
|
1503
|
+
}
|
|
1504
|
+
postAccount(name, principal) {
|
|
1505
|
+
return this.post(`/accounts`, {
|
|
1506
|
+
name,
|
|
1507
|
+
principal
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
duplicateAccount(body) {
|
|
1511
|
+
return this.post(`/accounts/duplicate`, body);
|
|
1512
|
+
}
|
|
1513
|
+
retryDuplicateAccount(account_code) {
|
|
1514
|
+
return this.post(`/accounts/duplicate/${account_code}/retry`);
|
|
1515
|
+
}
|
|
1516
|
+
getPendingDuplicateAccounts() {
|
|
1517
|
+
return this.get(`/accounts/duplicate`);
|
|
1518
|
+
}
|
|
1519
|
+
patchAccount(param) {
|
|
1520
|
+
var name = param.name, code = param.code, principal = param.principal;
|
|
1521
|
+
return this.patch(`/accounts/${code}`, {
|
|
1522
|
+
name,
|
|
1523
|
+
principal
|
|
1524
|
+
});
|
|
1525
|
+
}
|
|
1526
|
+
patchAccountV2(param) {
|
|
1527
|
+
var name = param.name, code = param.code, principal = param.principal;
|
|
1528
|
+
return this.patch(`/accounts/with-principal`, {
|
|
1529
|
+
name,
|
|
1530
|
+
principal
|
|
1531
|
+
}, {
|
|
1532
|
+
headers: {
|
|
1533
|
+
'x-account-code': code
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
putAccountPrincipal(param) {
|
|
1538
|
+
var account_code = param.account_code;
|
|
1539
|
+
return this.put(`/user-accounts/principal`, {
|
|
1540
|
+
account_code
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
bulkDisableAccounts(payload) {
|
|
1544
|
+
return this.post(`/v1/accounts/bulk-disable`, {
|
|
1545
|
+
account_codes: payload.accountCodes
|
|
1546
|
+
});
|
|
1547
|
+
}
|
|
1548
|
+
bulkEnableAccounts(payload) {
|
|
1549
|
+
return this.post(`/v1/accounts/bulk-enable`, {
|
|
1550
|
+
account_codes: payload.accountCodes
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
getAccountsByOrganization(params) {
|
|
1554
|
+
return this.get(`/v1/accounts/by-organization`, {
|
|
1555
|
+
params
|
|
1556
|
+
});
|
|
1557
|
+
}
|
|
1558
|
+
getAccountsByOrganizationCode(organizationCode, params) {
|
|
1559
|
+
return this.get(`/v1/accounts/organization/${organizationCode}`, {
|
|
1560
|
+
params
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
// #region NOTIFICATIONS
|
|
1564
|
+
getMergedNotifications() {
|
|
1565
|
+
return this.get(`/notifications-all`);
|
|
1566
|
+
}
|
|
1567
|
+
getNotificationsCustomer(customer) {
|
|
1568
|
+
return this.get(`/notifications/${customer}`);
|
|
1569
|
+
}
|
|
1570
|
+
getValidateOpsgenieKey(key) {
|
|
1571
|
+
return this.get(`/notifications/opsgenie/validate/${key}`);
|
|
1572
|
+
}
|
|
1573
|
+
postSlackMessageChannel(payload) {
|
|
1574
|
+
return this.post(`/slack-channel-message`, payload);
|
|
1575
|
+
}
|
|
1576
|
+
pathNotification(payload) {
|
|
1577
|
+
return this.patch(`/notifications`, payload);
|
|
1578
|
+
}
|
|
1579
|
+
getNotificationsNumber(customer) {
|
|
1580
|
+
return this.get(`/notifications/${customer}/number`);
|
|
1581
|
+
}
|
|
1582
|
+
// #region TEAM
|
|
1583
|
+
teamsFiltersMembers(param) {
|
|
1584
|
+
var organizationCode = param.organizationCode;
|
|
1585
|
+
var headers = {
|
|
1586
|
+
'x-organization-code': organizationCode
|
|
1587
|
+
};
|
|
1588
|
+
return this.get(`/teams/filters/members`, {
|
|
1589
|
+
headers
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
postMembersPaginatedV2(param) {
|
|
1593
|
+
var organizationCode = param.organizationCode, accountCodes = param.accountCodes, search = param.search, status = param.status, roleId = param.roleId, statuses = param.statuses, roleIds = param.roleIds, page = param.page, pageSize = param.pageSize;
|
|
1594
|
+
var headers = {
|
|
1595
|
+
'x-organization-code': organizationCode
|
|
1596
|
+
};
|
|
1597
|
+
return this.post(`/teams/paginated`, {
|
|
1598
|
+
account_codes: accountCodes,
|
|
1599
|
+
search,
|
|
1600
|
+
status,
|
|
1601
|
+
role_id: roleId,
|
|
1602
|
+
statuses,
|
|
1603
|
+
role_ids: roleIds,
|
|
1604
|
+
page,
|
|
1605
|
+
page_size: pageSize
|
|
1606
|
+
}, {
|
|
1607
|
+
headers
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
getRoles() {
|
|
1611
|
+
return this.get(`/teams/roles`);
|
|
1612
|
+
}
|
|
1613
|
+
setCustodian() {
|
|
1614
|
+
return this.post(`/teams/custodian`);
|
|
1615
|
+
}
|
|
1616
|
+
deleteUserTeamV2(param) {
|
|
1617
|
+
var userCode = param.userCode, organizationCode = param.organizationCode;
|
|
1618
|
+
var headers = {
|
|
1619
|
+
'x-organization-code': organizationCode
|
|
1620
|
+
};
|
|
1621
|
+
return this.delete(`/v2/teams/${userCode}`, {
|
|
1622
|
+
headers
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
createRoles(payload, accountCode) {
|
|
1626
|
+
return this.post(`/teams/roles`, payload, {
|
|
1627
|
+
headers: {
|
|
1628
|
+
'x-account-code': accountCode
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
}
|
|
1632
|
+
editRoles(param, accountCode) {
|
|
1633
|
+
var payload = param.payload, id = param.id;
|
|
1634
|
+
return this.patch(`/teams/roles/${id}`, payload, {
|
|
1635
|
+
headers: {
|
|
1636
|
+
'x-account-code': accountCode
|
|
1637
|
+
}
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
deleteRoles(id) {
|
|
1641
|
+
return this.delete(`/teams/roles/${id}`);
|
|
1642
|
+
}
|
|
1643
|
+
getRolesPermissions() {
|
|
1644
|
+
return this.get(`/teams/permissions`);
|
|
1645
|
+
}
|
|
1646
|
+
getFeatureFlagId(_0) {
|
|
1647
|
+
var name = _0.name, rest = (0,_swc_helpers_object_without_properties__rspack_import_5._)(_0, [
|
|
1648
|
+
"name"
|
|
1649
|
+
]);
|
|
1650
|
+
return this.post('/feature-flags/evaluate', {
|
|
1651
|
+
name,
|
|
1652
|
+
parameters: rest
|
|
1653
|
+
});
|
|
1654
|
+
}
|
|
1655
|
+
getFeatureFlagIdAll(_0) {
|
|
1656
|
+
return (0,_swc_helpers_async_to_generator__rspack_import_7._)(function(param) {
|
|
1657
|
+
var accountCode, response, structuredData;
|
|
1658
|
+
return (0,_swc_helpers_ts_generator__rspack_import_8._)(this, function(_state) {
|
|
1659
|
+
switch(_state.label){
|
|
1660
|
+
case 0:
|
|
1661
|
+
accountCode = param.accountCode;
|
|
1662
|
+
return [
|
|
1663
|
+
4,
|
|
1664
|
+
this.get('/feature-flags/names', accountCode ? {
|
|
1665
|
+
headers: {
|
|
1666
|
+
'x-account-code': accountCode
|
|
1667
|
+
}
|
|
1668
|
+
} : {})
|
|
1669
|
+
];
|
|
1670
|
+
case 1:
|
|
1671
|
+
response = _state.sent();
|
|
1672
|
+
structuredData = {};
|
|
1673
|
+
response.data.feature_flag_names.forEach((name)=>{
|
|
1674
|
+
structuredData[name] = true;
|
|
1675
|
+
});
|
|
1676
|
+
return [
|
|
1677
|
+
2,
|
|
1678
|
+
{
|
|
1679
|
+
data: structuredData,
|
|
1680
|
+
status: 200,
|
|
1681
|
+
statusText: 'OK',
|
|
1682
|
+
headers: {},
|
|
1683
|
+
config: {}
|
|
1684
|
+
}
|
|
1685
|
+
];
|
|
1686
|
+
}
|
|
1687
|
+
});
|
|
1688
|
+
}).apply(this, arguments);
|
|
1689
|
+
}
|
|
1690
|
+
getPermissionsCatalog() {
|
|
1691
|
+
return this.get(`/teams/permissions-catalog`);
|
|
1692
|
+
}
|
|
1693
|
+
// Organization Roles
|
|
1694
|
+
getOrgRolesPermissions() {
|
|
1695
|
+
return this.get(`/teams/permissions?type=ORGANIZATION`);
|
|
1696
|
+
}
|
|
1697
|
+
getOrgPermissionsCatalog() {
|
|
1698
|
+
return this.get(`/teams/permissions-catalog?role_type=ORGANIZATION`);
|
|
1699
|
+
}
|
|
1700
|
+
createOrgRole(payload) {
|
|
1701
|
+
return this.post(`/teams/roles`, payload);
|
|
1702
|
+
}
|
|
1703
|
+
editOrgRole(param) {
|
|
1704
|
+
var payload = param.payload, id = param.id;
|
|
1705
|
+
return this.patch(`/teams/roles/${id}`, payload);
|
|
1706
|
+
}
|
|
1707
|
+
deleteOrgRole(id) {
|
|
1708
|
+
return this.delete(`/teams/roles/${id}`);
|
|
1709
|
+
}
|
|
1710
|
+
getOrgRoleAssignments() {
|
|
1711
|
+
return this.get(`/teams/organization-roles/assignments`);
|
|
1712
|
+
}
|
|
1713
|
+
assignOrgRole(payload) {
|
|
1714
|
+
return this.post(`/teams/organization-roles/assign`, payload);
|
|
1715
|
+
}
|
|
1716
|
+
unassignOrgRole(userCode) {
|
|
1717
|
+
return this.delete(`/teams/organization-roles/assign/${userCode}`);
|
|
1718
|
+
}
|
|
1719
|
+
// User Exports
|
|
1720
|
+
startUserExport(params) {
|
|
1721
|
+
return this.post(`/users/exports/start`, {
|
|
1722
|
+
account_codes: params.accountCodes,
|
|
1723
|
+
name: params.name,
|
|
1724
|
+
search: params.search,
|
|
1725
|
+
statuses: params.statuses,
|
|
1726
|
+
role_ids: params.roleIds
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
getUserExportStatus(param) {
|
|
1730
|
+
var exportCode = param.exportCode;
|
|
1731
|
+
return this.get(`/users/exports/${exportCode}`);
|
|
1732
|
+
}
|
|
1733
|
+
listUserExports(param) {
|
|
1734
|
+
var _param_page = param.page, page = _param_page === void 0 ? 0 : _param_page, _param_pageSize = param.pageSize, pageSize = _param_pageSize === void 0 ? 20 : _param_pageSize;
|
|
1735
|
+
return this.get(`/users/exports?page=${page}&page_size=${pageSize}`);
|
|
1736
|
+
}
|
|
1737
|
+
changePasswordV2(body) {
|
|
1738
|
+
return this.patch('/user/change-password-profile', body);
|
|
1739
|
+
}
|
|
1740
|
+
workosPasswordReset(body) {
|
|
1741
|
+
return this.post('/workos/password-reset', body, {
|
|
1742
|
+
baseURL: (this.instance.defaults.baseURL || '').replace(/\/api$/, '/api-public')
|
|
1743
|
+
});
|
|
1744
|
+
}
|
|
1745
|
+
workosAdminPortal() {
|
|
1746
|
+
return this.post('/workos/admin-portal', {});
|
|
1747
|
+
}
|
|
1748
|
+
workosDomainVerificationPortal() {
|
|
1749
|
+
return this.post('/workos/domain-verification-portal', {});
|
|
1750
|
+
}
|
|
1751
|
+
workosDomainStatus() {
|
|
1752
|
+
return this.get('/workos/domain-status');
|
|
1753
|
+
}
|
|
1754
|
+
workosVerifyMfa(body) {
|
|
1755
|
+
return this.post('/workos/verify-mfa', body, {
|
|
1756
|
+
baseURL: (this.instance.defaults.baseURL || '').replace(/\/api$/, '/api-public'),
|
|
1757
|
+
withCredentials: true
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
getCardBrands() {
|
|
1761
|
+
return this.get('/catalog/card-brands');
|
|
1762
|
+
}
|
|
1763
|
+
getPaymentFilters(section) {
|
|
1764
|
+
return this.get(`/payments/filters?section=${section}`);
|
|
1765
|
+
}
|
|
1766
|
+
getPaymentMetricsFilters() {
|
|
1767
|
+
return this.get('/payments/metrics/filters');
|
|
1768
|
+
}
|
|
1769
|
+
sendPaymentNotification(params, body) {
|
|
1770
|
+
return this.post(`/payments/${params.paymentCode}/transactions/${params.transactionCode}/settle`, body);
|
|
1771
|
+
}
|
|
1772
|
+
// #region EVENTS
|
|
1773
|
+
postAuditMonitors(payload) {
|
|
1774
|
+
return this.post(`/routing-monitor/audit`, payload);
|
|
1775
|
+
}
|
|
1776
|
+
getAuditMonitorDetail(id) {
|
|
1777
|
+
return this.get(`/routing-monitor/audit-monitors-details/${id}`);
|
|
1778
|
+
}
|
|
1779
|
+
getAuditEvents(params) {
|
|
1780
|
+
var account_code = params.account_code, queryParams = (0,_swc_helpers_object_without_properties__rspack_import_5._)(params, [
|
|
1781
|
+
"account_code"
|
|
1782
|
+
]);
|
|
1783
|
+
return this.post(`v2/events/organization`, {
|
|
1784
|
+
account_codes: account_code
|
|
1785
|
+
}, {
|
|
1786
|
+
params: queryParams,
|
|
1787
|
+
paramsSerializer: _lib_http_client__rspack_import_0.serializeParams
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
getPaymentLinks(params, account) {
|
|
1791
|
+
return this.get(`/v2/payment-links/${account}`, {
|
|
1792
|
+
params
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
getPaymentLinksByCode(paymentLinkCode) {
|
|
1796
|
+
return this.get(`/v2/payment-links/by-code/${paymentLinkCode}`);
|
|
1797
|
+
}
|
|
1798
|
+
postPaymentLinks(param) {
|
|
1799
|
+
var payload = param.payload, accountCode = param.accountCode;
|
|
1800
|
+
return this.post(`/v2/payment-links/${accountCode}`, payload);
|
|
1801
|
+
}
|
|
1802
|
+
patchPaymentLinks(param) {
|
|
1803
|
+
var payload = param.payload, accountCode = param.accountCode, paymentLinkCode = param.paymentLinkCode;
|
|
1804
|
+
return this.patch(`/v2/payment-links/${accountCode}/${paymentLinkCode}`, payload);
|
|
1805
|
+
}
|
|
1806
|
+
postDeletePaymentLink(param) {
|
|
1807
|
+
var code = param.code;
|
|
1808
|
+
return this.post(`/v2/payment-links/cancel/${code}`);
|
|
1809
|
+
}
|
|
1810
|
+
uploadPaymentLinkLogo(param) {
|
|
1811
|
+
var payload = param.payload;
|
|
1812
|
+
return this.post('/v1/checkouts/payment-link/logo', payload);
|
|
1813
|
+
}
|
|
1814
|
+
// #region SUBSCRIPTIONS
|
|
1815
|
+
postSubscription(payload) {
|
|
1816
|
+
return this.post(`/subscriptions`, payload);
|
|
1817
|
+
}
|
|
1818
|
+
getSubscriptionByCode(subscriptionCode) {
|
|
1819
|
+
return this.get(`/subscriptions/${subscriptionCode}`);
|
|
1820
|
+
}
|
|
1821
|
+
postPauseSubscription(subscriptionCode) {
|
|
1822
|
+
return this.post(`/subscriptions/${subscriptionCode}/pause`);
|
|
1823
|
+
}
|
|
1824
|
+
postResumeSubscription(subscriptionCode) {
|
|
1825
|
+
return this.post(`/subscriptions/${subscriptionCode}/resume`);
|
|
1826
|
+
}
|
|
1827
|
+
postCancelSubscription(subscriptionCode) {
|
|
1828
|
+
return this.post(`/subscriptions/${subscriptionCode}/cancel`);
|
|
1829
|
+
}
|
|
1830
|
+
patchSubscription(subscriptionCode, payload) {
|
|
1831
|
+
return this.patch(`/subscriptions/${subscriptionCode}`, payload);
|
|
1832
|
+
}
|
|
1833
|
+
postRescheduleSubscription(subscriptionCode) {
|
|
1834
|
+
return this.post(`/subscriptions/${subscriptionCode}/reschedule`);
|
|
1835
|
+
}
|
|
1836
|
+
getSubscriptionPayments(subscriptionCode, page, size) {
|
|
1837
|
+
return this.get(`/subscriptions/${subscriptionCode}/payments`, {
|
|
1838
|
+
params: {
|
|
1839
|
+
page,
|
|
1840
|
+
size
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
}
|
|
1844
|
+
postListSubscriptions(payload) {
|
|
1845
|
+
return this.post(`/subscriptions/list`, payload);
|
|
1846
|
+
}
|
|
1847
|
+
getInstallmentPlans(params) {
|
|
1848
|
+
var queryString = params ? (0,_lib_http_client__rspack_import_0.serializeParams)(params) : '';
|
|
1849
|
+
var url = queryString ? `/v1/installments-plans?${queryString}` : `/v1/installments-plans`;
|
|
1850
|
+
return this.get(url);
|
|
1851
|
+
}
|
|
1852
|
+
createInstallmentsPlan(payload) {
|
|
1853
|
+
return this.post(`/v1/installments-plans`, payload);
|
|
1854
|
+
}
|
|
1855
|
+
updateInstallmentsPlan(code, payload) {
|
|
1856
|
+
return this.patch(`/v1/installments-plans/${code}`, payload);
|
|
1857
|
+
}
|
|
1858
|
+
deleteInstallmentsPlan(code) {
|
|
1859
|
+
return this.delete(`/v1/installments-plans/${code}`);
|
|
1860
|
+
}
|
|
1861
|
+
searchInstallmentsPlans(payload) {
|
|
1862
|
+
return this.post(`/v2/installments-plans/search`, payload);
|
|
1863
|
+
}
|
|
1864
|
+
bulkCreateInstallmentsPlans(payload) {
|
|
1865
|
+
return this.post(`/v2/installments-plans/bulk`, payload);
|
|
1866
|
+
}
|
|
1867
|
+
bulkDeleteInstallmentsPlans(payload) {
|
|
1868
|
+
return this.post(`/v2/installments-plans/bulk-delete`, payload);
|
|
1869
|
+
}
|
|
1870
|
+
// #region FIREBASE
|
|
1871
|
+
firebaseUserSubscribe(payload) {
|
|
1872
|
+
return this.post(`/firebase/user/subscribe`, payload);
|
|
1873
|
+
}
|
|
1874
|
+
// #region SETTINGS
|
|
1875
|
+
postUserSettings(payload) {
|
|
1876
|
+
return this.patch(`/user-settings`, payload);
|
|
1877
|
+
}
|
|
1878
|
+
postUserSettingsTables(payload, section) {
|
|
1879
|
+
return this.patch(`/user-settings/${section}`, payload);
|
|
1880
|
+
}
|
|
1881
|
+
postUserSettingsPinned(payload) {
|
|
1882
|
+
return this.patch(`/user-settings/pinned_sections`, payload);
|
|
1883
|
+
}
|
|
1884
|
+
postUserThemeSettings(payload) {
|
|
1885
|
+
return this.patch(`/user-settings/theme`, payload);
|
|
1886
|
+
}
|
|
1887
|
+
// #region MFA
|
|
1888
|
+
// #region MFA
|
|
1889
|
+
getMfaTokenValidation(password, otp) {
|
|
1890
|
+
return this.post(`/mfa/token`, {
|
|
1891
|
+
password: password,
|
|
1892
|
+
otp_input: otp,
|
|
1893
|
+
user_code: ''
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
getEmailOtp() {
|
|
1897
|
+
return this.post(`/mfa/send-otp`, {});
|
|
1898
|
+
}
|
|
1899
|
+
confirmMfaOtp(payload) {
|
|
1900
|
+
return this.post(`/mfa/confirm/otp`, payload);
|
|
1901
|
+
}
|
|
1902
|
+
unrollMfa(password) {
|
|
1903
|
+
return this.post(`/mfa/unroll/otp`, {
|
|
1904
|
+
password: password
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
sendOTPForMFA() {
|
|
1908
|
+
return this.post(`/mfa/send-otp`);
|
|
1909
|
+
}
|
|
1910
|
+
// #region fraud-screening
|
|
1911
|
+
getConfigAllowlist(accountCode) {
|
|
1912
|
+
var headers = {
|
|
1913
|
+
'x-account-code': accountCode
|
|
1914
|
+
};
|
|
1915
|
+
return this.get(`/yuno-fraud-screening-int/allow-lists/config`, {
|
|
1916
|
+
headers
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
getBlackListType(accountCode) {
|
|
1920
|
+
var headers = {
|
|
1921
|
+
'x-account-code': accountCode
|
|
1922
|
+
};
|
|
1923
|
+
return this.get(`/blacklist`, {
|
|
1924
|
+
headers
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
postBlockList(accountCodes, listName, page, size) {
|
|
1928
|
+
var data = {
|
|
1929
|
+
name: listName,
|
|
1930
|
+
account_codes: accountCodes,
|
|
1931
|
+
page,
|
|
1932
|
+
size
|
|
1933
|
+
};
|
|
1934
|
+
return this.post(`/blacklist`, data);
|
|
1935
|
+
}
|
|
1936
|
+
getBlackListSummary(black_list_code) {
|
|
1937
|
+
var account = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1938
|
+
return this.get(`/blacklist/get-one/${black_list_code}/summary`, account ? {
|
|
1939
|
+
headers: {
|
|
1940
|
+
'x-account-code': account
|
|
1941
|
+
}
|
|
1942
|
+
} : {});
|
|
1943
|
+
}
|
|
1944
|
+
getBlacklistDetail(black_list_code, offset) {
|
|
1945
|
+
var limit = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 26, account = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, search = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : null;
|
|
1946
|
+
var url = `/blacklist/get-one/${black_list_code}/detail?offset=${offset}&limit=${limit}`;
|
|
1947
|
+
if (search && (search === null || search === void 0 ? void 0 : search.length) > 0) url += `&search=${search}`;
|
|
1948
|
+
return this.get(url, account ? {
|
|
1949
|
+
headers: {
|
|
1950
|
+
'x-account-code': account
|
|
1951
|
+
}
|
|
1952
|
+
} : {});
|
|
1953
|
+
}
|
|
1954
|
+
getAllowlistDetail(code) {
|
|
1955
|
+
var account = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1956
|
+
return this.get(`/yuno-fraud-screening-int/allow-lists/${code}`, account ? {
|
|
1957
|
+
headers: {
|
|
1958
|
+
'x-account-code': account
|
|
1959
|
+
}
|
|
1960
|
+
} : {});
|
|
1961
|
+
}
|
|
1962
|
+
postAllowlistItems(param) {
|
|
1963
|
+
var payload = param.payload;
|
|
1964
|
+
return this.post(`yuno-fraud-screening-int/allow-lists/${payload.code}/items/pageable`, payload, payload.account && {
|
|
1965
|
+
headers: {
|
|
1966
|
+
'x-account-code': payload.account
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1970
|
+
postGetAllowlist(param) {
|
|
1971
|
+
var payload = param.payload;
|
|
1972
|
+
return this.post(`/yuno-fraud-screening-int/allow-lists/pageable`, payload);
|
|
1973
|
+
}
|
|
1974
|
+
postCreateAllowlistMultiAccount(param) {
|
|
1975
|
+
var payload = param.payload;
|
|
1976
|
+
return this.post(`/yuno-fraud-screening-int/allow-lists/massive`, payload);
|
|
1977
|
+
}
|
|
1978
|
+
patchChangeStatusAllowlist(param) {
|
|
1979
|
+
var payload = param.payload;
|
|
1980
|
+
return this.patch(`/yuno-fraud-screening-int/allow-lists/${payload.code}`, {
|
|
1981
|
+
active: payload.active
|
|
1982
|
+
}, (payload === null || payload === void 0 ? void 0 : payload.account) && {
|
|
1983
|
+
headers: {
|
|
1984
|
+
'x-account-code': payload === null || payload === void 0 ? void 0 : payload.account
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1987
|
+
}
|
|
1988
|
+
patchChangeStatusAllowlistItem(param) {
|
|
1989
|
+
var payload = param.payload;
|
|
1990
|
+
return this.patch(`/yuno-fraud-screening-int/allow-lists/${payload.allowlist_code}/items/${payload.item_allowlist_code}`, {
|
|
1991
|
+
active: payload.active
|
|
1992
|
+
});
|
|
1993
|
+
}
|
|
1994
|
+
patchAddAllowlistItems(param) {
|
|
1995
|
+
var payload = param.payload;
|
|
1996
|
+
return this.patch(`/yuno-fraud-screening-int/allow-lists/${payload.allowlist_code}/items`, payload, payload.account && {
|
|
1997
|
+
headers: {
|
|
1998
|
+
'x-account-code': payload.account
|
|
1999
|
+
}
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
deleteAllowlistItem(param) {
|
|
2003
|
+
var payload = param.payload;
|
|
2004
|
+
var headers = {
|
|
2005
|
+
'x-account-code': payload.account_code
|
|
2006
|
+
};
|
|
2007
|
+
return this.delete(`/yuno-fraud-screening-int/allow-lists/${payload.allowlist_code}/items/${payload.allowlist_item_id}`, {
|
|
2008
|
+
headers
|
|
2009
|
+
});
|
|
2010
|
+
}
|
|
2011
|
+
validateAllowlistItems(param) {
|
|
2012
|
+
var payload = param.payload;
|
|
2013
|
+
return this.post(`/yuno-fraud-screening-int/allow-lists/${payload.allowlist_code}/validate/duplicate-items`, payload, {
|
|
2014
|
+
headers: {
|
|
2015
|
+
'x-account-code': payload.account_code
|
|
2016
|
+
}
|
|
2017
|
+
});
|
|
2018
|
+
}
|
|
2019
|
+
patchAllowlist(param) {
|
|
2020
|
+
var payload = param.payload;
|
|
2021
|
+
return this.patch(`/yuno-fraud-screening-int/allow-lists/${payload.allowlist_code}`, payload, payload.account && {
|
|
2022
|
+
headers: {
|
|
2023
|
+
'x-account-code': payload.account
|
|
2024
|
+
}
|
|
2025
|
+
});
|
|
2026
|
+
}
|
|
2027
|
+
postBlackListMultiAccount(param) {
|
|
2028
|
+
var payload = param.payload;
|
|
2029
|
+
return this.post(`/blacklist/create/multi-account`, payload, payload.account && {
|
|
2030
|
+
headers: {
|
|
2031
|
+
'x-account-code': payload.account
|
|
2032
|
+
}
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
putBlackListType(payload) {
|
|
2036
|
+
return this.put(`/blacklist/edit`, payload);
|
|
2037
|
+
}
|
|
2038
|
+
changeBlackListStatus(payload) {
|
|
2039
|
+
return this.put(`/blacklist/change-status`, payload);
|
|
2040
|
+
}
|
|
2041
|
+
changeBlackListStatusItem(payload) {
|
|
2042
|
+
return this.put(`/blacklist/change-item-status`, payload);
|
|
2043
|
+
}
|
|
2044
|
+
postBlackListItems(param) {
|
|
2045
|
+
var payload = param.payload;
|
|
2046
|
+
return this.post(`/blacklist/items`, payload);
|
|
2047
|
+
}
|
|
2048
|
+
postBlackListBatch(param) {
|
|
2049
|
+
var blacklist_code = param.blacklist_code, expiration_days = param.expiration_days, file = param.file, handleSetProgress = param.handleSetProgress;
|
|
2050
|
+
return this.post(`/blacklist/create-batch/${blacklist_code}`, {
|
|
2051
|
+
expiration_days,
|
|
2052
|
+
file
|
|
2053
|
+
}, {
|
|
2054
|
+
onUploadProgress: (ev)=>{
|
|
2055
|
+
handleSetProgress(ev.total ? Math.round(ev.loaded * 100 / ev.total) : 0);
|
|
2056
|
+
}
|
|
2057
|
+
});
|
|
2058
|
+
}
|
|
2059
|
+
deleteBlackListType(param) {
|
|
2060
|
+
var black_list_code = param.black_list_code;
|
|
2061
|
+
return this.delete(`/blacklist/delete/${black_list_code}`);
|
|
2062
|
+
}
|
|
2063
|
+
deleteBlockListItem(param) {
|
|
2064
|
+
var blocklist_code = param.blocklist_code, blocklist_item_id = param.blocklist_item_id, account_code = param.account_code;
|
|
2065
|
+
return this.delete(`/blacklist/${blocklist_code}/items/${blocklist_item_id}`, {
|
|
2066
|
+
headers: {
|
|
2067
|
+
'x-account-code': account_code
|
|
2068
|
+
}
|
|
2069
|
+
});
|
|
2070
|
+
}
|
|
2071
|
+
valiateBlockListItems(param) {
|
|
2072
|
+
var payload = param.payload;
|
|
2073
|
+
return this.post(`/blacklist/${payload.blocklist_code}/validate/duplicate-items`, payload, {
|
|
2074
|
+
headers: {
|
|
2075
|
+
'x-account-code': payload.account_code
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
}
|
|
2079
|
+
// #region Velocity-rules
|
|
2080
|
+
getVelocityRules(params) {
|
|
2081
|
+
return this.post(`/yuno-fraud-screening-int/velocity-rules-list`, (0,_swc_helpers_object_spread__rspack_import_4._)({}, params));
|
|
2082
|
+
}
|
|
2083
|
+
postChangePaymentsWebhook(param) {
|
|
2084
|
+
var status = param.status, paymentCode = param.paymentCode;
|
|
2085
|
+
return this.post(`/yuno-fraud-screening-int/payments/webhook`, {
|
|
2086
|
+
status,
|
|
2087
|
+
payment_code: paymentCode
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
//S3Client
|
|
2091
|
+
uploadFileS3ClientBatchRefunds(param) {
|
|
2092
|
+
var payload = param.payload, handleSetProgress = param.handleSetProgress;
|
|
2093
|
+
var cancelToken = this.getCancelTokenSource();
|
|
2094
|
+
var cancel = ()=>cancelToken.cancel();
|
|
2095
|
+
var promise = this.post(`/batch-refunds/upload-s3-file`, payload, {
|
|
2096
|
+
onUploadProgress: (ev)=>handleSetProgress === null || handleSetProgress === void 0 ? void 0 : handleSetProgress(ev.total ? Math.round(ev.loaded * 100 / ev.total) : 0),
|
|
2097
|
+
cancelToken: cancelToken.token
|
|
2098
|
+
});
|
|
2099
|
+
return {
|
|
2100
|
+
promise,
|
|
2101
|
+
cancel
|
|
2102
|
+
};
|
|
2103
|
+
}
|
|
2104
|
+
// #region S3Client
|
|
2105
|
+
uploadFileS3ClientChargeBacks(param) {
|
|
2106
|
+
var payload = param.payload, handleSetProgress = param.handleSetProgress;
|
|
2107
|
+
var cancelToken = this.getCancelTokenSource();
|
|
2108
|
+
var cancel = ()=>cancelToken.cancel();
|
|
2109
|
+
var promise = this.post(`/chargebacks/upload-s3-file`, payload, {
|
|
2110
|
+
cancelToken: cancelToken.token,
|
|
2111
|
+
onUploadProgress: (ev)=>{
|
|
2112
|
+
handleSetProgress === null || handleSetProgress === void 0 ? void 0 : handleSetProgress(ev.total ? Math.round(ev.loaded * 100 / ev.total) : 0);
|
|
2113
|
+
}
|
|
2114
|
+
});
|
|
2115
|
+
return {
|
|
2116
|
+
promise,
|
|
2117
|
+
cancel
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
// #region Batch-refunds
|
|
2121
|
+
batchRefundByFile(param) {
|
|
2122
|
+
var payload = param.payload;
|
|
2123
|
+
return this.post(`/batch-refund-by-file`, (0,_swc_helpers_object_spread__rspack_import_4._)({}, payload));
|
|
2124
|
+
}
|
|
2125
|
+
uploadBatchRefundsV2(param) {
|
|
2126
|
+
var payload = param.payload;
|
|
2127
|
+
return this.post(`/batch-refunds`, (0,_swc_helpers_object_spread__rspack_import_4._)({}, payload));
|
|
2128
|
+
}
|
|
2129
|
+
getBatchRefunds(limit, offset) {
|
|
2130
|
+
return this.get(`/batch-refunds?limit=${limit}&offset=${offset}`);
|
|
2131
|
+
}
|
|
2132
|
+
getBatchRefundProcessedFileDownload(batchRefundId, organizationCode, accountCode) {
|
|
2133
|
+
var headers = {
|
|
2134
|
+
'x-organization-code': organizationCode,
|
|
2135
|
+
'x-account-code': accountCode
|
|
2136
|
+
};
|
|
2137
|
+
return this.get(`/batch-refunds/${batchRefundId}/processed-file-download`, {
|
|
2138
|
+
headers
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
getBatchRefundUserFileDownload(batchRefundId, organizationCode, accountCode) {
|
|
2142
|
+
var headers = {
|
|
2143
|
+
'x-organization-code': organizationCode,
|
|
2144
|
+
'x-account-code': accountCode
|
|
2145
|
+
};
|
|
2146
|
+
return this.get(`/batch-refunds/${batchRefundId}/user-file-download`, {
|
|
2147
|
+
headers
|
|
2148
|
+
});
|
|
2149
|
+
}
|
|
2150
|
+
getMFAConfig(param) {
|
|
2151
|
+
var organizationCode = param.organizationCode;
|
|
2152
|
+
var headers = {
|
|
2153
|
+
'x-organization-code': organizationCode
|
|
2154
|
+
};
|
|
2155
|
+
return this.get(`/organization-settings/mfa/config`, {
|
|
2156
|
+
headers
|
|
2157
|
+
});
|
|
2158
|
+
}
|
|
2159
|
+
getMFAExcludedUsers(param) {
|
|
2160
|
+
var organizationCode = param.organizationCode;
|
|
2161
|
+
var headers = {
|
|
2162
|
+
'x-organization-code': organizationCode
|
|
2163
|
+
};
|
|
2164
|
+
return this.get(`/organization-settings/mfa/excluded-users`, {
|
|
2165
|
+
headers
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
getMFAEnforcementStatus() {
|
|
2169
|
+
return this.get(`/mfa/enforcement-status`);
|
|
2170
|
+
}
|
|
2171
|
+
getWorkOsMfaStatus() {
|
|
2172
|
+
return this.get(`/mfa/status`);
|
|
2173
|
+
}
|
|
2174
|
+
updateMFAConfig(payload, organizationCode) {
|
|
2175
|
+
return this.post(`/organization-settings/mfa/config`, payload, {
|
|
2176
|
+
headers: {
|
|
2177
|
+
'x-organization-code': organizationCode
|
|
2178
|
+
}
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
mfaExcludeUsers(users, organizationCode) {
|
|
2182
|
+
return this.post(`/organization-settings/mfa/exclude-users`, users, {
|
|
2183
|
+
headers: {
|
|
2184
|
+
'x-organization-code': organizationCode
|
|
2185
|
+
}
|
|
2186
|
+
});
|
|
2187
|
+
}
|
|
2188
|
+
// #region risk-conditions
|
|
2189
|
+
getAllConfigRules() {
|
|
2190
|
+
return this.get(`/yuno-fraud-screening-int/velocity-rules/config/all`);
|
|
2191
|
+
}
|
|
2192
|
+
getConditionalConfigRules(conditional) {
|
|
2193
|
+
return this.get(`/yuno-fraud-screening-int/velocity-rules/config/conditional/${conditional}`);
|
|
2194
|
+
}
|
|
2195
|
+
getRule(payload) {
|
|
2196
|
+
return this.get(`/yuno-fraud-screening-int/velocity-rules/${payload.idRule}`, (payload === null || payload === void 0 ? void 0 : payload.accountCode) && {
|
|
2197
|
+
headers: {
|
|
2198
|
+
'x-account-code': payload === null || payload === void 0 ? void 0 : payload.accountCode
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
postCreateRuleMultiAccount(payload, accountCode) {
|
|
2203
|
+
return this.post(`/yuno-fraud-screening-int/velocity-rules/multi-account`, payload, {
|
|
2204
|
+
headers: {
|
|
2205
|
+
'x-account-code': accountCode
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
}
|
|
2209
|
+
postEditRule(payload, ruleId, accountCode) {
|
|
2210
|
+
return this.patch(`/yuno-fraud-screening-int/velocity-rules/${ruleId}`, payload, {
|
|
2211
|
+
headers: {
|
|
2212
|
+
'x-account-code': accountCode
|
|
2213
|
+
}
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
// #region Customized api keys
|
|
2217
|
+
postApiKeysRoll(payload, keyCode, password) {
|
|
2218
|
+
return this.post(`/credentials-manager/v1/keys/roll/${keyCode}`, payload, {
|
|
2219
|
+
headers: {
|
|
2220
|
+
'x-password': password
|
|
2221
|
+
}
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
patchApiKeysEditNote(payload, keyCode, password) {
|
|
2225
|
+
return this.patch(`/credentials-manager/keys/edit-note/${keyCode}`, payload, {
|
|
2226
|
+
headers: {
|
|
2227
|
+
'x-password': password
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
2231
|
+
getCustomizedApiKeysMembers() {
|
|
2232
|
+
return this.get(`/organization-user/resources/users/customized-keys`);
|
|
2233
|
+
}
|
|
2234
|
+
getCustomizedApiKeysAccounts() {
|
|
2235
|
+
return this.get(`/organization-user/resources/accounts/customized-keys`);
|
|
2236
|
+
}
|
|
2237
|
+
postCreateCustomizedApiKeys(payload) {
|
|
2238
|
+
return this.post(`/credentials-manager/keys`, payload);
|
|
2239
|
+
}
|
|
2240
|
+
pathCreateCustomizedApiKeys(payload, code) {
|
|
2241
|
+
return this.patch(`/credentials-manager/key/${code}`, payload);
|
|
2242
|
+
}
|
|
2243
|
+
postCustomizedApiKeys(accountCodes) {
|
|
2244
|
+
return this.post(`/credentials-manager/keys/retrieve`, {
|
|
2245
|
+
account_codes: accountCodes
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
getCustomizedApiKeysProducts() {
|
|
2249
|
+
return this.get(`/credentials-manager/product-list`);
|
|
2250
|
+
}
|
|
2251
|
+
getCustomizedApiKeysToken(code, password, otp, mfaToken) {
|
|
2252
|
+
var headers = {};
|
|
2253
|
+
if (password) headers['x-password'] = password;
|
|
2254
|
+
if (otp) headers['x-otp'] = otp;
|
|
2255
|
+
if (mfaToken) headers['x-mfa-token'] = mfaToken;
|
|
2256
|
+
return this.get(`/credentials-manager/keys/show-token/${code}`, {
|
|
2257
|
+
headers
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
validatePasswordStatus() {
|
|
2261
|
+
return this.get(`/validate-password-status`);
|
|
2262
|
+
}
|
|
2263
|
+
deleteCustomizedApiKeys(code) {
|
|
2264
|
+
return this.delete(`/credentials-manager/key/${code}`);
|
|
2265
|
+
}
|
|
2266
|
+
// #region Organization API Keys
|
|
2267
|
+
buildAuthHeaders(password, otp, mfaToken) {
|
|
2268
|
+
var headers = {};
|
|
2269
|
+
if (password) headers['x-password'] = password;
|
|
2270
|
+
if (otp) headers['x-otp'] = otp;
|
|
2271
|
+
if (mfaToken) headers['x-mfa-token'] = mfaToken;
|
|
2272
|
+
return headers;
|
|
2273
|
+
}
|
|
2274
|
+
getOrganizationKeysMetadata() {
|
|
2275
|
+
return this.get(`/v2/developers/organization-keys/metadata`);
|
|
2276
|
+
}
|
|
2277
|
+
patchOrganizationKeysNote(payload, password) {
|
|
2278
|
+
return this.patch(`/v2/developers/organization-keys/note`, payload, {
|
|
2279
|
+
headers: {
|
|
2280
|
+
'x-password': password
|
|
2281
|
+
}
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
postOrganizationKeysRoll(password, otp, mfaToken) {
|
|
2285
|
+
return this.post(`/v2/developers/organization-keys/roll`, {}, {
|
|
2286
|
+
headers: this.buildAuthHeaders(password, otp, mfaToken)
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
postOrganizationKeysTamRequest(password, otp, mfaToken) {
|
|
2290
|
+
return this.post(`/v2/developers/organization-keys/tam-request`, {}, {
|
|
2291
|
+
headers: this.buildAuthHeaders(password, otp, mfaToken)
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
postOrganizationKeysMarkRevealed(password, otp, mfaToken) {
|
|
2295
|
+
return this.post(`/v2/developers/organization-keys/mark-revealed`, {}, {
|
|
2296
|
+
headers: this.buildAuthHeaders(password, otp, mfaToken)
|
|
2297
|
+
});
|
|
2298
|
+
}
|
|
2299
|
+
// #endregion Organization API Keys
|
|
2300
|
+
// #region export-insights
|
|
2301
|
+
postCreateInsightsReport(payload) {
|
|
2302
|
+
var isFallback = (payload === null || payload === void 0 ? void 0 : payload.type) === 'CR_FALLBACK';
|
|
2303
|
+
var url = isFallback ? `/insights/conversion-rate/${_utils_enums__rspack_import_2.typesInsightsExport[payload === null || payload === void 0 ? void 0 : payload.type]}/export` : `/insights/conversion-rate/cards/metrics/${_utils_enums__rspack_import_2.typesInsightsExport[payload === null || payload === void 0 ? void 0 : payload.type]}/export`;
|
|
2304
|
+
return this.post(url, payload);
|
|
2305
|
+
}
|
|
2306
|
+
getInsightsReport(payload) {
|
|
2307
|
+
return this.get(`/insights/conversion-rate/exports/${payload === null || payload === void 0 ? void 0 : payload.type}/by-user`);
|
|
2308
|
+
}
|
|
2309
|
+
getInsightsReportAgain(payload) {
|
|
2310
|
+
return this.get(`/insights/conversion-rate/exports/${payload.code}`);
|
|
2311
|
+
}
|
|
2312
|
+
createUserAuth0(payload) {
|
|
2313
|
+
return this.post(`/user/auth0`, payload);
|
|
2314
|
+
}
|
|
2315
|
+
getSamlConfig() {
|
|
2316
|
+
return this.get(`/saml-config`);
|
|
2317
|
+
}
|
|
2318
|
+
createSamlConfig(payload) {
|
|
2319
|
+
return this.post(`/saml-config`, payload);
|
|
2320
|
+
}
|
|
2321
|
+
updateSamlConfig(payload) {
|
|
2322
|
+
return this.patch(`/saml-config`, payload);
|
|
2323
|
+
}
|
|
2324
|
+
deleteSamlConfig() {
|
|
2325
|
+
return this.delete(`/saml-config`);
|
|
2326
|
+
}
|
|
2327
|
+
postCall(payload) {
|
|
2328
|
+
return this.post(`/ai-agent-caller/demo`, payload);
|
|
2329
|
+
}
|
|
2330
|
+
getLoginMethods() {
|
|
2331
|
+
return this.get(`/organization/login-methods`);
|
|
2332
|
+
}
|
|
2333
|
+
changeLoginMethods(payload) {
|
|
2334
|
+
return this.patch(`/organization/login-methods/${payload.methodCode}`, {
|
|
2335
|
+
enabled: payload.enabled
|
|
2336
|
+
});
|
|
2337
|
+
}
|
|
2338
|
+
postValidateCredentials(param) {
|
|
2339
|
+
var payload = param.payload;
|
|
2340
|
+
return this.post('/connections/validate-credentials', payload);
|
|
2341
|
+
}
|
|
2342
|
+
getInsightsConversionRateOverview(body, params) {
|
|
2343
|
+
return this.post('/v3/insights/conversion-rate/overview', body, {
|
|
2344
|
+
params
|
|
2345
|
+
});
|
|
2346
|
+
}
|
|
2347
|
+
getInsightsConversionRateOverviewFraud3ds(body, params) {
|
|
2348
|
+
return this.post('/v3/insights/conversion-rate/overview-fraud-3ds', body, {
|
|
2349
|
+
params
|
|
2350
|
+
});
|
|
2351
|
+
}
|
|
2352
|
+
getConversionRateChargebacksByCardBrand(body, params) {
|
|
2353
|
+
return this.post('/insights/chargebacks/by-card-brand', body, {
|
|
2354
|
+
params
|
|
2355
|
+
});
|
|
2356
|
+
}
|
|
2357
|
+
get3DSExemptions() {
|
|
2358
|
+
return this.get('/routing/3ds-exemptions');
|
|
2359
|
+
}
|
|
2360
|
+
getNetworkTokensOnboarding() {
|
|
2361
|
+
return this.get('/network-tokens/onboarding');
|
|
2362
|
+
}
|
|
2363
|
+
getNetworkTokensOnboardingByOrganization(organizationCode) {
|
|
2364
|
+
return this.get(`network-tokens/organization/onboarding`, {
|
|
2365
|
+
headers: {
|
|
2366
|
+
'x-organization-code': organizationCode
|
|
2367
|
+
}
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
postNetworkTokensOnboarding(payload) {
|
|
2371
|
+
return this.post(`/network-tokens/organization/onboarding`, payload);
|
|
2372
|
+
}
|
|
2373
|
+
// #region ChartGPT
|
|
2374
|
+
createChartGPTChart(payload) {
|
|
2375
|
+
return this.post(`/data-assistant/charts`, payload);
|
|
2376
|
+
}
|
|
2377
|
+
deleteChartGPTChart(chart_id) {
|
|
2378
|
+
return this.delete(`/data-assistant/charts/${chart_id}`);
|
|
2379
|
+
}
|
|
2380
|
+
getChartById(chart_id) {
|
|
2381
|
+
return this.get(`/data-assistant/charts/${chart_id}`);
|
|
2382
|
+
}
|
|
2383
|
+
patchChartGPTChart(chart_id, payload) {
|
|
2384
|
+
return this.patch(`/data-assistant/charts/${chart_id}`, payload);
|
|
2385
|
+
}
|
|
2386
|
+
executeChartGPTChart() {
|
|
2387
|
+
var chart_id = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '';
|
|
2388
|
+
return this.get(`/data-assistant/charts/${chart_id}/execute`);
|
|
2389
|
+
}
|
|
2390
|
+
getChartsByUser() {
|
|
2391
|
+
return this.get(`/data-assistant/user/charts`);
|
|
2392
|
+
}
|
|
2393
|
+
submitChartFeedback(chartCode, payload) {
|
|
2394
|
+
return this.post(`/data-assistant/charts/${chartCode}/feedback`, payload);
|
|
2395
|
+
}
|
|
2396
|
+
getChartFeedback(chartCode) {
|
|
2397
|
+
return this.get(`/data-assistant/charts/${chartCode}/feedback`);
|
|
2398
|
+
}
|
|
2399
|
+
getLanguages() {
|
|
2400
|
+
return this.get(`/languages`);
|
|
2401
|
+
}
|
|
2402
|
+
getTranslations(lang) {
|
|
2403
|
+
return this.get(`/translations?language=${lang}`);
|
|
2404
|
+
}
|
|
2405
|
+
getCommunications(payload) {
|
|
2406
|
+
return this.post(`/communications`, payload);
|
|
2407
|
+
}
|
|
2408
|
+
getCommunicationsFilters() {
|
|
2409
|
+
return this.get(`/communications/filters`);
|
|
2410
|
+
}
|
|
2411
|
+
getCommunicationDetails(communicationId, accountCode) {
|
|
2412
|
+
var headers = {
|
|
2413
|
+
'x-account-code': accountCode
|
|
2414
|
+
};
|
|
2415
|
+
return this.get(`/communications/${communicationId}/details`, {
|
|
2416
|
+
headers
|
|
2417
|
+
});
|
|
2418
|
+
}
|
|
2419
|
+
getRecipients(organizationCode, params) {
|
|
2420
|
+
var headers = {
|
|
2421
|
+
'x-organization-code': organizationCode
|
|
2422
|
+
};
|
|
2423
|
+
return this.get(`/recipients`, {
|
|
2424
|
+
headers,
|
|
2425
|
+
params
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
getRecipientById(organizationCode, recipientId) {
|
|
2429
|
+
var headers = {
|
|
2430
|
+
'x-organization-code': organizationCode
|
|
2431
|
+
};
|
|
2432
|
+
return this.get(`/recipients/${recipientId}`, {
|
|
2433
|
+
headers
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
2436
|
+
getOnboardingDetail(organizationCode, recipientId, onboardingId) {
|
|
2437
|
+
var headers = {
|
|
2438
|
+
'x-organization-code': organizationCode
|
|
2439
|
+
};
|
|
2440
|
+
return this.get(`/recipients/${recipientId}/onboardings/${onboardingId}`, {
|
|
2441
|
+
headers
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
getOnboardingTimeline(organizationCode, onboardingId) {
|
|
2445
|
+
var headers = {
|
|
2446
|
+
'x-organization-code': organizationCode
|
|
2447
|
+
};
|
|
2448
|
+
return this.get(`/recipients/onboardings/${onboardingId}/timeline`, {
|
|
2449
|
+
headers
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
createRecipientExport(payload, accountCode) {
|
|
2453
|
+
var headers = {
|
|
2454
|
+
'x-account-code': accountCode
|
|
2455
|
+
};
|
|
2456
|
+
return this.post(`/v1/recipients/exports`, payload, {
|
|
2457
|
+
headers
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
getRecipientExports(params, accountCode) {
|
|
2461
|
+
var headers = {
|
|
2462
|
+
'x-account-code': accountCode
|
|
2463
|
+
};
|
|
2464
|
+
return this.get(`/v1/recipients/exports`, {
|
|
2465
|
+
headers,
|
|
2466
|
+
params
|
|
2467
|
+
});
|
|
2468
|
+
}
|
|
2469
|
+
downloadRecipientExport(exportCode, accountCode) {
|
|
2470
|
+
var headers = {
|
|
2471
|
+
'x-account-code': accountCode
|
|
2472
|
+
};
|
|
2473
|
+
return this.get(`/v1/recipients/exports/${exportCode}/download`, {
|
|
2474
|
+
headers
|
|
2475
|
+
});
|
|
2476
|
+
}
|
|
2477
|
+
createRecipient(organizationCode, payload) {
|
|
2478
|
+
var headers = {
|
|
2479
|
+
'x-organization-code': organizationCode
|
|
2480
|
+
};
|
|
2481
|
+
return this.post(`/recipients`, payload, {
|
|
2482
|
+
headers
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
updateRecipient(organizationCode, recipientId, payload) {
|
|
2486
|
+
var headers = {
|
|
2487
|
+
'x-organization-code': organizationCode
|
|
2488
|
+
};
|
|
2489
|
+
return this.patch(`/recipients/${recipientId}`, payload, {
|
|
2490
|
+
headers
|
|
2491
|
+
});
|
|
2492
|
+
}
|
|
2493
|
+
deleteRecipient(organizationCode, recipientId) {
|
|
2494
|
+
var headers = {
|
|
2495
|
+
'x-organization-code': organizationCode
|
|
2496
|
+
};
|
|
2497
|
+
return this.delete(`/recipients/${recipientId}`, {
|
|
2498
|
+
headers
|
|
2499
|
+
});
|
|
2500
|
+
}
|
|
2501
|
+
createOnboarding(organizationCode, recipientId, payload) {
|
|
2502
|
+
var headers = {
|
|
2503
|
+
'x-organization-code': organizationCode
|
|
2504
|
+
};
|
|
2505
|
+
return this.post(`/recipients/${recipientId}/onboardings`, payload, {
|
|
2506
|
+
headers
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
updateOnboarding(organizationCode, recipientId, onboardingId, payload) {
|
|
2510
|
+
var headers = {
|
|
2511
|
+
'x-organization-code': organizationCode
|
|
2512
|
+
};
|
|
2513
|
+
return this.patch(`/recipients/${recipientId}/onboardings/${onboardingId}`, payload, {
|
|
2514
|
+
headers
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
blockOnboarding(organizationCode, recipientId, onboardingId) {
|
|
2518
|
+
var headers = {
|
|
2519
|
+
'x-organization-code': organizationCode
|
|
2520
|
+
};
|
|
2521
|
+
return this.post(`/recipients/${recipientId}/onboardings/${onboardingId}/block`, {}, {
|
|
2522
|
+
headers
|
|
2523
|
+
});
|
|
2524
|
+
}
|
|
2525
|
+
unblockOnboarding(organizationCode, recipientId, onboardingId) {
|
|
2526
|
+
var headers = {
|
|
2527
|
+
'x-organization-code': organizationCode
|
|
2528
|
+
};
|
|
2529
|
+
return this.post(`/recipients/${recipientId}/onboardings/${onboardingId}/unblock`, {}, {
|
|
2530
|
+
headers
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
// #region CONCIERGE - ALERTS
|
|
2534
|
+
getConciergeAlerts() {
|
|
2535
|
+
return this.get('/concierge/alerts');
|
|
2536
|
+
}
|
|
2537
|
+
getConciergeAlertById(alertId) {
|
|
2538
|
+
return this.get(`/concierge/alerts/${alertId}`);
|
|
2539
|
+
}
|
|
2540
|
+
createConciergeAlert(payload) {
|
|
2541
|
+
return this.post('/concierge/alerts', payload);
|
|
2542
|
+
}
|
|
2543
|
+
deleteConciergeAlert(alertId) {
|
|
2544
|
+
return this.delete(`/concierge/alerts/${alertId}`);
|
|
2545
|
+
}
|
|
2546
|
+
enableConciergeAlert(alertId, payload) {
|
|
2547
|
+
return this.post(`/concierge/alerts/enable/${alertId}`, payload);
|
|
2548
|
+
}
|
|
2549
|
+
// #endregion
|
|
2550
|
+
// #region Playground
|
|
2551
|
+
postPlaygroundExecuteFlow(payload) {
|
|
2552
|
+
return this.post('/playground/payment-flows', payload);
|
|
2553
|
+
}
|
|
2554
|
+
constructor(config){
|
|
2555
|
+
var customConfig = config ? (0,_swc_helpers_object_spread__rspack_import_4._)({}, _lib_http_client__rspack_import_0.apiConfig, config) : _lib_http_client__rspack_import_0.apiConfig;
|
|
2556
|
+
super(customConfig);
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
function $RefreshSig$() { return $ReactRefreshRuntime$.createSignatureFunctionForTransform() }
|
|
2561
|
+
function $RefreshReg$(type, id) { $ReactRefreshRuntime$.register(type, module.id + "_" + id) }
|
|
2562
|
+
Promise.resolve().then(() => { $ReactRefreshRuntime$.refresh(module.id, module.hot) });
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
},
|
|
2566
|
+
|
|
2567
|
+
},function(__webpack_require__) {
|
|
2568
|
+
// webpack/runtime/get_full_hash
|
|
2569
|
+
(() => {
|
|
2570
|
+
__webpack_require__.h = () => ("39b804b4f223333f")
|
|
2571
|
+
})();
|
|
2572
|
+
|
|
2573
|
+
}
|
|
2574
|
+
);
|
|
2575
|
+
//# sourceMappingURL=main.2f0bb65f361bc9aa.hot-update.js.map
|