Add aliases field to template functions

This commit is contained in:
Gregory Schier
2024-09-30 18:28:52 -07:00
parent 9915c57817
commit 6060ddcd87
10 changed files with 44 additions and 145 deletions

View File

@@ -73,7 +73,7 @@ export type SendHttpRequestResponse = { httpResponse: HttpResponse, };
export type ShowToastRequest = { message: string, color?: Color | null, icon?: Icon | null, };
export type TemplateFunction = { name: string, args: Array<TemplateFunctionArg>, };
export type TemplateFunction = { name: string, aliases: Array<string>, args: Array<TemplateFunctionArg>, };
export type TemplateFunctionArg = { "type": "text" } & TemplateFunctionTextArg | { "type": "select" } & TemplateFunctionSelectArg | { "type": "checkbox" } & TemplateFunctionCheckboxArg | { "type": "http_request" } & TemplateFunctionHttpRequestArg;

View File

@@ -250,6 +250,7 @@ pub struct GetTemplateFunctionsResponse {
#[ts(export, export_to = "events.ts")]
pub struct TemplateFunction {
pub name: String,
pub aliases: Vec<String>,
pub args: Vec<TemplateFunctionArg>,
}