|
1 | 1 | import axios from 'axios'; |
2 | 2 |
|
| 3 | +// Existing functions |
3 | 4 | export const getEnterpriseLicense = async () => { |
4 | 5 | const response = await axios.get('/api/plugins/enterprise/license'); |
5 | 6 | return response.data; |
6 | 7 | }; |
7 | 8 |
|
8 | | -export const getAuditLogs = async () => { |
9 | | - const response = await axios.get('/api/plugins/enterprise/audit-logs'); |
| 9 | +export const getAuditLogs = async (params = {}) => { |
| 10 | + const query = new URLSearchParams(params).toString(); |
| 11 | + const response = await axios.get(`/api/plugins/enterprise/audit-logs${query ? `?${query}` : ''}`); |
10 | 12 | return response.data; |
11 | 13 | }; |
12 | 14 |
|
13 | | -export const getAuditLogStatistics = async (groupByParam: string) => { |
| 15 | +export const getAuditLogStatistics = async (groupByParam : string) => { |
14 | 16 | const response = await axios.get(`/api/plugins/enterprise/audit-logs/statistics?groupByParam=${groupByParam}`); |
15 | 17 | return response.data; |
16 | 18 | }; |
17 | 19 |
|
18 | | -export const getAppUsageLogs = async () => { |
19 | | - const response = await axios.get('/api/plugins/enterprise/app-usage-logs'); |
| 20 | +export const getAppUsageLogs = async (params = {}) => { |
| 21 | + const query = new URLSearchParams(params).toString(); |
| 22 | + const response = await axios.get(`/api/plugins/enterprise/app-usage-logs${query ? `?${query}` : ''}`); |
20 | 23 | return response.data; |
21 | 24 | }; |
22 | 25 |
|
23 | | -export const getAppUsageStatistics = async (groupByParam: string) => { |
| 26 | +export const getAppUsageStatistics = async (groupByParam : string) => { |
24 | 27 | const response = await axios.get(`/api/plugins/enterprise/app-usage-logs/statistics?groupByParam=${groupByParam}`); |
25 | 28 | return response.data; |
26 | 29 | }; |
| 30 | + |
| 31 | + |
| 32 | +export const getBranding = async () => { |
| 33 | + const response = await axios.get('/api/plugins/enterprise/branding'); |
| 34 | + return response.data; |
| 35 | +}; |
| 36 | + |
| 37 | +export const createBranding = async (brandingData : any) => { |
| 38 | + const response = await axios.post('/api/plugins/enterprise/branding', brandingData); |
| 39 | + return response.data; |
| 40 | +}; |
| 41 | + |
| 42 | +export const updateBranding = async (brandingData : any) => { |
| 43 | + const response = await axios.put('/api/plugins/enterprise/branding', brandingData); |
| 44 | + return response.data; |
| 45 | +}; |
0 commit comments