@webitel/api-services 26.8.44 → 26.8.45
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/package.json
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
snakeToCamel,
|
|
9
9
|
starToSearch,
|
|
10
10
|
} from '../../transformers';
|
|
11
|
-
import type { ApiParams } from '../_shared/types';
|
|
11
|
+
import type { ApiParams, GetItemParams } from '../_shared/types';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* The logger endpoints have no natural ordering, so both lists default to
|
|
@@ -146,6 +146,19 @@ const getLogsByConfigList = async (params: ApiParams) => {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
+
const getLog = async ({ itemId: id }: GetItemParams) => {
|
|
150
|
+
try {
|
|
151
|
+
const response = await getLoggerService().loggerServiceGetLog(Number(id));
|
|
152
|
+
return applyTransform(response.data, [
|
|
153
|
+
snakeToCamel(),
|
|
154
|
+
]);
|
|
155
|
+
} catch (err) {
|
|
156
|
+
throw applyTransform(err, [
|
|
157
|
+
notify,
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
149
162
|
/** Audit log of everything one user did. */
|
|
150
163
|
export const UserLogsAPI = {
|
|
151
164
|
getList: getLogsByUserList,
|
|
@@ -154,4 +167,5 @@ export const UserLogsAPI = {
|
|
|
154
167
|
/** Audit log of everything done to one logger config's object. */
|
|
155
168
|
export const ConfigLogsAPI = {
|
|
156
169
|
getList: getLogsByConfigList,
|
|
170
|
+
get: getLog,
|
|
157
171
|
};
|