Skip to content

Commit

Permalink
feat: change interfaces to types for quickinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sprutton1 committed Oct 10, 2023
1 parent ccfc9fe commit 3a97aae
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions lib/sdf-server/src/server/service/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,32 +590,32 @@ pub fn compile_return_types(ty: FuncBackendResponseType, kind: FuncBackendKind)
FuncBackendResponseType::String => "type Output = string | null;",
FuncBackendResponseType::Integer => "type Output = number | null;",
FuncBackendResponseType::Qualification => {
"interface Output {
"type Output {
result: 'success' | 'warning' | 'failure';
message?: string | null;
}"
}
FuncBackendResponseType::CodeGeneration => {
"interface Output {
"type Output {
format: string;
code: string;
}"
}
FuncBackendResponseType::Validation => {
"interface Output {
"type Output {
valid: boolean;
message: string;
}"
}
FuncBackendResponseType::Reconciliation => {
"interface Output {
"type Output {
updates: { [key: string]: unknown };
actions: string[];
message: string | null;
}"
}
FuncBackendResponseType::Action => {
"interface Output {
"type Output {
status: 'ok' | 'warning' | 'error';
payload?: { [key: string]: unknown } | null;
message?: string | null;
Expand Down Expand Up @@ -651,32 +651,32 @@ pub fn compile_return_types_2(ty: FuncBackendResponseType, kind: FuncBackendKind
FuncBackendResponseType::String => "type Output = string | null;",
FuncBackendResponseType::Integer => "type Output = number | null;",
FuncBackendResponseType::Qualification => {
"interface Output {
"type Output {
result: 'success' | 'warning' | 'failure';
message?: string | null;
}"
}
FuncBackendResponseType::CodeGeneration => {
"interface Output {
"type Output {
format: string;
code: string;
}"
}
FuncBackendResponseType::Validation => {
"interface Output {
"type Output {
valid: boolean;
message: string;
}"
}
FuncBackendResponseType::Reconciliation => {
"interface Output {
"type Output {
updates: { [key: string]: unknown };
actions: string[];
message: string | null;
}"
}
FuncBackendResponseType::Action => {
"interface Output {
"type Output {
status: 'ok' | 'warning' | 'error';
payload?: { [key: string]: unknown } | null;
message?: string | null;
Expand Down Expand Up @@ -855,7 +855,7 @@ async fn compile_action_types(
}

Ok(format!(
"interface Input {{
"type Input {{
kind: 'standard';
properties: {};
}}",
Expand Down

0 comments on commit 3a97aae

Please sign in to comment.