@webiny/app-audit-logs 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.eb196ccd2f
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/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 groups {\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":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-audit-logs",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
3
|
+
"version": "0.0.0-unstable.eb196ccd2f",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
"@apollo/react-hooks": "3.1.5",
|
|
13
13
|
"@emotion/react": "11.10.8",
|
|
14
14
|
"@emotion/styled": "11.10.6",
|
|
15
|
-
"@webiny/admin-ui": "0.0.0-unstable.
|
|
16
|
-
"@webiny/api-audit-logs": "0.0.0-unstable.
|
|
17
|
-
"@webiny/app": "0.0.0-unstable.
|
|
18
|
-
"@webiny/app-aco": "0.0.0-unstable.
|
|
19
|
-
"@webiny/app-admin": "0.0.0-unstable.
|
|
20
|
-
"@webiny/app-security": "0.0.0-unstable.
|
|
21
|
-
"@webiny/form": "0.0.0-unstable.
|
|
22
|
-
"@webiny/icons": "0.0.0-unstable.
|
|
23
|
-
"@webiny/plugins": "0.0.0-unstable.
|
|
24
|
-
"@webiny/react-properties": "0.0.0-unstable.
|
|
25
|
-
"@webiny/react-router": "0.0.0-unstable.
|
|
26
|
-
"@webiny/ui": "0.0.0-unstable.
|
|
15
|
+
"@webiny/admin-ui": "0.0.0-unstable.eb196ccd2f",
|
|
16
|
+
"@webiny/api-audit-logs": "0.0.0-unstable.eb196ccd2f",
|
|
17
|
+
"@webiny/app": "0.0.0-unstable.eb196ccd2f",
|
|
18
|
+
"@webiny/app-aco": "0.0.0-unstable.eb196ccd2f",
|
|
19
|
+
"@webiny/app-admin": "0.0.0-unstable.eb196ccd2f",
|
|
20
|
+
"@webiny/app-security": "0.0.0-unstable.eb196ccd2f",
|
|
21
|
+
"@webiny/form": "0.0.0-unstable.eb196ccd2f",
|
|
22
|
+
"@webiny/icons": "0.0.0-unstable.eb196ccd2f",
|
|
23
|
+
"@webiny/plugins": "0.0.0-unstable.eb196ccd2f",
|
|
24
|
+
"@webiny/react-properties": "0.0.0-unstable.eb196ccd2f",
|
|
25
|
+
"@webiny/react-router": "0.0.0-unstable.eb196ccd2f",
|
|
26
|
+
"@webiny/ui": "0.0.0-unstable.eb196ccd2f",
|
|
27
27
|
"date-fns": "2.29.3",
|
|
28
28
|
"emotion": "10.0.27",
|
|
29
29
|
"graphql-tag": "2.12.6",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/react": "18.2.79",
|
|
37
|
-
"@webiny/project-utils": "0.0.0-unstable.
|
|
37
|
+
"@webiny/project-utils": "0.0.0-unstable.eb196ccd2f",
|
|
38
38
|
"execa": "5.1.1",
|
|
39
39
|
"rimraf": "6.0.1",
|
|
40
40
|
"typescript": "5.3.3"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"build": "node ../cli/bin.js run build",
|
|
48
48
|
"watch": "node ../cli/bin.js run watch"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "eb196ccd2f32296e10f7add6dd7220d4e3abece4"
|
|
51
51
|
}
|
package/types.d.ts
CHANGED
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ActionType"],"sources":["types.ts"],"sourcesContent":["export enum ActionType {\n CREATE = \"CREATE\",\n UPDATE = \"UPDATE\",\n DELETE = \"DELETE\",\n MOVE_TO_TRASH = \"MOVE_TO_TRASH\",\n RESTORE_FROM_TRASH = \"RESTORE_FROM_TRASH\",\n PUBLISH = \"PUBLISH\",\n UNPUBLISH = \"UNPUBLISH\",\n IMPORT = \"IMPORT\",\n EXPORT = \"EXPORT\"\n}\n\nexport interface AuditLog {\n id: string;\n message: string;\n app: string;\n entity: string;\n entityId: string;\n action: ActionType;\n data: string;\n timestamp: Date;\n initiator: string;\n}\n\nexport interface User {\n id: string;\n firstName: string;\n lastName: string;\n
|
|
1
|
+
{"version":3,"names":["ActionType"],"sources":["types.ts"],"sourcesContent":["export enum ActionType {\n CREATE = \"CREATE\",\n UPDATE = \"UPDATE\",\n DELETE = \"DELETE\",\n MOVE_TO_TRASH = \"MOVE_TO_TRASH\",\n RESTORE_FROM_TRASH = \"RESTORE_FROM_TRASH\",\n PUBLISH = \"PUBLISH\",\n UNPUBLISH = \"UNPUBLISH\",\n IMPORT = \"IMPORT\",\n EXPORT = \"EXPORT\"\n}\n\nexport interface AuditLog {\n id: string;\n message: string;\n app: string;\n entity: string;\n entityId: string;\n action: ActionType;\n data: string;\n timestamp: Date;\n initiator: string;\n}\n\nexport interface User {\n id: string;\n firstName: string;\n lastName: string;\n groups?: {\n name: string;\n }[];\n}\n"],"mappings":"AAAA,WAAYA,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["auditLogsApps","transformCmsContentEntriesToRecordEntries","items","users","map","id","data","app","find","entity","entities","type","action","actions","user","initiator","message","displayName","label","value","link","linkToEntity","encodeURIComponent","entityId","savedOn","timestamp","name","firstName","lastName","role","
|
|
1
|
+
{"version":3,"names":["auditLogsApps","transformCmsContentEntriesToRecordEntries","items","users","map","id","data","app","find","entity","entities","type","action","actions","user","initiator","message","displayName","label","value","link","linkToEntity","encodeURIComponent","entityId","savedOn","timestamp","name","firstName","lastName","role","groups"],"sources":["transformCmsContentEntriesToRecordEntries.ts"],"sourcesContent":["import type { SearchRecordItem } from \"@webiny/app-aco/types\";\nimport { auditLogsApps } from \"@webiny/api-audit-logs/config\";\n\nimport type { ActionType, AuditLog, User } from \"~/types\";\n\nexport type Entry = {\n id: string;\n message: string;\n app: string;\n entity: {\n value: string;\n label: string;\n link?: string;\n };\n entityId: string;\n action: {\n label: string;\n value: ActionType;\n };\n data: string;\n savedOn: Date;\n initiator: {\n id: string;\n name: string;\n role: string;\n };\n};\n\nexport const transformCmsContentEntriesToRecordEntries = (\n items: SearchRecordItem<AuditLog>[],\n users: User[]\n): Entry[] => {\n return items.map(({ id, data }) => {\n const app = auditLogsApps.find(app => app.app === data.app);\n const entity = app?.entities?.find(entity => entity.type === data.entity);\n const action = entity?.actions?.find(action => action.type === data.action);\n const user = users.find(user => user.id === data.initiator);\n\n return {\n id,\n message: data.message,\n app: app?.displayName || \"-\",\n entity: {\n label: entity?.displayName || \"-\",\n value: data.entity,\n link: entity?.linkToEntity && entity.linkToEntity(encodeURIComponent(data.entityId))\n },\n entityId: data.entityId,\n action: {\n label: action?.displayName || \"-\",\n value: data.action\n },\n data: data.data,\n savedOn: data.timestamp,\n initiator: {\n id: data.initiator,\n name: `${user?.firstName} ${user?.lastName}`,\n role: user?.groups?.[0]?.name || \"\"\n }\n };\n });\n};\n"],"mappings":"AACA,SAASA,aAAa,QAAQ,+BAA+B;AA2B7D,OAAO,MAAMC,yCAAyC,GAAGA,CACrDC,KAAmC,EACnCC,KAAa,KACH;EACV,OAAOD,KAAK,CAACE,GAAG,CAAC,CAAC;IAAEC,EAAE;IAAEC;EAAK,CAAC,KAAK;IAC/B,MAAMC,GAAG,GAAGP,aAAa,CAACQ,IAAI,CAACD,GAAG,IAAIA,GAAG,CAACA,GAAG,KAAKD,IAAI,CAACC,GAAG,CAAC;IAC3D,MAAME,MAAM,GAAGF,GAAG,EAAEG,QAAQ,EAAEF,IAAI,CAACC,MAAM,IAAIA,MAAM,CAACE,IAAI,KAAKL,IAAI,CAACG,MAAM,CAAC;IACzE,MAAMG,MAAM,GAAGH,MAAM,EAAEI,OAAO,EAAEL,IAAI,CAACI,MAAM,IAAIA,MAAM,CAACD,IAAI,KAAKL,IAAI,CAACM,MAAM,CAAC;IAC3E,MAAME,IAAI,GAAGX,KAAK,CAACK,IAAI,CAACM,IAAI,IAAIA,IAAI,CAACT,EAAE,KAAKC,IAAI,CAACS,SAAS,CAAC;IAE3D,OAAO;MACHV,EAAE;MACFW,OAAO,EAAEV,IAAI,CAACU,OAAO;MACrBT,GAAG,EAAEA,GAAG,EAAEU,WAAW,IAAI,GAAG;MAC5BR,MAAM,EAAE;QACJS,KAAK,EAAET,MAAM,EAAEQ,WAAW,IAAI,GAAG;QACjCE,KAAK,EAAEb,IAAI,CAACG,MAAM;QAClBW,IAAI,EAAEX,MAAM,EAAEY,YAAY,IAAIZ,MAAM,CAACY,YAAY,CAACC,kBAAkB,CAAChB,IAAI,CAACiB,QAAQ,CAAC;MACvF,CAAC;MACDA,QAAQ,EAAEjB,IAAI,CAACiB,QAAQ;MACvBX,MAAM,EAAE;QACJM,KAAK,EAAEN,MAAM,EAAEK,WAAW,IAAI,GAAG;QACjCE,KAAK,EAAEb,IAAI,CAACM;MAChB,CAAC;MACDN,IAAI,EAAEA,IAAI,CAACA,IAAI;MACfkB,OAAO,EAAElB,IAAI,CAACmB,SAAS;MACvBV,SAAS,EAAE;QACPV,EAAE,EAAEC,IAAI,CAACS,SAAS;QAClBW,IAAI,EAAE,GAAGZ,IAAI,EAAEa,SAAS,IAAIb,IAAI,EAAEc,QAAQ,EAAE;QAC5CC,IAAI,EAAEf,IAAI,EAAEgB,MAAM,GAAG,CAAC,CAAC,EAAEJ,IAAI,IAAI;MACrC;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|