@servicenow/sdk-build-plugins 2.0.1
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/dist/AttachmentPlugin.d.ts +253 -0
- package/dist/AttachmentPlugin.js +216 -0
- package/dist/AttachmentPlugin.js.map +1 -0
- package/dist/BusinessRulePlugin.d.ts +56 -0
- package/dist/BusinessRulePlugin.js +171 -0
- package/dist/BusinessRulePlugin.js.map +1 -0
- package/dist/CrossScopePrivilegePlugin.d.ts +22 -0
- package/dist/CrossScopePrivilegePlugin.js +42 -0
- package/dist/CrossScopePrivilegePlugin.js.map +1 -0
- package/dist/DefaultPlugin.d.ts +71 -0
- package/dist/DefaultPlugin.js +238 -0
- package/dist/DefaultPlugin.js.map +1 -0
- package/dist/IdPlugin.d.ts +17 -0
- package/dist/IdPlugin.js +45 -0
- package/dist/IdPlugin.js.map +1 -0
- package/dist/ListPlugin.d.ts +91 -0
- package/dist/ListPlugin.js +398 -0
- package/dist/ListPlugin.js.map +1 -0
- package/dist/PropertyPlugin.d.ts +122 -0
- package/dist/PropertyPlugin.js +165 -0
- package/dist/PropertyPlugin.js.map +1 -0
- package/dist/ScriptTemplatePlugin.d.ts +31 -0
- package/dist/ScriptTemplatePlugin.js +208 -0
- package/dist/ScriptTemplatePlugin.js.map +1 -0
- package/dist/UserPreferencePlugin.d.ts +16 -0
- package/dist/UserPreferencePlugin.js +30 -0
- package/dist/UserPreferencePlugin.js.map +1 -0
- package/dist/aclAndRole/AclPlugin.d.ts +117 -0
- package/dist/aclAndRole/AclPlugin.js +285 -0
- package/dist/aclAndRole/AclPlugin.js.map +1 -0
- package/dist/aclAndRole/RolePlugin.d.ts +58 -0
- package/dist/aclAndRole/RolePlugin.js +152 -0
- package/dist/aclAndRole/RolePlugin.js.map +1 -0
- package/dist/aclAndRole/Util.d.ts +3 -0
- package/dist/aclAndRole/Util.js +106 -0
- package/dist/aclAndRole/Util.js.map +1 -0
- package/dist/app/ApplicationMenuPlugin.d.ts +32 -0
- package/dist/app/ApplicationMenuPlugin.js +106 -0
- package/dist/app/ApplicationMenuPlugin.js.map +1 -0
- package/dist/atf/ATFComposer.d.ts +492 -0
- package/dist/atf/ATFComposer.js +2717 -0
- package/dist/atf/ATFComposer.js.map +1 -0
- package/dist/atf/TestPlugin.d.ts +31 -0
- package/dist/atf/TestPlugin.js +95 -0
- package/dist/atf/TestPlugin.js.map +1 -0
- package/dist/atf/index.d.ts +1 -0
- package/dist/atf/index.js +9 -0
- package/dist/atf/index.js.map +1 -0
- package/dist/db/ColumnPlugins.d.ts +278 -0
- package/dist/db/ColumnPlugins.js +112 -0
- package/dist/db/ColumnPlugins.js.map +1 -0
- package/dist/db/RecordPlugin.d.ts +208 -0
- package/dist/db/RecordPlugin.js +287 -0
- package/dist/db/RecordPlugin.js.map +1 -0
- package/dist/db/TablePlugin.d.ts +742 -0
- package/dist/db/TablePlugin.js +1249 -0
- package/dist/db/TablePlugin.js.map +1 -0
- package/dist/db/index.d.ts +3 -0
- package/dist/db/index.js +27 -0
- package/dist/db/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.d.ts +12 -0
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.js +371 -0
- package/dist/scriptedRESTAPI/RESTDeserializationUtils.js.map +1 -0
- package/dist/scriptedRESTAPI/RESTSerializationUtils.d.ts +15 -0
- package/dist/scriptedRESTAPI/RESTSerializationUtils.js +177 -0
- package/dist/scriptedRESTAPI/RESTSerializationUtils.js.map +1 -0
- package/dist/scriptedRESTAPI/RestApiPlugin.d.ts +144 -0
- package/dist/scriptedRESTAPI/RestApiPlugin.js +318 -0
- package/dist/scriptedRESTAPI/RestApiPlugin.js.map +1 -0
- package/dist/scriptedRESTAPI/RestSchemaUtils.d.ts +190 -0
- package/dist/scriptedRESTAPI/RestSchemaUtils.js +53 -0
- package/dist/scriptedRESTAPI/RestSchemaUtils.js.map +1 -0
- package/dist/scriptedRESTAPI/RestUtils.d.ts +75 -0
- package/dist/scriptedRESTAPI/RestUtils.js +469 -0
- package/dist/scriptedRESTAPI/RestUtils.js.map +1 -0
- package/dist/scripts/ClientScriptPlugin.d.ts +43 -0
- package/dist/scripts/ClientScriptPlugin.js +190 -0
- package/dist/scripts/ClientScriptPlugin.js.map +1 -0
- package/dist/scripts/scriptUtils.d.ts +15 -0
- package/dist/scripts/scriptUtils.js +83 -0
- package/dist/scripts/scriptUtils.js.map +1 -0
- package/dist/uxf/ExperiencePlugin.d.ts +22 -0
- package/dist/uxf/ExperiencePlugin.js +55 -0
- package/dist/uxf/ExperiencePlugin.js.map +1 -0
- package/dist/uxf/RoutesPlugin.d.ts +22 -0
- package/dist/uxf/RoutesPlugin.js +176 -0
- package/dist/uxf/RoutesPlugin.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/cleanUxValue.d.ts +4 -0
- package/dist/uxf/UxfFormulaParser/cleanUxValue.js +65 -0
- package/dist/uxf/UxfFormulaParser/cleanUxValue.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/api.d.ts +189 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/api.js +158 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/api.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.d.ts +13 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +604 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.d.ts +12 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js +551 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/grammarParser.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.d.ts +31 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +64 -0
- package/dist/uxf/UxfFormulaParser/grammerParser/spanHelpers.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/index.d.ts +3 -0
- package/dist/uxf/UxfFormulaParser/index.js +11 -0
- package/dist/uxf/UxfFormulaParser/index.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/parser.d.ts +8 -0
- package/dist/uxf/UxfFormulaParser/parser.js +87 -0
- package/dist/uxf/UxfFormulaParser/parser.js.map +1 -0
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.d.ts +8 -0
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js +17 -0
- package/dist/uxf/UxfFormulaParser/utils/getErrorMsg.js.map +1 -0
- package/dist/uxf/constants.d.ts +2 -0
- package/dist/uxf/constants.js +8 -0
- package/dist/uxf/constants.js.map +1 -0
- package/dist/uxf/index.d.ts +2 -0
- package/dist/uxf/index.js +11 -0
- package/dist/uxf/index.js.map +1 -0
- package/dist/uxf/tectonicIdGenerator.d.ts +12 -0
- package/dist/uxf/tectonicIdGenerator.js +102 -0
- package/dist/uxf/tectonicIdGenerator.js.map +1 -0
- package/license +9 -0
- package/package.json +42 -0
- package/src/AttachmentPlugin.ts +262 -0
- package/src/BusinessRulePlugin.ts +251 -0
- package/src/CrossScopePrivilegePlugin.ts +54 -0
- package/src/DefaultPlugin.ts +272 -0
- package/src/IdPlugin.ts +47 -0
- package/src/ListPlugin.ts +497 -0
- package/src/PropertyPlugin.ts +218 -0
- package/src/ScriptTemplatePlugin.ts +223 -0
- package/src/UserPreferencePlugin.ts +36 -0
- package/src/aclAndRole/AclPlugin.ts +410 -0
- package/src/aclAndRole/RolePlugin.ts +225 -0
- package/src/aclAndRole/Util.ts +104 -0
- package/src/app/ApplicationMenuPlugin.ts +158 -0
- package/src/atf/ATFComposer.ts +3356 -0
- package/src/atf/TestPlugin.ts +119 -0
- package/src/atf/index.ts +1 -0
- package/src/db/ColumnPlugins.ts +117 -0
- package/src/db/RecordPlugin.ts +391 -0
- package/src/db/TablePlugin.ts +1581 -0
- package/src/db/index.ts +3 -0
- package/src/index.ts +16 -0
- package/src/scriptedRESTAPI/RESTDeserializationUtils.ts +410 -0
- package/src/scriptedRESTAPI/RESTSerializationUtils.ts +227 -0
- package/src/scriptedRESTAPI/RestApiPlugin.ts +438 -0
- package/src/scriptedRESTAPI/RestSchemaUtils.ts +72 -0
- package/src/scriptedRESTAPI/RestUtils.ts +507 -0
- package/src/scripts/ClientScriptPlugin.ts +251 -0
- package/src/scripts/scriptUtils.ts +81 -0
- package/src/uxf/ExperiencePlugin.ts +64 -0
- package/src/uxf/RoutesPlugin.ts +215 -0
- package/src/uxf/UxfFormulaParser/cleanUxValue.ts +73 -0
- package/src/uxf/UxfFormulaParser/grammerParser/api.js +166 -0
- package/src/uxf/UxfFormulaParser/grammerParser/clientTransformMap.js +606 -0
- package/src/uxf/UxfFormulaParser/grammerParser/grammarParser.js +551 -0
- package/src/uxf/UxfFormulaParser/grammerParser/spanHelpers.js +65 -0
- package/src/uxf/UxfFormulaParser/index.ts +4 -0
- package/src/uxf/UxfFormulaParser/parser.ts +64 -0
- package/src/uxf/UxfFormulaParser/utils/getErrorMsg.ts +13 -0
- package/src/uxf/constants.ts +4 -0
- package/src/uxf/index.ts +2 -0
- package/src/uxf/tectonicIdGenerator.ts +81 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { isEqual } from 'lodash'
|
|
2
|
+
import * as ts from 'ts-morph'
|
|
3
|
+
import {
|
|
4
|
+
Document,
|
|
5
|
+
Context,
|
|
6
|
+
getNodeId,
|
|
7
|
+
getOrCreatePropertyAssignment,
|
|
8
|
+
ArrayIterator,
|
|
9
|
+
stringify,
|
|
10
|
+
} from '@servicenow/sdk-build-core'
|
|
11
|
+
|
|
12
|
+
const getElementKey = (element: ts.Expression) => {
|
|
13
|
+
if (element.isKind(ts.SyntaxKind.StringLiteral)) {
|
|
14
|
+
return element.getLiteralValue()
|
|
15
|
+
}
|
|
16
|
+
const varDec = (element.getSymbol()?.getValueDeclaration() ??
|
|
17
|
+
element.getSymbol()?.getAliasedSymbol()?.getValueDeclaration()) as ts.VariableDeclaration
|
|
18
|
+
return varDec
|
|
19
|
+
? getNodeId(
|
|
20
|
+
varDec.getInitializerIfKind(ts.SyntaxKind.CallExpression)?.getArguments()[0] as ts.ObjectLiteralExpression
|
|
21
|
+
)!
|
|
22
|
+
: ''
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function addObjectToArrayById(document: Document, name: string, roleId: string, context: Context) {
|
|
26
|
+
const arg = document.node?.asKind(ts.SyntaxKind.CallExpression)?.getArguments()[0] as ts.ObjectLiteralExpression
|
|
27
|
+
const table = document.data!['table']
|
|
28
|
+
const argId = getNodeId(arg)
|
|
29
|
+
const propertyAssignment = getOrCreatePropertyAssignment(arg, name, '[]')
|
|
30
|
+
|
|
31
|
+
let handled = false
|
|
32
|
+
const rolesIterator = new ArrayIterator(propertyAssignment)
|
|
33
|
+
const primaryKey = table === 'sys_security_acl_role' ? 'sys_security_acl' : 'role'
|
|
34
|
+
const secondKey = table === 'sys_security_acl_role' ? 'sys_user_role' : 'contains'
|
|
35
|
+
while (rolesIterator.hasNext()) {
|
|
36
|
+
const element = rolesIterator.next()
|
|
37
|
+
const secKey = getElementKey(element)
|
|
38
|
+
|
|
39
|
+
const foundIdx = context.keys.composite.findIndex((k) =>
|
|
40
|
+
isEqual(k.key, {
|
|
41
|
+
[primaryKey]: argId,
|
|
42
|
+
[secondKey]: secKey,
|
|
43
|
+
})
|
|
44
|
+
)
|
|
45
|
+
if (foundIdx !== -1 && context.keys.composite[foundIdx]?.id === document.guid) {
|
|
46
|
+
if (context.keys.explicit[secKey]?.id === roleId || secKey === roleId) {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
element?.replaceWithText(stringify(roleId))
|
|
50
|
+
context.keys.composite.splice(foundIdx, 1)
|
|
51
|
+
handled = true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!handled) {
|
|
56
|
+
const stringValue = stringify(roleId)
|
|
57
|
+
rolesIterator.getExpression().addElement(stringValue)
|
|
58
|
+
}
|
|
59
|
+
context.keys.registerCompositeId(
|
|
60
|
+
table,
|
|
61
|
+
{
|
|
62
|
+
[primaryKey]: argId!,
|
|
63
|
+
[secondKey]: roleId,
|
|
64
|
+
},
|
|
65
|
+
document.guid
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function removeObjectFromArrayById(document: Document, name: string, context: Context) {
|
|
70
|
+
const arg = document.node?.asKind(ts.SyntaxKind.CallExpression)?.getArguments()[0] as ts.ObjectLiteralExpression
|
|
71
|
+
const table = document.data!['table']
|
|
72
|
+
const argId = getNodeId(arg)
|
|
73
|
+
const property = arg.getProperty(name)
|
|
74
|
+
if (!property) {
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const propertyAssignment = property.asKind(ts.ts.SyntaxKind.PropertyAssignment)
|
|
79
|
+
if (!propertyAssignment) {
|
|
80
|
+
return
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const rolesIterator = new ArrayIterator(propertyAssignment)
|
|
84
|
+
while (rolesIterator.hasNext()) {
|
|
85
|
+
const element = rolesIterator.next()
|
|
86
|
+
const secKey = getElementKey(element)
|
|
87
|
+
const primaryKey = table === 'sys_security_acl_role' ? 'sys_security_acl' : 'role'
|
|
88
|
+
const secondKey = table === 'sys_security_acl_role' ? 'sys_user_role' : 'contains'
|
|
89
|
+
const foundIdx = context.keys.composite.findIndex((k) =>
|
|
90
|
+
isEqual(k.key, {
|
|
91
|
+
[primaryKey]: argId,
|
|
92
|
+
[secondKey]: secKey,
|
|
93
|
+
})
|
|
94
|
+
)
|
|
95
|
+
if (foundIdx !== -1 && context.keys.composite[foundIdx]?.id === document.guid) {
|
|
96
|
+
rolesIterator.getExpression().removeElement(element)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if (!element.wasForgotten() && element.asKind(ts.SyntaxKind.Identifier) && !element.getSymbol()) {
|
|
100
|
+
//remove if the identifier doesn't have symbol, happens when the identifier declaration is removed prior to this
|
|
101
|
+
rolesIterator.getExpression().removeElement(element)
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
import { Node, SyntaxKind } from 'ts-morph'
|
|
3
|
+
import { ApplicationMenu, ApplicationMenuSchema, getRolesString, getRolesArray } from '@servicenow/sdk-core/runtime/app'
|
|
4
|
+
import {
|
|
5
|
+
Plugin,
|
|
6
|
+
extractCallExpression,
|
|
7
|
+
generateCallExpressionExportForDocument,
|
|
8
|
+
getSysUpdateName,
|
|
9
|
+
getCallExpressionName,
|
|
10
|
+
getOrCreateEntitySourceFile,
|
|
11
|
+
linkDocument,
|
|
12
|
+
removeNode,
|
|
13
|
+
transformFunctionArguments,
|
|
14
|
+
writeArrayPropertyAsReference,
|
|
15
|
+
writePropertyAsReference,
|
|
16
|
+
EntityData,
|
|
17
|
+
ObjectData,
|
|
18
|
+
} from '@servicenow/sdk-build-core'
|
|
19
|
+
import { RecordPlugin } from '../db/RecordPlugin'
|
|
20
|
+
import { Record } from '@servicenow/sdk-core/runtime/db'
|
|
21
|
+
import { Diagnostic } from '@servicenow/sdk-project'
|
|
22
|
+
|
|
23
|
+
type AppMenuDocumentSchema = z.output<typeof AppMenuDocumentSchema>
|
|
24
|
+
|
|
25
|
+
const AppMenuDocumentSchema = z.object({
|
|
26
|
+
table: z.literal('sys_app_application'),
|
|
27
|
+
data: ApplicationMenuSchema.omit({ roles: true, category: true, $id: true }).extend({
|
|
28
|
+
roles: z.string().optional(),
|
|
29
|
+
category: z.string().optional(),
|
|
30
|
+
device_type: z.string().optional(),
|
|
31
|
+
view_name: z.string().optional(),
|
|
32
|
+
}),
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
const AppMenuDocumentTransformer = AppMenuDocumentSchema.transform(
|
|
36
|
+
({ data: data }): Partial<typeof ApplicationMenuSchema> => {
|
|
37
|
+
const { roles, category, device_type, view_name, ...rest } = data
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
...rest,
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
export default Plugin({
|
|
46
|
+
name: 'ApplicationMenu',
|
|
47
|
+
ownedTables: {
|
|
48
|
+
sys_app_application: { diagnosticLevel: Diagnostic.Level.Warn },
|
|
49
|
+
},
|
|
50
|
+
extractors: {
|
|
51
|
+
entity: {
|
|
52
|
+
CallExpression: (node, context) =>
|
|
53
|
+
extractCallExpression(ApplicationMenu, 'appMenu', node, context, (menu) =>
|
|
54
|
+
context.registerExplicitId('sys_app_application', menu.$id as string)
|
|
55
|
+
),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
composers: {
|
|
59
|
+
entity: {
|
|
60
|
+
appMenu(entity, context) {
|
|
61
|
+
const appMenuData = ApplicationMenuSchema.safeParse(entity.getValue())
|
|
62
|
+
if (!appMenuData.success) {
|
|
63
|
+
return undefined
|
|
64
|
+
}
|
|
65
|
+
const { $id, roles, category, ...props } = appMenuData.data
|
|
66
|
+
const rolesString = roles ? getRolesString(roles) : ''
|
|
67
|
+
|
|
68
|
+
const recordEntity = Record({
|
|
69
|
+
$id,
|
|
70
|
+
table: 'sys_app_application',
|
|
71
|
+
data: {
|
|
72
|
+
...props,
|
|
73
|
+
roles: rolesString,
|
|
74
|
+
category: (category as string) ?? '',
|
|
75
|
+
device_type: 'browser',
|
|
76
|
+
view_name: '',
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
return context.composeEntities(
|
|
80
|
+
[
|
|
81
|
+
new EntityData(
|
|
82
|
+
'record',
|
|
83
|
+
entity.getGuid(),
|
|
84
|
+
ObjectData.fromObjectValue(recordEntity, entity.getNode()),
|
|
85
|
+
entity.getNode()
|
|
86
|
+
),
|
|
87
|
+
],
|
|
88
|
+
[RecordPlugin]
|
|
89
|
+
)
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
generators: {
|
|
95
|
+
record(document, context) {
|
|
96
|
+
if (!AppMenuDocumentSchema.safeParse(document.data).success) {
|
|
97
|
+
return undefined
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return linkDocument(
|
|
101
|
+
document,
|
|
102
|
+
generateCallExpressionExportForDocument(
|
|
103
|
+
context,
|
|
104
|
+
{
|
|
105
|
+
sourceFile: getOrCreateEntitySourceFile(
|
|
106
|
+
context,
|
|
107
|
+
getSysUpdateName(document, 'sys_app_application')
|
|
108
|
+
),
|
|
109
|
+
moduleSpecifier: '@servicenow/sdk/core',
|
|
110
|
+
},
|
|
111
|
+
ApplicationMenu,
|
|
112
|
+
{ $id: document.guid }
|
|
113
|
+
).getExpressionIfKindOrThrow(SyntaxKind.CallExpression)
|
|
114
|
+
)
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
transformers: {
|
|
118
|
+
record: {
|
|
119
|
+
CallExpression(document) {
|
|
120
|
+
if (getCallExpressionName(document.node) !== ApplicationMenu.name) {
|
|
121
|
+
return false
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (document.action === 'DELETE') {
|
|
125
|
+
removeNode(document.node)
|
|
126
|
+
return true
|
|
127
|
+
}
|
|
128
|
+
if (!document.changedData) {
|
|
129
|
+
return false
|
|
130
|
+
}
|
|
131
|
+
const menu = AppMenuDocumentTransformer.safeParse(document.data)
|
|
132
|
+
if (!menu.success) {
|
|
133
|
+
return false
|
|
134
|
+
}
|
|
135
|
+
const { roles, category } = (document.xmlData as AppMenuDocumentSchema).data
|
|
136
|
+
const [args] = document.node.getArguments()
|
|
137
|
+
if (!Node.isObjectLiteralExpression(args)) {
|
|
138
|
+
return false
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (roles) {
|
|
142
|
+
writeArrayPropertyAsReference(args, 'roles', '[]', getRolesArray(roles))
|
|
143
|
+
}
|
|
144
|
+
if (category) {
|
|
145
|
+
writePropertyAsReference(args, 'category', '{}', category)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const {
|
|
149
|
+
roles: _roles,
|
|
150
|
+
category: _category,
|
|
151
|
+
device_type: _device_type,
|
|
152
|
+
...data
|
|
153
|
+
} = (AppMenuDocumentSchema.deepPartial().parse(document.changedData) as AppMenuDocumentSchema).data
|
|
154
|
+
return transformFunctionArguments(document.node, ApplicationMenu, data as any)
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
})
|