reactive_graph/client/types/components/
commands.rs1use crate::client::types::components::args::add_extension::ComponentAddExtensionArgs;
2use crate::client::types::components::args::add_property::ComponentAddPropertyArgs;
3use crate::client::types::components::args::component_extension_type::ComponentExtensionTypeIdArgs;
4use crate::client::types::components::args::component_property::ComponentPropertyArgs;
5use crate::client::types::components::args::create::CreateComponentArgs;
6use crate::client::types::components::args::parse_component_ty;
7use crate::client::types::components::args::update_description::ComponentUpdateDescriptionArgs;
8use clap::Subcommand;
9use reactive_graph_graph::ComponentTypeId;
10
11#[derive(Subcommand, Debug, Clone)]
12pub(crate) enum ComponentsCommands {
13 #[non_exhaustive]
15 List,
16 #[non_exhaustive]
18 Get {
19 #[arg(name = "component", value_parser = parse_component_ty)]
20 component_ty: ComponentTypeId,
21 },
22 #[non_exhaustive]
24 ListProperties {
25 #[arg(name = "component", value_parser = parse_component_ty)]
26 component_ty: ComponentTypeId,
27 },
28 #[non_exhaustive]
30 ListExtensions {
31 #[arg(name = "component", value_parser = parse_component_ty)]
32 component_ty: ComponentTypeId,
33 },
34 #[non_exhaustive]
36 GetJsonSchema {
37 #[arg(name = "component", value_parser = parse_component_ty)]
38 component_ty: ComponentTypeId,
39 },
40 #[non_exhaustive]
42 Create(CreateComponentArgs),
43 #[non_exhaustive]
45 Delete {
46 #[arg(name = "component", value_parser = parse_component_ty)]
47 component_ty: ComponentTypeId,
48 },
49 #[non_exhaustive]
51 AddProperty(ComponentAddPropertyArgs),
52 #[non_exhaustive]
54 RemoveProperty(ComponentPropertyArgs),
55 #[non_exhaustive]
57 AddExtension(ComponentAddExtensionArgs),
58 #[non_exhaustive]
60 RemoveExtension(ComponentExtensionTypeIdArgs),
61 #[non_exhaustive]
63 UpdateDescription(ComponentUpdateDescriptionArgs),
64 #[non_exhaustive]
66 JsonSchema,
67}