@webiny/app-audit-logs 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.f6dc066313
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/README.md +11 -1
- package/SecurityPermission.d.ts +2 -0
- package/SecurityPermission.js +20 -0
- package/SecurityPermission.js.map +1 -0
- package/components/Text.d.ts +2 -2
- package/components/Text.js +2 -3
- package/components/Text.js.map +1 -1
- package/config/list/AuditLogsListConfig.d.ts +24 -17
- package/config/list/AuditLogsListConfig.js +19 -4
- package/config/list/AuditLogsListConfig.js.map +1 -1
- package/config/list/Browser/index.d.ts +12 -13
- package/config/list/Browser/index.js +2 -2
- package/config/list/Browser/index.js.map +1 -1
- package/config/list/index.d.ts +1 -1
- package/config/list/index.js +1 -1
- package/config/list/index.js.map +1 -1
- package/graphql.js +1 -1
- package/graphql.js.map +1 -1
- package/hooks/graphql.d.ts +27 -0
- package/hooks/graphql.js +43 -0
- package/hooks/graphql.js.map +1 -0
- package/hooks/index.d.ts +1 -1
- package/hooks/index.js +1 -1
- package/hooks/index.js.map +1 -1
- package/hooks/schema.d.ts +116 -0
- package/hooks/schema.js +34 -0
- package/hooks/schema.js.map +1 -0
- package/hooks/useAuditLogsList.d.ts +12 -14
- package/hooks/useAuditLogsList.js +87 -90
- package/hooks/useAuditLogsList.js.map +1 -1
- package/index.js +17 -27
- package/index.js.map +1 -1
- package/package.json +17 -23
- package/routes.d.ts +4 -0
- package/routes.js +9 -0
- package/routes.js.map +1 -0
- package/types.d.ts +48 -22
- package/types.js +2 -12
- package/types.js.map +1 -1
- package/utils/transformRawAuditLog.d.ts +5 -0
- package/utils/transformRawAuditLog.js +28 -0
- package/utils/transformRawAuditLog.js.map +1 -0
- package/views/Logs/Filters/FilterByAction.js +8 -10
- package/views/Logs/Filters/FilterByAction.js.map +1 -1
- package/views/Logs/Filters/FilterByApp.js +5 -5
- package/views/Logs/Filters/FilterByApp.js.map +1 -1
- package/views/Logs/Filters/FilterByCreatedBy.d.ts +2 -0
- package/views/Logs/Filters/FilterByCreatedBy.js +39 -0
- package/views/Logs/Filters/FilterByCreatedBy.js.map +1 -0
- package/views/Logs/Filters/FilterByCreatedOn.d.ts +2 -0
- package/views/Logs/Filters/FilterByCreatedOn.js +40 -0
- package/views/Logs/Filters/FilterByCreatedOn.js.map +1 -0
- package/views/Logs/Filters/FilterByEntity.js +8 -9
- package/views/Logs/Filters/FilterByEntity.js.map +1 -1
- package/views/Logs/Filters/FilterByEntityId.d.ts +2 -0
- package/views/Logs/Filters/FilterByEntityId.js +28 -0
- package/views/Logs/Filters/FilterByEntityId.js.map +1 -0
- package/views/Logs/Filters/FilterByInitiator.js +2 -2
- package/views/Logs/Filters/FilterByInitiator.js.map +1 -1
- package/views/Logs/Filters/FilterByTimestamp.js +2 -2
- package/views/Logs/Filters/FilterByTimestamp.js.map +1 -1
- package/views/Logs/Filters/Filters.d.ts +5 -5
- package/views/Logs/Filters/Filters.js +7 -14
- package/views/Logs/Filters/Filters.js.map +1 -1
- package/views/Logs/Filters/index.d.ts +7 -6
- package/views/Logs/Filters/index.js +7 -6
- package/views/Logs/Filters/index.js.map +1 -1
- package/views/Logs/Filters/styled.d.ts +2 -3
- package/views/Logs/Filters/styled.js +4 -5
- package/views/Logs/Filters/styled.js.map +1 -1
- package/views/Logs/Filters/types.d.ts +9 -0
- package/views/Logs/Filters/types.js +3 -0
- package/views/Logs/Filters/types.js.map +1 -0
- package/views/Logs/Header/ButtonFilters/ButtonFilters.js +2 -3
- package/views/Logs/Header/ButtonFilters/ButtonFilters.js.map +1 -1
- package/views/Logs/Header/ButtonFilters/index.d.ts +1 -1
- package/views/Logs/Header/ButtonFilters/index.js +1 -1
- package/views/Logs/Header/ButtonFilters/index.js.map +1 -1
- package/views/Logs/Header/Header.d.ts +1 -3
- package/views/Logs/Header/Header.js +7 -16
- package/views/Logs/Header/Header.js.map +1 -1
- package/views/Logs/Header/index.d.ts +1 -1
- package/views/Logs/Header/index.js +1 -1
- package/views/Logs/Header/index.js.map +1 -1
- package/views/Logs/LoadMoreButton/LoadMoreButton.js +3 -3
- package/views/Logs/LoadMoreButton/LoadMoreButton.js.map +1 -1
- package/views/Logs/LoadMoreButton/index.d.ts +1 -1
- package/views/Logs/LoadMoreButton/index.js +1 -1
- package/views/Logs/LoadMoreButton/index.js.map +1 -1
- package/views/Logs/LoadMoreButton/styled.d.ts +2 -3
- package/views/Logs/LoadMoreButton/styled.js +1 -2
- package/views/Logs/LoadMoreButton/styled.js.map +1 -1
- package/views/Logs/LoadingMore/index.js +4 -4
- package/views/Logs/LoadingMore/index.js.map +1 -1
- package/views/Logs/LoadingMore/styled.d.ts +4 -5
- package/views/Logs/LoadingMore/styled.js +2 -4
- package/views/Logs/LoadingMore/styled.js.map +1 -1
- package/views/Logs/Logs.js +16 -19
- package/views/Logs/Logs.js.map +1 -1
- package/views/Logs/LogsModule.js +11 -8
- package/views/Logs/LogsModule.js.map +1 -1
- package/views/Logs/LogsView.d.ts +2 -0
- package/views/Logs/LogsView.js +80 -0
- package/views/Logs/LogsView.js.map +1 -0
- package/views/Logs/Preview/Preview.d.ts +4 -4
- package/views/Logs/Preview/Preview.js +15 -14
- package/views/Logs/Preview/Preview.js.map +1 -1
- package/views/Logs/Preview/index.d.ts +1 -1
- package/views/Logs/Preview/index.js +1 -1
- package/views/Logs/Preview/index.js.map +1 -1
- package/views/Logs/Preview/styled.d.ts +2 -3
- package/views/Logs/Preview/styled.js +1 -2
- package/views/Logs/Preview/styled.js.map +1 -1
- package/views/Logs/Table/Table.d.ts +7 -8
- package/views/Logs/Table/Table.js +19 -17
- package/views/Logs/Table/Table.js.map +1 -1
- package/views/Logs/Table/index.d.ts +1 -1
- package/views/Logs/Table/index.js +1 -1
- package/views/Logs/Table/index.js.map +1 -1
- package/views/Logs/Table/styled.d.ts +7 -8
- package/views/Logs/Table/styled.js +5 -7
- package/views/Logs/Table/styled.js.map +1 -1
- package/views/Logs/styled.d.ts +4 -5
- package/views/Logs/styled.js +2 -4
- package/views/Logs/styled.js.map +1 -1
- package/plugins/permissionRenderer/AuditLogsPermissions.d.ts +0 -8
- package/plugins/permissionRenderer/AuditLogsPermissions.js +0 -100
- package/plugins/permissionRenderer/AuditLogsPermissions.js.map +0 -1
- package/plugins/permissionRenderer/index.d.ts +0 -1
- package/plugins/permissionRenderer/index.js +0 -32
- package/plugins/permissionRenderer/index.js.map +0 -1
- package/utils/transformCmsContentEntriesToRecordEntries.d.ts +0 -25
- package/utils/transformCmsContentEntriesToRecordEntries.js +0 -36
- package/utils/transformCmsContentEntriesToRecordEntries.js.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @webiny/app-audit-logs
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This package is part of the [Webiny](https://www.webiny.com) monorepo.
|
|
5
|
+
> It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
|
|
6
|
+
|
|
7
|
+
📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
_This README file is automatically generated during the publish process._
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AdminConfig } from "@webiny/app-admin";
|
|
3
|
+
import { ReactComponent as PermissionsIcon } from "@webiny/icons/manage_search.svg";
|
|
4
|
+
const {
|
|
5
|
+
Security
|
|
6
|
+
} = AdminConfig;
|
|
7
|
+
export const SecurityPermission = () => {
|
|
8
|
+
return /*#__PURE__*/React.createElement(AdminConfig, null, /*#__PURE__*/React.createElement(Security.Permissions, {
|
|
9
|
+
name: "audit-logs",
|
|
10
|
+
title: "Audit Logs",
|
|
11
|
+
description: "Manage Audit Logs permissions.",
|
|
12
|
+
icon: /*#__PURE__*/React.createElement(PermissionsIcon, null),
|
|
13
|
+
schema: {
|
|
14
|
+
prefix: "al",
|
|
15
|
+
fullAccess: true
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=SecurityPermission.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","AdminConfig","ReactComponent","PermissionsIcon","Security","SecurityPermission","createElement","Permissions","name","title","description","icon","schema","prefix","fullAccess"],"sources":["SecurityPermission.tsx"],"sourcesContent":["import React from \"react\";\nimport { AdminConfig } from \"@webiny/app-admin\";\nimport { ReactComponent as PermissionsIcon } from \"@webiny/icons/manage_search.svg\";\n\nconst { Security } = AdminConfig;\n\nexport const SecurityPermission = () => {\n return (\n <AdminConfig>\n <Security.Permissions\n name=\"audit-logs\"\n title=\"Audit Logs\"\n description=\"Manage Audit Logs permissions.\"\n icon={<PermissionsIcon />}\n schema={{\n prefix: \"al\",\n fullAccess: true\n }}\n />\n </AdminConfig>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,cAAc,IAAIC,eAAe,QAAQ,iCAAiC;AAEnF,MAAM;EAAEC;AAAS,CAAC,GAAGH,WAAW;AAEhC,OAAO,MAAMI,kBAAkB,GAAGA,CAAA,KAAM;EACpC,oBACIL,KAAA,CAAAM,aAAA,CAACL,WAAW,qBACRD,KAAA,CAAAM,aAAA,CAACF,QAAQ,CAACG,WAAW;IACjBC,IAAI,EAAC,YAAY;IACjBC,KAAK,EAAC,YAAY;IAClBC,WAAW,EAAC,gCAAgC;IAC5CC,IAAI,eAAEX,KAAA,CAAAM,aAAA,CAACH,eAAe,MAAE,CAAE;IAC1BS,MAAM,EAAE;MACJC,MAAM,EAAE,IAAI;MACZC,UAAU,EAAE;IAChB;EAAE,CACL,CACQ,CAAC;AAEtB,CAAC","ignoreList":[]}
|
package/components/Text.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TypographyProps } from "@webiny/ui/Typography";
|
|
1
|
+
import type { TypographyProps } from "@webiny/ui/Typography/index.js";
|
|
2
2
|
export declare const Text: import("@emotion/styled").StyledComponent<TypographyProps & {
|
|
3
|
-
theme?: import("@emotion/react").Theme
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
4
|
}, {}, {}>;
|
package/components/Text.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _styled from "@emotion/styled/base";
|
|
2
2
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { Typography as BaseTypography } from "@webiny/ui/Typography";
|
|
4
|
+
import { Typography as BaseTypography } from "@webiny/ui/Typography/index.js";
|
|
5
5
|
const Typography = props => {
|
|
6
6
|
return /*#__PURE__*/React.createElement(BaseTypography, Object.assign({
|
|
7
7
|
tag: "span"
|
|
@@ -17,8 +17,7 @@ export const Text = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "p
|
|
|
17
17
|
styles: "white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
18
18
|
} : {
|
|
19
19
|
name: "l8l8b8",
|
|
20
|
-
styles: "white-space:nowrap;overflow:hidden;text-overflow:ellipsis",
|
|
21
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRleHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNzQyIsImZpbGUiOiJUZXh0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHR5cGUgeyBUeXBvZ3JhcGh5UHJvcHMgfSBmcm9tIFwiQHdlYmlueS91aS9UeXBvZ3JhcGh5XCI7XG5pbXBvcnQgeyBUeXBvZ3JhcGh5IGFzIEJhc2VUeXBvZ3JhcGh5IH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeVwiO1xuXG5jb25zdCBUeXBvZ3JhcGh5ID0gKHByb3BzOiBUeXBvZ3JhcGh5UHJvcHMpID0+IHtcbiAgICByZXR1cm4gPEJhc2VUeXBvZ3JhcGh5IHRhZz17XCJzcGFuXCJ9IHsuLi5wcm9wc30gLz47XG59O1xuXG5leHBvcnQgY29uc3QgVGV4dCA9IHN0eWxlZChUeXBvZ3JhcGh5KWBcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
|
|
20
|
+
styles: "white-space:nowrap;overflow:hidden;text-overflow:ellipsis/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRleHQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNzQyIsImZpbGUiOiJUZXh0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHR5cGUgeyBUeXBvZ3JhcGh5UHJvcHMgfSBmcm9tIFwiQHdlYmlueS91aS9UeXBvZ3JhcGh5L2luZGV4LmpzXCI7XG5pbXBvcnQgeyBUeXBvZ3JhcGh5IGFzIEJhc2VUeXBvZ3JhcGh5IH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeS9pbmRleC5qc1wiO1xuXG5jb25zdCBUeXBvZ3JhcGh5ID0gKHByb3BzOiBUeXBvZ3JhcGh5UHJvcHMpID0+IHtcbiAgICByZXR1cm4gPEJhc2VUeXBvZ3JhcGh5IHRhZz17XCJzcGFuXCJ9IHsuLi5wcm9wc30gLz47XG59O1xuXG5leHBvcnQgY29uc3QgVGV4dCA9IHN0eWxlZChUeXBvZ3JhcGh5KWBcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
|
|
22
21
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
22
|
});
|
|
24
23
|
|
package/components/Text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Typography","BaseTypography","props","createElement","Object","assign","tag","Text","_styled","process","env","NODE_ENV","target","label","name","styles","
|
|
1
|
+
{"version":3,"names":["React","Typography","BaseTypography","props","createElement","Object","assign","tag","Text","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Text.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography/index.js\";\nimport { Typography as BaseTypography } from \"@webiny/ui/Typography/index.js\";\n\nconst Typography = (props: TypographyProps) => {\n return <BaseTypography tag={\"span\"} {...props} />;\n};\n\nexport const Text = styled(Typography)`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,SAASC,UAAU,IAAIC,cAAc,QAAQ,gCAAgC;AAE7E,MAAMD,UAAU,GAAIE,KAAsB,IAAK;EAC3C,oBAAOH,KAAA,CAAAI,aAAA,CAACF,cAAc,EAAAG,MAAA,CAAAC,MAAA;IAACC,GAAG,EAAE;EAAO,GAAKJ,KAAK,CAAG,CAAC;AACrD,CAAC;AAED,OAAO,MAAMK,IAAI,gBAAGC,OAAA,CAAOR,UAAU,EAAAS,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,QAAA,EAAAC;AAAA,EAIrC","ignoreList":[]}
|
|
@@ -1,42 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const AuditLogsListConfig:
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const AuditLogsListConfig: {
|
|
3
|
+
({ children }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
} & {
|
|
3
8
|
Browser: {
|
|
4
|
-
Filter: (({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
5
|
-
original: ({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
9
|
+
Filter: (({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element) & {
|
|
10
|
+
original: ({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element;
|
|
6
11
|
originalName: string;
|
|
7
12
|
displayName: string;
|
|
8
13
|
} & {
|
|
9
|
-
original: (({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
10
|
-
original: ({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
14
|
+
original: (({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element) & {
|
|
15
|
+
original: ({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element;
|
|
11
16
|
originalName: string;
|
|
12
17
|
displayName: string;
|
|
13
18
|
};
|
|
14
19
|
originalName: string;
|
|
15
20
|
displayName: string;
|
|
16
21
|
} & {
|
|
17
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
18
|
-
original: ({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
22
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element) & {
|
|
23
|
+
original: ({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element;
|
|
19
24
|
originalName: string;
|
|
20
25
|
displayName: string;
|
|
21
|
-
}>) => (props: unknown) =>
|
|
26
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
22
27
|
} & {
|
|
23
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
24
|
-
original: ({ name, element, after, before, remove }: import("./Browser/Filter").FilterProps) =>
|
|
28
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element) & {
|
|
29
|
+
original: ({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element;
|
|
25
30
|
originalName: string;
|
|
26
31
|
displayName: string;
|
|
27
32
|
}>) => (props: {
|
|
28
33
|
name: string;
|
|
29
|
-
}) =>
|
|
34
|
+
}) => React.JSX.Element;
|
|
30
35
|
};
|
|
31
36
|
FiltersToWhere: ({ converter }: {
|
|
32
|
-
converter: import("./Browser/FiltersToWhere").FiltersToWhereConverter;
|
|
33
|
-
}) =>
|
|
37
|
+
converter: import("./Browser/FiltersToWhere.js").FiltersToWhereConverter;
|
|
38
|
+
}) => React.JSX.Element;
|
|
34
39
|
};
|
|
35
40
|
};
|
|
36
|
-
export declare const AuditLogsListWithConfig: ({
|
|
41
|
+
export declare const AuditLogsListWithConfig: ({ children }: {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}) => React.JSX.Element;
|
|
37
44
|
export declare function useAuditLogsListConfig(): {
|
|
38
45
|
browser: {
|
|
39
|
-
filters: import("./Browser/Filter").FilterConfig[];
|
|
40
|
-
filtersToWhere: import("./Browser/FiltersToWhere").FiltersToWhereConverter[];
|
|
46
|
+
filters: import("./Browser/Filter.js").FilterConfig[];
|
|
47
|
+
filtersToWhere: import("./Browser/FiltersToWhere.js").FiltersToWhereConverter[];
|
|
41
48
|
};
|
|
42
49
|
};
|
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import { createConfigurableComponent } from "@webiny/react-properties";
|
|
3
|
-
import { Browser } from "./Browser";
|
|
3
|
+
import { Browser } from "./Browser/index.js";
|
|
4
|
+
import { CompositionScope } from "@webiny/react-composition";
|
|
4
5
|
const base = createConfigurableComponent("AuditLogsListConfig");
|
|
5
|
-
|
|
6
|
+
const ScopedAuditLogsListConfig = ({
|
|
7
|
+
children
|
|
8
|
+
}) => {
|
|
9
|
+
return /*#__PURE__*/React.createElement(CompositionScope, {
|
|
10
|
+
name: "auditLogs"
|
|
11
|
+
}, /*#__PURE__*/React.createElement(base.Config, null, children));
|
|
12
|
+
};
|
|
13
|
+
ScopedAuditLogsListConfig.displayName = "AuditLogsListConfig";
|
|
14
|
+
export const AuditLogsListConfig = Object.assign(ScopedAuditLogsListConfig, {
|
|
6
15
|
Browser
|
|
7
16
|
});
|
|
8
|
-
export const AuditLogsListWithConfig =
|
|
17
|
+
export const AuditLogsListWithConfig = ({
|
|
18
|
+
children
|
|
19
|
+
}) => {
|
|
20
|
+
return /*#__PURE__*/React.createElement(CompositionScope, {
|
|
21
|
+
name: "auditLogs"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(base.WithConfig, null, children));
|
|
23
|
+
};
|
|
9
24
|
export function useAuditLogsListConfig() {
|
|
10
25
|
const config = base.useConfig();
|
|
11
26
|
const browser = config.browser || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","createConfigurableComponent","Browser","base","
|
|
1
|
+
{"version":3,"names":["React","useMemo","createConfigurableComponent","Browser","CompositionScope","base","ScopedAuditLogsListConfig","children","createElement","name","Config","displayName","AuditLogsListConfig","Object","assign","AuditLogsListWithConfig","WithConfig","useAuditLogsListConfig","config","useConfig","browser","filters","filtersToWhere"],"sources":["AuditLogsListConfig.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport type { BrowserConfig } from \"./Browser/index.js\";\nimport { Browser } from \"./Browser/index.js\";\nimport { CompositionScope } from \"@webiny/react-composition\";\n\nconst base = createConfigurableComponent<AuditLogsListConfig>(\"AuditLogsListConfig\");\n\nconst ScopedAuditLogsListConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"auditLogs\"}>\n <base.Config>{children}</base.Config>\n </CompositionScope>\n );\n};\n\nScopedAuditLogsListConfig.displayName = \"AuditLogsListConfig\";\n\nexport const AuditLogsListConfig = Object.assign(ScopedAuditLogsListConfig, { Browser });\nexport const AuditLogsListWithConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"auditLogs\"}>\n <base.WithConfig>{children}</base.WithConfig>\n </CompositionScope>\n );\n};\n\ninterface AuditLogsListConfig {\n browser: BrowserConfig;\n}\n\nexport function useAuditLogsListConfig() {\n const config = base.useConfig();\n\n const browser = config.browser || {};\n\n return useMemo(\n () => ({\n browser: {\n ...browser,\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])]\n }\n }),\n [config]\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,2BAA2B,QAAQ,0BAA0B;AAEtE,SAASC,OAAO;AAChB,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,MAAMC,IAAI,GAAGH,2BAA2B,CAAsB,qBAAqB,CAAC;AAEpF,MAAMI,yBAAyB,GAAGA,CAAC;EAAEC;AAAwC,CAAC,KAAK;EAC/E,oBACIP,KAAA,CAAAQ,aAAA,CAACJ,gBAAgB;IAACK,IAAI,EAAE;EAAY,gBAChCT,KAAA,CAAAQ,aAAA,CAACH,IAAI,CAACK,MAAM,QAAEH,QAAsB,CACtB,CAAC;AAE3B,CAAC;AAEDD,yBAAyB,CAACK,WAAW,GAAG,qBAAqB;AAE7D,OAAO,MAAMC,mBAAmB,GAAGC,MAAM,CAACC,MAAM,CAACR,yBAAyB,EAAE;EAAEH;AAAQ,CAAC,CAAC;AACxF,OAAO,MAAMY,uBAAuB,GAAGA,CAAC;EAAER;AAAwC,CAAC,KAAK;EACpF,oBACIP,KAAA,CAAAQ,aAAA,CAACJ,gBAAgB;IAACK,IAAI,EAAE;EAAY,gBAChCT,KAAA,CAAAQ,aAAA,CAACH,IAAI,CAACW,UAAU,QAAET,QAA0B,CAC9B,CAAC;AAE3B,CAAC;AAMD,OAAO,SAASU,sBAAsBA,CAAA,EAAG;EACrC,MAAMC,MAAM,GAAGb,IAAI,CAACc,SAAS,CAAC,CAAC;EAE/B,MAAMC,OAAO,GAAGF,MAAM,CAACE,OAAO,IAAI,CAAC,CAAC;EAEpC,OAAOnB,OAAO,CACV,OAAO;IACHmB,OAAO,EAAE;MACL,GAAGA,OAAO;MACVC,OAAO,EAAE,CAAC,IAAID,OAAO,CAACC,OAAO,IAAI,EAAE,CAAC,CAAC;MACrCC,cAAc,EAAE,CAAC,IAAIF,OAAO,CAACE,cAAc,IAAI,EAAE,CAAC;IACtD;EACJ,CAAC,CAAC,EACF,CAACJ,MAAM,CACX,CAAC;AACL","ignoreList":[]}
|
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { FiltersToWhereConverter } from "./FiltersToWhere";
|
|
1
|
+
import type { FilterConfig } from "./Filter.js";
|
|
2
|
+
import type { FiltersToWhereConverter } from "./FiltersToWhere.js";
|
|
4
3
|
export interface BrowserConfig {
|
|
5
4
|
filters: FilterConfig[];
|
|
6
5
|
filtersToWhere: FiltersToWhereConverter[];
|
|
7
6
|
}
|
|
8
7
|
export declare const Browser: {
|
|
9
|
-
Filter: (({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element) & {
|
|
10
|
-
original: ({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element;
|
|
8
|
+
Filter: (({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element) & {
|
|
9
|
+
original: ({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element;
|
|
11
10
|
originalName: string;
|
|
12
11
|
displayName: string;
|
|
13
12
|
} & {
|
|
14
|
-
original: (({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element) & {
|
|
15
|
-
original: ({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element;
|
|
13
|
+
original: (({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element) & {
|
|
14
|
+
original: ({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element;
|
|
16
15
|
originalName: string;
|
|
17
16
|
displayName: string;
|
|
18
17
|
};
|
|
19
18
|
originalName: string;
|
|
20
19
|
displayName: string;
|
|
21
20
|
} & {
|
|
22
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element) & {
|
|
23
|
-
original: ({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element;
|
|
21
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element) & {
|
|
22
|
+
original: ({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element;
|
|
24
23
|
originalName: string;
|
|
25
24
|
displayName: string;
|
|
26
|
-
}>) => (props: unknown) =>
|
|
25
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
27
26
|
} & {
|
|
28
|
-
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element) & {
|
|
29
|
-
original: ({ name, element, after, before, remove }: import("./Filter").FilterProps) => import("react").JSX.Element;
|
|
27
|
+
createDecorator: (decorator: import("@webiny/react-composition/types.js").ComponentDecorator<(({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element) & {
|
|
28
|
+
original: ({ name, element, after, before, remove }: import("./Filter.js").FilterProps) => import("react").JSX.Element;
|
|
30
29
|
originalName: string;
|
|
31
30
|
displayName: string;
|
|
32
31
|
}>) => (props: {
|
|
33
32
|
name: string;
|
|
34
|
-
}) =>
|
|
33
|
+
}) => React.JSX.Element;
|
|
35
34
|
};
|
|
36
35
|
FiltersToWhere: ({ converter }: {
|
|
37
36
|
converter: FiltersToWhereConverter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Filter","FiltersToWhere","Browser"],"sources":["index.ts"],"sourcesContent":["import type { FilterConfig } from \"./Filter\";\nimport { Filter } from \"./Filter\";\nimport type { FiltersToWhereConverter } from \"./FiltersToWhere\";\nimport { FiltersToWhere } from \"./FiltersToWhere\";\n\nexport interface BrowserConfig {\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n}\n\nexport const Browser = {\n Filter,\n FiltersToWhere\n};\n"],"mappings":"AACA,SAASA,MAAM;AAEf,SAASC,cAAc;AAOvB,OAAO,MAAMC,OAAO,GAAG;EACnBF,MAAM;EACNC;AACJ,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Filter","FiltersToWhere","Browser"],"sources":["index.ts"],"sourcesContent":["import type { FilterConfig } from \"./Filter.js\";\nimport { Filter } from \"./Filter.js\";\nimport type { FiltersToWhereConverter } from \"./FiltersToWhere.js\";\nimport { FiltersToWhere } from \"./FiltersToWhere.js\";\n\nexport interface BrowserConfig {\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n}\n\nexport const Browser = {\n Filter,\n FiltersToWhere\n};\n"],"mappings":"AACA,SAASA,MAAM;AAEf,SAASC,cAAc;AAOvB,OAAO,MAAMC,OAAO,GAAG;EACnBF,MAAM;EACNC;AACJ,CAAC","ignoreList":[]}
|
package/config/list/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./AuditLogsListConfig";
|
|
1
|
+
export * from "./AuditLogsListConfig.js";
|
package/config/list/index.js
CHANGED
package/config/list/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./AuditLogsListConfig\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./AuditLogsListConfig.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
package/graphql.js
CHANGED
package/graphql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["gql","ERROR_FIELDS","LIST_USERS"],"sources":["graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\n\nconst ERROR_FIELDS = /* GraphQL */ `\n code\n message\n data\n`;\n\nexport const LIST_USERS: any = gql`\n query ListUsers {\n adminUsers {\n users: listUsers {\n data {\n id\n firstName\n lastName\n
|
|
1
|
+
{"version":3,"names":["gql","ERROR_FIELDS","LIST_USERS"],"sources":["graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\n\nconst ERROR_FIELDS = /* GraphQL */ `\n code\n message\n data\n`;\n\nexport const LIST_USERS: any = gql`\n query ListUsers {\n adminUsers {\n users: listUsers {\n data {\n id\n firstName\n lastName\n roles {\n name\n }\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n }\n`;\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,MAAMC,YAAY,GAAG,aAAc;AACnC;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,UAAe,GAAGF,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsBC,YAAY;AAClC;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IAuditLogRaw, IAuditLogsError, IAuditLogsMeta } from "../types.js";
|
|
2
|
+
export interface IListAuditLogsVariablesWhere {
|
|
3
|
+
app?: string;
|
|
4
|
+
action?: string;
|
|
5
|
+
createdBy?: string;
|
|
6
|
+
entity?: string;
|
|
7
|
+
entityId?: string;
|
|
8
|
+
createdOn_gte?: Date;
|
|
9
|
+
createdOn_lte?: Date;
|
|
10
|
+
}
|
|
11
|
+
export interface IListAuditLogsVariables {
|
|
12
|
+
where: Partial<IListAuditLogsVariablesWhere>;
|
|
13
|
+
after: string | undefined;
|
|
14
|
+
sort: "ASC" | "DESC" | undefined;
|
|
15
|
+
limit: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
export type IListAuditLogsVariablesPartial = Partial<IListAuditLogsVariables>;
|
|
18
|
+
export interface IListAuditLogsResponse {
|
|
19
|
+
auditLogs: {
|
|
20
|
+
listAuditLogs: {
|
|
21
|
+
data: IAuditLogRaw[] | null;
|
|
22
|
+
meta: IAuditLogsMeta | null;
|
|
23
|
+
error: IAuditLogsError | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare const LIST_AUDIT_LOGS: import("graphql").DocumentNode;
|
package/hooks/graphql.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import gql from "graphql-tag";
|
|
2
|
+
export const LIST_AUDIT_LOGS = gql`
|
|
3
|
+
query ListAuditLogs(
|
|
4
|
+
$where: ListAuditLogsWhere!
|
|
5
|
+
$sort: AuditLogsSort
|
|
6
|
+
$after: String
|
|
7
|
+
$limit: Number
|
|
8
|
+
) {
|
|
9
|
+
auditLogs {
|
|
10
|
+
listAuditLogs(where: $where, after: $after, sort: $sort, limit: $limit) {
|
|
11
|
+
data {
|
|
12
|
+
id
|
|
13
|
+
createdBy {
|
|
14
|
+
id
|
|
15
|
+
displayName
|
|
16
|
+
type
|
|
17
|
+
}
|
|
18
|
+
createdOn
|
|
19
|
+
app
|
|
20
|
+
action
|
|
21
|
+
message
|
|
22
|
+
entity
|
|
23
|
+
entityId
|
|
24
|
+
tags
|
|
25
|
+
expiresAt
|
|
26
|
+
content
|
|
27
|
+
}
|
|
28
|
+
meta {
|
|
29
|
+
hasMoreItems
|
|
30
|
+
cursor
|
|
31
|
+
}
|
|
32
|
+
error {
|
|
33
|
+
message
|
|
34
|
+
code
|
|
35
|
+
data
|
|
36
|
+
stack
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["gql","LIST_AUDIT_LOGS"],"sources":["graphql.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { IAuditLogRaw, IAuditLogsError, IAuditLogsMeta } from \"~/types.js\";\n\nexport interface IListAuditLogsVariablesWhere {\n app?: string;\n action?: string;\n createdBy?: string;\n entity?: string;\n entityId?: string;\n createdOn_gte?: Date;\n createdOn_lte?: Date;\n}\n\nexport interface IListAuditLogsVariables {\n where: Partial<IListAuditLogsVariablesWhere>;\n after: string | undefined;\n sort: \"ASC\" | \"DESC\" | undefined;\n limit: number | undefined;\n}\n\nexport type IListAuditLogsVariablesPartial = Partial<IListAuditLogsVariables>;\n\nexport interface IListAuditLogsResponse {\n auditLogs: {\n listAuditLogs: {\n data: IAuditLogRaw[] | null;\n meta: IAuditLogsMeta | null;\n error: IAuditLogsError | null;\n };\n };\n}\n\nexport const LIST_AUDIT_LOGS = gql`\n query ListAuditLogs(\n $where: ListAuditLogsWhere!\n $sort: AuditLogsSort\n $after: String\n $limit: Number\n ) {\n auditLogs {\n listAuditLogs(where: $where, after: $after, sort: $sort, limit: $limit) {\n data {\n id\n createdBy {\n id\n displayName\n type\n }\n createdOn\n app\n action\n message\n entity\n entityId\n tags\n expiresAt\n content\n }\n meta {\n hasMoreItems\n cursor\n }\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n`;\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAgC7B,OAAO,MAAMC,eAAe,GAAGD,GAAG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
package/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./useAuditLogsList";
|
|
1
|
+
export * from "./useAuditLogsList.js";
|
package/hooks/index.js
CHANGED
package/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAuditLogsList\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useAuditLogsList.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
import { ActionType } from "../types.js";
|
|
3
|
+
export declare const auditLogSchema: zod.ZodObject<{
|
|
4
|
+
id: zod.ZodString;
|
|
5
|
+
createdBy: zod.ZodObject<{
|
|
6
|
+
id: zod.ZodString;
|
|
7
|
+
displayName: zod.ZodOptional<zod.ZodString>;
|
|
8
|
+
type: zod.ZodOptional<zod.ZodString>;
|
|
9
|
+
}, "strip", zod.ZodTypeAny, {
|
|
10
|
+
id: string;
|
|
11
|
+
displayName?: string | undefined;
|
|
12
|
+
type?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
id: string;
|
|
15
|
+
displayName?: string | undefined;
|
|
16
|
+
type?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
createdOn: zod.ZodEffects<zod.ZodDate, Date, unknown>;
|
|
19
|
+
app: zod.ZodString;
|
|
20
|
+
action: zod.ZodNativeEnum<typeof ActionType>;
|
|
21
|
+
message: zod.ZodString;
|
|
22
|
+
entity: zod.ZodString;
|
|
23
|
+
entityId: zod.ZodString;
|
|
24
|
+
tags: zod.ZodArray<zod.ZodString, "many">;
|
|
25
|
+
expiresAt: zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodDate>>>, Date | null | undefined, unknown>>>>, Date | undefined, unknown>;
|
|
26
|
+
content: zod.ZodString;
|
|
27
|
+
}, "strip", zod.ZodTypeAny, {
|
|
28
|
+
id: string;
|
|
29
|
+
entity: string;
|
|
30
|
+
action: ActionType;
|
|
31
|
+
createdBy: {
|
|
32
|
+
id: string;
|
|
33
|
+
displayName?: string | undefined;
|
|
34
|
+
type?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
createdOn: Date;
|
|
37
|
+
app: string;
|
|
38
|
+
message: string;
|
|
39
|
+
entityId: string;
|
|
40
|
+
tags: string[];
|
|
41
|
+
content: string;
|
|
42
|
+
expiresAt?: Date | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
id: string;
|
|
45
|
+
entity: string;
|
|
46
|
+
action: ActionType;
|
|
47
|
+
createdBy: {
|
|
48
|
+
id: string;
|
|
49
|
+
displayName?: string | undefined;
|
|
50
|
+
type?: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
app: string;
|
|
53
|
+
message: string;
|
|
54
|
+
entityId: string;
|
|
55
|
+
tags: string[];
|
|
56
|
+
content: string;
|
|
57
|
+
createdOn?: unknown;
|
|
58
|
+
expiresAt?: unknown;
|
|
59
|
+
}>;
|
|
60
|
+
export declare const listAuditLogsSchema: zod.ZodArray<zod.ZodObject<{
|
|
61
|
+
id: zod.ZodString;
|
|
62
|
+
createdBy: zod.ZodObject<{
|
|
63
|
+
id: zod.ZodString;
|
|
64
|
+
displayName: zod.ZodOptional<zod.ZodString>;
|
|
65
|
+
type: zod.ZodOptional<zod.ZodString>;
|
|
66
|
+
}, "strip", zod.ZodTypeAny, {
|
|
67
|
+
id: string;
|
|
68
|
+
displayName?: string | undefined;
|
|
69
|
+
type?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
id: string;
|
|
72
|
+
displayName?: string | undefined;
|
|
73
|
+
type?: string | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
createdOn: zod.ZodEffects<zod.ZodDate, Date, unknown>;
|
|
76
|
+
app: zod.ZodString;
|
|
77
|
+
action: zod.ZodNativeEnum<typeof ActionType>;
|
|
78
|
+
message: zod.ZodString;
|
|
79
|
+
entity: zod.ZodString;
|
|
80
|
+
entityId: zod.ZodString;
|
|
81
|
+
tags: zod.ZodArray<zod.ZodString, "many">;
|
|
82
|
+
expiresAt: zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodEffects<zod.ZodOptional<zod.ZodNullable<zod.ZodOptional<zod.ZodDate>>>, Date | null | undefined, unknown>>>>, Date | undefined, unknown>;
|
|
83
|
+
content: zod.ZodString;
|
|
84
|
+
}, "strip", zod.ZodTypeAny, {
|
|
85
|
+
id: string;
|
|
86
|
+
entity: string;
|
|
87
|
+
action: ActionType;
|
|
88
|
+
createdBy: {
|
|
89
|
+
id: string;
|
|
90
|
+
displayName?: string | undefined;
|
|
91
|
+
type?: string | undefined;
|
|
92
|
+
};
|
|
93
|
+
createdOn: Date;
|
|
94
|
+
app: string;
|
|
95
|
+
message: string;
|
|
96
|
+
entityId: string;
|
|
97
|
+
tags: string[];
|
|
98
|
+
content: string;
|
|
99
|
+
expiresAt?: Date | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
id: string;
|
|
102
|
+
entity: string;
|
|
103
|
+
action: ActionType;
|
|
104
|
+
createdBy: {
|
|
105
|
+
id: string;
|
|
106
|
+
displayName?: string | undefined;
|
|
107
|
+
type?: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
app: string;
|
|
110
|
+
message: string;
|
|
111
|
+
entityId: string;
|
|
112
|
+
tags: string[];
|
|
113
|
+
content: string;
|
|
114
|
+
createdOn?: unknown;
|
|
115
|
+
expiresAt?: unknown;
|
|
116
|
+
}>, "many">;
|
package/hooks/schema.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
import { ActionType } from "../types.js";
|
|
3
|
+
export const auditLogSchema = zod.object({
|
|
4
|
+
id: zod.string(),
|
|
5
|
+
createdBy: zod.object({
|
|
6
|
+
id: zod.string(),
|
|
7
|
+
displayName: zod.string().optional(),
|
|
8
|
+
type: zod.string().optional()
|
|
9
|
+
}),
|
|
10
|
+
createdOn: zod.preprocess(value => {
|
|
11
|
+
if (typeof value === "string" || value instanceof Date) {
|
|
12
|
+
return new Date(value);
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}, zod.date()),
|
|
16
|
+
app: zod.string(),
|
|
17
|
+
action: zod.nativeEnum(ActionType),
|
|
18
|
+
message: zod.string(),
|
|
19
|
+
entity: zod.string(),
|
|
20
|
+
entityId: zod.string(),
|
|
21
|
+
tags: zod.array(zod.string()),
|
|
22
|
+
expiresAt: zod.preprocess(value => {
|
|
23
|
+
if (typeof value === "string" || value instanceof Date) {
|
|
24
|
+
return new Date(value);
|
|
25
|
+
}
|
|
26
|
+
return undefined;
|
|
27
|
+
}, zod.date().optional().nullish()).optional().nullish().transform(value => {
|
|
28
|
+
return value || undefined;
|
|
29
|
+
}),
|
|
30
|
+
content: zod.string()
|
|
31
|
+
});
|
|
32
|
+
export const listAuditLogsSchema = zod.array(auditLogSchema);
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["zod","ActionType","auditLogSchema","object","id","string","createdBy","displayName","optional","type","createdOn","preprocess","value","Date","date","app","action","nativeEnum","message","entity","entityId","tags","array","expiresAt","undefined","nullish","transform","content","listAuditLogsSchema"],"sources":["schema.ts"],"sourcesContent":["import zod from \"zod\";\nimport { ActionType } from \"~/types.js\";\n\nexport const auditLogSchema = zod.object({\n id: zod.string(),\n createdBy: zod.object({\n id: zod.string(),\n displayName: zod.string().optional(),\n type: zod.string().optional()\n }),\n createdOn: zod.preprocess(value => {\n if (typeof value === \"string\" || value instanceof Date) {\n return new Date(value);\n }\n return value;\n }, zod.date()),\n app: zod.string(),\n action: zod.nativeEnum(ActionType),\n message: zod.string(),\n entity: zod.string(),\n entityId: zod.string(),\n tags: zod.array(zod.string()),\n expiresAt: zod\n .preprocess(value => {\n if (typeof value === \"string\" || value instanceof Date) {\n return new Date(value);\n }\n return undefined;\n }, zod.date().optional().nullish())\n .optional()\n .nullish()\n .transform(value => {\n return value || undefined;\n }),\n content: zod.string()\n});\n\nexport const listAuditLogsSchema = zod.array(auditLogSchema);\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AACrB,SAASC,UAAU;AAEnB,OAAO,MAAMC,cAAc,GAAGF,GAAG,CAACG,MAAM,CAAC;EACrCC,EAAE,EAAEJ,GAAG,CAACK,MAAM,CAAC,CAAC;EAChBC,SAAS,EAAEN,GAAG,CAACG,MAAM,CAAC;IAClBC,EAAE,EAAEJ,GAAG,CAACK,MAAM,CAAC,CAAC;IAChBE,WAAW,EAAEP,GAAG,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;IACpCC,IAAI,EAAET,GAAG,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC;EAChC,CAAC,CAAC;EACFE,SAAS,EAAEV,GAAG,CAACW,UAAU,CAACC,KAAK,IAAI;IAC/B,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,YAAYC,IAAI,EAAE;MACpD,OAAO,IAAIA,IAAI,CAACD,KAAK,CAAC;IAC1B;IACA,OAAOA,KAAK;EAChB,CAAC,EAAEZ,GAAG,CAACc,IAAI,CAAC,CAAC,CAAC;EACdC,GAAG,EAAEf,GAAG,CAACK,MAAM,CAAC,CAAC;EACjBW,MAAM,EAAEhB,GAAG,CAACiB,UAAU,CAAChB,UAAU,CAAC;EAClCiB,OAAO,EAAElB,GAAG,CAACK,MAAM,CAAC,CAAC;EACrBc,MAAM,EAAEnB,GAAG,CAACK,MAAM,CAAC,CAAC;EACpBe,QAAQ,EAAEpB,GAAG,CAACK,MAAM,CAAC,CAAC;EACtBgB,IAAI,EAAErB,GAAG,CAACsB,KAAK,CAACtB,GAAG,CAACK,MAAM,CAAC,CAAC,CAAC;EAC7BkB,SAAS,EAAEvB,GAAG,CACTW,UAAU,CAACC,KAAK,IAAI;IACjB,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,YAAYC,IAAI,EAAE;MACpD,OAAO,IAAIA,IAAI,CAACD,KAAK,CAAC;IAC1B;IACA,OAAOY,SAAS;EACpB,CAAC,EAAExB,GAAG,CAACc,IAAI,CAAC,CAAC,CAACN,QAAQ,CAAC,CAAC,CAACiB,OAAO,CAAC,CAAC,CAAC,CAClCjB,QAAQ,CAAC,CAAC,CACViB,OAAO,CAAC,CAAC,CACTC,SAAS,CAACd,KAAK,IAAI;IAChB,OAAOA,KAAK,IAAIY,SAAS;EAC7B,CAAC,CAAC;EACNG,OAAO,EAAE3B,GAAG,CAACK,MAAM,CAAC;AACxB,CAAC,CAAC;AAEF,OAAO,MAAMuB,mBAAmB,GAAG5B,GAAG,CAACsB,KAAK,CAACpB,cAAc,CAAC","ignoreList":[]}
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import { type IListAuditLogsVariablesWhere } from "../hooks/graphql.js";
|
|
2
|
+
import type { IAuditLog, IAuditLogsMeta } from "../types.js";
|
|
3
|
+
import type { OnSortingChange, Sorting } from "@webiny/ui/DataTable/index.js";
|
|
4
4
|
export interface UseAuditLogs {
|
|
5
|
-
hideFilters: () => void;
|
|
6
5
|
isListLoading: boolean;
|
|
7
6
|
isListLoadingMore: boolean;
|
|
8
|
-
|
|
7
|
+
records: IAuditLog[];
|
|
8
|
+
meta: IAuditLogsMeta;
|
|
9
9
|
listMoreRecords: () => void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
setSearch: (value: string) => void;
|
|
10
|
+
setWhere: (where: Partial<IListAuditLogsVariablesWhere>) => void;
|
|
11
|
+
setLimit: (limit: number) => void;
|
|
12
|
+
after?: string;
|
|
13
|
+
sorting: Sorting;
|
|
15
14
|
setSorting: OnSortingChange;
|
|
16
|
-
showFilters: () => void;
|
|
17
15
|
showingFilters: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
showFilters: () => void;
|
|
17
|
+
hideFilters: () => void;
|
|
20
18
|
}
|
|
21
|
-
export declare const useAuditLogsList: (
|
|
19
|
+
export declare const useAuditLogsList: () => UseAuditLogs;
|