Mutation API Methods for locally mutating the token tree.
You access each of the mutation methods over:
Copy sdtfEngine .mutation.[method]
addToken
Add a new token to the token tree.
Copy function addToken (param : {
parentPath : Array < string > ,
name : string ,
tokenProperties : {
$type : string ;
$value : unknown ;
$description ?: string ;
$extensions ?: Record < string , unknown >;
} ,
}) : void ;
renameToken
Rename a token.
Copy function renameToken (param : { atPath : Array < string >; name : string }) : void ;
updateTokenDescription
Update the description of a token.
Copy function updateTokenDescription (param : {
atPath : Array < string >;
description : string ;
}) : void ;
updateTokenExtensions
Update the extensions of a token.
Copy function updateTokenExtensions (param : {
atPath : Array < string >;
extensions : treeNodeExtensionsSchema ;
}) : void ;
updateTokenValue
Update the value of a token.
Copy function updateTokenValue (param : {
atPath : Array < string > ,
// We cannot know with type of the value since no type is enforced
value : unknown ,
}) : void ;
updateTokenModeValue
Update the value of a token for a given mode.
Copy function updateTokenModeValue (param : {
mode : string ,
// We cannot know with type of the value since no type is enforced
value : unknown ,
}) : void ;
renameTokenMode
Rename a token mode.
Copy function renameTokenMode (param : {
atPath : Array < string >;
fromMode : string ;
toMode : string ;
}) : void ;
createTokenModeValue
Create a new token mode value.
Copy function createTokenModeValue (param : {
atPath : Array < string > ,
mode : string ,
// We cannot know with type of the value since no type is enforced
value : unknown ,
}) : void ;
deleteTokenModeValue
Delete a token mode value.
Copy function deleteTokenModeValue (param : {
atPath : Array < string >;
mode : string ;
}) : void ;
deleteToken
Delete a token.
Copy function deleteToken (param : { atPath : Array < string > }) : void ;
moveToken
Move a token.
Copy function moveToken (param : {
atPath : Array < string >;
toPath : Array < string >;
}) : void ;
addCollection
Add a new collection to the token tree.
Copy function addCollection (param : {
parentPath : Array < string >;
name : string ;
collectionProperties : {
$collection : {$modes : Array < string >};
$description ?: string ;
$extensions ?: Record < string , unknown >;
};
}) : void ;
renameCollection
Rename a collection.
Copy function renameCollection (param : {
atPath : Array < string >;
name : string ;
}) : void ;
updateCollectionDescription
Update the description of a collection.
Copy function updateCollectionDescription (param : {
atPath : Array < string >;
description : string ;
}) : void ;
updateCollectionExtensions
Update the extensions of a collection.
Copy function updateCollectionExtensions (param : {
atPath : Array < string >;
extensions : treeNodeExtensionsSchema ;
}) : void ;
renameCollectionMode
Rename a collection mode.
Copy function renameCollectionMode (param : {
atPath : Array < string >;
fromMode : string ;
toMode : string ;
}) : void ;
truncateCollection
Truncate a collection.
Copy function truncateCollection (param : { atPath : Array < string > }) : void ;
deleteCollection
Delete a collection.
Copy function deleteCollection (param : { atPath : Array < string > }) : void ;
deleteCollectionMode
Delete a collection mode.
Copy function deleteCollectionMode (param : {
atPath : Array < string >;
mode : string ;
}) : void ;
moveCollection
Move a collection.
Copy function moveCollection (param : {
atPath : Array < string >;
toPath : Array < string >;
}) : void ;
addGroup
Add a new group to the token tree.
Copy function addGroup (param : {
parentPath : Array < string >;
name : string ;
groupProperties : specifyGroupPropertiesSchema ;
}) : void ;
renameGroup
Rename a group.
Copy function renameGroup (param : { atPath : Array < string >; name : string }) : void ;
updateGroupDescription
Update the description of a group.
Copy function updateGroupDescription (param : {
atPath : Array < string >;
description : string ;
}) : void ;
updateGroupExtensions
Update the extensions of a group.
Copy function updateGroupExtensions (param : {
atPath : Array < string >;
extensions : treeNodeExtensionsSchema ;
}) : void ;
truncateGroup
Truncate a group.
Copy function truncateGroup (param : { atPath : Array < string > }) : void ;
deleteGroup
Delete a group.
Copy function deleteGroup (param : { atPath : Array < string > }) : void ;
moveGroup
Move a group.
Copy function moveGroup (param : {
atPath : Array < string >;
toPath : Array < string >;
}) : void ;
Last updated 8 months ago