-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(commands): add command and command handler types
- Loading branch information
1 parent
5259277
commit 18c6abc
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/default-packages/unigraph.core/schemas/command.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"dgraph.type": "Type", | ||
"_name": "Command", | ||
"_icon": "%3Csvg xmlns='http://www.w3.org/2000/svg' style='width:24px;height:24px' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74c-3.6-.76-3.54-.75-3.67-.75-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z' /%3E%3C/svg%3E", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/composer/Object" }, | ||
"_parameters": { | ||
"_indexedBy": { "unigraph.id": "$/primitive/string" } | ||
}, | ||
"_properties": [ | ||
{ | ||
"_key": "name", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/primitive/string" } | ||
}, | ||
"_indexAs": "name" | ||
}, | ||
{ | ||
"_key": "icon", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/schema/icon_url" } | ||
} | ||
} | ||
] | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
packages/default-packages/unigraph.core/schemas/command_handler.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"dgraph.type": "Type", | ||
"_name": "Command Handler", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/composer/Object" }, | ||
"_parameters": { | ||
"_indexedBy": { "unigraph.id": "$/primitive/string" } | ||
}, | ||
"_properties": [ | ||
{ | ||
"_key": "command", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/schema/command" } | ||
} | ||
}, | ||
{ | ||
"_key": "condition", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/schema/executable" } | ||
} | ||
}, | ||
{ | ||
"_key": "action", | ||
"_definition": { | ||
"type": { "unigraph.id": "$/schema/executable" } | ||
} | ||
} | ||
] | ||
} | ||
} |