@webiny/app-audit-logs 6.4.12-beta.5 → 6.5.0-beta.0
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/components/Text.d.ts +1 -3
- package/components/Text.js +4 -9
- package/components/Text.js.map +1 -1
- package/config/list/AuditLogsListConfig.d.ts +11 -5
- package/config/list/AuditLogsListConfig.js +10 -1
- package/config/list/AuditLogsListConfig.js.map +1 -1
- package/config/list/Browser/index.d.ts +2 -3
- package/config/list/Details/PreviewTab.d.ts +15 -0
- package/config/list/Details/PreviewTab.js +32 -0
- package/config/list/Details/PreviewTab.js.map +1 -0
- package/config/list/Details/index.d.ts +8 -0
- package/config/list/Details/index.js +7 -0
- package/config/list/Details/index.js.map +1 -0
- package/features/listAuditLogs/ListAuditLogsGateway.d.ts +11 -0
- package/features/listAuditLogs/ListAuditLogsGateway.js +71 -0
- package/features/listAuditLogs/ListAuditLogsGateway.js.map +1 -0
- package/features/listAuditLogs/ListAuditLogsRepository.d.ts +11 -0
- package/features/listAuditLogs/ListAuditLogsRepository.js +35 -0
- package/features/listAuditLogs/ListAuditLogsRepository.js.map +1 -0
- package/features/listAuditLogs/ListAuditLogsUseCase.d.ts +10 -0
- package/features/listAuditLogs/ListAuditLogsUseCase.js +19 -0
- package/features/listAuditLogs/ListAuditLogsUseCase.js.map +1 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsGateway.d.ts +20 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsGateway.js +5 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsGateway.js.map +1 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsRepository.d.ts +20 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsRepository.js +5 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsRepository.js.map +1 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsUseCase.d.ts +20 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsUseCase.js +5 -0
- package/features/listAuditLogs/abstractions/ListAuditLogsUseCase.js.map +1 -0
- package/features/listAuditLogs/abstractions/index.d.ts +6 -0
- package/features/listAuditLogs/abstractions/index.js +3 -0
- package/features/listAuditLogs/feature.d.ts +3 -0
- package/features/listAuditLogs/feature.js +21 -0
- package/features/listAuditLogs/feature.js.map +1 -0
- package/features/listAuditLogs/index.d.ts +1 -0
- package/features/listAuditLogs/index.js +1 -0
- package/features/permissions/feature.d.ts +1 -1
- package/graphql.d.ts +1 -1
- package/graphql.js +1 -2
- package/graphql.js.map +1 -1
- package/hooks/graphql.d.ts +0 -18
- package/hooks/graphql.js +0 -44
- package/hooks/schema.d.ts +6 -7
- package/hooks/schema.js +1 -2
- package/hooks/schema.js.map +1 -1
- package/hooks/useAuditLogsList.d.ts +1 -4
- package/hooks/useAuditLogsList.js +34 -42
- package/hooks/useAuditLogsList.js.map +1 -1
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/package.json +14 -17
- package/types.d.ts +2 -2
- package/views/Logs/Filters/FilterByAction.d.ts +1 -1
- package/views/Logs/Filters/FilterByAction.js +5 -3
- package/views/Logs/Filters/FilterByAction.js.map +1 -1
- package/views/Logs/Filters/FilterByApp.js +2 -1
- package/views/Logs/Filters/FilterByApp.js.map +1 -1
- package/views/Logs/Filters/FilterByCreatedBy.js +18 -10
- package/views/Logs/Filters/FilterByCreatedBy.js.map +1 -1
- package/views/Logs/Filters/FilterByCreatedOn.js +26 -27
- package/views/Logs/Filters/FilterByCreatedOn.js.map +1 -1
- package/views/Logs/Filters/FilterByEntity.d.ts +1 -1
- package/views/Logs/Filters/FilterByEntity.js +5 -3
- package/views/Logs/Filters/FilterByEntity.js.map +1 -1
- package/views/Logs/Filters/FilterByEntityId.js +2 -1
- package/views/Logs/Filters/FilterByEntityId.js.map +1 -1
- package/views/Logs/Filters/FilterByInitiator.js +16 -9
- package/views/Logs/Filters/FilterByInitiator.js.map +1 -1
- package/views/Logs/Filters/Filters.d.ts +1 -2
- package/views/Logs/Filters/Filters.js +61 -13
- package/views/Logs/Filters/Filters.js.map +1 -1
- package/views/Logs/Header/ButtonFilters/ButtonFilters.js +4 -5
- package/views/Logs/Header/ButtonFilters/ButtonFilters.js.map +1 -1
- package/views/Logs/Header/Header.d.ts +2 -4
- package/views/Logs/Header/Header.js +4 -7
- package/views/Logs/Header/Header.js.map +1 -1
- package/views/Logs/LoadMoreButton/styled.d.ts +4 -4
- package/views/Logs/LoadMoreButton/styled.js +4 -6
- package/views/Logs/LoadMoreButton/styled.js.map +1 -1
- package/views/Logs/LogsView.js +4 -8
- package/views/Logs/LogsView.js.map +1 -1
- package/views/Logs/Preview/AuditLogDetailsPresenter.d.ts +13 -0
- package/views/Logs/Preview/AuditLogDetailsPresenter.js +36 -0
- package/views/Logs/Preview/AuditLogDetailsPresenter.js.map +1 -0
- package/views/Logs/Preview/Preview.d.ts +4 -2
- package/views/Logs/Preview/Preview.js +67 -22
- package/views/Logs/Preview/Preview.js.map +1 -1
- package/views/Logs/Preview/abstractions.d.ts +14 -0
- package/views/Logs/Preview/abstractions.js +5 -0
- package/views/Logs/Preview/abstractions.js.map +1 -0
- package/views/Logs/Preview/feature.d.ts +5 -0
- package/views/Logs/Preview/feature.js +22 -0
- package/views/Logs/Preview/feature.js.map +1 -0
- package/views/Logs/Preview/index.d.ts +2 -0
- package/views/Logs/Preview/index.js +1 -0
- package/views/Logs/Preview/tabs/AiPromptTabs.d.ts +2 -0
- package/views/Logs/Preview/tabs/AiPromptTabs.js +25 -0
- package/views/Logs/Preview/tabs/AiPromptTabs.js.map +1 -0
- package/views/Logs/Preview/tabs/LlmResponseTab.d.ts +4 -0
- package/views/Logs/Preview/tabs/LlmResponseTab.js +41 -0
- package/views/Logs/Preview/tabs/LlmResponseTab.js.map +1 -0
- package/views/Logs/Preview/tabs/SystemPromptTab.d.ts +4 -0
- package/views/Logs/Preview/tabs/SystemPromptTab.js +24 -0
- package/views/Logs/Preview/tabs/SystemPromptTab.js.map +1 -0
- package/views/Logs/Preview/tabs/UserPromptTab.d.ts +4 -0
- package/views/Logs/Preview/tabs/UserPromptTab.js +18 -0
- package/views/Logs/Preview/tabs/UserPromptTab.js.map +1 -0
- package/views/Logs/Preview/tabs/shared.d.ts +28 -0
- package/views/Logs/Preview/tabs/shared.js +16 -0
- package/views/Logs/Preview/tabs/shared.js.map +1 -0
- package/views/Logs/Table/Table.d.ts +3 -6
- package/views/Logs/Table/Table.js +25 -16
- package/views/Logs/Table/Table.js.map +1 -1
- package/views/Logs/Table/styled.d.ts +1 -16
- package/views/Logs/Table/styled.js +15 -55
- package/views/Logs/Table/styled.js.map +1 -1
- package/hooks/graphql.js.map +0 -1
- package/views/Logs/Filters/FilterByTimestamp.d.ts +0 -2
- package/views/Logs/Filters/FilterByTimestamp.js +0 -39
- package/views/Logs/Filters/FilterByTimestamp.js.map +0 -1
- package/views/Logs/Filters/styled.d.ts +0 -4
- package/views/Logs/Filters/styled.js +0 -13
- package/views/Logs/Filters/styled.js.map +0 -1
- package/views/Logs/Logs.d.ts +0 -3
- package/views/Logs/Logs.js +0 -76
- package/views/Logs/Logs.js.map +0 -1
- package/views/Logs/Preview/styled.d.ts +0 -5
- package/views/Logs/Preview/styled.js +0 -32
- package/views/Logs/Preview/styled.js.map +0 -1
package/components/Text.d.ts
CHANGED
|
@@ -6,7 +6,5 @@ export interface TypographyProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
style?: React.CSSProperties;
|
|
8
8
|
}
|
|
9
|
-
export declare const Text:
|
|
10
|
-
theme?: import("@emotion/react").Theme;
|
|
11
|
-
}, {}, {}>;
|
|
9
|
+
export declare const Text: ({ use, children, className, style }: TypographyProps) => React.JSX.Element;
|
|
12
10
|
export {};
|
package/components/Text.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import styled from "@emotion/styled";
|
|
3
2
|
import { Heading, Text } from "@webiny/admin-ui";
|
|
4
3
|
const headingLevelMap = {
|
|
5
4
|
headline1: 1,
|
|
@@ -18,23 +17,19 @@ const sizeMap = {
|
|
|
18
17
|
button: "sm",
|
|
19
18
|
overline: "sm"
|
|
20
19
|
};
|
|
21
|
-
const
|
|
20
|
+
const Text_Text = ({ use = "body2", children, className, style })=>{
|
|
21
|
+
const classes = `whitespace-nowrap overflow-hidden text-ellipsis ${className ?? ""}`.trim();
|
|
22
22
|
if (use in headingLevelMap) return /*#__PURE__*/ react.createElement(Heading, {
|
|
23
23
|
level: headingLevelMap[use],
|
|
24
|
-
className:
|
|
24
|
+
className: classes,
|
|
25
25
|
style: style
|
|
26
26
|
}, children);
|
|
27
27
|
return /*#__PURE__*/ react.createElement(Text, {
|
|
28
28
|
size: sizeMap[use] ?? "md",
|
|
29
|
-
className:
|
|
29
|
+
className: classes,
|
|
30
30
|
style: style
|
|
31
31
|
}, children);
|
|
32
32
|
};
|
|
33
|
-
const Text_Text = styled(Typography)`
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
text-overflow: ellipsis;
|
|
37
|
-
`;
|
|
38
33
|
export { Text_Text as Text };
|
|
39
34
|
|
|
40
35
|
//# sourceMappingURL=Text.js.map
|
package/components/Text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Text.js","sources":["../../src/components/Text.tsx"],"sourcesContent":["import React from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"components/Text.js","sources":["../../src/components/Text.tsx"],"sourcesContent":["import React from \"react\";\nimport { Text as BaseText, Heading } from \"@webiny/admin-ui\";\nimport type { HeadingLevels } from \"@webiny/admin-ui\";\n\ntype TypographyT =\n | \"headline1\"\n | \"headline2\"\n | \"headline3\"\n | \"headline4\"\n | \"headline5\"\n | \"headline6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"caption\"\n | \"button\"\n | \"overline\";\n\nexport interface TypographyProps {\n use?: TypographyT;\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst headingLevelMap: Partial<Record<TypographyT, HeadingLevels>> = {\n headline1: 1,\n headline2: 2,\n headline3: 3,\n headline4: 4,\n headline5: 5,\n headline6: 6\n};\n\nconst sizeMap: Partial<Record<TypographyT, \"sm\" | \"md\">> = {\n subtitle1: \"md\",\n subtitle2: \"sm\",\n body1: \"md\",\n body2: \"sm\",\n caption: \"sm\",\n button: \"sm\",\n overline: \"sm\"\n};\n\nexport const Text = ({ use = \"body2\", children, className, style }: TypographyProps) => {\n const classes = `whitespace-nowrap overflow-hidden text-ellipsis ${className ?? \"\"}`.trim();\n\n if (use in headingLevelMap) {\n return (\n <Heading level={headingLevelMap[use]} className={classes} style={style}>\n {children}\n </Heading>\n );\n }\n return (\n <BaseText size={sizeMap[use] ?? \"md\"} className={classes} style={style}>\n {children}\n </BaseText>\n );\n};\n"],"names":["headingLevelMap","sizeMap","Text","use","children","className","style","classes","Heading","BaseText"],"mappings":";;AA0BA,MAAMA,kBAA+D;IACjE,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;AACf;AAEA,MAAMC,UAAqD;IACvD,WAAW;IACX,WAAW;IACX,OAAO;IACP,OAAO;IACP,SAAS;IACT,QAAQ;IACR,UAAU;AACd;AAEO,MAAMC,YAAO,CAAC,EAAEC,MAAM,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,KAAK,EAAmB;IAC/E,MAAMC,UAAU,CAAC,gDAAgD,EAAEF,aAAa,IAAI,CAAC,IAAI;IAEzF,IAAIF,OAAOH,iBACP,OAAO,WAAP,GACI,oBAACQ,SAAOA;QAAC,OAAOR,eAAe,CAACG,IAAI;QAAE,WAAWI;QAAS,OAAOD;OAC5DF;IAIb,OAAO,WAAP,GACI,oBAACK,MAAQA;QAAC,MAAMR,OAAO,CAACE,IAAI,IAAI;QAAM,WAAWI;QAAS,OAAOD;OAC5DF;AAGb"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
declare const ScopedAuditLogsListConfig: {
|
|
3
3
|
({ children }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
}): React.JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
export declare const AuditLogsListConfig: typeof ScopedAuditLogsListConfig & {
|
|
8
9
|
Browser: {
|
|
9
10
|
Filter: (({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element) & {
|
|
10
11
|
original: ({ name, element, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element;
|
|
@@ -33,9 +34,10 @@ export declare const AuditLogsListConfig: {
|
|
|
33
34
|
name: string;
|
|
34
35
|
}) => React.JSX.Element;
|
|
35
36
|
};
|
|
36
|
-
FiltersToWhere: (
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
FiltersToWhere: typeof import("./Browser/FiltersToWhere.js").FiltersToWhere;
|
|
38
|
+
};
|
|
39
|
+
Details: {
|
|
40
|
+
Tab: typeof import("./Details/PreviewTab.js").PreviewTab;
|
|
39
41
|
};
|
|
40
42
|
};
|
|
41
43
|
export declare const AuditLogsListWithConfig: ({ children }: {
|
|
@@ -46,4 +48,8 @@ export declare function useAuditLogsListConfig(): {
|
|
|
46
48
|
filters: import("./Browser/Filter.js").FilterConfig[];
|
|
47
49
|
filtersToWhere: import("./Browser/FiltersToWhere.js").FiltersToWhereConverter[];
|
|
48
50
|
};
|
|
51
|
+
details: {
|
|
52
|
+
tabs: import("./Details/PreviewTab.js").PreviewTabConfig[];
|
|
53
|
+
};
|
|
49
54
|
};
|
|
55
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import react, { useMemo } from "react";
|
|
2
2
|
import { createConfigurableComponent } from "@webiny/react-properties";
|
|
3
3
|
import { Browser } from "./Browser/index.js";
|
|
4
|
+
import { Details } from "./Details/index.js";
|
|
4
5
|
import { CompositionScope } from "@webiny/react-composition";
|
|
5
6
|
const base = createConfigurableComponent("AuditLogsListConfig");
|
|
6
7
|
const ScopedAuditLogsListConfig = ({ children })=>/*#__PURE__*/ react.createElement(CompositionScope, {
|
|
@@ -8,7 +9,8 @@ const ScopedAuditLogsListConfig = ({ children })=>/*#__PURE__*/ react.createElem
|
|
|
8
9
|
}, /*#__PURE__*/ react.createElement(base.Config, null, children));
|
|
9
10
|
ScopedAuditLogsListConfig.displayName = "AuditLogsListConfig";
|
|
10
11
|
const AuditLogsListConfig = Object.assign(ScopedAuditLogsListConfig, {
|
|
11
|
-
Browser: Browser
|
|
12
|
+
Browser: Browser,
|
|
13
|
+
Details: Details
|
|
12
14
|
});
|
|
13
15
|
const AuditLogsListWithConfig = ({ children })=>/*#__PURE__*/ react.createElement(CompositionScope, {
|
|
14
16
|
name: "auditLogs"
|
|
@@ -16,6 +18,7 @@ const AuditLogsListWithConfig = ({ children })=>/*#__PURE__*/ react.createElemen
|
|
|
16
18
|
function useAuditLogsListConfig() {
|
|
17
19
|
const config = base.useConfig();
|
|
18
20
|
const browser = config.browser || {};
|
|
21
|
+
const details = config.details || {};
|
|
19
22
|
return useMemo(()=>({
|
|
20
23
|
browser: {
|
|
21
24
|
...browser,
|
|
@@ -25,6 +28,12 @@ function useAuditLogsListConfig() {
|
|
|
25
28
|
filtersToWhere: [
|
|
26
29
|
...browser.filtersToWhere || []
|
|
27
30
|
]
|
|
31
|
+
},
|
|
32
|
+
details: {
|
|
33
|
+
...details,
|
|
34
|
+
tabs: [
|
|
35
|
+
...details.tabs || []
|
|
36
|
+
]
|
|
28
37
|
}
|
|
29
38
|
}), [
|
|
30
39
|
config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config/list/AuditLogsListConfig.js","sources":["../../../src/config/list/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"],"names":["base","createConfigurableComponent","ScopedAuditLogsListConfig","children","CompositionScope","AuditLogsListConfig","Object","Browser","AuditLogsListWithConfig","useAuditLogsListConfig","config","browser","useMemo"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config/list/AuditLogsListConfig.js","sources":["../../../src/config/list/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 type { DetailsConfig } from \"./Details/index.js\";\nimport { Details } from \"./Details/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, Details });\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 details: DetailsConfig;\n}\n\nexport function useAuditLogsListConfig() {\n const config = base.useConfig();\n\n const browser = config.browser || {};\n const details = config.details || {};\n\n return useMemo(\n () => ({\n browser: {\n ...browser,\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])]\n },\n details: {\n ...details,\n tabs: [...(details.tabs || [])]\n }\n }),\n [config]\n );\n}\n"],"names":["base","createConfigurableComponent","ScopedAuditLogsListConfig","children","CompositionScope","AuditLogsListConfig","Object","Browser","Details","AuditLogsListWithConfig","useAuditLogsListConfig","config","browser","details","useMemo"],"mappings":";;;;;AAQA,MAAMA,OAAOC,4BAAiD;AAE9D,MAAMC,4BAA4B,CAAC,EAAEC,QAAQ,EAAiC,GACnE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,MAAM,QAAEG;AAK1BD,0BAA0B,WAAW,GAAG;AAEjC,MAAMG,sBAAsBC,OAAO,MAAM,CAACJ,2BAA2B;IAAEK,SAAOA;IAAEC,SAAOA;AAAC;AACxF,MAAMC,0BAA0B,CAAC,EAAEN,QAAQ,EAAiC,GACxE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,UAAU,QAAEG;AAUvB,SAASO;IACZ,MAAMC,SAASX,KAAK,SAAS;IAE7B,MAAMY,UAAUD,OAAO,OAAO,IAAI,CAAC;IACnC,MAAME,UAAUF,OAAO,OAAO,IAAI,CAAC;IAEnC,OAAOG,QACH,IAAO;YACH,SAAS;gBACL,GAAGF,OAAO;gBACV,SAAS;uBAAKA,QAAQ,OAAO,IAAI,EAAE;iBAAE;gBACrC,gBAAgB;uBAAKA,QAAQ,cAAc,IAAI,EAAE;iBAAE;YACvD;YACA,SAAS;gBACL,GAAGC,OAAO;gBACV,MAAM;uBAAKA,QAAQ,IAAI,IAAI,EAAE;iBAAE;YACnC;QACJ,IACA;QAACF;KAAO;AAEhB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FilterConfig } from "./Filter.js";
|
|
2
2
|
import type { FiltersToWhereConverter } from "./FiltersToWhere.js";
|
|
3
|
+
import { FiltersToWhere } from "./FiltersToWhere.js";
|
|
3
4
|
export interface BrowserConfig {
|
|
4
5
|
filters: FilterConfig[];
|
|
5
6
|
filtersToWhere: FiltersToWhereConverter[];
|
|
@@ -32,7 +33,5 @@ export declare const Browser: {
|
|
|
32
33
|
name: string;
|
|
33
34
|
}) => React.JSX.Element;
|
|
34
35
|
};
|
|
35
|
-
FiltersToWhere:
|
|
36
|
-
converter: FiltersToWhereConverter;
|
|
37
|
-
}) => import("react").JSX.Element;
|
|
36
|
+
FiltersToWhere: typeof FiltersToWhere;
|
|
38
37
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { IAuditLog } from "../../../types.js";
|
|
3
|
+
export interface PreviewTabConfig {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
element: React.ReactElement;
|
|
7
|
+
canRender?: (auditLog: IAuditLog) => boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface PreviewTabProps {
|
|
10
|
+
name: string;
|
|
11
|
+
label: string;
|
|
12
|
+
element: React.ReactElement;
|
|
13
|
+
canRender?: (auditLog: IAuditLog) => boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const PreviewTab: ({ name, label, element, canRender }: PreviewTabProps) => React.JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { Property, useIdGenerator } from "@webiny/react-properties";
|
|
3
|
+
const PreviewTab = ({ name, label, element, canRender })=>{
|
|
4
|
+
const getId = useIdGenerator("previewTab");
|
|
5
|
+
return /*#__PURE__*/ react.createElement(Property, {
|
|
6
|
+
id: "details",
|
|
7
|
+
name: "details"
|
|
8
|
+
}, /*#__PURE__*/ react.createElement(Property, {
|
|
9
|
+
id: getId(name),
|
|
10
|
+
name: "tabs",
|
|
11
|
+
array: true
|
|
12
|
+
}, /*#__PURE__*/ react.createElement(Property, {
|
|
13
|
+
id: getId(name, "name"),
|
|
14
|
+
name: "name",
|
|
15
|
+
value: name
|
|
16
|
+
}), /*#__PURE__*/ react.createElement(Property, {
|
|
17
|
+
id: getId(name, "label"),
|
|
18
|
+
name: "label",
|
|
19
|
+
value: label
|
|
20
|
+
}), /*#__PURE__*/ react.createElement(Property, {
|
|
21
|
+
id: getId(name, "element"),
|
|
22
|
+
name: "element",
|
|
23
|
+
value: element
|
|
24
|
+
}), canRender ? /*#__PURE__*/ react.createElement(Property, {
|
|
25
|
+
id: getId(name, "canRender"),
|
|
26
|
+
name: "canRender",
|
|
27
|
+
value: canRender
|
|
28
|
+
}) : null));
|
|
29
|
+
};
|
|
30
|
+
export { PreviewTab };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=PreviewTab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config/list/Details/PreviewTab.js","sources":["../../../../src/config/list/Details/PreviewTab.tsx"],"sourcesContent":["import React from \"react\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport type { IAuditLog } from \"~/types.js\";\n\nexport interface PreviewTabConfig {\n name: string;\n label: string;\n element: React.ReactElement;\n canRender?: (auditLog: IAuditLog) => boolean;\n}\n\nexport interface PreviewTabProps {\n name: string;\n label: string;\n element: React.ReactElement;\n canRender?: (auditLog: IAuditLog) => boolean;\n}\n\nexport const PreviewTab = ({ name, label, element, canRender }: PreviewTabProps) => {\n const getId = useIdGenerator(\"previewTab\");\n\n return (\n <Property id=\"details\" name={\"details\"}>\n <Property id={getId(name)} name={\"tabs\"} array={true}>\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property id={getId(name, \"label\")} name={\"label\"} value={label} />\n <Property id={getId(name, \"element\")} name={\"element\"} value={element} />\n {canRender ? (\n <Property id={getId(name, \"canRender\")} name={\"canRender\"} value={canRender} />\n ) : null}\n </Property>\n </Property>\n );\n};\n"],"names":["PreviewTab","name","label","element","canRender","getId","useIdGenerator","Property"],"mappings":";;AAkBO,MAAMA,aAAa,CAAC,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,SAAS,EAAmB;IAC3E,MAAMC,QAAQC,eAAe;IAE7B,OAAO,WAAP,GACI,oBAACC,UAAQA;QAAC,IAAG;QAAU,MAAM;qBACzB,oBAACA,UAAQA;QAAC,IAAIF,MAAMJ;QAAO,MAAM;QAAQ,OAAO;qBAC5C,oBAACM,UAAQA;QAAC,IAAIF,MAAMJ,MAAM;QAAS,MAAM;QAAQ,OAAOA;sBACxD,oBAACM,UAAQA;QAAC,IAAIF,MAAMJ,MAAM;QAAU,MAAM;QAAS,OAAOC;sBAC1D,oBAACK,UAAQA;QAAC,IAAIF,MAAMJ,MAAM;QAAY,MAAM;QAAW,OAAOE;QAC7DC,YAAY,WAAZA,GACG,oBAACG,UAAQA;QAAC,IAAIF,MAAMJ,MAAM;QAAc,MAAM;QAAa,OAAOG;SAClE;AAIpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config/list/Details/index.js","sources":["../../../../src/config/list/Details/index.ts"],"sourcesContent":["import type { PreviewTabConfig } from \"./PreviewTab.js\";\nimport { PreviewTab } from \"./PreviewTab.js\";\n\nexport interface DetailsConfig {\n tabs: PreviewTabConfig[];\n}\n\nexport const Details = {\n Tab: PreviewTab\n};\n"],"names":["Details","PreviewTab"],"mappings":";AAOO,MAAMA,UAAU;IACnB,KAAKC;AACT"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient";
|
|
2
|
+
import { ListAuditLogsGateway as GatewayAbstraction } from "./abstractions/index.js";
|
|
3
|
+
declare class ListAuditLogsGatewayImpl implements GatewayAbstraction.Interface {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: MainGraphQLClient.Interface);
|
|
6
|
+
execute(params: GatewayAbstraction.Params): Promise<GatewayAbstraction.Result>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ListAuditLogsGateway: typeof ListAuditLogsGatewayImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/ListAuditLogsGateway.js").IListAuditLogsGateway>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient";
|
|
2
|
+
import { ListAuditLogsGateway } from "./abstractions/index.js";
|
|
3
|
+
const LIST_AUDIT_LOGS = `
|
|
4
|
+
query ListAuditLogs(
|
|
5
|
+
$where: ListAuditLogsWhere!
|
|
6
|
+
$sort: AuditLogsSort
|
|
7
|
+
$after: String
|
|
8
|
+
$limit: Number
|
|
9
|
+
) {
|
|
10
|
+
auditLogs {
|
|
11
|
+
listAuditLogs(where: $where, after: $after, sort: $sort, limit: $limit) {
|
|
12
|
+
data {
|
|
13
|
+
id
|
|
14
|
+
createdBy {
|
|
15
|
+
id
|
|
16
|
+
displayName
|
|
17
|
+
type
|
|
18
|
+
}
|
|
19
|
+
createdOn
|
|
20
|
+
app
|
|
21
|
+
action
|
|
22
|
+
message
|
|
23
|
+
entity
|
|
24
|
+
entityId
|
|
25
|
+
tags
|
|
26
|
+
expiresAt
|
|
27
|
+
content
|
|
28
|
+
}
|
|
29
|
+
meta {
|
|
30
|
+
hasMoreItems
|
|
31
|
+
cursor
|
|
32
|
+
}
|
|
33
|
+
error {
|
|
34
|
+
message
|
|
35
|
+
code
|
|
36
|
+
data
|
|
37
|
+
stack
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
class ListAuditLogsGatewayImpl {
|
|
44
|
+
constructor(client){
|
|
45
|
+
this.client = client;
|
|
46
|
+
}
|
|
47
|
+
async execute(params) {
|
|
48
|
+
const response = await this.client.execute({
|
|
49
|
+
query: LIST_AUDIT_LOGS,
|
|
50
|
+
variables: params
|
|
51
|
+
});
|
|
52
|
+
const envelope = response.auditLogs.listAuditLogs;
|
|
53
|
+
if (envelope.error) throw new Error(envelope.error.message || "Could not fetch audit logs.");
|
|
54
|
+
return {
|
|
55
|
+
data: envelope.data || [],
|
|
56
|
+
meta: envelope.meta || {
|
|
57
|
+
hasMoreItems: false,
|
|
58
|
+
cursor: null
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const ListAuditLogsGateway_ListAuditLogsGateway = ListAuditLogsGateway.createImplementation({
|
|
64
|
+
implementation: ListAuditLogsGatewayImpl,
|
|
65
|
+
dependencies: [
|
|
66
|
+
MainGraphQLClient
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
export { ListAuditLogsGateway_ListAuditLogsGateway as ListAuditLogsGateway };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=ListAuditLogsGateway.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/ListAuditLogsGateway.js","sources":["../../../src/features/listAuditLogs/ListAuditLogsGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient\";\nimport type { IAuditLogRaw, IAuditLogsMeta, IAuditLogsError } from \"~/types.js\";\nimport { ListAuditLogsGateway as GatewayAbstraction } from \"./abstractions/index.js\";\n\nconst LIST_AUDIT_LOGS = /* GraphQL */ `\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\ninterface ListAuditLogsResponse {\n auditLogs: {\n listAuditLogs: {\n data: IAuditLogRaw[] | null;\n meta: IAuditLogsMeta | null;\n error: IAuditLogsError | null;\n };\n };\n}\n\nclass ListAuditLogsGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private readonly client: MainGraphQLClient.Interface) {}\n\n async execute(params: GatewayAbstraction.Params): Promise<GatewayAbstraction.Result> {\n const response = await this.client.execute<ListAuditLogsResponse>({\n query: LIST_AUDIT_LOGS,\n variables: params\n });\n\n const envelope = response.auditLogs.listAuditLogs;\n\n if (envelope.error) {\n throw new Error(envelope.error.message || \"Could not fetch audit logs.\");\n }\n\n return {\n data: envelope.data || [],\n meta: envelope.meta || { hasMoreItems: false, cursor: null }\n };\n }\n}\n\nexport const ListAuditLogsGateway = GatewayAbstraction.createImplementation({\n implementation: ListAuditLogsGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["LIST_AUDIT_LOGS","ListAuditLogsGatewayImpl","client","params","response","envelope","Error","ListAuditLogsGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAIA,MAAMA,kBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCvC,CAAC;AAYD,MAAMC;IACF,YAA6BC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAEnE,MAAM,QAAQC,MAAiC,EAAsC;QACjF,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAC9D,OAAOJ;YACP,WAAWG;QACf;QAEA,MAAME,WAAWD,SAAS,SAAS,CAAC,aAAa;QAEjD,IAAIC,SAAS,KAAK,EACd,MAAM,IAAIC,MAAMD,SAAS,KAAK,CAAC,OAAO,IAAI;QAG9C,OAAO;YACH,MAAMA,SAAS,IAAI,IAAI,EAAE;YACzB,MAAMA,SAAS,IAAI,IAAI;gBAAE,cAAc;gBAAO,QAAQ;YAAK;QAC/D;IACJ;AACJ;AAEO,MAAME,4CAAuBC,qBAAAA,oBAAuC,CAAC;IACxE,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ListAuditLogsGateway } from "./abstractions/index.js";
|
|
2
|
+
import { ListAuditLogsRepository as RepositoryAbstraction } from "./abstractions/index.js";
|
|
3
|
+
declare class ListAuditLogsRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
4
|
+
private readonly gateway;
|
|
5
|
+
constructor(gateway: ListAuditLogsGateway.Interface);
|
|
6
|
+
execute(params: RepositoryAbstraction.Params): Promise<RepositoryAbstraction.Result>;
|
|
7
|
+
}
|
|
8
|
+
export declare const ListAuditLogsRepository: typeof ListAuditLogsRepositoryImpl & {
|
|
9
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/ListAuditLogsRepository.js").IListAuditLogsRepository>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ListAuditLogsGateway, ListAuditLogsRepository } from "./abstractions/index.js";
|
|
2
|
+
import { listAuditLogsSchema } from "../../hooks/schema.js";
|
|
3
|
+
import { transformRawAuditLog } from "../../utils/transformRawAuditLog.js";
|
|
4
|
+
class ListAuditLogsRepositoryImpl {
|
|
5
|
+
constructor(gateway){
|
|
6
|
+
this.gateway = gateway;
|
|
7
|
+
}
|
|
8
|
+
async execute(params) {
|
|
9
|
+
const response = await this.gateway.execute(params);
|
|
10
|
+
const parsed = listAuditLogsSchema.safeParse(response.data);
|
|
11
|
+
if (!parsed.success) {
|
|
12
|
+
console.error(parsed.error);
|
|
13
|
+
return {
|
|
14
|
+
records: [],
|
|
15
|
+
meta: response.meta
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const records = parsed.data.map((auditLog)=>transformRawAuditLog({
|
|
19
|
+
auditLog
|
|
20
|
+
}));
|
|
21
|
+
return {
|
|
22
|
+
records,
|
|
23
|
+
meta: response.meta
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const ListAuditLogsRepository_ListAuditLogsRepository = ListAuditLogsRepository.createImplementation({
|
|
28
|
+
implementation: ListAuditLogsRepositoryImpl,
|
|
29
|
+
dependencies: [
|
|
30
|
+
ListAuditLogsGateway
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
export { ListAuditLogsRepository_ListAuditLogsRepository as ListAuditLogsRepository };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ListAuditLogsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/ListAuditLogsRepository.js","sources":["../../../src/features/listAuditLogs/ListAuditLogsRepository.ts"],"sourcesContent":["import { ListAuditLogsGateway } from \"./abstractions/index.js\";\nimport { ListAuditLogsRepository as RepositoryAbstraction } from \"./abstractions/index.js\";\nimport { listAuditLogsSchema } from \"~/hooks/schema.js\";\nimport { transformRawAuditLog } from \"~/utils/transformRawAuditLog.js\";\n\nclass ListAuditLogsRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(private readonly gateway: ListAuditLogsGateway.Interface) {}\n\n async execute(params: RepositoryAbstraction.Params): Promise<RepositoryAbstraction.Result> {\n const response = await this.gateway.execute(params);\n\n const parsed = listAuditLogsSchema.safeParse(response.data);\n if (!parsed.success) {\n console.error(parsed.error);\n return {\n records: [],\n meta: response.meta\n };\n }\n\n const records = parsed.data.map(auditLog => transformRawAuditLog({ auditLog }));\n\n return {\n records,\n meta: response.meta\n };\n }\n}\n\nexport const ListAuditLogsRepository = RepositoryAbstraction.createImplementation({\n implementation: ListAuditLogsRepositoryImpl,\n dependencies: [ListAuditLogsGateway]\n});\n"],"names":["ListAuditLogsRepositoryImpl","gateway","params","response","parsed","listAuditLogsSchema","console","records","auditLog","transformRawAuditLog","ListAuditLogsRepository","RepositoryAbstraction","ListAuditLogsGateway"],"mappings":";;;AAKA,MAAMA;IACF,YAA6BC,OAAuC,CAAE;aAAzCA,OAAO,GAAPA;IAA0C;IAEvE,MAAM,QAAQC,MAAoC,EAAyC;QACvF,MAAMC,WAAW,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAACD;QAE5C,MAAME,SAASC,oBAAoB,SAAS,CAACF,SAAS,IAAI;QAC1D,IAAI,CAACC,OAAO,OAAO,EAAE;YACjBE,QAAQ,KAAK,CAACF,OAAO,KAAK;YAC1B,OAAO;gBACH,SAAS,EAAE;gBACX,MAAMD,SAAS,IAAI;YACvB;QACJ;QAEA,MAAMI,UAAUH,OAAO,IAAI,CAAC,GAAG,CAACI,CAAAA,WAAYC,qBAAqB;gBAAED;YAAS;QAE5E,OAAO;YACHD;YACA,MAAMJ,SAAS,IAAI;QACvB;IACJ;AACJ;AAEO,MAAMO,kDAA0BC,wBAAAA,oBAA0C,CAAC;IAC9E,gBAAgBX;IAChB,cAAc;QAACY;KAAqB;AACxC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListAuditLogsRepository, ListAuditLogsUseCase as UseCaseAbstraction } from "./abstractions/index.js";
|
|
2
|
+
declare class ListAuditLogsUseCaseImpl implements UseCaseAbstraction.Interface {
|
|
3
|
+
private readonly repository;
|
|
4
|
+
constructor(repository: ListAuditLogsRepository.Interface);
|
|
5
|
+
execute(params: UseCaseAbstraction.Params): Promise<UseCaseAbstraction.Result>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ListAuditLogsUseCase: typeof ListAuditLogsUseCaseImpl & {
|
|
8
|
+
__abstraction: import("@webiny/di").Abstraction<import("./abstractions/ListAuditLogsUseCase.js").IListAuditLogsUseCase>;
|
|
9
|
+
};
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ListAuditLogsRepository, ListAuditLogsUseCase } from "./abstractions/index.js";
|
|
2
|
+
class ListAuditLogsUseCaseImpl {
|
|
3
|
+
constructor(repository){
|
|
4
|
+
this.repository = repository;
|
|
5
|
+
}
|
|
6
|
+
async execute(params) {
|
|
7
|
+
const result = await this.repository.execute(params);
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const ListAuditLogsUseCase_ListAuditLogsUseCase = ListAuditLogsUseCase.createImplementation({
|
|
12
|
+
implementation: ListAuditLogsUseCaseImpl,
|
|
13
|
+
dependencies: [
|
|
14
|
+
ListAuditLogsRepository
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
export { ListAuditLogsUseCase_ListAuditLogsUseCase as ListAuditLogsUseCase };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ListAuditLogsUseCase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/ListAuditLogsUseCase.js","sources":["../../../src/features/listAuditLogs/ListAuditLogsUseCase.ts"],"sourcesContent":["import {\n ListAuditLogsRepository,\n ListAuditLogsUseCase as UseCaseAbstraction\n} from \"./abstractions/index.js\";\n\nclass ListAuditLogsUseCaseImpl implements UseCaseAbstraction.Interface {\n constructor(private readonly repository: ListAuditLogsRepository.Interface) {}\n\n async execute(params: UseCaseAbstraction.Params): Promise<UseCaseAbstraction.Result> {\n const result = await this.repository.execute(params);\n return result;\n }\n}\n\nexport const ListAuditLogsUseCase = UseCaseAbstraction.createImplementation({\n implementation: ListAuditLogsUseCaseImpl,\n dependencies: [ListAuditLogsRepository]\n});\n"],"names":["ListAuditLogsUseCaseImpl","repository","params","result","ListAuditLogsUseCase","UseCaseAbstraction","ListAuditLogsRepository"],"mappings":";AAKA,MAAMA;IACF,YAA6BC,UAA6C,CAAE;aAA/CA,UAAU,GAAVA;IAAgD;IAE7E,MAAM,QAAQC,MAAiC,EAAsC;QACjF,MAAMC,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAACD;QAC7C,OAAOC;IACX;AACJ;AAEO,MAAMC,4CAAuBC,qBAAAA,oBAAuC,CAAC;IACxE,gBAAgBL;IAChB,cAAc;QAACM;KAAwB;AAC3C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAuditLogRaw, IAuditLogsMeta } from "../../../types.js";
|
|
2
|
+
export interface IListAuditLogsGatewayParams {
|
|
3
|
+
where?: Record<string, unknown>;
|
|
4
|
+
after?: string;
|
|
5
|
+
sort?: "ASC" | "DESC";
|
|
6
|
+
limit?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IListAuditLogsGatewayResult {
|
|
9
|
+
data: IAuditLogRaw[];
|
|
10
|
+
meta: IAuditLogsMeta;
|
|
11
|
+
}
|
|
12
|
+
export interface IListAuditLogsGateway {
|
|
13
|
+
execute(params: IListAuditLogsGatewayParams): Promise<IListAuditLogsGatewayResult>;
|
|
14
|
+
}
|
|
15
|
+
export declare const ListAuditLogsGateway: import("@webiny/di").Abstraction<IListAuditLogsGateway>;
|
|
16
|
+
export declare namespace ListAuditLogsGateway {
|
|
17
|
+
type Interface = IListAuditLogsGateway;
|
|
18
|
+
type Params = IListAuditLogsGatewayParams;
|
|
19
|
+
type Result = IListAuditLogsGatewayResult;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/abstractions/ListAuditLogsGateway.js","sources":["../../../../src/features/listAuditLogs/abstractions/ListAuditLogsGateway.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IAuditLogRaw, IAuditLogsMeta } from \"~/types.js\";\n\nexport interface IListAuditLogsGatewayParams {\n where?: Record<string, unknown>;\n after?: string;\n sort?: \"ASC\" | \"DESC\";\n limit?: number;\n}\n\nexport interface IListAuditLogsGatewayResult {\n data: IAuditLogRaw[];\n meta: IAuditLogsMeta;\n}\n\nexport interface IListAuditLogsGateway {\n execute(params: IListAuditLogsGatewayParams): Promise<IListAuditLogsGatewayResult>;\n}\n\nexport const ListAuditLogsGateway =\n createAbstraction<IListAuditLogsGateway>(\"ListAuditLogsGateway\");\n\nexport namespace ListAuditLogsGateway {\n export type Interface = IListAuditLogsGateway;\n export type Params = IListAuditLogsGatewayParams;\n export type Result = IListAuditLogsGatewayResult;\n}\n"],"names":["ListAuditLogsGateway","createAbstraction"],"mappings":";AAmBO,MAAMA,uBACTC,kBAAyC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAuditLog, IAuditLogsMeta } from "../../../types.js";
|
|
2
|
+
export interface IListAuditLogsRepositoryParams {
|
|
3
|
+
where?: Record<string, unknown>;
|
|
4
|
+
after?: string;
|
|
5
|
+
sort?: "ASC" | "DESC";
|
|
6
|
+
limit?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IListAuditLogsRepositoryResult {
|
|
9
|
+
records: IAuditLog[];
|
|
10
|
+
meta: IAuditLogsMeta;
|
|
11
|
+
}
|
|
12
|
+
export interface IListAuditLogsRepository {
|
|
13
|
+
execute(params: IListAuditLogsRepositoryParams): Promise<IListAuditLogsRepositoryResult>;
|
|
14
|
+
}
|
|
15
|
+
export declare const ListAuditLogsRepository: import("@webiny/di").Abstraction<IListAuditLogsRepository>;
|
|
16
|
+
export declare namespace ListAuditLogsRepository {
|
|
17
|
+
type Interface = IListAuditLogsRepository;
|
|
18
|
+
type Params = IListAuditLogsRepositoryParams;
|
|
19
|
+
type Result = IListAuditLogsRepositoryResult;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/abstractions/ListAuditLogsRepository.js","sources":["../../../../src/features/listAuditLogs/abstractions/ListAuditLogsRepository.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IAuditLog, IAuditLogsMeta } from \"~/types.js\";\n\nexport interface IListAuditLogsRepositoryParams {\n where?: Record<string, unknown>;\n after?: string;\n sort?: \"ASC\" | \"DESC\";\n limit?: number;\n}\n\nexport interface IListAuditLogsRepositoryResult {\n records: IAuditLog[];\n meta: IAuditLogsMeta;\n}\n\nexport interface IListAuditLogsRepository {\n execute(params: IListAuditLogsRepositoryParams): Promise<IListAuditLogsRepositoryResult>;\n}\n\nexport const ListAuditLogsRepository =\n createAbstraction<IListAuditLogsRepository>(\"ListAuditLogsRepository\");\n\nexport namespace ListAuditLogsRepository {\n export type Interface = IListAuditLogsRepository;\n export type Params = IListAuditLogsRepositoryParams;\n export type Result = IListAuditLogsRepositoryResult;\n}\n"],"names":["ListAuditLogsRepository","createAbstraction"],"mappings":";AAmBO,MAAMA,0BACTC,kBAA4C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IAuditLog, IAuditLogsMeta } from "../../../types.js";
|
|
2
|
+
export interface IListAuditLogsUseCaseParams {
|
|
3
|
+
where?: Record<string, unknown>;
|
|
4
|
+
after?: string;
|
|
5
|
+
sort?: "ASC" | "DESC";
|
|
6
|
+
limit?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IListAuditLogsUseCaseResult {
|
|
9
|
+
records: IAuditLog[];
|
|
10
|
+
meta: IAuditLogsMeta;
|
|
11
|
+
}
|
|
12
|
+
export interface IListAuditLogsUseCase {
|
|
13
|
+
execute(params: IListAuditLogsUseCaseParams): Promise<IListAuditLogsUseCaseResult>;
|
|
14
|
+
}
|
|
15
|
+
export declare const ListAuditLogsUseCase: import("@webiny/di").Abstraction<IListAuditLogsUseCase>;
|
|
16
|
+
export declare namespace ListAuditLogsUseCase {
|
|
17
|
+
type Interface = IListAuditLogsUseCase;
|
|
18
|
+
type Params = IListAuditLogsUseCaseParams;
|
|
19
|
+
type Result = IListAuditLogsUseCaseResult;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/abstractions/ListAuditLogsUseCase.js","sources":["../../../../src/features/listAuditLogs/abstractions/ListAuditLogsUseCase.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { IAuditLog, IAuditLogsMeta } from \"~/types.js\";\n\nexport interface IListAuditLogsUseCaseParams {\n where?: Record<string, unknown>;\n after?: string;\n sort?: \"ASC\" | \"DESC\";\n limit?: number;\n}\n\nexport interface IListAuditLogsUseCaseResult {\n records: IAuditLog[];\n meta: IAuditLogsMeta;\n}\n\nexport interface IListAuditLogsUseCase {\n execute(params: IListAuditLogsUseCaseParams): Promise<IListAuditLogsUseCaseResult>;\n}\n\nexport const ListAuditLogsUseCase =\n createAbstraction<IListAuditLogsUseCase>(\"ListAuditLogsUseCase\");\n\nexport namespace ListAuditLogsUseCase {\n export type Interface = IListAuditLogsUseCase;\n export type Params = IListAuditLogsUseCaseParams;\n export type Result = IListAuditLogsUseCaseResult;\n}\n"],"names":["ListAuditLogsUseCase","createAbstraction"],"mappings":";AAmBO,MAAMA,uBACTC,kBAAyC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ListAuditLogsGateway } from "./ListAuditLogsGateway.js";
|
|
2
|
+
export type { IListAuditLogsGateway } from "./ListAuditLogsGateway.js";
|
|
3
|
+
export { ListAuditLogsRepository } from "./ListAuditLogsRepository.js";
|
|
4
|
+
export type { IListAuditLogsRepository } from "./ListAuditLogsRepository.js";
|
|
5
|
+
export { ListAuditLogsUseCase } from "./ListAuditLogsUseCase.js";
|
|
6
|
+
export type { IListAuditLogsUseCase } from "./ListAuditLogsUseCase.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { ListAuditLogsUseCase } from "./abstractions/index.js";
|
|
3
|
+
import { ListAuditLogsUseCase as external_ListAuditLogsUseCase_js_ListAuditLogsUseCase } from "./ListAuditLogsUseCase.js";
|
|
4
|
+
import { ListAuditLogsRepository } from "./ListAuditLogsRepository.js";
|
|
5
|
+
import { ListAuditLogsGateway } from "./ListAuditLogsGateway.js";
|
|
6
|
+
const ListAuditLogsFeature = createFeature({
|
|
7
|
+
name: "AuditLogs/ListAuditLogs",
|
|
8
|
+
register (container) {
|
|
9
|
+
container.register(external_ListAuditLogsUseCase_js_ListAuditLogsUseCase);
|
|
10
|
+
container.register(ListAuditLogsRepository).inSingletonScope();
|
|
11
|
+
container.register(ListAuditLogsGateway).inSingletonScope();
|
|
12
|
+
},
|
|
13
|
+
resolve (container) {
|
|
14
|
+
return {
|
|
15
|
+
useCase: container.resolve(ListAuditLogsUseCase)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export { ListAuditLogsFeature };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/listAuditLogs/feature.js","sources":["../../../src/features/listAuditLogs/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ListAuditLogsUseCase as UseCaseAbstraction } from \"./abstractions/index.js\";\nimport { ListAuditLogsUseCase } from \"./ListAuditLogsUseCase.js\";\nimport { ListAuditLogsRepository } from \"./ListAuditLogsRepository.js\";\nimport { ListAuditLogsGateway } from \"./ListAuditLogsGateway.js\";\n\nexport const ListAuditLogsFeature = createFeature({\n name: \"AuditLogs/ListAuditLogs\",\n register(container) {\n container.register(ListAuditLogsUseCase);\n container.register(ListAuditLogsRepository).inSingletonScope();\n container.register(ListAuditLogsGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["ListAuditLogsFeature","createFeature","container","ListAuditLogsUseCase","ListAuditLogsRepository","ListAuditLogsGateway","UseCaseAbstraction"],"mappings":";;;;;AAMO,MAAMA,uBAAuBC,cAAc;IAC9C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,yBAAyB,gBAAgB;QAC5DF,UAAU,QAAQ,CAACG,sBAAsB,gBAAgB;IAC7D;IACA,SAAQH,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACI;QAC/B;IACJ;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListAuditLogsFeature } from "./feature.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListAuditLogsFeature } from "./feature.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AlPermissionsFeature: import("@webiny/feature/admin
|
|
1
|
+
export declare const AlPermissionsFeature: import("@webiny/feature/admin").FeatureDefinition<{
|
|
2
2
|
permissions: {
|
|
3
3
|
canAccess: (entityId: never) => boolean;
|
|
4
4
|
canAction: (action: string, entityId: never) => boolean;
|
package/graphql.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIST_USERS:
|
|
1
|
+
export declare const LIST_USERS = "\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 \n code\n message\n data\n\n }\n }\n }\n }\n";
|