From 101828437d9d94ba1969ee4551d4e7fb6624aba8 Mon Sep 17 00:00:00 2001 From: Mark McCulloh Date: Sun, 26 May 2024 15:50:08 -0400 Subject: [PATCH] fix: language server hover/completions are too verbose (#6562) The LSP currently shows a lot of information at once. This can be useful when you want to reference information, but it is way too overwhelming to see it everywhere all the time. The general goal of this PR was to improve the overwhelming nature of the provided information and fix some other bugs along the way. - Types are now rendered entirely in a highlighted code block (no more markdown headers for members) - Typeclasses are limited to showing 6 members at once - Less depth of information is shown in general - This along with some other tweaks fixes #4853 - Typeclass members are sorted by more factors - members inherited from `constructs.Construct` (and related primitives) are hidden in completions (no more `node` and `toString` showing up everwhere) - If a typeclass is empty the completion/hover will say so - Fixes #5575 - Links in markdown that look like `{@link URL LABEL}` are now rendered as regular markdown links (Common in cdktf provider libs) - Struct expansion completions are fixed in multiple places - Notably, if you start typing a struct field you'll see relevant completions. Previously the completions only showed correctly if you triggered completions with before attempting to type anything. Fixes #4983 ## Before (cursor kept in the middle to make it look even worse) https://github.com/winglang/wing/assets/1237390/c13c6680-ec78-4cb0-a7cc-601dc6462b9e image ## After https://github.com/winglang/wing/assets/1237390/befca5be-18fd-4111-8e9b-2fd1cf6e1f34 image image --- libs/wingc/src/ast.rs | 4 + libs/wingc/src/diagnostic.rs | 4 + libs/wingc/src/docs.rs | 461 +++++++++++------- libs/wingc/src/lsp/completions.rs | 102 +++- libs/wingc/src/lsp/signature.rs | 32 +- .../completions/call_struct_expansion.snap | 11 +- .../call_struct_expansion_partial.snap | 11 +- .../call_struct_expansion_partial_text.snap | 13 + .../completions/capture_in_test.snap | 37 +- .../dot_before_returning_struct.snap | 3 - .../src/lsp/snapshots/completions/empty.snap | 10 +- .../forin_before_return_type_ref.snap | 13 - .../hide_parent_symbols_defined_later.snap | 14 +- .../snapshots/completions/hide_private.snap | 29 +- .../if_before_return_type_ref.snap | 13 - .../completions/incomplete_if_statement.snap | 22 +- .../incomplete_inflight_namespace.snap | 190 ++++---- .../completions/json_literal_cast_inner.snap | 3 - .../snapshots/completions/json_statics.snap | 18 +- .../completions/mut_json_methods.snap | 28 +- .../completions/namespace_inflight.snap | 32 +- .../completions/namespace_middle_dot.snap | 190 ++++---- .../nested_json_literal_cast_inner.snap | 3 - .../completions/nested_struct_literal.snap | 3 - .../completions/new_expression_nested.snap | 26 +- .../only_show_symbols_in_scope.snap | 9 +- .../completions/optional_chaining.snap | 22 +- .../completions/optional_chaining_auto.snap | 22 +- .../completions/parentheses_expression.snap | 22 +- .../completions/partial_reference_2.snap | 3 - .../completions/partial_reference_3.snap | 3 - .../completions/partial_reference_call.snap | 28 +- .../completions/partial_type_reference.snap | 39 -- .../partial_type_reference_annotation.snap | 190 ++++---- .../snapshots/completions/show_private.snap | 30 -- .../static_completions_after_expression.snap | 18 +- .../static_json_after_expression.snap | 18 +- ...tatic_json_after_expression_statement.snap | 18 +- .../completions/static_method_call.snap | 39 -- .../struct_arg_expansion_partial.snap | 137 ++++++ .../struct_completion_in_test.snap | 3 - .../completions/struct_definition_types.snap | 2 +- .../completions/struct_literal_all.snap | 6 - .../struct_literal_empty_nospace.snap | 3 - .../completions/struct_literal_unused.snap | 3 - .../completions/struct_literal_value.snap | 8 +- .../completions/struct_show_values.snap | 11 +- .../snapshots/completions/struct_static.snap | 10 +- .../type_annotation_shows_struct.snap | 2 +- .../completions/util_static_methods.snap | 50 +- .../variable_type_annotation_namespace.snap | 190 ++++---- .../snapshots/hovers/builtin_in_inflight.snap | 2 +- .../hovers/builtin_in_preflight.snap | 2 +- .../hovers/builtin_instance_method.snap | 2 +- .../src/lsp/snapshots/hovers/class_doc.snap | 2 +- ...class_doc_with_multiline_and_markdown.snap | 2 +- .../snapshots/hovers/class_method_doc.snap | 2 +- .../lsp/snapshots/hovers/class_property.snap | 2 +- .../lsp/snapshots/hovers/class_symbol.snap | 2 +- .../hovers/class_symbol_in_closure.snap | 2 +- .../src/lsp/snapshots/hovers/ctor_doc.snap | 2 +- .../hovers/ctor_doc_from_new_expr.snap | 2 +- .../src/lsp/snapshots/hovers/enum_doc.snap | 2 +- .../snapshots/hovers/enum_variant_doc.snap | 2 +- .../hovers/ignoe_empty_lines_in_doc.snap | 2 +- .../snapshots/hovers/inflight_ctor_doc.snap | 2 +- .../inflight_ctor_doc_from_new_expr.snap | 2 +- .../lsp/snapshots/hovers/inflight_init.snap | 2 +- .../inherited_interface_method_doc.snap | 2 +- .../snapshots/hovers/inside_class_field.snap | 2 +- .../lsp/snapshots/hovers/interface_doc.snap | 2 +- .../hovers/interface_method_doc.snap | 2 +- .../multipart_reference_hover_middle.snap | 2 +- .../lsp/snapshots/hovers/new_statement.snap | 2 +- .../lsp/snapshots/hovers/static_method.snap | 2 +- .../snapshots/hovers/static_method_root.snap | 2 +- .../hovers/static_stdtype_method.snap | 2 +- .../src/lsp/snapshots/hovers/struct_doc.snap | 2 +- .../hovers/user_defined_type_annotation.snap | 2 +- .../user_defined_type_reference_property.snap | 2 +- .../user_defined_type_reference_type.snap | 2 +- .../snapshots/hovers/user_defined_types.snap | 2 +- .../lsp/snapshots/hovers/variadic_args.snap | 2 +- .../lsp/snapshots/signature/class_super.snap | 2 +- .../snapshots/signature/constructor_arg.snap | 4 +- .../signature/inflight_class_super.snap | 2 +- .../snapshots/signature/named_arg_active.snap | 7 +- .../signature/nested_class_calls.snap | 7 +- .../signature/second_arg_active.snap | 2 +- 89 files changed, 1196 insertions(+), 1050 deletions(-) create mode 100644 libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial_text.snap create mode 100644 libs/wingc/src/lsp/snapshots/completions/struct_arg_expansion_partial.snap diff --git a/libs/wingc/src/ast.rs b/libs/wingc/src/ast.rs index d4d65fc4627..4c4886c324e 100644 --- a/libs/wingc/src/ast.rs +++ b/libs/wingc/src/ast.rs @@ -596,6 +596,10 @@ impl Display for IntrinsicKind { } impl Documented for IntrinsicKind { + fn docs(&self) -> Option<&crate::docs::Docs> { + None + } + fn render_docs(&self) -> String { match self { IntrinsicKind::Dirname => r#"Get the normalized absolute path of the current source file's directory. diff --git a/libs/wingc/src/diagnostic.rs b/libs/wingc/src/diagnostic.rs index 6071a323cd7..93215187469 100644 --- a/libs/wingc/src/diagnostic.rs +++ b/libs/wingc/src/diagnostic.rs @@ -237,6 +237,10 @@ impl WingSpan { } } + pub fn byte_size(&self) -> usize { + self.end_offset - self.start_offset + } + /// Checks if this span is the default span. This means the span is covers nothing by ending at (0,0). pub fn is_default(&self) -> bool { self.end == WingLocation::default() diff --git a/libs/wingc/src/docs.rs b/libs/wingc/src/docs.rs index 5953536cfa9..8b27d2f4379 100644 --- a/libs/wingc/src/docs.rs +++ b/libs/wingc/src/docs.rs @@ -1,21 +1,19 @@ -use std::collections::BTreeMap; +use std::{collections::BTreeMap, sync::OnceLock}; use itertools::Itertools; +use regex::Regex; use crate::{ - ast::{AccessModifier, Phase, Symbol}, + ast::{AccessModifier, Phase}, closure_transform::CLOSURE_CLASS_PREFIX, jsify::codemaker::CodeMaker, type_check::{ - jsii_importer::is_construct_base, Class, ClassLike, Enum, FunctionSignature, Interface, Namespace, Struct, - SymbolKind, Type, TypeRef, VariableInfo, VariableKind, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, + jsii_importer::is_construct_base, symbol_env::SymbolEnvKind, Class, ClassLike, Enum, FunctionSignature, Interface, + Namespace, Struct, SymbolKind, Type, TypeRef, VariableInfo, VariableKind, CLASS_INFLIGHT_INIT_NAME, + CLASS_INIT_NAME, }, }; -const FIELD_HEADER: &'static str = "### Fields"; -const METHOD_HEADER: &'static str = "### Methods"; -const PARAMETER_HEADER: &'static str = "### Parameters"; - #[derive(Debug, Default, Clone)] pub struct Docs { pub summary: Option, @@ -35,10 +33,20 @@ pub struct Docs { } pub trait Documented { + fn docs(&self) -> Option<&Docs>; fn render_docs(&self) -> String; } impl Docs { + pub fn render(&self) -> String { + let mut markdown = CodeMaker::default(); + + render_summary(&mut markdown, self); + render_docs(&mut markdown, self); + + markdown.to_string().trim().to_string() + } + pub(crate) fn with_summary(summary: &str) -> Docs { Docs { summary: Some(summary.to_string()), @@ -49,11 +57,10 @@ impl Docs { pub fn as_jsdoc_comment(&self) -> Option { let mut markdown = CodeMaker::default(); let mut has_data = false; - markdown.line("/** "); - if let Some(s) = &self.summary { + if let Some(_) = &self.summary { has_data = true; - markdown.append(s); + render_summary(&mut markdown, self); } if let Some(s) = &self.remarks { @@ -82,8 +89,7 @@ impl Docs { } if has_data { - markdown.append(" */"); - Some(markdown.to_string()) + Some(format!("/** {} */", markdown.to_string())) } else { None } @@ -91,9 +97,34 @@ impl Docs { } impl Documented for SymbolKind { + fn docs(&self) -> Option<&Docs> { + match self { + SymbolKind::Type(t) => t.docs(), + SymbolKind::Variable(v) => v.docs(), + SymbolKind::Namespace(n) => n.docs(), + } + } + fn render_docs(&self) -> String { match self { - SymbolKind::Type(t) => t.render_docs(), + SymbolKind::Type(t) => { + let mut markdown = CodeMaker::default(); + + markdown.line("```wing"); + markdown.line(t.render_docs()); + markdown.line("```"); + + if let Some(d) = t.docs() { + if d.summary.is_some() { + markdown.line("---"); + } + + render_summary(&mut markdown, d); + render_docs(&mut markdown, d); + } + + markdown.to_string().trim().to_string() + } SymbolKind::Variable(v) => v.render_docs(), SymbolKind::Namespace(n) => n.render_docs(), } @@ -104,10 +135,48 @@ impl Documented for Namespace { fn render_docs(&self) -> String { format!("Module `{}`", self.name).to_string() } + + fn docs(&self) -> Option<&Docs> { + None + } } impl Documented for TypeRef { + fn docs(&self) -> Option<&Docs> { + match &**self { + Type::Function(f) => Some(&f.docs), + Type::Class(c) => Some(&c.docs), + Type::Interface(i) => Some(&i.docs), + Type::Struct(s) => Some(&s.docs), + Type::Optional(t) => t.docs(), + Type::Enum(e) => Some(&e.docs), + + Type::Anything + | Type::Number + | Type::String + | Type::Duration + | Type::Boolean + | Type::Void + | Type::Json(_) + | Type::Stringable + | Type::MutJson + | Type::Nil + | Type::Inferred(_) + | Type::Unresolved + | Type::Array(_) + | Type::MutArray(_) + | Type::Map(_) + | Type::MutMap(_) + | Type::Set(_) + | Type::MutSet(_) => None, + } + } + fn render_docs(&self) -> String { + if let Some(sig) = self.as_deep_function_sig() { + return sig.render_docs(); + } + match &**self { Type::Function(f) => f.render_docs(), Type::Class(c) => render_class(c), @@ -140,6 +209,10 @@ impl Documented for TypeRef { } impl Documented for VariableInfo { + fn docs(&self) -> Option<&Docs> { + self.docs.as_ref() + } + fn render_docs(&self) -> String { let mut modifiers = vec![]; @@ -157,63 +230,97 @@ impl Documented for VariableInfo { modifiers.push("var"); } + let mut is_initializer = false; + let modifiers_str = modifiers.join(" "); let name_str = if modifiers.is_empty() { self.name.name.clone() } else { - format!("{} {}", modifiers_str, self.name) + if self.name.name == CLASS_INFLIGHT_INIT_NAME { + is_initializer = true; + "inflight new".to_string() + } else if self.name.name == CLASS_INIT_NAME { + is_initializer = true; + "new".to_string() + } else { + format!("{} {}", modifiers_str, self.name) + } }; let mut markdown = CodeMaker::default(); - markdown.line("```wing"); - markdown.line(format!("{name_str}: {}", self.type_)); - let type_docs = self.type_.render_docs(); + let mut docs = self.docs.as_ref().or_else(|| self.type_.docs()); - if !type_docs.is_empty() { - if type_docs.starts_with("```wing") { - // skip the first line to combine the code block - markdown.line(type_docs.lines().skip(1).join("\n")); + markdown.line("```wing"); + if let Some(sig) = self.type_.maybe_unwrap_option().as_function_sig() { + if is_initializer { + if let Some(d) = docs { + if d.summary.is_none() { + // Special case for constructors, just show the resulting type docs + docs = sig.return_type.docs(); + } + } + } + if matches!(self.kind, VariableKind::InstanceMember | VariableKind::StaticMember) { + markdown.line(format!("{name_str}({}): {}", render_args(sig), sig.return_type)); } else { - markdown.line("```"); - markdown.line("---"); - markdown.line(type_docs); + markdown.line(format!("{name_str}: {}", self.type_)); } + markdown.line("```"); } else { + markdown.line(format!("{name_str}: ")); + let type_docs = self.type_.render_docs(); + if !type_docs.is_empty() { + markdown.append(type_docs); + } else { + markdown.append(format!("{}", self.type_)) + } markdown.line("```"); + }; - if let Some(d) = &self.docs { + if let Some(d) = docs { + if d.summary.is_some() { markdown.line("---"); - - if let Some(summary) = &d.summary { - markdown.line(summary); - markdown.empty_line(); - } - - render_docs(&mut markdown, d); } + render_summary(&mut markdown, d); + render_docs(&mut markdown, d); } markdown.to_string().trim().to_string() } } +pub fn render_summary(markdown: &mut CodeMaker, docs: &Docs) { + if let Some(s) = &docs.summary { + markdown.line(fix_markdown_links(s)); + } +} + +pub fn fix_markdown_links(s: &str) -> String { + // Some JSII libraries use {@link URL LABEL} syntax for link, let's convert it to markdown syntax + static LINK_REGEX: OnceLock = OnceLock::new(); + LINK_REGEX + .get_or_init(|| Regex::new(r"\{@link (\S+) ([^\}]+)\}").unwrap()) + .replace_all(s, |caps: ®ex::Captures| format!("[{}]({})", &caps[2], &caps[1])) + .to_string() +} + fn render_docs(markdown: &mut CodeMaker, docs: &Docs) { if let Some(s) = &docs.returns { markdown.empty_line(); - markdown.line("### Returns"); - markdown.line(s); + markdown.line("#### Returns"); + markdown.line(fix_markdown_links(s)); } if let Some(s) = &docs.remarks { markdown.empty_line(); - markdown.line("### Remarks"); - markdown.line(s); + markdown.line("#### Remarks"); + markdown.line(fix_markdown_links(s)); } if let Some(s) = &docs.example { markdown.empty_line(); - markdown.line("### Example"); + markdown.line("#### Example"); // For now, the examples are all still in typescript markdown.line("```ts"); markdown.line(s); @@ -255,12 +362,11 @@ fn render_docs(markdown: &mut CodeMaker, docs: &Docs) { } } -fn render_signature_help(f: &FunctionSignature) -> String { - let mut markdown = CodeMaker::default(); +fn render_args(f: &FunctionSignature) -> String { + let mut args = vec![]; for (param_idx, param) in f.parameters.iter().enumerate() { let param_type = param.typeref; - let param_type_unwrapped = param.typeref.maybe_unwrap_option(); let is_last = param_idx == f.parameters.len() - 1; let param_name = if param.name.is_empty() { @@ -268,47 +374,27 @@ fn render_signature_help(f: &FunctionSignature) -> String { } else { param.name.clone() }; - let detail_text = if let Some(summary) = ¶m.docs.summary { - format!("— `{param_type}` — {summary}") - } else { - format!("— `{param_type}`") - }; - let is_last_struct = is_last && param_type_unwrapped.is_struct(); + let is_last_struct = is_last && param_type.maybe_unwrap_option().is_struct(); let prefix = if param.variadic || is_last_struct { "..." } else { "" }; - if !is_last_struct { - markdown.line(format!("- `{prefix}{param_name}` {detail_text}")); - } else { - markdown.line(format!("- `{prefix}{param_name}` {detail_text}")); - - let structy = param_type_unwrapped.as_struct().unwrap(); - let struct_text = render_classlike_members(structy); - - markdown.indent(); - markdown.line(struct_text.replace(FIELD_HEADER, "")); - markdown.unindent(); - } + args.push(format!("{prefix}{param_name}: {}", param.typeref)); } - markdown.to_string().trim().to_string() + args.join(", ") } impl Documented for FunctionSignature { - fn render_docs(&self) -> String { - let mut markdown = CodeMaker::default(); - - if let Some(s) = &self.docs.summary { - markdown.line(s); - } - - if self.parameters.len() > 0 { - markdown.line(PARAMETER_HEADER); - markdown.line(render_signature_help(self)); - } + fn docs(&self) -> Option<&Docs> { + Some(&self.docs) + } - render_docs(&mut markdown, &self.docs); + fn render_docs(&self) -> String { + let phase = match self.phase { + Phase::Inflight => "inflight ", + Phase::Preflight | Phase::Independent => "", + }; - markdown.to_string().trim().to_string() + format!("{phase}({}): {}", render_args(self), self.return_type) } } @@ -322,18 +408,12 @@ fn render_struct(s: &Struct) -> String { format!(" extends {}", extends) }; - markdown.line("```wing"); - markdown.line(format!("struct {}{extends}", s.name)); - markdown.line("```"); - markdown.line("---"); - - if let Some(s) = &s.docs.summary { - markdown.line(s); - } + markdown.empty_line(); + markdown.open(format!("struct {}{extends} {{", s.name)); markdown.line(render_classlike_members(s)); - render_docs(&mut markdown, &s.docs); + markdown.close("}"); markdown.to_string().trim().to_string() } @@ -354,20 +434,11 @@ fn render_interface(i: &Interface) -> String { String::default() }; - markdown.line("```wing"); - markdown.line(format!("interface {}{extends}", i.name)); - markdown.line("```"); - markdown.line("---"); - - if let Some(s) = &i.docs.summary { - markdown.line(s); - } + markdown.open(format!("interface {}{extends} {{", i.name)); markdown.line(render_classlike_members(i)); - markdown.empty_line(); - - render_docs(&mut markdown, &i.docs); + markdown.close("}"); markdown.to_string().trim().to_string() } @@ -375,27 +446,14 @@ fn render_interface(i: &Interface) -> String { fn render_enum(e: &Enum) -> String { let mut markdown = CodeMaker::default(); - markdown.line("```wing"); - markdown.line(format!("enum {}", e.name)); - markdown.line("```"); - markdown.line("---"); - - if let Some(s) = &e.docs.summary { - markdown.line(s); - } + markdown.open(format!("enum {} {{", e.name)); - for prop in e.values.iter() { - let value_doc = if let Some(doc) = prop.1.as_ref() { - format!(" — {}", doc) - } else { - String::default() - }; - markdown.line(&format!("- `{}{}`\n", prop.0, value_doc)); + if !e.values.is_empty() { + for sym in e.values.keys() { + markdown.line(format!("{sym},")); + } } - - markdown.empty_line(); - - render_docs(&mut markdown, &e.docs); + markdown.close("}"); markdown.to_string().trim().to_string() } @@ -409,8 +467,6 @@ fn render_class(c: &Class) -> String { let mut markdown = CodeMaker::default(); - markdown.line("```wing"); - let extends = if let Some(t) = render_typeref(&c.parent) { format!(" extends {}", t) } else { @@ -430,88 +486,165 @@ fn render_class(c: &Class) -> String { String::default() }; - markdown.line(format!("class {}{}{}", c.name, extends, implements)); - - markdown.line("```"); - markdown.line("---"); - - if let Some(s) = &c.docs.summary { - markdown.line(s); - } - render_docs(&mut markdown, &c.docs); - - if matches!(c.phase, Phase::Preflight | Phase::Independent) { - if let Some(initializer) = c.get_method(&Symbol::global(CLASS_INIT_NAME)) { - let function_sig = initializer.type_.as_function_sig().unwrap(); - if function_sig.parameters.len() > 0 { - markdown.line("### Initializer"); - markdown.line(render_signature_help(&function_sig)); - } - } - } - - if let Some(initializer) = c.get_method(&Symbol::global(CLASS_INFLIGHT_INIT_NAME)) { - let function_sig = initializer.type_.as_function_sig().unwrap(); - if function_sig.parameters.len() > 0 { - markdown.line("### Initializer (`inflight`)"); - markdown.line(render_signature_help(&function_sig)); - } - } + markdown.open(format!("class {}{}{} {{", c.name, extends, implements)); markdown.line(render_classlike_members(c)); + markdown.close("}"); + markdown.to_string().trim().to_string() } fn render_classlike_members(classlike: &impl ClassLike) -> String { let mut field_markdown = CodeMaker::default(); let mut method_markdown = CodeMaker::default(); + let classlike_phase = classlike.get_env().phase; + + let member_name_denylist = vec![CLASS_INIT_NAME, CLASS_INFLIGHT_INIT_NAME]; let public_member_variables = classlike .get_env() .iter(true) - .flat_map(|f| if f.2.init { None } else { f.1.as_variable() }) - .filter(|v| v.access == AccessModifier::Public) - // show optionals first, then sort alphabetically by name + .flat_map(|f| { + if f.2.init { + return None; + } + + if f.2.access != AccessModifier::Public { + return None; + } + + if member_name_denylist.contains(&f.0.as_str()) { + return None; + } + + if let SymbolEnvKind::Type(t) = f.2.env.kind { + if let Some(class) = t.as_class() { + if let Some(fqn) = &class.fqn { + if fqn.starts_with("constructs.") || is_construct_base(fqn) { + return None; + } + } + } + } + + f.1.as_variable() + }) + // Use the following ordering: + // 1. optionals + // 2. phase independent members + // 3. phase matching classlike + // 4. instance members + // 5. fields + // 6. methods .sorted_by(|a, b| { - let a_is_option = a.type_.is_option(); - let b_is_option = b.type_.is_option(); - a_is_option - .cmp(&b_is_option) - .then_with(|| a.name.name.cmp(&b.name.name)) + let a_is_optional = a.type_.is_option(); + let b_is_optional = b.type_.is_option(); + let a_is_independent = a.phase == Phase::Independent; + let b_is_independent = b.phase == Phase::Independent; + let a_is_classlike_phase = a.phase == classlike_phase; + let b_is_classlike_phase = b.phase == classlike_phase; + let a_is_instance = a.kind != VariableKind::StaticMember; + let b_is_instance = b.kind != VariableKind::StaticMember; + let a_is_field = !a.type_.maybe_unwrap_option().is_function_sig(); + let b_is_field = !b.type_.maybe_unwrap_option().is_function_sig(); + + // 1. optionals + if a_is_optional && !b_is_optional { + return std::cmp::Ordering::Less; + } + if !a_is_optional && b_is_optional { + return std::cmp::Ordering::Greater; + } + + // 2. phase independent members + if a_is_independent && !b_is_independent { + return std::cmp::Ordering::Less; + } + if !a_is_independent && b_is_independent { + return std::cmp::Ordering::Greater; + } + + // 3. phase matching classlike + if a_is_classlike_phase && !b_is_classlike_phase { + return std::cmp::Ordering::Less; + } + if !a_is_classlike_phase && b_is_classlike_phase { + return std::cmp::Ordering::Greater; + } + + // 4. instance members + if a_is_instance && !b_is_instance { + return std::cmp::Ordering::Less; + } + if !a_is_instance && b_is_instance { + return std::cmp::Ordering::Greater; + } + + // 5. fields + if a_is_field && !b_is_field { + return std::cmp::Ordering::Less; + } + if !a_is_field && b_is_field { + return std::cmp::Ordering::Greater; + } + + // 6. methods + std::cmp::Ordering::Equal }) .collect_vec(); - for member in public_member_variables { - let member_type = member.type_; - let option_text = if member_type.is_option() { "?" } else { "" }; - let member_name = &member.name.name; - let member_docs = member.docs.as_ref().and_then(|d| d.summary.clone()); - let text = if let Some(member_docs) = member_docs { - format!("- `{member_name}{option_text}` — `{member_type}` — {member_docs}") + for (idx, member) in public_member_variables.iter().enumerate() { + if idx >= 6 { + method_markdown.line("/* ... */"); + break; + } + + let static_text = if matches!(member.kind, VariableKind::StaticMember) { + "static " } else { - format!("- `{member_name}{option_text}` — `{member_type}`") + "" }; - - if member_type.maybe_unwrap_option().is_function_sig() { - if member.name.name == CLASS_INIT_NAME || member.name.name == CLASS_INFLIGHT_INIT_NAME { - continue; + let phase_text = if member.phase == classlike_phase { + "" + } else { + match member.phase { + Phase::Inflight => "inflight ", + Phase::Preflight => "preflight ", + Phase::Independent => "", } + }; + + let member_type = member.type_; + let option_text = if member_type.is_option() { "?" } else { "" }; + let member_name = &member.name.name; + if let Some(member_sig) = member_type.maybe_unwrap_option().as_function_sig() { + let arg_text = ""; + let text = format!( + "{static_text}{phase_text}{member_name}{option_text}({arg_text}): {};", + member_sig.return_type + ); method_markdown.line(text); } else { + let text = format!( + "{static_text}{phase_text}{member_name}{option_text}: {};", + member_type.maybe_unwrap_option() + ); field_markdown.line(text); - } + }; + } + + if field_markdown.is_empty() && method_markdown.is_empty() { + return "// No public members".to_string(); } let mut markdown = CodeMaker::default(); if !field_markdown.is_empty() { - markdown.line(FIELD_HEADER); markdown.add_code(field_markdown); } if !method_markdown.is_empty() { - markdown.line(METHOD_HEADER); markdown.add_code(method_markdown); } diff --git a/libs/wingc/src/lsp/completions.rs b/libs/wingc/src/lsp/completions.rs index 95b9ce33052..596e038fa77 100644 --- a/libs/wingc/src/lsp/completions.rs +++ b/libs/wingc/src/lsp/completions.rs @@ -14,7 +14,8 @@ use crate::closure_transform::{CLOSURE_CLASS_PREFIX, PARENT_THIS_NAME}; use crate::diagnostic::{WingLocation, WingSpan}; use crate::docs::Documented; use crate::lsp::sync::{JSII_TYPES, PROJECT_DATA, WING_TYPES}; -use crate::type_check::symbol_env::{LookupResult, StatementIdx}; +use crate::type_check::jsii_importer::is_construct_base; +use crate::type_check::symbol_env::{LookupResult, StatementIdx, SymbolEnvKind}; use crate::type_check::{ fully_qualify_std_type, import_udt_from_jsii, resolve_super_method, ClassLike, Namespace, Struct, SymbolKind, Type, TypeRef, Types, UnsafeRef, VariableKind, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, @@ -427,7 +428,7 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse }; } } - } else if !last_char_is_colon && (nearest_non_reference.kind() == "argument_list") { + } else if !last_char_is_colon && matches!(nearest_non_reference.kind(), "argument_list" | "positional_argument") { if let Some(callish_expr) = scope_visitor.expression_trail.iter().rev().find_map(|e| match &e.kind { ExprKind::Call { arg_list, callee } => Some(( match callee { @@ -441,8 +442,15 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse ExprKind::New(new_expr) => Some((types.get_expr_type(&e), &new_expr.arg_list)), _ => None, }) { - let mut completions = - get_current_scope_completions(&types, &scope_visitor, &node_to_complete, &preceding_text); + let mut completions = vec![]; + + if !matches!( + nearest_non_reference.prev_named_sibling().map(|n| n.kind()), + Some("keyword_argument") + ) { + // We haven't run into any keyword args yet, so let's show options for positional args (expressions) + completions = get_current_scope_completions(&types, &scope_visitor, &node_to_complete, &preceding_text); + } let arg_list_strings = &callish_expr .1 @@ -1014,6 +1022,17 @@ fn get_completions_from_class( return None; } + // ignore members from the constructs library + if let SymbolEnvKind::Type(t) = symbol_data.2.env.kind { + if let Some(class) = t.as_class() { + if let Some(fqn) = &class.fqn { + if fqn.starts_with("constructs.") || is_construct_base(fqn) { + return None; + } + } + } + } + // See `Phase::can_call_to` for phase access rules if let Some(current_phase) = current_phase { if variable.type_.maybe_unwrap_option().as_function_sig().is_some() @@ -1034,6 +1053,17 @@ fn get_completions_from_class( .collect() } +fn make_documentation(text: String) -> Option { + if text.is_empty() { + None + } else { + Some(Documentation::MarkupContent(MarkupContent { + kind: MarkupKind::Markdown, + value: text, + })) + } +} + fn get_intrinsic_list(types: &Types) -> Vec { let mut completions = vec![]; @@ -1042,14 +1072,9 @@ fn get_intrinsic_list(types: &Types) -> Vec { continue; }; - let documentation = Some(Documentation::MarkupContent(MarkupContent { - kind: MarkupKind::Markdown, - value: intrinsic.render_docs(), - })); - let mut item = CompletionItem { label: intrinsic.to_string(), - documentation, + documentation: make_documentation(intrinsic.render_docs()), kind: Some(CompletionItemKind::FUNCTION), ..Default::default() }; @@ -1067,15 +1092,10 @@ fn format_symbol_kind_as_completion(name: &str, symbol_kind: &SymbolKind) -> Opt return None; } - let documentation = Some(Documentation::MarkupContent(MarkupContent { - kind: MarkupKind::Markdown, - value: symbol_kind.render_docs(), - })); - Some(match symbol_kind { SymbolKind::Type(t) => CompletionItem { label: name.to_string(), - documentation, + documentation: make_documentation(symbol_kind.render_docs()), kind: Some(match **t { Type::Array(_) | Type::MutArray(_) @@ -1111,11 +1131,12 @@ fn format_symbol_kind_as_completion(name: &str, symbol_kind: &SymbolKind) -> Opt Some(CompletionItemKind::VARIABLE) }; let is_method = kind == Some(CompletionItemKind::FUNCTION); + let docs = v.docs.as_ref().or_else(|| v.type_.docs()); let mut completion_item = CompletionItem { label: name.to_string(), detail: Some(v.type_.to_string()), - documentation, + documentation: docs.and_then(|d| make_documentation(d.render())), kind, ..Default::default() }; @@ -1139,7 +1160,7 @@ fn format_symbol_kind_as_completion(name: &str, symbol_kind: &SymbolKind) -> Opt } SymbolKind::Namespace(..) => CompletionItem { label: name.to_string(), - documentation, + documentation: make_documentation(symbol_kind.render_docs()), kind: Some(CompletionItemKind::MODULE), ..Default::default() }, @@ -1224,6 +1245,17 @@ impl<'a> Visit<'a> for ScopeVisitor<'a> { fn visit_expr(&mut self, node: &'a Expr) { let mut set_node = false; + if self.nearest_expr.is_none() && !node.span.is_default() && node.span.contains_location(&self.exact_position) { + if let Some(last) = self.expression_trail.last() { + if node.span.byte_size() > last.span.byte_size() { + // This typically happens when inside transformed/generated code + // where the order of nodes is not necessarily depth-first + return; + } + } + self.expression_trail.push(node); + } + // if the span is exactly the same, we want to set the node if node.span.start == self.target_span.start && node.span.end == self.target_span.end { set_node = true; @@ -1250,10 +1282,6 @@ impl<'a> Visit<'a> for ScopeVisitor<'a> { } } - if self.nearest_expr.is_none() && node.span.contains_location(&self.exact_position) { - self.expression_trail.push(node); - } - // if this node is possibly what we're looking for, no need to visit its children // (we will still visit sibling expressions, just in case) if set_node { @@ -1758,6 +1786,21 @@ x(one: "", ) "# ); + test_completion_list!( + call_struct_expansion_partial_text, + r#" +struct A { + one: str; + two: str; +} + +let x = (arg1: A) => {}; + +x(one: "", tw ) + //^ +"# + ); + test_completion_list!( nested_struct_literal, r#" @@ -1885,8 +1928,9 @@ S. hide_private, r#" class S { - a: num; - new() { this.a = 2; } + shouldBeHidden: num; + pub shouldBeVisible: num; + new() { this.a = 0; this.shouldBeVisible = 0 } } let x = new S(); x. @@ -1959,6 +2003,16 @@ let s: S = { a: 1, b: }; assert!(struct_show_values.iter().any(|c| c.label == "x")) ); + test_completion_list!( + struct_arg_expansion_partial, + r#" +struct S { a1: num; b1: num; } +let func = (a: num, s: S) => {}; +func(1, a ) + //^ +"#, + ); + test_completion_list!( partial_type_reference, r#" diff --git a/libs/wingc/src/lsp/signature.rs b/libs/wingc/src/lsp/signature.rs index 7ce834e7cb3..7bf36c8e243 100644 --- a/libs/wingc/src/lsp/signature.rs +++ b/libs/wingc/src/lsp/signature.rs @@ -5,13 +5,14 @@ use lsp_types::{ }; use crate::ast::{CalleeKind, Class, Expr, ExprKind, New, Stmt, StmtKind, Symbol}; -use crate::docs::Documented; +use crate::docs::{render_summary, Documented}; +use crate::jsify::codemaker::CodeMaker; use crate::lsp::sync::PROJECT_DATA; use crate::lsp::sync::WING_TYPES; use crate::type_check::symbol_env::SymbolEnvRef; use crate::type_check::{ - resolve_super_method, resolve_user_defined_type, Types, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, + resolve_super_method, resolve_user_defined_type, TypeRef, Types, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, }; use crate::visit::{visit_expr, visit_scope, visit_stmt, Visit}; use crate::wasm_util::extern_json_fn; @@ -35,10 +36,7 @@ pub fn on_signature_help(params: lsp_types::SignatureHelpParams) -> Option, - &crate::ast::ArgList, - ) = if scope_visitor.call_stmt.is_some() { + let sig_data: (TypeRef, &crate::ast::ArgList) = if scope_visitor.call_stmt.is_some() { let stmt = scope_visitor.call_stmt?; let class = scope_visitor.class?; @@ -137,11 +135,17 @@ pub fn on_signature_help(params: lsp_types::SignatureHelpParams) -> Option Option Option` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(...deps: Array): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getAllContext` — `(defaults: Json?): any` — Retrieves the all context of a node from tree context.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." - sortText: ab|node - label: copy kind: 2 detail: "inflight (srcKey: str, dstKey: str): void" documentation: kind: markdown - value: "```wing\ninflight copy: inflight (srcKey: str, dstKey: str): void\n```\n---\nCopy an object to a new location in the bucket.\n### Parameters\n- `srcKey` — `str` — The key of the source object you wish to copy.\n- `dstKey` — `str` — The key of the destination object after copying.\n\n### Remarks\nIf the destination object\nalready exists, it will be overwritten.\n\n*@throws* *if `srcKey` object doesn't exist.*" + value: "Copy an object to a new location in the bucket.\n\n#### Remarks\nIf the destination object\nalready exists, it will be overwritten.\n\n*@throws* *if `srcKey` object doesn't exist.*" sortText: ff|copy insertText: copy($1) insertTextFormat: 2 @@ -25,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, opts: BucketDeleteOptions?): void" documentation: kind: markdown - value: "```wing\ninflight delete: inflight (key: str, opts: BucketDeleteOptions?): void\n```\n---\nDelete an existing object using a key from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...opts` — `BucketDeleteOptions?` — Options available for delete an item from a bucket.\n \n - `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: Delete an existing object using a key from the bucket. sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -37,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): bool" documentation: kind: markdown - value: "```wing\ninflight exists: inflight (key: str): bool\n```\n---\nCheck if an object exists in the bucket.\n### Parameters\n- `key` — `str` — Key of the object." + value: Check if an object exists in the bucket. sortText: ff|exists insertText: exists($1) insertTextFormat: 2 @@ -49,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, options: BucketGetOptions?): str" documentation: kind: markdown - value: "```wing\ninflight get: inflight (key: str, options: BucketGetOptions?): str\n```\n---\nRetrieve an object from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...options` — `BucketGetOptions?` — Additional get options.\n \n - `endByte?` — `num?` — The ending byte to read up to (including).\n - `startByte?` — `num?` — The starting byte to read from.\n\n### Remarks\nIf the bytes returned are not a valid UTF-8 string, an error is thrown.\n\n*@Returns* *the object's body.*\n*@Throws* *if no object with the given key exists.*" + value: "Retrieve an object from the bucket.\n\n#### Remarks\nIf the bytes returned are not a valid UTF-8 string, an error is thrown.\n\n*@Returns* *the object's body.*\n*@Throws* *if no object with the given key exists.*" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -61,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): Json" documentation: kind: markdown - value: "```wing\ninflight getJson: inflight (key: str): Json\n```\n---\nRetrieve a Json object from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n\n*@Returns* *the object's parsed Json.*\n*@Throws* *if no object with the given key exists.*" + value: "Retrieve a Json object from the bucket.\n\n*@Returns* *the object's parsed Json.*\n*@Throws* *if no object with the given key exists.*" sortText: ff|getJson insertText: getJson($1) insertTextFormat: 2 @@ -73,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (prefix: str?): Array" documentation: kind: markdown - value: "```wing\ninflight list: inflight (prefix: str?): Array\n```\n---\nRetrieve existing objects keys from the bucket.\n### Parameters\n- `prefix` — `str?` — Limits the response to keys that begin with the specified prefix.\n\n### Returns\na list of keys or an empty array if the bucket is empty." + value: "Retrieve existing objects keys from the bucket.\n\n#### Returns\na list of keys or an empty array if the bucket is empty." sortText: ff|list insertText: list($1) insertTextFormat: 2 @@ -85,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): ObjectMetadata" documentation: kind: markdown - value: "```wing\ninflight metadata: inflight (key: str): ObjectMetadata\n```\n---\nGet the metadata of an object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n\n*@Throws* *if there is no object with the given key.*" + value: "Get the metadata of an object in the bucket.\n\n*@Throws* *if there is no object with the given key.*" sortText: ff|metadata insertText: metadata($1) insertTextFormat: 2 @@ -97,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): str" documentation: kind: markdown - value: "```wing\ninflight publicUrl: inflight (key: str): str\n```\n---\nReturns a url to the given file.\n### Parameters\n- `key` — `str`\n\n*@Throws* *if the file is not public or if object does not exist.*" + value: "Returns a url to the given file.\n\n*@Throws* *if the file is not public or if object does not exist.*" sortText: ff|publicUrl insertText: publicUrl($1) insertTextFormat: 2 @@ -109,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, body: str, options: BucketPutOptions?): void" documentation: kind: markdown - value: "```wing\ninflight put: inflight (key: str, body: str, options: BucketPutOptions?): void\n```\n---\nPut an object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `body` — `str` — Content of the object we want to store into the bucket.\n- `...options` — `BucketPutOptions?` — Additional options.\n \n - `contentType` — `str` — The HTTP Content-Type of the object." + value: Put an object in the bucket. sortText: ff|put insertText: put($1) insertTextFormat: 2 @@ -121,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, body: Json): void" documentation: kind: markdown - value: "```wing\ninflight putJson: inflight (key: str, body: Json): void\n```\n---\nPut a Json object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `body` — `Json` — Json object that we want to store into the bucket." + value: Put a Json object in the bucket. sortText: ff|putJson insertText: putJson($1) insertTextFormat: 2 @@ -133,7 +126,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (srcKey: str, dstKey: str): void" documentation: kind: markdown - value: "```wing\ninflight rename: inflight (srcKey: str, dstKey: str): void\n```\n---\nMove an object to a new location in the bucket.\n### Parameters\n- `srcKey` — `str` — The key of the source object you wish to rename.\n- `dstKey` — `str` — The key of the destination object after renaming.\n\n### Remarks\nIf the destination object\nalready exists, it will be overwritten. Returns once the renaming is finished.\n\n*@throws* *if `srcKey` object doesn't exist or if it matches `dstKey`.*" + value: "Move an object to a new location in the bucket.\n\n#### Remarks\nIf the destination object\nalready exists, it will be overwritten. Returns once the renaming is finished.\n\n*@throws* *if `srcKey` object doesn't exist or if it matches `dstKey`.*" sortText: ff|rename insertText: rename($1) insertTextFormat: 2 @@ -145,7 +138,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, options: BucketSignedUrlOptions?): str" documentation: kind: markdown - value: "```wing\ninflight signedUrl: inflight (key: str, options: BucketSignedUrlOptions?): str\n```\n---\nReturns a signed url to the given file.\n### Parameters\n- `key` — `str` — The key to access the cloud object.\n- `...options` — `BucketSignedUrlOptions?` — The signedUrlOptions where you can provide the configurations of the signed url.\n \n - `action?` — `BucketSignedUrlAction?` — The action allowed by the signed URL.\n - `duration?` — `duration?` — The duration for the signed URL to expire.\n\n### Returns\nA string representing the signed url of the object which can be used to download in any downstream system\n\n*@Throws* *if object does not exist.*" + value: "Returns a signed url to the given file.\n\n#### Returns\nA string representing the signed url of the object which can be used to download in any downstream system\n\n*@Throws* *if object does not exist.*" sortText: ff|signedUrl insertText: signedUrl($1) insertTextFormat: 2 @@ -157,7 +150,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): bool" documentation: kind: markdown - value: "```wing\ninflight tryDelete: inflight (key: str): bool\n```\n---\nDelete an object from the bucket if it exists.\n### Parameters\n- `key` — `str` — Key of the object.\n\n### Returns\nthe result of the delete operation" + value: "Delete an object from the bucket if it exists.\n\n#### Returns\nthe result of the delete operation" sortText: ff|tryDelete insertText: tryDelete($1) insertTextFormat: 2 @@ -169,7 +162,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, options: BucketTryGetOptions?): str?" documentation: kind: markdown - value: "```wing\ninflight tryGet: inflight (key: str, options: BucketTryGetOptions?): str?\n```\n---\nGet an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...options` — `BucketTryGetOptions?` — Additional get options.\n \n - `endByte?` — `num?` — The ending byte to read up to (including).\n - `startByte?` — `num?` — The starting byte to read from.\n\n### Returns\nthe contents of the object as a string if it exists, nil otherwise" + value: "Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n\n#### Returns\nthe contents of the object as a string if it exists, nil otherwise" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -181,7 +174,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): Json?" documentation: kind: markdown - value: "```wing\ninflight tryGetJson: inflight (key: str): Json?\n```\n---\nGets an object from the bucket if it exists, parsing it as Json.\n### Parameters\n- `key` — `str` — Key of the object.\n\n### Returns\nthe contents of the object as Json if it exists, nil otherwise" + value: "Gets an object from the bucket if it exists, parsing it as Json.\n\n#### Returns\nthe contents of the object as Json if it exists, nil otherwise" sortText: ff|tryGetJson insertText: tryGetJson($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/dot_before_returning_struct.snap b/libs/wingc/src/lsp/snapshots/completions/dot_before_returning_struct.snap index 7380ad4d86a..dcc421b7775 100644 --- a/libs/wingc/src/lsp/snapshots/completions/dot_before_returning_struct.snap +++ b/libs/wingc/src/lsp/snapshots/completions/dot_before_returning_struct.snap @@ -4,8 +4,5 @@ source: libs/wingc/src/lsp/completions.rs - label: s kind: 5 detail: str - documentation: - kind: markdown - value: "```wing\ns: str\n```" sortText: ab|s diff --git a/libs/wingc/src/lsp/snapshots/completions/empty.snap b/libs/wingc/src/lsp/snapshots/completions/empty.snap index 116d7f1d7d8..beef6a5ebb0 100644 --- a/libs/wingc/src/lsp/snapshots/completions/empty.snap +++ b/libs/wingc/src/lsp/snapshots/completions/empty.snap @@ -6,14 +6,14 @@ source: libs/wingc/src/lsp/completions.rs detail: Construct documentation: kind: markdown - value: "```wing\npreflight this: Construct\nclass Construct impl IConstruct\n```\n---\nRepresents the building block of the construct graph.\n\n### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct.\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "Represents the building block of the construct graph.\n\n#### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct." sortText: bb|this - label: assert kind: 3 detail: "(condition: bool, message: str?): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert\n- `message` — `str?` — The message to log if the condition is false" + value: Asserts that a condition is true sortText: cc|assert insertText: assert($1) insertTextFormat: 2 @@ -25,7 +25,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: stringable): void" documentation: kind: markdown - value: "```wing\nlog: (value: stringable): void\n```\n---\nLogs a value\n### Parameters\n- `value` — `stringable` — The value to log" + value: Logs a value sortText: cc|log insertText: log($1) insertTextFormat: 2 @@ -37,7 +37,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "preflight (construct: IConstruct): Node" documentation: kind: markdown - value: "```wing\nnodeof: preflight (construct: IConstruct): Node\n```\n---\nObtain the tree node of a preflight resource.\n### Parameters\n- `construct` — `IConstruct` — The construct to obtain the tree node of" + value: Obtain the tree node of a preflight resource. sortText: cc|nodeof insertText: nodeof($1) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" + value: Casts a value into a different type. This is unsafe and can cause runtime errors sortText: cc|unsafeCast insertText: unsafeCast($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/forin_before_return_type_ref.snap b/libs/wingc/src/lsp/snapshots/completions/forin_before_return_type_ref.snap index a94f8cdfeb4..8432e6b4d40 100644 --- a/libs/wingc/src/lsp/snapshots/completions/forin_before_return_type_ref.snap +++ b/libs/wingc/src/lsp/snapshots/completions/forin_before_return_type_ref.snap @@ -1,27 +1,14 @@ --- source: libs/wingc/src/lsp/completions.rs --- -- label: node - kind: 5 - detail: Node - documentation: - kind: markdown - value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(...deps: Array): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getAllContext` — `(defaults: Json?): any` — Retrieves the all context of a node from tree context.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." - sortText: ab|node - label: otherInflight kind: 2 detail: "inflight (): void" - documentation: - kind: markdown - value: "```wing\ninflight otherInflight: inflight (): void\n```" sortText: ff|otherInflight insertText: otherInflight() - label: status kind: 2 detail: "inflight (): num" - documentation: - kind: markdown - value: "```wing\ninflight status: inflight (): num\n```" sortText: ff|status insertText: status() diff --git a/libs/wingc/src/lsp/snapshots/completions/hide_parent_symbols_defined_later.snap b/libs/wingc/src/lsp/snapshots/completions/hide_parent_symbols_defined_later.snap index 1011504e576..4ab06337a4a 100644 --- a/libs/wingc/src/lsp/snapshots/completions/hide_parent_symbols_defined_later.snap +++ b/libs/wingc/src/lsp/snapshots/completions/hide_parent_symbols_defined_later.snap @@ -4,23 +4,17 @@ source: libs/wingc/src/lsp/completions.rs - label: this kind: 6 detail: "inflight (): void" - documentation: - kind: markdown - value: "```wing\npreflight this: inflight (): void\n```" sortText: bb|this - label: x kind: 6 detail: num - documentation: - kind: markdown - value: "```wing\npreflight x: num\n```" sortText: bb|x - label: assert kind: 3 detail: "(condition: bool, message: str?): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert\n- `message` — `str?` — The message to log if the condition is false" + value: Asserts that a condition is true sortText: cc|assert insertText: assert($1) insertTextFormat: 2 @@ -32,7 +26,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: stringable): void" documentation: kind: markdown - value: "```wing\nlog: (value: stringable): void\n```\n---\nLogs a value\n### Parameters\n- `value` — `stringable` — The value to log" + value: Logs a value sortText: cc|log insertText: log($1) insertTextFormat: 2 @@ -44,7 +38,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "preflight (construct: IConstruct): Node" documentation: kind: markdown - value: "```wing\nnodeof: preflight (construct: IConstruct): Node\n```\n---\nObtain the tree node of a preflight resource.\n### Parameters\n- `construct` — `IConstruct` — The construct to obtain the tree node of" + value: Obtain the tree node of a preflight resource. sortText: cc|nodeof insertText: nodeof($1) insertTextFormat: 2 @@ -56,7 +50,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" + value: Casts a value into a different type. This is unsafe and can cause runtime errors sortText: cc|unsafeCast insertText: unsafeCast($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/hide_private.snap b/libs/wingc/src/lsp/snapshots/completions/hide_private.snap index 5f83d676c58..bb80cdf871b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/hide_private.snap +++ b/libs/wingc/src/lsp/snapshots/completions/hide_private.snap @@ -1,31 +1,8 @@ --- source: libs/wingc/src/lsp/completions.rs --- -- label: node +- label: shouldBeVisible kind: 5 - detail: Node - documentation: - kind: markdown - value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(...deps: Array): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getAllContext` — `(defaults: Json?): any` — Retrieves the all context of a node from tree context.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." - sortText: ab|node -- label: onLift - kind: 2 - detail: "preflight (host: IInflightHost, ops: Array): void" - documentation: - kind: markdown - value: "```wing\npreflight onLift: preflight (host: IInflightHost, ops: Array): void\n```\n---\nA hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nYou can override this method to perform additional logic like granting\nIAM permissions to the host based on what methods are being called. But\nyou must call `super.bind(host, ops)` to ensure that the resource is\nactually bound." - sortText: ff|onLift - insertText: onLift($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: toString - kind: 2 - detail: "preflight (): str" - documentation: - kind: markdown - value: "```wing\npreflight toString: preflight (): str\n```\n---\nReturns a string representation of this construct." - sortText: ff|toString - insertText: toString() + detail: num + sortText: ab|shouldBeVisible diff --git a/libs/wingc/src/lsp/snapshots/completions/if_before_return_type_ref.snap b/libs/wingc/src/lsp/snapshots/completions/if_before_return_type_ref.snap index a94f8cdfeb4..8432e6b4d40 100644 --- a/libs/wingc/src/lsp/snapshots/completions/if_before_return_type_ref.snap +++ b/libs/wingc/src/lsp/snapshots/completions/if_before_return_type_ref.snap @@ -1,27 +1,14 @@ --- source: libs/wingc/src/lsp/completions.rs --- -- label: node - kind: 5 - detail: Node - documentation: - kind: markdown - value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(...deps: Array): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getAllContext` — `(defaults: Json?): any` — Retrieves the all context of a node from tree context.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." - sortText: ab|node - label: otherInflight kind: 2 detail: "inflight (): void" - documentation: - kind: markdown - value: "```wing\ninflight otherInflight: inflight (): void\n```" sortText: ff|otherInflight insertText: otherInflight() - label: status kind: 2 detail: "inflight (): num" - documentation: - kind: markdown - value: "```wing\ninflight status: inflight (): num\n```" sortText: ff|status insertText: status() diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap index c63cd58d3ce..e167e73464e 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): void" documentation: kind: markdown - value: "```wing\nclear: (): void\n```\n---\nRemoves all elements." + value: Removes all elements. sortText: ff|clear insertText: clear() - label: copy @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Map" documentation: kind: markdown - value: "```wing\ncopy: (): Map\n```\n---\nCreate an immutable shallow copy of this map.\n\n### Returns\nan ImmutableMap with the same values as this map" + value: "Create an immutable shallow copy of this map.\n\n#### Returns\nan ImmutableMap with the same values as this map" sortText: ff|copy insertText: copy() - label: delete @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\ndelete: (key: str): bool\n```\n---\nRemoves the specified element from a map.\n### Parameters\n- `key` — `str` — The key.\n\n### Returns\ntrue if the given key is no longer present" + value: "Removes the specified element from a map.\n\n#### Returns\ntrue if the given key is no longer present" sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -34,7 +34,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Array" documentation: kind: markdown - value: "```wing\nentries: (): Array\n```\n---\nReturns the entries from the map.\n\n### Returns\nthe entries as Array" + value: "Returns the entries from the map.\n\n#### Returns\nthe entries as Array" sortText: ff|entries insertText: entries() - label: get @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): T1" documentation: kind: markdown - value: "```wing\nget: (key: str): T1\n```\n---\nReturns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or throw an error if the key can't be found\n\n### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." + value: "Returns a specified element from the map.\n\n#### Returns\nThe element associated with the specified key, or throw an error if the key can't be found\n\n#### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nReturns a boolean indicating whether an element with the specified key exists or not.\n### Parameters\n- `key` — `str` — The key of the element to test for presence.\n\n### Returns\ntrue if an element with the specified key exists in the map; otherwise false." + value: "Returns a boolean indicating whether an element with the specified key exists or not.\n\n#### Returns\ntrue if an element with the specified key exists in the map; otherwise false." sortText: ff|has insertText: has($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Array" documentation: kind: markdown - value: "```wing\nkeys: (): Array\n```\n---\nReturns the keys of this map.\n\n### Returns\nan array containing the keys of this map" + value: "Returns the keys of this map.\n\n#### Returns\nan array containing the keys of this map" sortText: ff|keys insertText: keys() - label: set @@ -74,7 +74,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str, value: T1): void" documentation: kind: markdown - value: "```wing\nset: (key: str, value: T1): void\n```\n---\nAdds or updates an entry in a Map object with a specified key and a value.\n### Parameters\n- `key` — `str` — The key of the element to add.\n- `value` — `T1` — The value of the element to add.\n\n### Remarks\nTODO: revisit this macro after we support indexed args https://github.com/winglang/wing/issues/1659" + value: "Adds or updates an entry in a Map object with a specified key and a value.\n\n#### Remarks\nTODO: revisit this macro after we support indexed args https://github.com/winglang/wing/issues/1659" sortText: ff|set insertText: set($1) insertTextFormat: 2 @@ -86,7 +86,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nsize: (): num\n```\n---\nReturns the number of elements in the map.\n\n### Returns\nThe number of elements in map\n\n### Remarks\nTODO: For now this has to be a method rather than a getter as macros only work on methods https://github.com/winglang/wing/issues/1658" + value: "Returns the number of elements in the map.\n\n#### Returns\nThe number of elements in map\n\n#### Remarks\nTODO: For now this has to be a method rather than a getter as macros only work on methods https://github.com/winglang/wing/issues/1658" sortText: ff|size insertText: size() - label: tryGet @@ -94,7 +94,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): T1?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): T1?\n```\n---\nOptionally returns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "Optionally returns a specified element from the map.\n\n#### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -106,7 +106,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Array" documentation: kind: markdown - value: "```wing\nvalues: (): Array\n```\n---\nReturns the values of this map.\n\n### Returns\nan array containing of type T the values of this map" + value: "Returns the values of this map.\n\n#### Returns\nan array containing of type T the values of this map" sortText: ff|values insertText: values() diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap index eb6ba6c140f..ed3a11ecc17 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap @@ -5,570 +5,570 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiConnectOptions?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiDeleteOptions?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiGetOptions?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiHeadOptions?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiOptionsOptions?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPatchOptions?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPostOptions?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPutOptions?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `renderCorsHeaders` — `preflight (corsOptions: ApiCorsOptions?): CorsHeaders?` — Generates an object containing default CORS response headers and OPTIONS response headers.\n- `renderOpenApiPath` — `preflight (path: str): str` — Converts input path to a valid OpenAPI path (replaces `:` based path params with `{}`).\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Api {\n url: str;\n connect(): void;\n delete(): void;\n get(): void;\n head(): void;\n options(): void;\n /* ... */\n}\n```\n---\nFunctionality shared between all `Api` implementations." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\nclass Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Counter {\n initial: num;\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nA distributed atomic counter." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Domain {\n domainName: str;\n}\n```\n---\nA cloud Domain." sortText: gg|Domain - label: Endpoint kind: 7 documentation: kind: markdown - value: "```wing\nclass Endpoint\n```\n---\nA cloud Endpoint.\n\n### Initializer\n- `url` — `str`\n- `...props` — `EndpointProps?`\n \n - `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n - `label?` — `str?` — The endpoint's label.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The endpoint url.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Endpoint {\n url: str;\n}\n```\n---\nA cloud Endpoint." sortText: gg|Endpoint - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str?): str?`\n- `...props` — `FunctionProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Function impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nA function." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass OnDeploy {\n // No public members\n}\n```\n---\nRun code every time the app is deployed." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerOptions?): Function` — Create a function to consume messages from this queue.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Queue {\n setConsumer(): Function;\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nA queue." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickOptions?): Function` — Create a function that runs when receiving the scheduled event.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Schedule {\n onTick(): Function;\n}\n```\n---\nA schedule." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n- `name?` — `str?` — Get secret name.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\nclass Secret {\n name?: str;\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nA cloud secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Service impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nA long-running service." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageOptions?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform.\n- `subscribeQueue` — `preflight (queue: Queue, props: TopicSubscribeQueueOptions?): void` — Subscribing queue to the topic.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Topic {\n onMessage(): Function;\n subscribeQueue(): void;\n inflight publish(): void;\n}\n```\n---\nA topic." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?` — The website's custom domain object.\n - `errorDocument?` — `str?` — Name of the error document for the website.\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions?): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Website impl IWebsite {\n path: str;\n url: str;\n addFile(): str;\n addJson(): str;\n}\n```\n---\nA cloud static website." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." + value: "```wing\nstruct AddFileOptions {\n contentType?: str;\n}\n```\n---\nOptions for adding a file with custom value during the website's deployment." sortText: hh|AddFileOptions - label: ApiConnectOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectOptions - label: ApiCorsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `str?` — The allowed origin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions {\n allowCredentials?: bool;\n allowHeaders?: Array;\n allowMethods?: Array;\n allowOrigin?: str;\n exposeHeaders?: Array;\n maxAge?: duration;\n}\n```\n---\nCors Options for `Api`." sortText: hh|ApiCorsOptions - label: ApiDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiDeleteOptions - label: ApiEndpointOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiEndpointOptions extends FunctionProps\n```\n---\nBase options for Api endpoints.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiEndpointOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nBase options for Api endpoints." sortText: hh|ApiEndpointOptions - label: ApiGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions\n```\n---\nOptions for Api get endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api get endpoint." sortText: hh|ApiGetOptions - label: ApiHeadOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiHeadOptions - label: ApiOptionsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiOptionsOptions - label: ApiPatchOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiPatchOptions - label: ApiPostOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions\n```\n---\nOptions for Api post endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api post endpoint." sortText: hh|ApiPostOptions - label: ApiProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps {\n cors?: bool;\n corsOptions?: ApiCorsOptions;\n}\n```\n---\nOptions for `Api`." sortText: hh|ApiProps - label: ApiPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiPutOptions - label: ApiRequest kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." + value: "```wing\nstruct ApiRequest {\n body?: str;\n headers?: Map;\n method: HttpMethod;\n path: str;\n query: Map;\n vars: Map;\n}\n```\n---\nShape of a request to an inflight handler." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers.\n- `status?` — `num?` — The response's status code." + value: "```wing\nstruct ApiResponse {\n body?: str;\n headers?: Map;\n status?: num;\n}\n```\n---\nShape of a response from a inflight handler." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nOptions for `Bucket.delete()`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions {\n mustExist?: bool;\n}\n```\n---\nOptions for `Bucket.delete()`." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." + value: "```wing\nstruct BucketEvent {\n key: str;\n type: BucketEventType;\n}\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927." sortText: hh|BucketEvent - label: BucketGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketGetOptions\n```\n---\nOptions for `Bucket.get()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.get()`." sortText: hh|BucketGetOptions - label: BucketOnCreateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnCreateOptions\n```\n---\n`onCreate` event options." + value: "```wing\nstruct BucketOnCreateOptions {\n // No public members\n}\n```\n---\n`onCreate` event options." sortText: hh|BucketOnCreateOptions - label: BucketOnDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnDeleteOptions\n```\n---\n`onDelete` event options." + value: "```wing\nstruct BucketOnDeleteOptions {\n // No public members\n}\n```\n---\n`onDelete` event options." sortText: hh|BucketOnDeleteOptions - label: BucketOnEventOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnEventOptions\n```\n---\n`onEvent` options." + value: "```wing\nstruct BucketOnEventOptions {\n // No public members\n}\n```\n---\n`onEvent` options." sortText: hh|BucketOnEventOptions - label: BucketOnUpdateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnUpdateOptions\n```\n---\n`onUpdate` event options." + value: "```wing\nstruct BucketOnUpdateOptions {\n // No public members\n}\n```\n---\n`onUpdate` event options." sortText: hh|BucketOnUpdateOptions - label: BucketProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps {\n public?: bool;\n}\n```\n---\nOptions for `Bucket`." sortText: hh|BucketProps - label: BucketPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketPutOptions\n```\n---\nOptions for `Bucket.put()`.\n### Fields\n- `contentType` — `str` — The HTTP Content-Type of the object." + value: "```wing\nstruct BucketPutOptions {\n contentType: str;\n}\n```\n---\nOptions for `Bucket.put()`." sortText: hh|BucketPutOptions - label: BucketSignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketSignedUrlOptions\n```\n---\nOptions for `Bucket.signedUrl()`.\n### Fields\n- `action?` — `BucketSignedUrlAction?` — The action allowed by the signed URL.\n- `duration?` — `duration?` — The duration for the signed URL to expire." + value: "```wing\nstruct BucketSignedUrlOptions {\n action?: BucketSignedUrlAction;\n duration?: duration;\n}\n```\n---\nOptions for `Bucket.signedUrl()`." sortText: hh|BucketSignedUrlOptions - label: BucketTryGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions\n```\n---\nOptions for `Bucket.tryGet()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.tryGet()`." sortText: hh|BucketTryGetOptions - label: CorsHeaders kind: 22 documentation: kind: markdown - value: "```wing\nstruct CorsHeaders\n```\n---\nType definition for CORS headers which includes default and options headers.\n### Fields\n- `defaultResponse` — `Map` — Default CORS response headers.\n- `optionsResponse` — `Map` — CORS options response headers." + value: "```wing\nstruct CorsHeaders {\n defaultResponse: Map;\n optionsResponse: Map;\n}\n```\n---\nType definition for CORS headers which includes default and options headers." sortText: hh|CorsHeaders - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." + value: "```wing\nstruct CounterProps {\n initial?: num;\n}\n```\n---\nOptions for `Counter`." sortText: hh|CounterProps - label: DeadLetterQueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DeadLetterQueueProps\n```\n---\nDead letter queue options.\n### Fields\n- `queue` — `Queue` — Queue to receive messages that failed processing.\n- `maxDeliveryAttempts?` — `num?` — Number of times a message will be processed before being sent to the dead-letter queue." + value: "```wing\nstruct DeadLetterQueueProps {\n maxDeliveryAttempts?: num;\n queue: Queue;\n}\n```\n---\nDead letter queue options." sortText: hh|DeadLetterQueueProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." + value: "```wing\nstruct DomainProps {\n domainName: str;\n}\n```\n---\nOptions for `Domain`." sortText: hh|DomainProps - label: EndpointProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct EndpointProps\n```\n---\nOptions for `Endpoint`.\n### Fields\n- `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n- `label?` — `str?` — The endpoint's label." + value: "```wing\nstruct EndpointProps {\n browserSupport?: bool;\n label?: str;\n}\n```\n---\nOptions for `Endpoint`." sortText: hh|EndpointProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Function`." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions {\n cache?: bool;\n}\n```\n---\nOptions when getting a secret value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." + value: "```wing\nstruct ObjectMetadata {\n contentType?: str;\n lastModified: Datetime;\n size: num;\n}\n```\n---\nMetadata of a bucket object." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct OnDeployProps extends FunctionProps {\n concurrency?: num;\n env?: Map;\n executeAfter?: Array;\n executeBefore?: Array;\n logRetentionDays?: num;\n memory?: num;\n /* ... */\n}\n```\n---\nOptions for `OnDeploy`." sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Queue`." sortText: hh|QueueProps - label: QueueSetConsumerOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps {\n batchSize?: num;\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Queue.setConsumer." sortText: hh|QueueSetConsumerOptions - label: ScheduleOnTickOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Schedule.onTick." sortText: hh|ScheduleOnTickOptions - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps {\n cron?: str;\n rate?: duration;\n}\n```\n---\nOptions for `Schedule`." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." + value: "```wing\nstruct SecretProps {\n name?: str;\n}\n```\n---\nOptions for `Secret`." sortText: hh|SecretProps - label: ServiceOnStartOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Service.onStart." sortText: hh|ServiceOnStartOptions - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps {\n autoStart?: bool;\n env?: Map;\n}\n```\n---\nOptions for `Service`." sortText: hh|ServiceProps - label: TopicOnMessageOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.onMessage`." sortText: hh|TopicOnMessageOptions - label: TopicProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicProps\n```\n---\nOptions for `Topic`." + value: "```wing\nstruct TopicProps {\n // No public members\n}\n```\n---\nOptions for `Topic`." sortText: hh|TopicProps - label: TopicSubscribeQueueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps\n```\n---\nOptions for `Topic.subscribeQueue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.subscribeQueue`." sortText: hh|TopicSubscribeQueueOptions - label: WebsiteDomainOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteDomainOptions {\n domain?: Domain;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteDomainOptions - label: WebsiteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nBasic options for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteOptions {\n errorDocument?: str;\n path: str;\n}\n```\n---\nBasic options for `Website`." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?` — The website's custom domain object.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions {\n domain?: Domain;\n errorDocument?: str;\n path: str;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteProps - label: IApiClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiClient\n```\n---\nInflight methods and members of `cloud.Api`." + value: "```wing\ninterface IApiClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Api`." sortText: ii|IApiClient - label: IApiEndpointHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nInflight client for `IApiEndpointHandler`." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient {\n inflight copy(): void;\n inflight delete(): void;\n inflight exists(): bool;\n inflight get(): str;\n inflight getJson(): Json;\n inflight list(): Array;\n /* ... */\n}\n```\n---\nInflight interface for `Bucket`." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient {\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nInflight interface for `Counter`." sortText: ii|ICounterClient - label: IDomainClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IDomainClient\n```\n---\nInflight interface for `Domain`." + value: "```wing\ninterface IDomainClient {\n // No public members\n}\n```\n---\nInflight interface for `Domain`." sortText: ii|IDomainClient - label: IEndpointClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IEndpointClient\n```\n---\nInflight interface for `Endpoint`." + value: "```wing\ninterface IEndpointClient {\n // No public members\n}\n```\n---\nInflight interface for `Endpoint`." sortText: ii|IEndpointClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running." + value: "```wing\ninterface IFunctionClient {\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nInflight interface for `Function`." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str?): str?\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninflight (event: str?): str?\n```\n---\nInflight client for `IFunctionHandler`." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployClient\n```\n---\nInflight interface for `OnDeploy`." + value: "```wing\ninterface IOnDeployClient {\n // No public members\n}\n```\n---\nInflight interface for `OnDeploy`." sortText: ii|IOnDeployClient - label: IOnDeployHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IOnDeployHandler`." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient {\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nInflight interface for `Queue`." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (message: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." + value: "```wing\ninflight (message: str): void\n```\n---\nInflight client for `IQueueSetConsumerHandler`." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleClient\n```\n---\nInflight interface for `Schedule`." + value: "```wing\ninterface IScheduleClient {\n // No public members\n}\n```\n---\nInflight interface for `Schedule`." sortText: ii|IScheduleClient - label: IScheduleOnTickHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IScheduleOnTickHandler`." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient {\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nInflight interface for `Secret`." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." + value: "```wing\ninterface IServiceClient {\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nInflight interface for `Service`." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nExecuted when a `cloud.Service` is started." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nInflight client for `IServiceHandler`." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nExecuted when a `cloud.Service` is stopped." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IServiceStopHandler`." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform." + value: "```wing\ninterface ITopicClient {\n inflight publish(): void;\n}\n```\n---\nInflight interface for `Topic`." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." + value: "```wing\ninflight (event: str): void\n```\n---\nInflight client for `ITopicOnMessageHandler`." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." + value: "```wing\ninterface IWebsite {\n url: str;\n}\n```\n---\nBase interface for a website." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsiteClient\n```\n---\nInflight methods and members of `cloud.Website`." + value: "```wing\ninterface IWebsiteClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Website`." sortText: ii|IWebsiteClient - label: BucketEventType kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketEventType\n```\n---\nBucket events to subscribe to.\n- `CREATE — Create.`\n- `DELETE — Delete.`\n- `UPDATE — Update.`" + value: "```wing\nenum BucketEventType {\n CREATE,\n DELETE,\n UPDATE,\n}\n```\n---\nBucket events to subscribe to." sortText: jj|BucketEventType - label: BucketSignedUrlAction kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketSignedUrlAction\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket.\n- `DOWNLOAD — Represents a HTTP GET request for a presigned URL, allowing read access for an object in the bucket.`\n- `UPLOAD — Represents a HTTP PUT request for a presigned URL, allowing write access for an object in the bucket.`" + value: "```wing\nenum BucketSignedUrlAction {\n DOWNLOAD,\n UPLOAD,\n}\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket." sortText: jj|BucketSignedUrlAction - label: HttpMethod kind: 13 documentation: kind: markdown - value: "```wing\nenum HttpMethod\n```\n---\nAllowed HTTP methods for a endpoint.\n- `GET — Get.`\n- `HEAD — Head.`\n- `POST — Post.`\n- `PUT — Put.`\n- `DELETE — Delete.`\n- `CONNECT — Connect.`\n- `OPTIONS — Options.`\n- `PATCH — Patch.`" + value: "```wing\nenum HttpMethod {\n GET,\n HEAD,\n POST,\n PUT,\n DELETE,\n CONNECT,\n OPTIONS,\n PATCH,\n}\n```\n---\nAllowed HTTP methods for a endpoint." sortText: jj|HttpMethod diff --git a/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap b/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap index 47d293bb9fa..b60862f6acd 100644 --- a/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap +++ b/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "durationThing:" kind: 5 detail: duration - documentation: - kind: markdown - value: "```wing\ndurationThing: duration\n```" sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/json_statics.snap b/libs/wingc/src/lsp/snapshots/completions/json_statics.snap index ad6eb5ddf4c..a1ef50a4beb 100644 --- a/libs/wingc/src/lsp/snapshots/completions/json_statics.snap +++ b/libs/wingc/src/lsp/snapshots/completions/json_statics.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" + value: "Creates an immutable deep copy of the Json.\n\n#### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" + value: "Creates a mutable deep copy of the Json.\n\n#### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." + value: Deletes a key in a given Json. sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" + value: "Returns the entries from the Json.\n\n#### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" + value: "Returns the keys from the Json.\n\n#### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" + value: "Parse a string into a Json.\n\n#### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" + value: "Formats Json as string.\n\n#### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "Try to parse a string into a Json.\n\n#### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" + value: "Returns the values from the Json.\n\n#### Returns\nthe values as Array" sortText: ff|values insertText: values($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap index f3a29c0b31e..a7355c9d3fe 100644 --- a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|asStr insertText: asStr() - label: delete @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\ndelete: (key: str): bool\n```\n---\nRemoves the specified element from a map.\n### Parameters\n- `key` — `str` — The key.\n\n### Returns\ntrue if the given key is no longer present" + value: "Removes the specified element from a map.\n\n#### Returns\ntrue if the given key is no longer present" sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): MutJson" documentation: kind: markdown - value: "```wing\nget: (key: str): MutJson\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "Returns the value associated with the specified Json key.\n\n#### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): MutJson" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): MutJson\n```\n---\nReturns a specified element at a given index from MutJson Array.\n### Parameters\n- `index` — `num` — The index of the element in the MutJson Array to return.\n\n### Returns\nThe element at given index in MutJson Array\n\n*@throws* *index out of bounds error if the given index does not exist for the MutJson Array*" + value: "Returns a specified element at a given index from MutJson Array.\n\n#### Returns\nThe element at given index in MutJson Array\n\n*@throws* *index out of bounds error if the given index does not exist for the MutJson Array*" sortText: ff|getAt insertText: getAt($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "Checks if a Json object has a given key.\n\n#### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str, value: MutJson): void" documentation: kind: markdown - value: "```wing\nset: (key: str, value: MutJson): void\n```\n---\nAdds or updates an element in MutJson with a specific key and value.\n### Parameters\n- `key` — `str` — The key of the element to add.\n- `value` — `MutJson` — The value of the element to add." + value: Adds or updates an element in MutJson with a specific key and value. sortText: ff|set insertText: set($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num, value: MutJson): void" documentation: kind: markdown - value: "```wing\nsetAt: (index: num, value: MutJson): void\n```\n---\nSet element in MutJson Array with a specific key and value.\n### Parameters\n- `index` — `num`\n- `value` — `MutJson` — The value of the element to set." + value: Set element in MutJson Array with a specific key and value. sortText: ff|setAt insertText: setAt($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -110,7 +110,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -118,7 +118,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -126,7 +126,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): MutJson?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): MutJson?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "Optionally returns an specified element from the Json.\n\n#### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -138,7 +138,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): MutJson?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): MutJson?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "Optionally returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap index 5dd4bbccc03..37bfac8859a 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight delete: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a DELETE request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the DELETE request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the DELETE request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: "Executes a DELETE request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call" sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight fetch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a HTTP request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the HTTP request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call\n\n### Remarks\nThis method allows various HTTP methods based on the provided options.\n\n*@throws* *Only throws if there is a networking error*" + value: "Executes a HTTP request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call\n\n#### Remarks\nThis method allows various HTTP methods based on the provided options.\n\n*@throws* *Only throws if there is a networking error*" sortText: ff|fetch insertText: fetch($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: Url, options: FormatUrlOptions?): str" documentation: kind: markdown - value: "```wing\nstatic inflight formatUrl: inflight (url: Url, options: FormatUrlOptions?): str\n```\n---\nSerializes an URL Struct to a String.\n### Parameters\n- `url` — `Url` — The URL Struct to be formatted.\n- `...options` — `FormatUrlOptions?`\n \n - `auth?` — `bool?` — Whether the formatted URL should include the username and password.\n - `fragment?` — `bool?` — Whether the formatted URL should include the fragment identifier.\n - `search?` — `bool?` — Whether the formatted URL should include the search query.\n - `unicode?` — `bool?` — Whether the formatted URL should represent Unicode characters for the host component.\n\n### Returns\nA formatted URL String.\n\n*@throws* *Will throw an error if the input URL has invalid fields.*" + value: "Serializes an URL Struct to a String.\n\n#### Returns\nA formatted URL String.\n\n*@throws* *Will throw an error if the input URL has invalid fields.*" sortText: ff|formatUrl insertText: formatUrl($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight get: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a GET request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the GET request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the GET request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: "Executes a GET request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (urlString: str): Url" documentation: kind: markdown - value: "```wing\nstatic inflight parseUrl: inflight (urlString: str): Url\n```\n---\nParses the input URL String using WHATWG URL API and returns an URL Struct.\n### Parameters\n- `urlString` — `str` — The URL String to be parsed.\n\n### Returns\nAn URL Struct.\n\n*@throws* *Will throw an error if the input String is not a valid URL.*" + value: "Parses the input URL String using WHATWG URL API and returns an URL Struct.\n\n#### Returns\nAn URL Struct.\n\n*@throws* *Will throw an error if the input String is not a valid URL.*" sortText: ff|parseUrl insertText: parseUrl($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight patch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PATCH request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the PATCH request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the PATCH request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: "Executes a PATCH request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call" sortText: ff|patch insertText: patch($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight post: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a POST request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the POST request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the POST request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: "Executes a POST request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call" sortText: ff|post insertText: post($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight put: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PUT request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the PUT request.\n- `...options` — `RequestOptions?` — ptional parameters for customizing the PUT request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: "Executes a PUT request to a specified URL and provides a formatted response.\n\n#### Returns\nthe formatted response of the call" sortText: ff|put insertText: put($1) insertTextFormat: 2 @@ -101,48 +101,48 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Util\n```\n---\nThe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources.\n\n### Methods\n- `delete` — `inflight (url: str, options: RequestOptions?): Response` — Executes a DELETE request to a specified URL and provides a formatted response.\n- `fetch` — `inflight (url: str, options: RequestOptions?): Response` — Executes a HTTP request to a specified URL and provides a formatted response.\n- `formatUrl` — `inflight (url: Url, options: FormatUrlOptions?): str` — Serializes an URL Struct to a String.\n- `get` — `inflight (url: str, options: RequestOptions?): Response` — Executes a GET request to a specified URL and provides a formatted response.\n- `parseUrl` — `inflight (urlString: str): Url` — Parses the input URL String using WHATWG URL API and returns an URL Struct.\n- `patch` — `inflight (url: str, options: RequestOptions?): Response` — Executes a PATCH request to a specified URL and provides a formatted response.\n- `post` — `inflight (url: str, options: RequestOptions?): Response` — Executes a POST request to a specified URL and provides a formatted response.\n- `put` — `inflight (url: str, options: RequestOptions?): Response` — Executes a PUT request to a specified URL and provides a formatted response." + value: "```wing\nclass Util {\n static inflight delete(): Response;\n static inflight fetch(): Response;\n static inflight formatUrl(): str;\n static inflight get(): Response;\n static inflight parseUrl(): Url;\n static inflight patch(): Response;\n /* ... */\n}\n```\n---\nThe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources." sortText: gg|Util - label: FormatUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct FormatUrlOptions\n```\n---\nOptions for serializing a WHATWG URL to a String.\n### Fields\n- `auth?` — `bool?` — Whether the formatted URL should include the username and password.\n- `fragment?` — `bool?` — Whether the formatted URL should include the fragment identifier.\n- `search?` — `bool?` — Whether the formatted URL should include the search query.\n- `unicode?` — `bool?` — Whether the formatted URL should represent Unicode characters for the host component." + value: "```wing\nstruct FormatUrlOptions {\n auth?: bool;\n fragment?: bool;\n search?: bool;\n unicode?: bool;\n}\n```\n---\nOptions for serializing a WHATWG URL to a String." sortText: hh|FormatUrlOptions - label: RequestOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — `str?` — Any body that you want to add to your request.\n- `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n- `headers?` — `Map?` — Any headers you want to add to your request.\n- `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n- `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL." + value: "```wing\nstruct RequestOptions {\n body?: str;\n cache?: RequestCache;\n headers?: Map;\n method?: HttpMethod;\n redirect?: RequestRedirect;\n referrer?: str;\n}\n```\n---\nAn object containing any custom settings that you want to apply to the request." sortText: hh|RequestOptions - label: Response kind: 22 documentation: kind: markdown - value: "```wing\nstruct Response\n```\n---\nThe response to a HTTP request.\n### Fields\n- `body` — `str` — A string representation of the body contents.\n- `headers` — `Map` — The map of header information associated with the response.\n- `ok` — `bool` — A boolean indicating whether the response was successful (status in the range 200 – 299) or not.\n- `status` — `num` — The status code of the response.\n- `url` — `str` — The URL of the response." + value: "```wing\nstruct Response {\n body: str;\n headers: Map;\n ok: bool;\n status: num;\n url: str;\n}\n```\n---\nThe response to a HTTP request." sortText: hh|Response - label: Url kind: 22 documentation: kind: markdown - value: "```wing\nstruct Url\n```\n---\nAn URL following WHATWG URL Standard.\n### Fields\n- `hash` — `str` — The URL's fragment.\n- `host` — `str` — The URL's host.\n- `hostname` — `str` — The URL's hostname.\n- `href` — `str` — The entire URL.\n- `origin` — `str` — The URL's origin.\n- `password` — `str` — The URL’s password.\n- `pathname` — `str` — The URL's pathname.\n- `port` — `str` — The URL's port.\n- `protocol` — `str` — The URL's protocol.\n- `search` — `str` — The URL's search.\n- `username` — `str` — The URL's username." + value: "```wing\nstruct Url {\n hash: str;\n host: str;\n hostname: str;\n href: str;\n origin: str;\n password: str;\n /* ... */\n}\n```\n---\nAn URL following WHATWG URL Standard." sortText: hh|Url - label: HttpMethod kind: 13 documentation: kind: markdown - value: "```wing\nenum HttpMethod\n```\n---\nThe request's method.\n- `GET — GET.`\n- `PUT — PUT.`\n- `DELETE — DELETE.`\n- `PATCH — PATCH.`\n- `POST — POST.`\n- `OPTIONS — OPTIONS.`\n- `HEAD — HEAD.`" + value: "```wing\nenum HttpMethod {\n GET,\n PUT,\n DELETE,\n PATCH,\n POST,\n OPTIONS,\n HEAD,\n}\n```\n---\nThe request's method." sortText: jj|HttpMethod - label: RequestCache kind: 13 documentation: kind: markdown - value: "```wing\nenum RequestCache\n```\n---\nThe cache mode of the request.\n- `DEFAULT — The runtime environment looks for a matching request in its HTTP cache.`\n- `NO_STORE — The runtime environment fetches the resource from the remote server without first looking in the cache, and will not update the cache with the downloaded resource.`\n- `RELOAD — The runtime environment fetches the resource from the remote server without first looking in the cache, but then will update the cache with the downloaded resource.`\n- `NO_CACHE — The runtime environment looks for a matching request in its HTTP cache.`\n- `FORCE_CACHE — The runtime environment looks for a matching request in its HTTP cache.`\n\n\n### Remarks\nIt controls how a request will interact with the system's HTTP cache." + value: "```wing\nenum RequestCache {\n DEFAULT,\n NO_STORE,\n RELOAD,\n NO_CACHE,\n FORCE_CACHE,\n}\n```\n---\nThe cache mode of the request.\n\n#### Remarks\nIt controls how a request will interact with the system's HTTP cache." sortText: jj|RequestCache - label: RequestRedirect kind: 13 documentation: kind: markdown - value: "```wing\nenum RequestRedirect\n```\n---\nThe redirect read-only property that contains the mode for how redirects are handled.\n- `MANUAL — Do not follow redirects automatically.`\n- `FOLLOW — Follow all redirects incurred when fetching a resource.`\n- `ERROR — Return a network error when a request is met with a redirect.`" + value: "```wing\nenum RequestRedirect {\n MANUAL,\n FOLLOW,\n ERROR,\n}\n```\n---\nThe redirect read-only property that contains the mode for how redirects are handled." sortText: jj|RequestRedirect diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap index eb6ba6c140f..ed3a11ecc17 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap @@ -5,570 +5,570 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiConnectOptions?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiDeleteOptions?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiGetOptions?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiHeadOptions?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiOptionsOptions?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPatchOptions?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPostOptions?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPutOptions?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `renderCorsHeaders` — `preflight (corsOptions: ApiCorsOptions?): CorsHeaders?` — Generates an object containing default CORS response headers and OPTIONS response headers.\n- `renderOpenApiPath` — `preflight (path: str): str` — Converts input path to a valid OpenAPI path (replaces `:` based path params with `{}`).\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Api {\n url: str;\n connect(): void;\n delete(): void;\n get(): void;\n head(): void;\n options(): void;\n /* ... */\n}\n```\n---\nFunctionality shared between all `Api` implementations." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\nclass Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Counter {\n initial: num;\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nA distributed atomic counter." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Domain {\n domainName: str;\n}\n```\n---\nA cloud Domain." sortText: gg|Domain - label: Endpoint kind: 7 documentation: kind: markdown - value: "```wing\nclass Endpoint\n```\n---\nA cloud Endpoint.\n\n### Initializer\n- `url` — `str`\n- `...props` — `EndpointProps?`\n \n - `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n - `label?` — `str?` — The endpoint's label.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The endpoint url.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Endpoint {\n url: str;\n}\n```\n---\nA cloud Endpoint." sortText: gg|Endpoint - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str?): str?`\n- `...props` — `FunctionProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Function impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nA function." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass OnDeploy {\n // No public members\n}\n```\n---\nRun code every time the app is deployed." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerOptions?): Function` — Create a function to consume messages from this queue.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Queue {\n setConsumer(): Function;\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nA queue." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickOptions?): Function` — Create a function that runs when receiving the scheduled event.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Schedule {\n onTick(): Function;\n}\n```\n---\nA schedule." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n- `name?` — `str?` — Get secret name.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\nclass Secret {\n name?: str;\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nA cloud secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Service impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nA long-running service." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageOptions?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform.\n- `subscribeQueue` — `preflight (queue: Queue, props: TopicSubscribeQueueOptions?): void` — Subscribing queue to the topic.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Topic {\n onMessage(): Function;\n subscribeQueue(): void;\n inflight publish(): void;\n}\n```\n---\nA topic." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?` — The website's custom domain object.\n - `errorDocument?` — `str?` — Name of the error document for the website.\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions?): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Website impl IWebsite {\n path: str;\n url: str;\n addFile(): str;\n addJson(): str;\n}\n```\n---\nA cloud static website." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." + value: "```wing\nstruct AddFileOptions {\n contentType?: str;\n}\n```\n---\nOptions for adding a file with custom value during the website's deployment." sortText: hh|AddFileOptions - label: ApiConnectOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectOptions - label: ApiCorsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `str?` — The allowed origin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions {\n allowCredentials?: bool;\n allowHeaders?: Array;\n allowMethods?: Array;\n allowOrigin?: str;\n exposeHeaders?: Array;\n maxAge?: duration;\n}\n```\n---\nCors Options for `Api`." sortText: hh|ApiCorsOptions - label: ApiDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiDeleteOptions - label: ApiEndpointOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiEndpointOptions extends FunctionProps\n```\n---\nBase options for Api endpoints.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiEndpointOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nBase options for Api endpoints." sortText: hh|ApiEndpointOptions - label: ApiGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions\n```\n---\nOptions for Api get endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api get endpoint." sortText: hh|ApiGetOptions - label: ApiHeadOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiHeadOptions - label: ApiOptionsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiOptionsOptions - label: ApiPatchOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiPatchOptions - label: ApiPostOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions\n```\n---\nOptions for Api post endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api post endpoint." sortText: hh|ApiPostOptions - label: ApiProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps {\n cors?: bool;\n corsOptions?: ApiCorsOptions;\n}\n```\n---\nOptions for `Api`." sortText: hh|ApiProps - label: ApiPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiPutOptions - label: ApiRequest kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." + value: "```wing\nstruct ApiRequest {\n body?: str;\n headers?: Map;\n method: HttpMethod;\n path: str;\n query: Map;\n vars: Map;\n}\n```\n---\nShape of a request to an inflight handler." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers.\n- `status?` — `num?` — The response's status code." + value: "```wing\nstruct ApiResponse {\n body?: str;\n headers?: Map;\n status?: num;\n}\n```\n---\nShape of a response from a inflight handler." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nOptions for `Bucket.delete()`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions {\n mustExist?: bool;\n}\n```\n---\nOptions for `Bucket.delete()`." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." + value: "```wing\nstruct BucketEvent {\n key: str;\n type: BucketEventType;\n}\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927." sortText: hh|BucketEvent - label: BucketGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketGetOptions\n```\n---\nOptions for `Bucket.get()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.get()`." sortText: hh|BucketGetOptions - label: BucketOnCreateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnCreateOptions\n```\n---\n`onCreate` event options." + value: "```wing\nstruct BucketOnCreateOptions {\n // No public members\n}\n```\n---\n`onCreate` event options." sortText: hh|BucketOnCreateOptions - label: BucketOnDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnDeleteOptions\n```\n---\n`onDelete` event options." + value: "```wing\nstruct BucketOnDeleteOptions {\n // No public members\n}\n```\n---\n`onDelete` event options." sortText: hh|BucketOnDeleteOptions - label: BucketOnEventOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnEventOptions\n```\n---\n`onEvent` options." + value: "```wing\nstruct BucketOnEventOptions {\n // No public members\n}\n```\n---\n`onEvent` options." sortText: hh|BucketOnEventOptions - label: BucketOnUpdateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnUpdateOptions\n```\n---\n`onUpdate` event options." + value: "```wing\nstruct BucketOnUpdateOptions {\n // No public members\n}\n```\n---\n`onUpdate` event options." sortText: hh|BucketOnUpdateOptions - label: BucketProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps {\n public?: bool;\n}\n```\n---\nOptions for `Bucket`." sortText: hh|BucketProps - label: BucketPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketPutOptions\n```\n---\nOptions for `Bucket.put()`.\n### Fields\n- `contentType` — `str` — The HTTP Content-Type of the object." + value: "```wing\nstruct BucketPutOptions {\n contentType: str;\n}\n```\n---\nOptions for `Bucket.put()`." sortText: hh|BucketPutOptions - label: BucketSignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketSignedUrlOptions\n```\n---\nOptions for `Bucket.signedUrl()`.\n### Fields\n- `action?` — `BucketSignedUrlAction?` — The action allowed by the signed URL.\n- `duration?` — `duration?` — The duration for the signed URL to expire." + value: "```wing\nstruct BucketSignedUrlOptions {\n action?: BucketSignedUrlAction;\n duration?: duration;\n}\n```\n---\nOptions for `Bucket.signedUrl()`." sortText: hh|BucketSignedUrlOptions - label: BucketTryGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions\n```\n---\nOptions for `Bucket.tryGet()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.tryGet()`." sortText: hh|BucketTryGetOptions - label: CorsHeaders kind: 22 documentation: kind: markdown - value: "```wing\nstruct CorsHeaders\n```\n---\nType definition for CORS headers which includes default and options headers.\n### Fields\n- `defaultResponse` — `Map` — Default CORS response headers.\n- `optionsResponse` — `Map` — CORS options response headers." + value: "```wing\nstruct CorsHeaders {\n defaultResponse: Map;\n optionsResponse: Map;\n}\n```\n---\nType definition for CORS headers which includes default and options headers." sortText: hh|CorsHeaders - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." + value: "```wing\nstruct CounterProps {\n initial?: num;\n}\n```\n---\nOptions for `Counter`." sortText: hh|CounterProps - label: DeadLetterQueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DeadLetterQueueProps\n```\n---\nDead letter queue options.\n### Fields\n- `queue` — `Queue` — Queue to receive messages that failed processing.\n- `maxDeliveryAttempts?` — `num?` — Number of times a message will be processed before being sent to the dead-letter queue." + value: "```wing\nstruct DeadLetterQueueProps {\n maxDeliveryAttempts?: num;\n queue: Queue;\n}\n```\n---\nDead letter queue options." sortText: hh|DeadLetterQueueProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." + value: "```wing\nstruct DomainProps {\n domainName: str;\n}\n```\n---\nOptions for `Domain`." sortText: hh|DomainProps - label: EndpointProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct EndpointProps\n```\n---\nOptions for `Endpoint`.\n### Fields\n- `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n- `label?` — `str?` — The endpoint's label." + value: "```wing\nstruct EndpointProps {\n browserSupport?: bool;\n label?: str;\n}\n```\n---\nOptions for `Endpoint`." sortText: hh|EndpointProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Function`." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions {\n cache?: bool;\n}\n```\n---\nOptions when getting a secret value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." + value: "```wing\nstruct ObjectMetadata {\n contentType?: str;\n lastModified: Datetime;\n size: num;\n}\n```\n---\nMetadata of a bucket object." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct OnDeployProps extends FunctionProps {\n concurrency?: num;\n env?: Map;\n executeAfter?: Array;\n executeBefore?: Array;\n logRetentionDays?: num;\n memory?: num;\n /* ... */\n}\n```\n---\nOptions for `OnDeploy`." sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Queue`." sortText: hh|QueueProps - label: QueueSetConsumerOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps {\n batchSize?: num;\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Queue.setConsumer." sortText: hh|QueueSetConsumerOptions - label: ScheduleOnTickOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Schedule.onTick." sortText: hh|ScheduleOnTickOptions - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps {\n cron?: str;\n rate?: duration;\n}\n```\n---\nOptions for `Schedule`." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." + value: "```wing\nstruct SecretProps {\n name?: str;\n}\n```\n---\nOptions for `Secret`." sortText: hh|SecretProps - label: ServiceOnStartOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Service.onStart." sortText: hh|ServiceOnStartOptions - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps {\n autoStart?: bool;\n env?: Map;\n}\n```\n---\nOptions for `Service`." sortText: hh|ServiceProps - label: TopicOnMessageOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.onMessage`." sortText: hh|TopicOnMessageOptions - label: TopicProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicProps\n```\n---\nOptions for `Topic`." + value: "```wing\nstruct TopicProps {\n // No public members\n}\n```\n---\nOptions for `Topic`." sortText: hh|TopicProps - label: TopicSubscribeQueueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps\n```\n---\nOptions for `Topic.subscribeQueue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.subscribeQueue`." sortText: hh|TopicSubscribeQueueOptions - label: WebsiteDomainOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteDomainOptions {\n domain?: Domain;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteDomainOptions - label: WebsiteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nBasic options for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteOptions {\n errorDocument?: str;\n path: str;\n}\n```\n---\nBasic options for `Website`." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?` — The website's custom domain object.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions {\n domain?: Domain;\n errorDocument?: str;\n path: str;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteProps - label: IApiClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiClient\n```\n---\nInflight methods and members of `cloud.Api`." + value: "```wing\ninterface IApiClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Api`." sortText: ii|IApiClient - label: IApiEndpointHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nInflight client for `IApiEndpointHandler`." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient {\n inflight copy(): void;\n inflight delete(): void;\n inflight exists(): bool;\n inflight get(): str;\n inflight getJson(): Json;\n inflight list(): Array;\n /* ... */\n}\n```\n---\nInflight interface for `Bucket`." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient {\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nInflight interface for `Counter`." sortText: ii|ICounterClient - label: IDomainClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IDomainClient\n```\n---\nInflight interface for `Domain`." + value: "```wing\ninterface IDomainClient {\n // No public members\n}\n```\n---\nInflight interface for `Domain`." sortText: ii|IDomainClient - label: IEndpointClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IEndpointClient\n```\n---\nInflight interface for `Endpoint`." + value: "```wing\ninterface IEndpointClient {\n // No public members\n}\n```\n---\nInflight interface for `Endpoint`." sortText: ii|IEndpointClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running." + value: "```wing\ninterface IFunctionClient {\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nInflight interface for `Function`." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str?): str?\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninflight (event: str?): str?\n```\n---\nInflight client for `IFunctionHandler`." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployClient\n```\n---\nInflight interface for `OnDeploy`." + value: "```wing\ninterface IOnDeployClient {\n // No public members\n}\n```\n---\nInflight interface for `OnDeploy`." sortText: ii|IOnDeployClient - label: IOnDeployHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IOnDeployHandler`." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient {\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nInflight interface for `Queue`." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (message: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." + value: "```wing\ninflight (message: str): void\n```\n---\nInflight client for `IQueueSetConsumerHandler`." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleClient\n```\n---\nInflight interface for `Schedule`." + value: "```wing\ninterface IScheduleClient {\n // No public members\n}\n```\n---\nInflight interface for `Schedule`." sortText: ii|IScheduleClient - label: IScheduleOnTickHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IScheduleOnTickHandler`." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient {\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nInflight interface for `Secret`." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." + value: "```wing\ninterface IServiceClient {\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nInflight interface for `Service`." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nExecuted when a `cloud.Service` is started." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nInflight client for `IServiceHandler`." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nExecuted when a `cloud.Service` is stopped." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IServiceStopHandler`." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform." + value: "```wing\ninterface ITopicClient {\n inflight publish(): void;\n}\n```\n---\nInflight interface for `Topic`." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." + value: "```wing\ninflight (event: str): void\n```\n---\nInflight client for `ITopicOnMessageHandler`." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." + value: "```wing\ninterface IWebsite {\n url: str;\n}\n```\n---\nBase interface for a website." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsiteClient\n```\n---\nInflight methods and members of `cloud.Website`." + value: "```wing\ninterface IWebsiteClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Website`." sortText: ii|IWebsiteClient - label: BucketEventType kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketEventType\n```\n---\nBucket events to subscribe to.\n- `CREATE — Create.`\n- `DELETE — Delete.`\n- `UPDATE — Update.`" + value: "```wing\nenum BucketEventType {\n CREATE,\n DELETE,\n UPDATE,\n}\n```\n---\nBucket events to subscribe to." sortText: jj|BucketEventType - label: BucketSignedUrlAction kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketSignedUrlAction\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket.\n- `DOWNLOAD — Represents a HTTP GET request for a presigned URL, allowing read access for an object in the bucket.`\n- `UPLOAD — Represents a HTTP PUT request for a presigned URL, allowing write access for an object in the bucket.`" + value: "```wing\nenum BucketSignedUrlAction {\n DOWNLOAD,\n UPLOAD,\n}\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket." sortText: jj|BucketSignedUrlAction - label: HttpMethod kind: 13 documentation: kind: markdown - value: "```wing\nenum HttpMethod\n```\n---\nAllowed HTTP methods for a endpoint.\n- `GET — Get.`\n- `HEAD — Head.`\n- `POST — Post.`\n- `PUT — Put.`\n- `DELETE — Delete.`\n- `CONNECT — Connect.`\n- `OPTIONS — Options.`\n- `PATCH — Patch.`" + value: "```wing\nenum HttpMethod {\n GET,\n HEAD,\n POST,\n PUT,\n DELETE,\n CONNECT,\n OPTIONS,\n PATCH,\n}\n```\n---\nAllowed HTTP methods for a endpoint." sortText: jj|HttpMethod diff --git a/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap b/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap index 47d293bb9fa..b60862f6acd 100644 --- a/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap +++ b/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "durationThing:" kind: 5 detail: duration - documentation: - kind: markdown - value: "```wing\ndurationThing: duration\n```" sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap b/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap index 47d293bb9fa..b60862f6acd 100644 --- a/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap +++ b/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "durationThing:" kind: 5 detail: duration - documentation: - kind: markdown - value: "```wing\ndurationThing: duration\n```" sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap b/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap index 284740fa6fb..af97b279799 100644 --- a/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap +++ b/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap @@ -5,7 +5,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiConnectOptions?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiDeleteOptions?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiGetOptions?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiHeadOptions?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiOptionsOptions?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPatchOptions?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPostOptions?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPutOptions?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `renderCorsHeaders` — `preflight (corsOptions: ApiCorsOptions?): CorsHeaders?` — Generates an object containing default CORS response headers and OPTIONS response headers.\n- `renderOpenApiPath` — `preflight (path: str): str` — Converts input path to a valid OpenAPI path (replaces `:` based path params with `{}`).\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Api {\n url: str;\n connect(): void;\n delete(): void;\n get(): void;\n head(): void;\n options(): void;\n /* ... */\n}\n```\n---\nFunctionality shared between all `Api` implementations." sortText: gg|Api insertText: Api($1) insertTextFormat: 2 @@ -16,7 +16,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\nclass Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." sortText: gg|Bucket insertText: Bucket($1) insertTextFormat: 2 @@ -27,7 +27,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Counter {\n initial: num;\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nA distributed atomic counter." sortText: gg|Counter insertText: Counter($1) insertTextFormat: 2 @@ -38,7 +38,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Domain {\n domainName: str;\n}\n```\n---\nA cloud Domain." sortText: gg|Domain insertText: Domain($1) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Endpoint\n```\n---\nA cloud Endpoint.\n\n### Initializer\n- `url` — `str`\n- `...props` — `EndpointProps?`\n \n - `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n - `label?` — `str?` — The endpoint's label.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The endpoint url.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Endpoint {\n url: str;\n}\n```\n---\nA cloud Endpoint." sortText: gg|Endpoint insertText: Endpoint($1) insertTextFormat: 2 @@ -60,7 +60,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str?): str?`\n- `...props` — `FunctionProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Function impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nA function." sortText: gg|Function insertText: Function($1) insertTextFormat: 2 @@ -71,7 +71,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass OnDeploy {\n // No public members\n}\n```\n---\nRun code every time the app is deployed." sortText: gg|OnDeploy insertText: OnDeploy($1) insertTextFormat: 2 @@ -82,7 +82,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerOptions?): Function` — Create a function to consume messages from this queue.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Queue {\n setConsumer(): Function;\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nA queue." sortText: gg|Queue insertText: Queue($1) insertTextFormat: 2 @@ -93,7 +93,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickOptions?): Function` — Create a function that runs when receiving the scheduled event.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Schedule {\n onTick(): Function;\n}\n```\n---\nA schedule." sortText: gg|Schedule insertText: Schedule($1) insertTextFormat: 2 @@ -104,7 +104,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n- `name?` — `str?` — Get secret name.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\nclass Secret {\n name?: str;\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nA cloud secret." sortText: gg|Secret insertText: Secret($1) insertTextFormat: 2 @@ -115,7 +115,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Service impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nA long-running service." sortText: gg|Service insertText: Service($1) insertTextFormat: 2 @@ -126,7 +126,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageOptions?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform.\n- `subscribeQueue` — `preflight (queue: Queue, props: TopicSubscribeQueueOptions?): void` — Subscribing queue to the topic.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Topic {\n onMessage(): Function;\n subscribeQueue(): void;\n inflight publish(): void;\n}\n```\n---\nA topic." sortText: gg|Topic insertText: Topic($1) insertTextFormat: 2 @@ -137,7 +137,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?` — The website's custom domain object.\n - `errorDocument?` — `str?` — Name of the error document for the website.\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions?): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Website impl IWebsite {\n path: str;\n url: str;\n addFile(): str;\n addJson(): str;\n}\n```\n---\nA cloud static website." sortText: gg|Website insertText: Website($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap index bee389dcdcc..6d8e6e8943f 100644 --- a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap +++ b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap @@ -4,23 +4,20 @@ source: libs/wingc/src/lsp/completions.rs - label: a kind: 6 detail: num - documentation: - kind: markdown - value: "```wing\npreflight a: num\n```" sortText: bb|a - label: this kind: 6 detail: Construct documentation: kind: markdown - value: "```wing\npreflight this: Construct\nclass Construct impl IConstruct\n```\n---\nRepresents the building block of the construct graph.\n\n### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct.\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "Represents the building block of the construct graph.\n\n#### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct." sortText: bb|this - label: nodeof kind: 3 detail: "preflight (construct: IConstruct): Node" documentation: kind: markdown - value: "```wing\nnodeof: preflight (construct: IConstruct): Node\n```\n---\nObtain the tree node of a preflight resource.\n### Parameters\n- `construct` — `IConstruct` — The construct to obtain the tree node of" + value: Obtain the tree node of a preflight resource. sortText: cc|nodeof insertText: nodeof($1) insertTextFormat: 2 @@ -32,7 +29,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" + value: Casts a value into a different type. This is unsafe and can cause runtime errors sortText: cc|unsafeCast insertText: unsafeCast($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap index 59086c30f09..bed5ec38a5b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|asStr insertText: asStr() - label: get @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "Returns the value associated with the specified Json key.\n\n#### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "Returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "Checks if a Json object has a given key.\n\n#### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -74,7 +74,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -82,7 +82,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "Optionally returns an specified element from the Json.\n\n#### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "Optionally returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap index ed82e23a65e..aab56141bcd 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|asBool insertText: asBool() additionalTextEdits: @@ -23,7 +23,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|asNum insertText: asNum() additionalTextEdits: @@ -40,7 +40,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|asStr insertText: asStr() additionalTextEdits: @@ -57,7 +57,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "Returns the value associated with the specified Json key.\n\n#### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "Returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($1) insertTextFormat: 2 @@ -99,7 +99,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "Checks if a Json object has a given key.\n\n#### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($1) insertTextFormat: 2 @@ -120,7 +120,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() additionalTextEdits: @@ -137,7 +137,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() additionalTextEdits: @@ -154,7 +154,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() additionalTextEdits: @@ -171,7 +171,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "Optionally returns an specified element from the Json.\n\n#### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -192,7 +192,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "Optionally returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap index 59086c30f09..bed5ec38a5b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|asStr insertText: asStr() - label: get @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "Returns the value associated with the specified Json key.\n\n#### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "Returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "Checks if a Json object has a given key.\n\n#### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." + value: "Convert Json element to boolean if possible.\n\n#### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -74,7 +74,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." + value: "Convert Json element to number if possible.\n\n#### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -82,7 +82,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." + value: "Convert Json element to string if possible.\n\n#### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "Optionally returns an specified element from the Json.\n\n#### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "Optionally returns a specified element at a given index from Json Array.\n\n#### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap b/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap index 8eae7f21956..c038e2cd557 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap @@ -4,8 +4,5 @@ source: libs/wingc/src/lsp/completions.rs - label: bThing kind: 5 detail: Inner - documentation: - kind: markdown - value: "```wing\nbThing: Inner\nstruct Inner\n```\n---\n### Fields\n- `durationThing` — `duration`" sortText: ab|bThing diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_reference_3.snap b/libs/wingc/src/lsp/snapshots/completions/partial_reference_3.snap index 85d11824bde..7c1b54a677f 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_reference_3.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_reference_3.snap @@ -4,8 +4,5 @@ source: libs/wingc/src/lsp/completions.rs - label: durationThing kind: 5 detail: duration - documentation: - kind: markdown - value: "```wing\ndurationThing: duration\n```" sortText: ab|durationThing diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap b/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap index 37ac58eb4ef..0414cb6b862 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap @@ -6,14 +6,14 @@ source: libs/wingc/src/lsp/completions.rs detail: num documentation: kind: markdown - value: "```wing\nlength: num\n```\n---\nThe length of the string." + value: The length of the string. sortText: ab|length - label: at kind: 2 detail: "(index: num): str" documentation: kind: markdown - value: "```wing\nat: (index: num): str\n```\n---\nReturns the character at the specified index.\n### Parameters\n- `index` — `num` — position of the character.\n\n### Returns\nstring at the specified index." + value: "Returns the character at the specified index.\n\n#### Returns\nstring at the specified index." sortText: ff|at insertText: at($1) insertTextFormat: 2 @@ -25,7 +25,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(strN: str): str" documentation: kind: markdown - value: "```wing\nconcat: (strN: str): str\n```\n---\nCombines the text of two (or more) strings and returns a new string.\n### Parameters\n- `strN` — `str` — one or more strings to concatenate to this string.\n\n### Returns\na new combined string." + value: "Combines the text of two (or more) strings and returns a new string.\n\n#### Returns\na new combined string." sortText: ff|concat insertText: concat($1) insertTextFormat: 2 @@ -37,7 +37,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\ncontains: (searchString: str): bool\n```\n---\nChecks if string includes substring.\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string includes substring." + value: "Checks if string includes substring.\n\n#### Returns\ntrue if string includes substring." sortText: ff|contains insertText: contains($1) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\nendsWith: (searchString: str): bool\n```\n---\nDoes this string end with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string ends with searchString." + value: "Does this string end with the given searchString?\n\n#### Returns\ntrue if string ends with searchString." sortText: ff|endsWith insertText: endsWith($1) insertTextFormat: 2 @@ -61,7 +61,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): num" documentation: kind: markdown - value: "```wing\nindexOf: (searchString: str): num\n```\n---\nReturns the index of the first occurrence of searchString found.\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\nthe index of the first occurrence of searchString found, or -1 if not found." + value: "Returns the index of the first occurrence of searchString found.\n\n#### Returns\nthe index of the first occurrence of searchString found, or -1 if not found." sortText: ff|indexOf insertText: indexOf($1) insertTextFormat: 2 @@ -73,7 +73,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nlowercase: (): str\n```\n---\nReturns this string in lower case.\n\n### Returns\na new lower case string." + value: "Returns this string in lower case.\n\n#### Returns\na new lower case string." sortText: ff|lowercase insertText: lowercase() - label: replace @@ -81,7 +81,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str, replaceString: str): str" documentation: kind: markdown - value: "```wing\nreplace: (searchString: str, replaceString: str): str\n```\n---\nReplaces the first occurence of a substring within a string.\n### Parameters\n- `searchString` — `str` — The substring to search for.\n- `replaceString` — `str` — The replacement substring.\n\n### Returns\nThe modified string after replacement." + value: "Replaces the first occurence of a substring within a string.\n\n#### Returns\nThe modified string after replacement." sortText: ff|replace insertText: replace($1) insertTextFormat: 2 @@ -93,7 +93,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str, replaceString: str): str" documentation: kind: markdown - value: "```wing\nreplaceAll: (searchString: str, replaceString: str): str\n```\n---\nReplaces all occurrences of a substring within a string.\n### Parameters\n- `searchString` — `str` — The substring to search for.\n- `replaceString` — `str` — The replacement substring.\n\n### Returns\nThe modified string after replacement." + value: "Replaces all occurrences of a substring within a string.\n\n#### Returns\nThe modified string after replacement." sortText: ff|replaceAll insertText: replaceAll($1) insertTextFormat: 2 @@ -105,7 +105,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(separator: str): Array" documentation: kind: markdown - value: "```wing\nsplit: (separator: str): Array\n```\n---\nSplits string by separator.\n### Parameters\n- `separator` — `str` — separator to split by.\n\n### Returns\narray of strings." + value: "Splits string by separator.\n\n#### Returns\narray of strings." sortText: ff|split insertText: split($1) insertTextFormat: 2 @@ -117,7 +117,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string starts with searchString." + value: "Does this string start with the given searchString?\n\n#### Returns\ntrue if string starts with searchString." sortText: ff|startsWith insertText: startsWith($1) insertTextFormat: 2 @@ -129,7 +129,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(indexStart: num, indexEnd: num?): str" documentation: kind: markdown - value: "```wing\nsubstring: (indexStart: num, indexEnd: num?): str\n```\n---\nReturns a string between indexStart, indexEnd.\n### Parameters\n- `indexStart` — `num` — index of the character we slice at.\n- `indexEnd` — `num?` — optional - index of the character we end slicing at.\n\n### Returns\nthe string contained from indexStart to indexEnd." + value: "Returns a string between indexStart, indexEnd.\n\n#### Returns\nthe string contained from indexStart to indexEnd." sortText: ff|substring insertText: substring($1) insertTextFormat: 2 @@ -141,7 +141,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\ntrim: (): str\n```\n---\nRemoves white spaces from start and end of this string.\n\n### Returns\na new string with white spaces removed from start and end." + value: "Removes white spaces from start and end of this string.\n\n#### Returns\na new string with white spaces removed from start and end." sortText: ff|trim insertText: trim() - label: uppercase @@ -149,7 +149,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nuppercase: (): str\n```\n---\nReturns this string in upper case.\n\n### Returns\na new upper case string." + value: "Returns this string in upper case.\n\n#### Returns\na new upper case string." sortText: ff|uppercase insertText: uppercase() diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_type_reference.snap b/libs/wingc/src/lsp/snapshots/completions/partial_type_reference.snap index e5f243bd643..3cca6b8f097 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_type_reference.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_type_reference.snap @@ -4,45 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: func kind: 2 detail: "preflight (): void" - documentation: - kind: markdown - value: "```wing\nstatic preflight func: preflight (): void\n```" sortText: ff|func insertText: func() -- label: isConstruct - kind: 2 - detail: "preflight (x: any): bool" - documentation: - kind: markdown - value: "```wing\nstatic preflight isConstruct: preflight (x: any): bool\n```\n---\nChecks if `x` is a construct.\n### Parameters\n- `x` — `any` — Any object.\n\n### Returns\ntrue if `x` is an object created from a class which extends `Construct`.\n\n### Remarks\nUse this method instead of `instanceof` to properly detect `Construct`\ninstances, even when the construct library is symlinked.\n\nExplanation: in JavaScript, multiple copies of the `constructs` library on\ndisk are seen as independent, completely different libraries. As a\nconsequence, the class `Construct` in each copy of the `constructs` library\nis seen as a different class, and an instance of one class will not test as\n`instanceof` the other class. `npm install` will not create installations\nlike this, but users may manually symlink construct libraries together or\nuse a monorepo tool: in those cases, multiple copies of the `constructs`\nlibrary can be accidentally installed, and `instanceof` will behave\nunpredictably. It is safest to avoid using `instanceof`, and using\nthis type-testing method instead." - sortText: ff|isConstruct - insertText: isConstruct($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: onLiftType - kind: 2 - detail: "preflight (host: IInflightHost, ops: Array): void" - documentation: - kind: markdown - value: "```wing\nstatic preflight onLiftType: preflight (host: IInflightHost, ops: Array): void\n```\n---\nA hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nThe list of requested inflight methods\nneeded by the inflight host are given by `ops`.\n\nThis method is commonly used for adding permissions, environment variables, or\nother capabilities to the inflight host." - sortText: ff|onLiftType - insertText: onLiftType($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: toInflight - kind: 2 - detail: "preflight (obj: IResource): str" - documentation: - kind: markdown - value: "```wing\nstatic preflight toInflight: preflight (obj: IResource): str\n```\n---\nGenerates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n### Parameters\n- `obj` — `IResource`\n\n### Remarks\nNOTE: This statement must be executed within an async context." - sortText: ff|toInflight - insertText: toInflight($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_type_reference_annotation.snap b/libs/wingc/src/lsp/snapshots/completions/partial_type_reference_annotation.snap index eb6ba6c140f..ed3a11ecc17 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_type_reference_annotation.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_type_reference_annotation.snap @@ -5,570 +5,570 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiConnectOptions?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiDeleteOptions?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiGetOptions?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiHeadOptions?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiOptionsOptions?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPatchOptions?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPostOptions?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPutOptions?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `renderCorsHeaders` — `preflight (corsOptions: ApiCorsOptions?): CorsHeaders?` — Generates an object containing default CORS response headers and OPTIONS response headers.\n- `renderOpenApiPath` — `preflight (path: str): str` — Converts input path to a valid OpenAPI path (replaces `:` based path params with `{}`).\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Api {\n url: str;\n connect(): void;\n delete(): void;\n get(): void;\n head(): void;\n options(): void;\n /* ... */\n}\n```\n---\nFunctionality shared between all `Api` implementations." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\nclass Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Counter {\n initial: num;\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nA distributed atomic counter." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Domain {\n domainName: str;\n}\n```\n---\nA cloud Domain." sortText: gg|Domain - label: Endpoint kind: 7 documentation: kind: markdown - value: "```wing\nclass Endpoint\n```\n---\nA cloud Endpoint.\n\n### Initializer\n- `url` — `str`\n- `...props` — `EndpointProps?`\n \n - `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n - `label?` — `str?` — The endpoint's label.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The endpoint url.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Endpoint {\n url: str;\n}\n```\n---\nA cloud Endpoint." sortText: gg|Endpoint - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str?): str?`\n- `...props` — `FunctionProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Function impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nA function." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass OnDeploy {\n // No public members\n}\n```\n---\nRun code every time the app is deployed." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerOptions?): Function` — Create a function to consume messages from this queue.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Queue {\n setConsumer(): Function;\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nA queue." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickOptions?): Function` — Create a function that runs when receiving the scheduled event.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Schedule {\n onTick(): Function;\n}\n```\n---\nA schedule." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n- `name?` — `str?` — Get secret name.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\nclass Secret {\n name?: str;\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nA cloud secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Service impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nA long-running service." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageOptions?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform.\n- `subscribeQueue` — `preflight (queue: Queue, props: TopicSubscribeQueueOptions?): void` — Subscribing queue to the topic.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Topic {\n onMessage(): Function;\n subscribeQueue(): void;\n inflight publish(): void;\n}\n```\n---\nA topic." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?` — The website's custom domain object.\n - `errorDocument?` — `str?` — Name of the error document for the website.\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions?): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Website impl IWebsite {\n path: str;\n url: str;\n addFile(): str;\n addJson(): str;\n}\n```\n---\nA cloud static website." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." + value: "```wing\nstruct AddFileOptions {\n contentType?: str;\n}\n```\n---\nOptions for adding a file with custom value during the website's deployment." sortText: hh|AddFileOptions - label: ApiConnectOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectOptions - label: ApiCorsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `str?` — The allowed origin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions {\n allowCredentials?: bool;\n allowHeaders?: Array;\n allowMethods?: Array;\n allowOrigin?: str;\n exposeHeaders?: Array;\n maxAge?: duration;\n}\n```\n---\nCors Options for `Api`." sortText: hh|ApiCorsOptions - label: ApiDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiDeleteOptions - label: ApiEndpointOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiEndpointOptions extends FunctionProps\n```\n---\nBase options for Api endpoints.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiEndpointOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nBase options for Api endpoints." sortText: hh|ApiEndpointOptions - label: ApiGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions\n```\n---\nOptions for Api get endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api get endpoint." sortText: hh|ApiGetOptions - label: ApiHeadOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiHeadOptions - label: ApiOptionsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiOptionsOptions - label: ApiPatchOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiPatchOptions - label: ApiPostOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions\n```\n---\nOptions for Api post endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api post endpoint." sortText: hh|ApiPostOptions - label: ApiProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps {\n cors?: bool;\n corsOptions?: ApiCorsOptions;\n}\n```\n---\nOptions for `Api`." sortText: hh|ApiProps - label: ApiPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiPutOptions - label: ApiRequest kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." + value: "```wing\nstruct ApiRequest {\n body?: str;\n headers?: Map;\n method: HttpMethod;\n path: str;\n query: Map;\n vars: Map;\n}\n```\n---\nShape of a request to an inflight handler." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers.\n- `status?` — `num?` — The response's status code." + value: "```wing\nstruct ApiResponse {\n body?: str;\n headers?: Map;\n status?: num;\n}\n```\n---\nShape of a response from a inflight handler." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nOptions for `Bucket.delete()`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions {\n mustExist?: bool;\n}\n```\n---\nOptions for `Bucket.delete()`." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." + value: "```wing\nstruct BucketEvent {\n key: str;\n type: BucketEventType;\n}\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927." sortText: hh|BucketEvent - label: BucketGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketGetOptions\n```\n---\nOptions for `Bucket.get()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.get()`." sortText: hh|BucketGetOptions - label: BucketOnCreateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnCreateOptions\n```\n---\n`onCreate` event options." + value: "```wing\nstruct BucketOnCreateOptions {\n // No public members\n}\n```\n---\n`onCreate` event options." sortText: hh|BucketOnCreateOptions - label: BucketOnDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnDeleteOptions\n```\n---\n`onDelete` event options." + value: "```wing\nstruct BucketOnDeleteOptions {\n // No public members\n}\n```\n---\n`onDelete` event options." sortText: hh|BucketOnDeleteOptions - label: BucketOnEventOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnEventOptions\n```\n---\n`onEvent` options." + value: "```wing\nstruct BucketOnEventOptions {\n // No public members\n}\n```\n---\n`onEvent` options." sortText: hh|BucketOnEventOptions - label: BucketOnUpdateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnUpdateOptions\n```\n---\n`onUpdate` event options." + value: "```wing\nstruct BucketOnUpdateOptions {\n // No public members\n}\n```\n---\n`onUpdate` event options." sortText: hh|BucketOnUpdateOptions - label: BucketProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps {\n public?: bool;\n}\n```\n---\nOptions for `Bucket`." sortText: hh|BucketProps - label: BucketPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketPutOptions\n```\n---\nOptions for `Bucket.put()`.\n### Fields\n- `contentType` — `str` — The HTTP Content-Type of the object." + value: "```wing\nstruct BucketPutOptions {\n contentType: str;\n}\n```\n---\nOptions for `Bucket.put()`." sortText: hh|BucketPutOptions - label: BucketSignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketSignedUrlOptions\n```\n---\nOptions for `Bucket.signedUrl()`.\n### Fields\n- `action?` — `BucketSignedUrlAction?` — The action allowed by the signed URL.\n- `duration?` — `duration?` — The duration for the signed URL to expire." + value: "```wing\nstruct BucketSignedUrlOptions {\n action?: BucketSignedUrlAction;\n duration?: duration;\n}\n```\n---\nOptions for `Bucket.signedUrl()`." sortText: hh|BucketSignedUrlOptions - label: BucketTryGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions\n```\n---\nOptions for `Bucket.tryGet()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.tryGet()`." sortText: hh|BucketTryGetOptions - label: CorsHeaders kind: 22 documentation: kind: markdown - value: "```wing\nstruct CorsHeaders\n```\n---\nType definition for CORS headers which includes default and options headers.\n### Fields\n- `defaultResponse` — `Map` — Default CORS response headers.\n- `optionsResponse` — `Map` — CORS options response headers." + value: "```wing\nstruct CorsHeaders {\n defaultResponse: Map;\n optionsResponse: Map;\n}\n```\n---\nType definition for CORS headers which includes default and options headers." sortText: hh|CorsHeaders - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." + value: "```wing\nstruct CounterProps {\n initial?: num;\n}\n```\n---\nOptions for `Counter`." sortText: hh|CounterProps - label: DeadLetterQueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DeadLetterQueueProps\n```\n---\nDead letter queue options.\n### Fields\n- `queue` — `Queue` — Queue to receive messages that failed processing.\n- `maxDeliveryAttempts?` — `num?` — Number of times a message will be processed before being sent to the dead-letter queue." + value: "```wing\nstruct DeadLetterQueueProps {\n maxDeliveryAttempts?: num;\n queue: Queue;\n}\n```\n---\nDead letter queue options." sortText: hh|DeadLetterQueueProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." + value: "```wing\nstruct DomainProps {\n domainName: str;\n}\n```\n---\nOptions for `Domain`." sortText: hh|DomainProps - label: EndpointProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct EndpointProps\n```\n---\nOptions for `Endpoint`.\n### Fields\n- `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n- `label?` — `str?` — The endpoint's label." + value: "```wing\nstruct EndpointProps {\n browserSupport?: bool;\n label?: str;\n}\n```\n---\nOptions for `Endpoint`." sortText: hh|EndpointProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Function`." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions {\n cache?: bool;\n}\n```\n---\nOptions when getting a secret value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." + value: "```wing\nstruct ObjectMetadata {\n contentType?: str;\n lastModified: Datetime;\n size: num;\n}\n```\n---\nMetadata of a bucket object." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct OnDeployProps extends FunctionProps {\n concurrency?: num;\n env?: Map;\n executeAfter?: Array;\n executeBefore?: Array;\n logRetentionDays?: num;\n memory?: num;\n /* ... */\n}\n```\n---\nOptions for `OnDeploy`." sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Queue`." sortText: hh|QueueProps - label: QueueSetConsumerOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps {\n batchSize?: num;\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Queue.setConsumer." sortText: hh|QueueSetConsumerOptions - label: ScheduleOnTickOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Schedule.onTick." sortText: hh|ScheduleOnTickOptions - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps {\n cron?: str;\n rate?: duration;\n}\n```\n---\nOptions for `Schedule`." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." + value: "```wing\nstruct SecretProps {\n name?: str;\n}\n```\n---\nOptions for `Secret`." sortText: hh|SecretProps - label: ServiceOnStartOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Service.onStart." sortText: hh|ServiceOnStartOptions - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps {\n autoStart?: bool;\n env?: Map;\n}\n```\n---\nOptions for `Service`." sortText: hh|ServiceProps - label: TopicOnMessageOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.onMessage`." sortText: hh|TopicOnMessageOptions - label: TopicProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicProps\n```\n---\nOptions for `Topic`." + value: "```wing\nstruct TopicProps {\n // No public members\n}\n```\n---\nOptions for `Topic`." sortText: hh|TopicProps - label: TopicSubscribeQueueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps\n```\n---\nOptions for `Topic.subscribeQueue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.subscribeQueue`." sortText: hh|TopicSubscribeQueueOptions - label: WebsiteDomainOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteDomainOptions {\n domain?: Domain;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteDomainOptions - label: WebsiteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nBasic options for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteOptions {\n errorDocument?: str;\n path: str;\n}\n```\n---\nBasic options for `Website`." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?` — The website's custom domain object.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions {\n domain?: Domain;\n errorDocument?: str;\n path: str;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteProps - label: IApiClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiClient\n```\n---\nInflight methods and members of `cloud.Api`." + value: "```wing\ninterface IApiClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Api`." sortText: ii|IApiClient - label: IApiEndpointHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nInflight client for `IApiEndpointHandler`." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient {\n inflight copy(): void;\n inflight delete(): void;\n inflight exists(): bool;\n inflight get(): str;\n inflight getJson(): Json;\n inflight list(): Array;\n /* ... */\n}\n```\n---\nInflight interface for `Bucket`." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient {\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nInflight interface for `Counter`." sortText: ii|ICounterClient - label: IDomainClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IDomainClient\n```\n---\nInflight interface for `Domain`." + value: "```wing\ninterface IDomainClient {\n // No public members\n}\n```\n---\nInflight interface for `Domain`." sortText: ii|IDomainClient - label: IEndpointClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IEndpointClient\n```\n---\nInflight interface for `Endpoint`." + value: "```wing\ninterface IEndpointClient {\n // No public members\n}\n```\n---\nInflight interface for `Endpoint`." sortText: ii|IEndpointClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running." + value: "```wing\ninterface IFunctionClient {\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nInflight interface for `Function`." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str?): str?\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninflight (event: str?): str?\n```\n---\nInflight client for `IFunctionHandler`." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployClient\n```\n---\nInflight interface for `OnDeploy`." + value: "```wing\ninterface IOnDeployClient {\n // No public members\n}\n```\n---\nInflight interface for `OnDeploy`." sortText: ii|IOnDeployClient - label: IOnDeployHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IOnDeployHandler`." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient {\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nInflight interface for `Queue`." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (message: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." + value: "```wing\ninflight (message: str): void\n```\n---\nInflight client for `IQueueSetConsumerHandler`." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleClient\n```\n---\nInflight interface for `Schedule`." + value: "```wing\ninterface IScheduleClient {\n // No public members\n}\n```\n---\nInflight interface for `Schedule`." sortText: ii|IScheduleClient - label: IScheduleOnTickHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IScheduleOnTickHandler`." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient {\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nInflight interface for `Secret`." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." + value: "```wing\ninterface IServiceClient {\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nInflight interface for `Service`." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nExecuted when a `cloud.Service` is started." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nInflight client for `IServiceHandler`." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nExecuted when a `cloud.Service` is stopped." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IServiceStopHandler`." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform." + value: "```wing\ninterface ITopicClient {\n inflight publish(): void;\n}\n```\n---\nInflight interface for `Topic`." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." + value: "```wing\ninflight (event: str): void\n```\n---\nInflight client for `ITopicOnMessageHandler`." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." + value: "```wing\ninterface IWebsite {\n url: str;\n}\n```\n---\nBase interface for a website." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsiteClient\n```\n---\nInflight methods and members of `cloud.Website`." + value: "```wing\ninterface IWebsiteClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Website`." sortText: ii|IWebsiteClient - label: BucketEventType kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketEventType\n```\n---\nBucket events to subscribe to.\n- `CREATE — Create.`\n- `DELETE — Delete.`\n- `UPDATE — Update.`" + value: "```wing\nenum BucketEventType {\n CREATE,\n DELETE,\n UPDATE,\n}\n```\n---\nBucket events to subscribe to." sortText: jj|BucketEventType - label: BucketSignedUrlAction kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketSignedUrlAction\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket.\n- `DOWNLOAD — Represents a HTTP GET request for a presigned URL, allowing read access for an object in the bucket.`\n- `UPLOAD — Represents a HTTP PUT request for a presigned URL, allowing write access for an object in the bucket.`" + value: "```wing\nenum BucketSignedUrlAction {\n DOWNLOAD,\n UPLOAD,\n}\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket." sortText: jj|BucketSignedUrlAction - label: HttpMethod kind: 13 documentation: kind: markdown - value: "```wing\nenum HttpMethod\n```\n---\nAllowed HTTP methods for a endpoint.\n- `GET — Get.`\n- `HEAD — Head.`\n- `POST — Post.`\n- `PUT — Put.`\n- `DELETE — Delete.`\n- `CONNECT — Connect.`\n- `OPTIONS — Options.`\n- `PATCH — Patch.`" + value: "```wing\nenum HttpMethod {\n GET,\n HEAD,\n POST,\n PUT,\n DELETE,\n CONNECT,\n OPTIONS,\n PATCH,\n}\n```\n---\nAllowed HTTP methods for a endpoint." sortText: jj|HttpMethod diff --git a/libs/wingc/src/lsp/snapshots/completions/show_private.snap b/libs/wingc/src/lsp/snapshots/completions/show_private.snap index 073523dc6d1..af462eca267 100644 --- a/libs/wingc/src/lsp/snapshots/completions/show_private.snap +++ b/libs/wingc/src/lsp/snapshots/completions/show_private.snap @@ -4,35 +4,5 @@ source: libs/wingc/src/lsp/completions.rs - label: a kind: 5 detail: num - documentation: - kind: markdown - value: "```wing\npreflight a: num\n```" sortText: ab|a -- label: node - kind: 5 - detail: Node - documentation: - kind: markdown - value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(...deps: Array): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getAllContext` — `(defaults: Json?): any` — Retrieves the all context of a node from tree context.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." - sortText: ab|node -- label: onLift - kind: 2 - detail: "preflight (host: IInflightHost, ops: Array): void" - documentation: - kind: markdown - value: "```wing\npreflight onLift: preflight (host: IInflightHost, ops: Array): void\n```\n---\nA hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nYou can override this method to perform additional logic like granting\nIAM permissions to the host based on what methods are being called. But\nyou must call `super.bind(host, ops)` to ensure that the resource is\nactually bound." - sortText: ff|onLift - insertText: onLift($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: toString - kind: 2 - detail: "preflight (): str" - documentation: - kind: markdown - value: "```wing\npreflight toString: preflight (): str\n```\n---\nReturns a string representation of this construct." - sortText: ff|toString - insertText: toString() diff --git a/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap b/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap index ad6eb5ddf4c..a1ef50a4beb 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" + value: "Creates an immutable deep copy of the Json.\n\n#### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" + value: "Creates a mutable deep copy of the Json.\n\n#### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." + value: Deletes a key in a given Json. sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" + value: "Returns the entries from the Json.\n\n#### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" + value: "Returns the keys from the Json.\n\n#### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" + value: "Parse a string into a Json.\n\n#### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" + value: "Formats Json as string.\n\n#### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "Try to parse a string into a Json.\n\n#### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" + value: "Returns the values from the Json.\n\n#### Returns\nthe values as Array" sortText: ff|values insertText: values($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap index ad6eb5ddf4c..a1ef50a4beb 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" + value: "Creates an immutable deep copy of the Json.\n\n#### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" + value: "Creates a mutable deep copy of the Json.\n\n#### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." + value: Deletes a key in a given Json. sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" + value: "Returns the entries from the Json.\n\n#### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" + value: "Returns the keys from the Json.\n\n#### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" + value: "Parse a string into a Json.\n\n#### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" + value: "Formats Json as string.\n\n#### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "Try to parse a string into a Json.\n\n#### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" + value: "Returns the values from the Json.\n\n#### Returns\nthe values as Array" sortText: ff|values insertText: values($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap index ad6eb5ddf4c..a1ef50a4beb 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" + value: "Creates an immutable deep copy of the Json.\n\n#### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" + value: "Creates a mutable deep copy of the Json.\n\n#### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." + value: Deletes a key in a given Json. sortText: ff|delete insertText: delete($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" + value: "Returns the entries from the Json.\n\n#### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" + value: "Returns the keys from the Json.\n\n#### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" + value: "Parse a string into a Json.\n\n#### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($1) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" + value: "Formats Json as string.\n\n#### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($1) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "Try to parse a string into a Json.\n\n#### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($1) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" + value: "Returns the values from the Json.\n\n#### Returns\nthe values as Array" sortText: ff|values insertText: values($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap b/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap index 5da9f5c3997..21fe52dcfe4 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap @@ -4,45 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: hello kind: 2 detail: "preflight (): void" - documentation: - kind: markdown - value: "```wing\nstatic preflight hello: preflight (): void\n```" sortText: ff|hello insertText: hello() -- label: isConstruct - kind: 2 - detail: "preflight (x: any): bool" - documentation: - kind: markdown - value: "```wing\nstatic preflight isConstruct: preflight (x: any): bool\n```\n---\nChecks if `x` is a construct.\n### Parameters\n- `x` — `any` — Any object.\n\n### Returns\ntrue if `x` is an object created from a class which extends `Construct`.\n\n### Remarks\nUse this method instead of `instanceof` to properly detect `Construct`\ninstances, even when the construct library is symlinked.\n\nExplanation: in JavaScript, multiple copies of the `constructs` library on\ndisk are seen as independent, completely different libraries. As a\nconsequence, the class `Construct` in each copy of the `constructs` library\nis seen as a different class, and an instance of one class will not test as\n`instanceof` the other class. `npm install` will not create installations\nlike this, but users may manually symlink construct libraries together or\nuse a monorepo tool: in those cases, multiple copies of the `constructs`\nlibrary can be accidentally installed, and `instanceof` will behave\nunpredictably. It is safest to avoid using `instanceof`, and using\nthis type-testing method instead." - sortText: ff|isConstruct - insertText: isConstruct($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: onLiftType - kind: 2 - detail: "preflight (host: IInflightHost, ops: Array): void" - documentation: - kind: markdown - value: "```wing\nstatic preflight onLiftType: preflight (host: IInflightHost, ops: Array): void\n```\n---\nA hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nThe list of requested inflight methods\nneeded by the inflight host are given by `ops`.\n\nThis method is commonly used for adding permissions, environment variables, or\nother capabilities to the inflight host." - sortText: ff|onLiftType - insertText: onLiftType($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints -- label: toInflight - kind: 2 - detail: "preflight (obj: IResource): str" - documentation: - kind: markdown - value: "```wing\nstatic preflight toInflight: preflight (obj: IResource): str\n```\n---\nGenerates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n### Parameters\n- `obj` — `IResource`\n\n### Remarks\nNOTE: This statement must be executed within an async context." - sortText: ff|toInflight - insertText: toInflight($1) - insertTextFormat: 2 - command: - title: triggerParameterHints - command: editor.action.triggerParameterHints diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_arg_expansion_partial.snap b/libs/wingc/src/lsp/snapshots/completions/struct_arg_expansion_partial.snap new file mode 100644 index 00000000000..9390aaa24d5 --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/completions/struct_arg_expansion_partial.snap @@ -0,0 +1,137 @@ +--- +source: libs/wingc/src/lsp/completions.rs +--- +- label: "a1:" + kind: 5 + detail: num + sortText: "ab|a|a1:" + insertText: "a1: $1" + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: "b1:" + kind: 5 + detail: num + sortText: "ab|a|b1:" + insertText: "b1: $1" + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: this + kind: 6 + detail: Construct + documentation: + kind: markdown + value: "Represents the building block of the construct graph.\n\n#### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct." + sortText: bb|this +- label: nodeof + kind: 3 + detail: "preflight (construct: IConstruct): Node" + documentation: + kind: markdown + value: Obtain the tree node of a preflight resource. + sortText: cc|nodeof + insertText: nodeof($1) + insertTextFormat: 2 + command: + title: triggerParameterHints + command: editor.action.triggerParameterHints +- label: unsafeCast + kind: 3 + detail: "(value: any): any" + documentation: + kind: markdown + value: Casts a value into a different type. This is unsafe and can cause runtime errors + sortText: cc|unsafeCast + insertText: unsafeCast($1) + insertTextFormat: 2 + command: + title: triggerParameterHints + command: editor.action.triggerParameterHints +- label: S + kind: 22 + documentation: + kind: markdown + value: "```wing\nstruct S {\n a1: num;\n b1: num;\n}\n```" + sortText: hh|S +- label: Json + kind: 14 + sortText: kl|zyJson +- label: MutJson + kind: 14 + sortText: kl|zyMutJson +- label: bool + kind: 14 + sortText: kl|zybool +- label: datetime + kind: 14 + sortText: kl|zydatetime +- label: duration + kind: 14 + sortText: kl|zyduration +- label: num + kind: 14 + sortText: kl|zynum +- label: regex + kind: 14 + sortText: kl|zyregex +- label: str + kind: 14 + sortText: kl|zystr +- label: Array + kind: 14 + sortText: kl|zzArray + insertText: Array<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: Map + kind: 14 + sortText: kl|zzMap + insertText: Map<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: MutArray + kind: 14 + sortText: kl|zzMutArray + insertText: MutArray<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: MutMap + kind: 14 + sortText: kl|zzMutMap + insertText: MutMap<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: MutSet + kind: 14 + sortText: kl|zzMutSet + insertText: MutSet<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: Set + kind: 14 + sortText: kl|zzSet + insertText: Set<$1> + insertTextFormat: 2 + command: + title: triggerCompletion + command: editor.action.triggerSuggest +- label: "inflight () => {}" + kind: 15 + sortText: ll|zzinflight + filterText: inflight + insertText: "inflight ($1) => {$0}" + insertTextFormat: 2 + diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_completion_in_test.snap b/libs/wingc/src/lsp/snapshots/completions/struct_completion_in_test.snap index 1b5b2ca57aa..c1ff7ba98b1 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_completion_in_test.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_completion_in_test.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "ab:" kind: 5 detail: num - documentation: - kind: markdown - value: "```wing\nab: num\n```" sortText: "ab|a|ab:" insertText: "ab: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_definition_types.snap b/libs/wingc/src/lsp/snapshots/completions/struct_definition_types.snap index 430fae58296..26c043077fe 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_definition_types.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_definition_types.snap @@ -5,7 +5,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct Foo\n```\n---" + value: "```wing\nstruct Foo {\n // No public members\n}\n```" sortText: hh|Foo - label: cloud kind: 9 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap index 6982f19bd47..ebe2ec76db6 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "x:" kind: 5 detail: str - documentation: - kind: markdown - value: "```wing\nx: str\n```" sortText: "ab|a|x:" insertText: "x: $1" insertTextFormat: 2 @@ -16,9 +13,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "y:" kind: 5 detail: num - documentation: - kind: markdown - value: "```wing\ny: num\n```" sortText: "ab|a|y:" insertText: "y: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_empty_nospace.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_empty_nospace.snap index 2e4a08ccf60..f8de678453c 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_empty_nospace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_empty_nospace.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "x:" kind: 5 detail: str - documentation: - kind: markdown - value: "```wing\nx: str\n```" sortText: "ab|a|x:" insertText: "x: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap index 97885fb9f1d..d7596a184aa 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap @@ -4,9 +4,6 @@ source: libs/wingc/src/lsp/completions.rs - label: "y:" kind: 5 detail: num - documentation: - kind: markdown - value: "```wing\ny: num\n```" sortText: "ab|a|y:" insertText: "y: $1" insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap index e091a39671b..21a43adb971 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap @@ -6,14 +6,14 @@ source: libs/wingc/src/lsp/completions.rs detail: Construct documentation: kind: markdown - value: "```wing\npreflight this: Construct\nclass Construct impl IConstruct\n```\n---\nRepresents the building block of the construct graph.\n\n### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct.\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "Represents the building block of the construct graph.\n\n#### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct." sortText: bb|this - label: nodeof kind: 3 detail: "preflight (construct: IConstruct): Node" documentation: kind: markdown - value: "```wing\nnodeof: preflight (construct: IConstruct): Node\n```\n---\nObtain the tree node of a preflight resource.\n### Parameters\n- `construct` — `IConstruct` — The construct to obtain the tree node of" + value: Obtain the tree node of a preflight resource. sortText: cc|nodeof insertText: nodeof($1) insertTextFormat: 2 @@ -25,7 +25,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" + value: Casts a value into a different type. This is unsafe and can cause runtime errors sortText: cc|unsafeCast insertText: unsafeCast($1) insertTextFormat: 2 @@ -36,7 +36,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct Foo\n```\n---\n### Fields\n- `x` — `str`\n- `y` — `num`" + value: "```wing\nstruct Foo {\n x: str;\n y: num;\n}\n```" sortText: hh|Foo - label: Json kind: 14 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_show_values.snap b/libs/wingc/src/lsp/snapshots/completions/struct_show_values.snap index a06bdc2effc..e7fe01330cb 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_show_values.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_show_values.snap @@ -6,21 +6,18 @@ source: libs/wingc/src/lsp/completions.rs detail: Construct documentation: kind: markdown - value: "```wing\npreflight this: Construct\nclass Construct impl IConstruct\n```\n---\nRepresents the building block of the construct graph.\n\n### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct.\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "Represents the building block of the construct graph.\n\n#### Remarks\nAll constructs besides the root construct must be created within the scope of\nanother construct." sortText: bb|this - label: x kind: 6 detail: num - documentation: - kind: markdown - value: "```wing\npreflight x: num\n```" sortText: bb|x - label: nodeof kind: 3 detail: "preflight (construct: IConstruct): Node" documentation: kind: markdown - value: "```wing\nnodeof: preflight (construct: IConstruct): Node\n```\n---\nObtain the tree node of a preflight resource.\n### Parameters\n- `construct` — `IConstruct` — The construct to obtain the tree node of" + value: Obtain the tree node of a preflight resource. sortText: cc|nodeof insertText: nodeof($1) insertTextFormat: 2 @@ -32,7 +29,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" + value: Casts a value into a different type. This is unsafe and can cause runtime errors sortText: cc|unsafeCast insertText: unsafeCast($1) insertTextFormat: 2 @@ -43,7 +40,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct S\n```\n---\n### Fields\n- `a` — `num`\n- `b` — `num`" + value: "```wing\nstruct S {\n a: num;\n b: num;\n}\n```" sortText: hh|S - label: Json kind: 14 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_static.snap b/libs/wingc/src/lsp/snapshots/completions/struct_static.snap index 026e19406aa..ac99a94ba36 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_static.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_static.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, options: JsonValidationOptions?): T1" documentation: kind: markdown - value: "```wing\nstatic fromJson: (json: Json, options: JsonValidationOptions?): T1\n```\n---\nConverts a Json to a Struct.\n### Parameters\n- `json` — `Json`\n- `...options` — `JsonValidationOptions?`\n \n - `unsafe?` — `bool?` — Unsafe mode to skip validation (may lead to runtime errors)." + value: Converts a Json to a Struct. sortText: ff|fromJson insertText: fromJson($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: str): T1" documentation: kind: markdown - value: "```wing\nstatic parseJson: (json: str): T1\n```\n---\nParse a Json string into a Struct.\n### Parameters\n- `json` — `str`" + value: Parse a Json string into a Struct. sortText: ff|parseJson insertText: parseJson($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): JsonSchema" documentation: kind: markdown - value: "```wing\nstatic schema: (): JsonSchema\n```\n---\nRetrieve the schema for this struct." + value: Retrieve the schema for this struct. sortText: ff|schema insertText: schema() - label: tryFromJson @@ -38,7 +38,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): T1?" documentation: kind: markdown - value: "```wing\nstatic tryFromJson: (json: Json): T1?\n```\n---\nConverts a Json to a Struct, returning nil if the Json is not valid.\n### Parameters\n- `json` — `Json`" + value: "Converts a Json to a Struct, returning nil if the Json is not valid." sortText: ff|tryFromJson insertText: tryFromJson($1) insertTextFormat: 2 @@ -50,7 +50,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: str?): T1?" documentation: kind: markdown - value: "```wing\nstatic tryParseJson: (json: str?): T1?\n```\n---\nParse a Json string into a Struct, returning nil if the Json is not valid.\n### Parameters\n- `json` — `str?`" + value: "Parse a Json string into a Struct, returning nil if the Json is not valid." sortText: ff|tryParseJson insertText: tryParseJson($1) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/type_annotation_shows_struct.snap b/libs/wingc/src/lsp/snapshots/completions/type_annotation_shows_struct.snap index a93204f6b4d..067f932d154 100644 --- a/libs/wingc/src/lsp/snapshots/completions/type_annotation_shows_struct.snap +++ b/libs/wingc/src/lsp/snapshots/completions/type_annotation_shows_struct.snap @@ -5,7 +5,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct Foo\n```\n---" + value: "```wing\nstruct Foo {\n // No public members\n}\n```" sortText: hh|Foo - label: Json kind: 14 diff --git a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap index e119d06190c..6ab3c704c6b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(stringToDecode: str, url: bool?): str" documentation: kind: markdown - value: "```wing\nstatic base64Decode: (stringToDecode: str, url: bool?): str\n```\n---\nConverts a string from base64 to UTF-8.\n### Parameters\n- `stringToDecode` — `str` — base64 string to decode.\n- `url` — `bool?` — If `true`, the source is expected to be a URL-safe base64 string.\n\n### Returns\nThe UTF-8 string." + value: "Converts a string from base64 to UTF-8.\n\n#### Returns\nThe UTF-8 string." sortText: ff|base64Decode insertText: base64Decode($1) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(stringToEncode: str, url: bool?): str" documentation: kind: markdown - value: "```wing\nstatic base64Encode: (stringToEncode: str, url: bool?): str\n```\n---\nConverts a string from UTF-8 to base64.\n### Parameters\n- `stringToEncode` — `str` — The name of the UTF-8 string to encode.\n- `url` — `bool?` — If `true`, a URL-safe base64 string is returned.\n\n### Returns\nThe base64 string." + value: "Converts a string from UTF-8 to base64.\n\n#### Returns\nThe base64 string." sortText: ff|base64Encode insertText: base64Encode($1) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(name: str): str" documentation: kind: markdown - value: "```wing\nstatic env: (name: str): str\n```\n---\nReturns the value of an environment variable.\n### Parameters\n- `name` — `str` — The name of the environment variable.\n\n### Remarks\nThrows if not found or empty." + value: "Returns the value of an environment variable.\n\n#### Remarks\nThrows if not found or empty." sortText: ff|env insertText: env($1) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(program: str, args: Array, opts: ExecOptions?): Output" documentation: kind: markdown - value: "```wing\nstatic exec: (program: str, args: Array, opts: ExecOptions?): Output\n```\n---\nExecute a program with the given arguments, wait for it to finish, and return its outputs.\n### Parameters\n- `program` — `str` — The program to execute.\n- `args` — `Array` — An array of arguments to pass to the program.\n- `...opts` — `ExecOptions?` — `ExecOptions`, such as the working directory and environment variables.\n \n - `cwd?` — `str?` — Path to a directory to run the command in.\n - `env?` — `Map?` — Environment variables.\n - `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment.\n\n### Returns\nA struct containing `stdout`, `stderr` and exit `status` of the executed program." + value: "Execute a program with the given arguments, wait for it to finish, and return its outputs.\n\n#### Returns\nA struct containing `stdout`, `stderr` and exit `status` of the executed program." sortText: ff|exec insertText: exec($1) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(options: NanoidOptions?): str" documentation: kind: markdown - value: "```wing\nstatic nanoid: (options: NanoidOptions?): str\n```\n---\nGenerates a unique ID using the nanoid library.\n### Parameters\n- `...options` — `NanoidOptions?` — - Optional options object for generating the ID.\n \n - `alphabet?` — `str?` — Characters that make up the alphabet to generate the ID, limited to 256 characters or fewer.\n - `size?` — `num?` — Size of ID.\n\n### Remarks\n#\n\n*@link* *https://github.com/ai/nanoid*" + value: "Generates a unique ID using the nanoid library.\n\n#### Remarks\n#\n\n*@link* *https://github.com/ai/nanoid*" sortText: ff|nanoid insertText: nanoid($1) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nstatic os: (): str\n```\n---\nReturns a string identifying the operating system platform.\n\n### Returns\nThe operating system platform\n\n### Example\n```ts\n\"linux\", \"darwin\", \"win32\"\n```" + value: "Returns a string identifying the operating system platform.\n\n#### Returns\nThe operating system platform\n\n#### Example\n```ts\n\"linux\", \"darwin\", \"win32\"\n```" sortText: ff|os insertText: os() - label: setEnv @@ -74,7 +74,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(name: str, value: str): void" documentation: kind: markdown - value: "```wing\nstatic setEnv: (name: str, value: str): void\n```\n---\nSets the given name and value as an environment variable.\n### Parameters\n- `name` — `str` — The name of the environment variable.\n- `value` — `str` — The value of the environment variable." + value: Sets the given name and value as an environment variable. sortText: ff|setEnv insertText: setEnv($1) insertTextFormat: 2 @@ -86,7 +86,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(data: str): str" documentation: kind: markdown - value: "```wing\nstatic sha256: (data: str): str\n```\n---\nComputes the SHA256 hash of the given data.\n### Parameters\n- `data` — `str` — - The string to be hashed." + value: Computes the SHA256 hash of the given data. sortText: ff|sha256 insertText: sha256($1) insertTextFormat: 2 @@ -98,7 +98,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(command: str, opts: ShellOptions?): str" documentation: kind: markdown - value: "```wing\nstatic shell: (command: str, opts: ShellOptions?): str\n```\n---\nExecutes a command in the shell and returns its standard output.\n### Parameters\n- `command` — `str` — The command string to execute in the shell.\n- `...opts` — `ShellOptions?` — `ShellOptions`, such as the working directory and environment variables.\n \n - `cwd?` — `str?` — Path to a directory to run the command in.\n - `env?` — `Map?` — Environment variables.\n - `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment.\n - `throw?` — `bool?` — Whether to throw an error on command execution failure.\n\n### Returns\nThe standard output of the shell command.\n\n*@throws* *An error if the shell command execution fails or returns a non-zero exit code.*" + value: "Executes a command in the shell and returns its standard output.\n\n#### Returns\nThe standard output of the shell command.\n\n*@throws* *An error if the shell command execution fails or returns a non-zero exit code.*" sortText: ff|shell insertText: shell($1) insertTextFormat: 2 @@ -110,7 +110,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(name: str): str?" documentation: kind: markdown - value: "```wing\nstatic tryEnv: (name: str): str?\n```\n---\nReturns the value of an environment variable.\n### Parameters\n- `name` — `str` — The name of the environment variable.\n\n### Returns\nThe value of the environment variable or `nil`.\n\n### Remarks\nReturns `nil` if not found or empty." + value: "Returns the value of an environment variable.\n\n#### Returns\nThe value of the environment variable or `nil`.\n\n#### Remarks\nReturns `nil` if not found or empty." sortText: ff|tryEnv insertText: tryEnv($1) insertTextFormat: 2 @@ -122,7 +122,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(options: UlidOptions?): str" documentation: kind: markdown - value: "```wing\nstatic ulid: (options: UlidOptions?): str\n```\n---\nGenerates universally unique lexicographically sortable identifier.\n### Parameters\n- `...options` — `UlidOptions?` — - Optional options object for generating the ID.\n \n - `seed?` — `num?` — You can also input a seed time which will consistently give you the same string for the time component.\n\n### Remarks\n#\n\n*@link* *https://github.com/ulid/javascript*" + value: "Generates universally unique lexicographically sortable identifier.\n\n#### Remarks\n#\n\n*@link* *https://github.com/ulid/javascript*" sortText: ff|ulid insertText: ulid($1) insertTextFormat: 2 @@ -134,85 +134,85 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nstatic uuidv4: (): str\n```\n---\nGenerates a version 4 UUID." + value: Generates a version 4 UUID. sortText: ff|uuidv4 insertText: uuidv4() - label: ChildProcess kind: 7 documentation: kind: markdown - value: "```wing\nclass ChildProcess\n```\n---\nHandle to a running child process.\n\n### Initializer\n- `program` — `str`\n- `args` — `Array`\n- `...opts` — `SpawnOptions?`\n \n - `cwd?` — `str?` — Path to a directory to run the command in.\n - `env?` — `Map?` — Environment variables.\n - `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment.\n - `stderr?` — `Stdio?` — Configuration for the process's standard error stream.\n - `stdin?` — `Stdio?` — Configuration for the process's standard input stream.\n - `stdout?` — `Stdio?` — Configuration for the process's standard output stream.\n### Fields\n- `pid?` — `num?` — The child's OS-assigned process ID.\n### Methods\n- `kill` — `(signal: num?): void` — Kill the process.\n- `wait` — `(): Output` — Wait for the process to finish and return its output." + value: "```wing\nclass ChildProcess {\n pid?: num;\n kill(): void;\n wait(): Output;\n}\n```\n---\nHandle to a running child process." sortText: gg|ChildProcess - label: Util kind: 7 documentation: kind: markdown - value: "```wing\nclass Util\n```\n---\nUtility functions.\n\n### Methods\n- `base64Decode` — `(stringToDecode: str, url: bool?): str` — Converts a string from base64 to UTF-8.\n- `base64Encode` — `(stringToEncode: str, url: bool?): str` — Converts a string from UTF-8 to base64.\n- `env` — `(name: str): str` — Returns the value of an environment variable.\n- `exec` — `(program: str, args: Array, opts: ExecOptions?): Output` — Execute a program with the given arguments, wait for it to finish, and return its outputs.\n- `nanoid` — `(options: NanoidOptions?): str` — Generates a unique ID using the nanoid library.\n- `os` — `(): str` — Returns a string identifying the operating system platform.\n- `setEnv` — `(name: str, value: str): void` — Sets the given name and value as an environment variable.\n- `sha256` — `(data: str): str` — Computes the SHA256 hash of the given data.\n- `shell` — `(command: str, opts: ShellOptions?): str` — Executes a command in the shell and returns its standard output.\n- `sleep` — `inflight (delay: duration): void` — Suspends execution for a given duration.\n- `spawn` — `inflight (program: str, args: Array, opts: SpawnOptions?): ChildProcess` — Execute a program with the given arguments, and return a `ChildProcess` object that can be used to interact with the process while it is running.\n- `tryEnv` — `(name: str): str?` — Returns the value of an environment variable.\n- `ulid` — `(options: UlidOptions?): str` — Generates universally unique lexicographically sortable identifier.\n- `uuidv4` — `(): str` — Generates a version 4 UUID.\n- `waitUntil` — `inflight (predicate: inflight (): bool, props: WaitUntilProps?): bool` — Run a predicate repeatedly, waiting until it returns true or until the timeout elapses." + value: "```wing\nclass Util {\n static base64Decode(): str;\n static base64Encode(): str;\n static env(): str;\n static exec(): Output;\n static nanoid(): str;\n static os(): str;\n /* ... */\n}\n```\n---\nUtility functions." sortText: gg|Util - label: CommandOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct CommandOptions\n```\n---\nBase command options.\n### Fields\n- `cwd?` — `str?` — Path to a directory to run the command in.\n- `env?` — `Map?` — Environment variables.\n- `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment." + value: "```wing\nstruct CommandOptions {\n cwd?: str;\n env?: Map;\n inheritEnv?: bool;\n}\n```\n---\nBase command options." sortText: hh|CommandOptions - label: ExecOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ExecOptions extends CommandOptions\n```\n---\nAdditional options for `util.exec()`.\n### Fields\n- `cwd?` — `str?` — Path to a directory to run the command in.\n- `env?` — `Map?` — Environment variables.\n- `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment." + value: "```wing\nstruct ExecOptions extends CommandOptions {\n cwd?: str;\n env?: Map;\n inheritEnv?: bool;\n}\n```\n---\nAdditional options for `util.exec()`." sortText: hh|ExecOptions - label: NanoidOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct NanoidOptions\n```\n---\nOptions to generating a unique ID.\n### Fields\n- `alphabet?` — `str?` — Characters that make up the alphabet to generate the ID, limited to 256 characters or fewer.\n- `size?` — `num?` — Size of ID." + value: "```wing\nstruct NanoidOptions {\n alphabet?: str;\n size?: num;\n}\n```\n---\nOptions to generating a unique ID." sortText: hh|NanoidOptions - label: Output kind: 22 documentation: kind: markdown - value: "```wing\nstruct Output\n```\n---\nOutput of a finished process.\n### Fields\n- `status` — `num` — A process's exit status.\n- `stderr` — `str` — The standard error of a finished process.\n- `stdout` — `str` — The standard output of a finished process." + value: "```wing\nstruct Output {\n status: num;\n stderr: str;\n stdout: str;\n}\n```\n---\nOutput of a finished process." sortText: hh|Output - label: ShellOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ShellOptions extends CommandOptions\n```\n---\nAdditional options for `util.shell()`.\n### Fields\n- `cwd?` — `str?` — Path to a directory to run the command in.\n- `env?` — `Map?` — Environment variables.\n- `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment.\n- `throw?` — `bool?` — Whether to throw an error on command execution failure." + value: "```wing\nstruct ShellOptions extends CommandOptions {\n cwd?: str;\n env?: Map;\n inheritEnv?: bool;\n throw?: bool;\n}\n```\n---\nAdditional options for `util.shell()`." sortText: hh|ShellOptions - label: SpawnOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct SpawnOptions extends CommandOptions\n```\n---\nAdditional options for `util.spawn()`.\n### Fields\n- `cwd?` — `str?` — Path to a directory to run the command in.\n- `env?` — `Map?` — Environment variables.\n- `inheritEnv?` — `bool?` — Whether to inherit environment variables from the host's environment.\n- `stderr?` — `Stdio?` — Configuration for the process's standard error stream.\n- `stdin?` — `Stdio?` — Configuration for the process's standard input stream.\n- `stdout?` — `Stdio?` — Configuration for the process's standard output stream." + value: "```wing\nstruct SpawnOptions extends CommandOptions {\n cwd?: str;\n env?: Map;\n inheritEnv?: bool;\n stderr?: Stdio;\n stdin?: Stdio;\n stdout?: Stdio;\n}\n```\n---\nAdditional options for `util.spawn()`." sortText: hh|SpawnOptions - label: UlidOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct UlidOptions\n```\n---\nOptions to generate universally unique lexicographically sortable identifiers.\n### Fields\n- `seed?` — `num?` — You can also input a seed time which will consistently give you the same string for the time component." + value: "```wing\nstruct UlidOptions {\n seed?: num;\n}\n```\n---\nOptions to generate universally unique lexicographically sortable identifiers." sortText: hh|UlidOptions - label: WaitUntilProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WaitUntilProps\n```\n---\nProperties for `util.waitUntil`.\n### Fields\n- `interval?` — `duration?` — Interval between predicate retries.\n- `throws?` — `bool?` — Whether to throw an error if the timeout elapses.\n- `timeout?` — `duration?` — The timeout for keep trying predicate." + value: "```wing\nstruct WaitUntilProps {\n interval?: duration;\n throws?: bool;\n timeout?: duration;\n}\n```\n---\nProperties for `util.waitUntil`." sortText: hh|WaitUntilProps - label: IPredicateHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IPredicateHandler extends IInflight\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`.\n### Methods\n- `handle` — `inflight (): bool` — The Predicate function that is called.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): bool\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`." sortText: ii|IPredicateHandler - label: IPredicateHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IPredicateHandlerClient\n```\n---\nInflight client for `IPredicateHandler`.\n### Methods\n- `handle` — `inflight (): bool` — The Predicate function that is called." + value: "```wing\ninflight (): bool\n```\n---\nInflight client for `IPredicateHandler`." sortText: ii|IPredicateHandlerClient - label: Stdio kind: 13 documentation: kind: markdown - value: "```wing\nenum Stdio\n```\n---\nDescribes what to do with a standard I/O stream for a child process.\n- `INHERIT — The child inherits from the corresponding parent descriptor.`\n- `PIPED — A new pipe should be arranged to connect the parent and child processes.`\n- `NULL — This stream will be ignored.`" + value: "```wing\nenum Stdio {\n INHERIT,\n PIPED,\n NULL,\n}\n```\n---\nDescribes what to do with a standard I/O stream for a child process." sortText: jj|Stdio diff --git a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap index eb6ba6c140f..ed3a11ecc17 100644 --- a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap @@ -5,570 +5,570 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiConnectOptions?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiDeleteOptions?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiGetOptions?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiHeadOptions?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiOptionsOptions?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPatchOptions?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPostOptions?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse?, props: ApiPutOptions?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `renderCorsHeaders` — `preflight (corsOptions: ApiCorsOptions?): CorsHeaders?` — Generates an object containing default CORS response headers and OPTIONS response headers.\n- `renderOpenApiPath` — `preflight (path: str): str` — Converts input path to a valid OpenAPI path (replaces `:` based path params with `{}`).\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Api {\n url: str;\n connect(): void;\n delete(): void;\n get(): void;\n head(): void;\n options(): void;\n /* ... */\n}\n```\n---\nFunctionality shared between all `Api` implementations." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\nclass Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Counter {\n initial: num;\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nA distributed atomic counter." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Domain {\n domainName: str;\n}\n```\n---\nA cloud Domain." sortText: gg|Domain - label: Endpoint kind: 7 documentation: kind: markdown - value: "```wing\nclass Endpoint\n```\n---\nA cloud Endpoint.\n\n### Initializer\n- `url` — `str`\n- `...props` — `EndpointProps?`\n \n - `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n - `label?` — `str?` — The endpoint's label.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The endpoint url.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Endpoint {\n url: str;\n}\n```\n---\nA cloud Endpoint." sortText: gg|Endpoint - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str?): str?`\n- `...props` — `FunctionProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Function impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nA function." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n - `env?` — `Map?` — Environment variables to pass to the function.\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass OnDeploy {\n // No public members\n}\n```\n---\nRun code every time the app is deployed." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerOptions?): Function` — Create a function to consume messages from this queue.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Queue {\n setConsumer(): Function;\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nA queue." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickOptions?): Function` — Create a function that runs when receiving the scheduled event.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Schedule {\n onTick(): Function;\n}\n```\n---\nA schedule." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n- `name?` — `str?` — Get secret name.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\nclass Secret {\n name?: str;\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nA cloud secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Service impl IInflightHost {\n env: Map;\n addEnvironment(): void;\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nA long-running service." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageOptions?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform.\n- `subscribeQueue` — `preflight (queue: Queue, props: TopicSubscribeQueueOptions?): void` — Subscribing queue to the topic.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Topic {\n onMessage(): Function;\n subscribeQueue(): void;\n inflight publish(): void;\n}\n```\n---\nA topic." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?` — The website's custom domain object.\n - `errorDocument?` — `str?` — Name of the error document for the website.\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions?): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Website impl IWebsite {\n path: str;\n url: str;\n addFile(): str;\n addJson(): str;\n}\n```\n---\nA cloud static website." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." + value: "```wing\nstruct AddFileOptions {\n contentType?: str;\n}\n```\n---\nOptions for adding a file with custom value during the website's deployment." sortText: hh|AddFileOptions - label: ApiConnectOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiConnectOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiConnectOptions - label: ApiCorsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `str?` — The allowed origin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions {\n allowCredentials?: bool;\n allowHeaders?: Array;\n allowMethods?: Array;\n allowOrigin?: str;\n exposeHeaders?: Array;\n maxAge?: duration;\n}\n```\n---\nCors Options for `Api`." sortText: hh|ApiCorsOptions - label: ApiDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiDeleteOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiDeleteOptions - label: ApiEndpointOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiEndpointOptions extends FunctionProps\n```\n---\nBase options for Api endpoints.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiEndpointOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nBase options for Api endpoints." sortText: hh|ApiEndpointOptions - label: ApiGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions\n```\n---\nOptions for Api get endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiGetOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api get endpoint." sortText: hh|ApiGetOptions - label: ApiHeadOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiHeadOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiHeadOptions - label: ApiOptionsOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiOptionsOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiOptionsOptions - label: ApiPatchOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions\n```\n---\nOptions for Api patch endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPatchOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api patch endpoint." sortText: hh|ApiPatchOptions - label: ApiPostOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions\n```\n---\nOptions for Api post endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPostOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api post endpoint." sortText: hh|ApiPostOptions - label: ApiProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps {\n cors?: bool;\n corsOptions?: ApiCorsOptions;\n}\n```\n---\nOptions for `Api`." sortText: hh|ApiProps - label: ApiPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions\n```\n---\nOptions for Api put endpoint.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ApiPutOptions extends ApiEndpointOptions {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Api put endpoint." sortText: hh|ApiPutOptions - label: ApiRequest kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." + value: "```wing\nstruct ApiRequest {\n body?: str;\n headers?: Map;\n method: HttpMethod;\n path: str;\n query: Map;\n vars: Map;\n}\n```\n---\nShape of a request to an inflight handler." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers.\n- `status?` — `num?` — The response's status code." + value: "```wing\nstruct ApiResponse {\n body?: str;\n headers?: Map;\n status?: num;\n}\n```\n---\nShape of a response from a inflight handler." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nOptions for `Bucket.delete()`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions {\n mustExist?: bool;\n}\n```\n---\nOptions for `Bucket.delete()`." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." + value: "```wing\nstruct BucketEvent {\n key: str;\n type: BucketEventType;\n}\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927." sortText: hh|BucketEvent - label: BucketGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketGetOptions\n```\n---\nOptions for `Bucket.get()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.get()`." sortText: hh|BucketGetOptions - label: BucketOnCreateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnCreateOptions\n```\n---\n`onCreate` event options." + value: "```wing\nstruct BucketOnCreateOptions {\n // No public members\n}\n```\n---\n`onCreate` event options." sortText: hh|BucketOnCreateOptions - label: BucketOnDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnDeleteOptions\n```\n---\n`onDelete` event options." + value: "```wing\nstruct BucketOnDeleteOptions {\n // No public members\n}\n```\n---\n`onDelete` event options." sortText: hh|BucketOnDeleteOptions - label: BucketOnEventOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnEventOptions\n```\n---\n`onEvent` options." + value: "```wing\nstruct BucketOnEventOptions {\n // No public members\n}\n```\n---\n`onEvent` options." sortText: hh|BucketOnEventOptions - label: BucketOnUpdateOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketOnUpdateOptions\n```\n---\n`onUpdate` event options." + value: "```wing\nstruct BucketOnUpdateOptions {\n // No public members\n}\n```\n---\n`onUpdate` event options." sortText: hh|BucketOnUpdateOptions - label: BucketProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps {\n public?: bool;\n}\n```\n---\nOptions for `Bucket`." sortText: hh|BucketProps - label: BucketPutOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketPutOptions\n```\n---\nOptions for `Bucket.put()`.\n### Fields\n- `contentType` — `str` — The HTTP Content-Type of the object." + value: "```wing\nstruct BucketPutOptions {\n contentType: str;\n}\n```\n---\nOptions for `Bucket.put()`." sortText: hh|BucketPutOptions - label: BucketSignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketSignedUrlOptions\n```\n---\nOptions for `Bucket.signedUrl()`.\n### Fields\n- `action?` — `BucketSignedUrlAction?` — The action allowed by the signed URL.\n- `duration?` — `duration?` — The duration for the signed URL to expire." + value: "```wing\nstruct BucketSignedUrlOptions {\n action?: BucketSignedUrlAction;\n duration?: duration;\n}\n```\n---\nOptions for `Bucket.signedUrl()`." sortText: hh|BucketSignedUrlOptions - label: BucketTryGetOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions\n```\n---\nOptions for `Bucket.tryGet()`.\n### Fields\n- `endByte?` — `num?` — The ending byte to read up to (including).\n- `startByte?` — `num?` — The starting byte to read from." + value: "```wing\nstruct BucketTryGetOptions extends BucketGetOptions {\n endByte?: num;\n startByte?: num;\n}\n```\n---\nOptions for `Bucket.tryGet()`." sortText: hh|BucketTryGetOptions - label: CorsHeaders kind: 22 documentation: kind: markdown - value: "```wing\nstruct CorsHeaders\n```\n---\nType definition for CORS headers which includes default and options headers.\n### Fields\n- `defaultResponse` — `Map` — Default CORS response headers.\n- `optionsResponse` — `Map` — CORS options response headers." + value: "```wing\nstruct CorsHeaders {\n defaultResponse: Map;\n optionsResponse: Map;\n}\n```\n---\nType definition for CORS headers which includes default and options headers." sortText: hh|CorsHeaders - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." + value: "```wing\nstruct CounterProps {\n initial?: num;\n}\n```\n---\nOptions for `Counter`." sortText: hh|CounterProps - label: DeadLetterQueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DeadLetterQueueProps\n```\n---\nDead letter queue options.\n### Fields\n- `queue` — `Queue` — Queue to receive messages that failed processing.\n- `maxDeliveryAttempts?` — `num?` — Number of times a message will be processed before being sent to the dead-letter queue." + value: "```wing\nstruct DeadLetterQueueProps {\n maxDeliveryAttempts?: num;\n queue: Queue;\n}\n```\n---\nDead letter queue options." sortText: hh|DeadLetterQueueProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." + value: "```wing\nstruct DomainProps {\n domainName: str;\n}\n```\n---\nOptions for `Domain`." sortText: hh|DomainProps - label: EndpointProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct EndpointProps\n```\n---\nOptions for `Endpoint`.\n### Fields\n- `browserSupport?` — `bool?` — Whether the endpoint is supported through browsers.\n- `label?` — `str?` — The endpoint's label." + value: "```wing\nstruct EndpointProps {\n browserSupport?: bool;\n label?: str;\n}\n```\n---\nOptions for `Endpoint`." sortText: hh|EndpointProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Function`." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions {\n cache?: bool;\n}\n```\n---\nOptions when getting a secret value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." + value: "```wing\nstruct ObjectMetadata {\n contentType?: str;\n lastModified: Datetime;\n size: num;\n}\n```\n---\nMetadata of a bucket object." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct OnDeployProps extends FunctionProps {\n concurrency?: num;\n env?: Map;\n executeAfter?: Array;\n executeBefore?: Array;\n logRetentionDays?: num;\n memory?: num;\n /* ... */\n}\n```\n---\nOptions for `OnDeploy`." sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Queue`." sortText: hh|QueueProps - label: QueueSetConsumerOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct QueueSetConsumerOptions extends FunctionProps {\n batchSize?: num;\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Queue.setConsumer." sortText: hh|QueueSetConsumerOptions - label: ScheduleOnTickOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ScheduleOnTickOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Schedule.onTick." sortText: hh|ScheduleOnTickOptions - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps {\n cron?: str;\n rate?: duration;\n}\n```\n---\nOptions for `Schedule`." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." + value: "```wing\nstruct SecretProps {\n name?: str;\n}\n```\n---\nOptions for `Secret`." sortText: hh|SecretProps - label: ServiceOnStartOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct ServiceOnStartOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for Service.onStart." sortText: hh|ServiceOnStartOptions - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps {\n autoStart?: bool;\n env?: Map;\n}\n```\n---\nOptions for `Service`." sortText: hh|ServiceProps - label: TopicOnMessageOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `concurrency?` — `num?` — The maximum concurrent invocations that can run at one time.\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." + value: "```wing\nstruct TopicOnMessageOptions extends FunctionProps {\n concurrency?: num;\n env?: Map;\n logRetentionDays?: num;\n memory?: num;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.onMessage`." sortText: hh|TopicOnMessageOptions - label: TopicProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicProps\n```\n---\nOptions for `Topic`." + value: "```wing\nstruct TopicProps {\n // No public members\n}\n```\n---\nOptions for `Topic`." sortText: hh|TopicProps - label: TopicSubscribeQueueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps\n```\n---\nOptions for `Topic.subscribeQueue`.\n### Fields\n- `dlq?` — `DeadLetterQueueProps?` — A dead-letter queue.\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct TopicSubscribeQueueOptions extends QueueProps {\n dlq?: DeadLetterQueueProps;\n retentionPeriod?: duration;\n timeout?: duration;\n}\n```\n---\nOptions for `Topic.subscribeQueue`." sortText: hh|TopicSubscribeQueueOptions - label: WebsiteDomainOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteDomainOptions {\n domain?: Domain;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteDomainOptions - label: WebsiteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nBasic options for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteOptions {\n errorDocument?: str;\n path: str;\n}\n```\n---\nBasic options for `Website`." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?` — The website's custom domain object.\n- `errorDocument?` — `str?` — Name of the error document for the website." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions, WebsiteDomainOptions {\n domain?: Domain;\n errorDocument?: str;\n path: str;\n}\n```\n---\nOptions for `Website`." sortText: hh|WebsiteProps - label: IApiClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiClient\n```\n---\nInflight methods and members of `cloud.Api`." + value: "```wing\ninterface IApiClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Api`." sortText: ii|IApiClient - label: IApiEndpointHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse?` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninflight (...request: ApiRequest): ApiResponse?\n```\n---\nInflight client for `IApiEndpointHandler`." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient {\n inflight copy(): void;\n inflight delete(): void;\n inflight exists(): bool;\n inflight get(): str;\n inflight getJson(): Json;\n inflight list(): Array;\n /* ... */\n}\n```\n---\nInflight interface for `Bucket`." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." + value: "```wing\ninflight (key: str, type: BucketEventType): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient {\n inflight dec(): num;\n inflight inc(): num;\n inflight peek(): num;\n inflight set(): void;\n}\n```\n---\nInflight interface for `Counter`." sortText: ii|ICounterClient - label: IDomainClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IDomainClient\n```\n---\nInflight interface for `Domain`." + value: "```wing\ninterface IDomainClient {\n // No public members\n}\n```\n---\nInflight interface for `Domain`." sortText: ii|IDomainClient - label: IEndpointClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IEndpointClient\n```\n---\nInflight interface for `Endpoint`." + value: "```wing\ninterface IEndpointClient {\n // No public members\n}\n```\n---\nInflight interface for `Endpoint`." sortText: ii|IEndpointClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str?): str?` — Invokes the function with a payload and waits for the result.\n- `invokeAsync` — `inflight (payload: str?): void` — Kicks off the execution of the function with a payload and returns immediately while the function is running." + value: "```wing\ninterface IFunctionClient {\n inflight invoke(): str?;\n inflight invokeAsync(): void;\n}\n```\n---\nInflight interface for `Function`." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str?): str?\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str?): str?` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninflight (event: str?): str?\n```\n---\nInflight client for `IFunctionHandler`." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployClient\n```\n---\nInflight interface for `OnDeploy`." + value: "```wing\ninterface IOnDeployClient {\n // No public members\n}\n```\n---\nInflight interface for `OnDeploy`." sortText: ii|IOnDeployClient - label: IOnDeployHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IOnDeployHandler`." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (...messages: Array): void` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient {\n inflight approxSize(): num;\n inflight pop(): str?;\n inflight purge(): void;\n inflight push(): void;\n}\n```\n---\nInflight interface for `Queue`." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (message: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." + value: "```wing\ninflight (message: str): void\n```\n---\nInflight client for `IQueueSetConsumerHandler`." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleClient\n```\n---\nInflight interface for `Schedule`." + value: "```wing\ninterface IScheduleClient {\n // No public members\n}\n```\n---\nInflight interface for `Schedule`." sortText: ii|IScheduleClient - label: IScheduleOnTickHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IScheduleOnTickHandler`." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient {\n inflight value(): str;\n inflight valueJson(): Json;\n}\n```\n---\nInflight interface for `Secret`." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." + value: "```wing\ninterface IServiceClient {\n inflight start(): void;\n inflight started(): bool;\n inflight stop(): void;\n}\n```\n---\nInflight interface for `Service`." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nExecuted when a `cloud.Service` is started." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." + value: "```wing\ninflight (): inflight (): void?\n```\n---\nInflight client for `IServiceHandler`." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IInflight\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (): void\n```\n---\nExecuted when a `cloud.Service` is stopped." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." + value: "```wing\ninflight (): void\n```\n---\nInflight client for `IServiceStopHandler`." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (...messages: Array): void` — Publish messages to topic, if multiple messages are passed then they will be published as a batch if supported by the target platform." + value: "```wing\ninterface ITopicClient {\n inflight publish(): void;\n}\n```\n---\nInflight interface for `Topic`." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IInflight\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this object inflight." + value: "```wing\ninflight (event: str): void\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." + value: "```wing\ninflight (event: str): void\n```\n---\nInflight client for `ITopicOnMessageHandler`." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." + value: "```wing\ninterface IWebsite {\n url: str;\n}\n```\n---\nBase interface for a website." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsiteClient\n```\n---\nInflight methods and members of `cloud.Website`." + value: "```wing\ninterface IWebsiteClient {\n // No public members\n}\n```\n---\nInflight methods and members of `cloud.Website`." sortText: ii|IWebsiteClient - label: BucketEventType kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketEventType\n```\n---\nBucket events to subscribe to.\n- `CREATE — Create.`\n- `DELETE — Delete.`\n- `UPDATE — Update.`" + value: "```wing\nenum BucketEventType {\n CREATE,\n DELETE,\n UPDATE,\n}\n```\n---\nBucket events to subscribe to." sortText: jj|BucketEventType - label: BucketSignedUrlAction kind: 13 documentation: kind: markdown - value: "```wing\nenum BucketSignedUrlAction\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket.\n- `DOWNLOAD — Represents a HTTP GET request for a presigned URL, allowing read access for an object in the bucket.`\n- `UPLOAD — Represents a HTTP PUT request for a presigned URL, allowing write access for an object in the bucket.`" + value: "```wing\nenum BucketSignedUrlAction {\n DOWNLOAD,\n UPLOAD,\n}\n```\n---\nSpecifies the action permitted by a presigned URL for a bucket." sortText: jj|BucketSignedUrlAction - label: HttpMethod kind: 13 documentation: kind: markdown - value: "```wing\nenum HttpMethod\n```\n---\nAllowed HTTP methods for a endpoint.\n- `GET — Get.`\n- `HEAD — Head.`\n- `POST — Post.`\n- `PUT — Put.`\n- `DELETE — Delete.`\n- `CONNECT — Connect.`\n- `OPTIONS — Options.`\n- `PATCH — Patch.`" + value: "```wing\nenum HttpMethod {\n GET,\n HEAD,\n POST,\n PUT,\n DELETE,\n CONNECT,\n OPTIONS,\n PATCH,\n}\n```\n---\nAllowed HTTP methods for a endpoint." sortText: jj|HttpMethod diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap index 5e6be756af8..b72c68e90ab 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert\n- `message` — `str?` — The message to log if the condition is false" + value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap index d16cee02be8..914db050acd 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert\n- `message` — `str?` — The message to log if the condition is false" + value: "```wing\nassert: (condition: bool, message: str?): void\n```\n---\nAsserts that a condition is true" range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap index a236e91fb1e..07da8f36839 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string starts with searchString." + value: "```wing\nstartsWith(searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n\n#### Returns\ntrue if string starts with searchString." range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/class_doc.snap index 64de2779fe5..fd05488a179 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n Class doc\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n // No public members\n}\n```\n---\n Class doc" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_doc_with_multiline_and_markdown.snap b/libs/wingc/src/lsp/snapshots/hovers/class_doc_with_multiline_and_markdown.snap index 81ba3c68d7a..241f80a4a26 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_doc_with_multiline_and_markdown.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_doc_with_multiline_and_markdown.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n Class doc\n With multiline\n ## And markdown\n\n### Fields\n- `a` — `num`\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n a: num;\n}\n```\n---\n Class doc\n With multiline\n ## And markdown" range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_method_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/class_method_doc.snap index 06b7875059b..b05ad8ecf6f 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_method_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_method_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight do: preflight (): void\n```\n---\n Class method doc" + value: "```wing\npreflight do(): void\n```\n---\n Class method doc" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_property.snap b/libs/wingc/src/lsp/snapshots/hovers/class_property.snap index b4aeac55f0b..3a6ec980fdc 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_property.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_property.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight addObject: preflight (key: str, body: str): void\n```\n---\nAdd a file to the bucket that is uploaded when the app is deployed.\n### Parameters\n- `key` — `str`\n- `body` — `str`\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." + value: "```wing\npreflight addObject(key: str, body: str): void\n```\n---\nAdd a file to the bucket that is uploaded when the app is deployed.\n\n#### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap b/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap index 14ea35dfc60..3dab2db3add 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\npreflight bucket: class Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_symbol_in_closure.snap b/libs/wingc/src/lsp/snapshots/hovers/class_symbol_in_closure.snap index 2c65c19e3ed..e416e48a73c 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_symbol_in_closure.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_symbol_in_closure.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\ninflight myClass: MyClass\nclass MyClass\n```\n---" + value: "```wing\ninflight myClass: class MyClass {\n // No public members\n}\n```" range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/ctor_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/ctor_doc.snap index 6bfb3d1d20d..d1b08ecdbaa 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/ctor_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/ctor_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight new: preflight (): Bob\n```\n---\n I'm bob the constructor" + value: "```wing\nnew(): Bob\n```\n---\n I'm bob the constructor" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/ctor_doc_from_new_expr.snap b/libs/wingc/src/lsp/snapshots/hovers/ctor_doc_from_new_expr.snap index 0a64600ae42..45fc03e5ef3 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/ctor_doc_from_new_expr.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/ctor_doc_from_new_expr.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight new: preflight (): Bob\n```\n---\n I'm bob the constructor" + value: "```wing\nnew(): Bob\n```\n---\n I'm bob the constructor" range: start: line: 5 diff --git a/libs/wingc/src/lsp/snapshots/hovers/enum_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/enum_doc.snap index 7e667ee412b..276411098e7 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/enum_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/enum_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nenum Foo\n```\n---\n Enum doc" + value: "```wing\nenum Foo {\n}\n```\n---\n Enum doc" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/enum_variant_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/enum_variant_doc.snap index 9c8c8465838..98210ae330d 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/enum_variant_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/enum_variant_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nenum Foo\n```\n---\n- `A — Enum variant doc`" + value: "```wing\nenum Foo {\n A,\n}\n```" range: start: line: 5 diff --git a/libs/wingc/src/lsp/snapshots/hovers/ignoe_empty_lines_in_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/ignoe_empty_lines_in_doc.snap index de2ee878384..8c94a552d96 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/ignoe_empty_lines_in_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/ignoe_empty_lines_in_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n Class doc with empty lines after it\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n // No public members\n}\n```\n---\n Class doc with empty lines after it" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc.snap index 505d44d4c44..9408e1280a1 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\ninflight $inflight_init: inflight (): Bob\n```\n---\n I'm bob the constructor (inflight)" + value: "```wing\ninflight new(): Bob\n```\n---\n I'm bob the constructor (inflight)" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc_from_new_expr.snap b/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc_from_new_expr.snap index 807d83e9cfe..95c2f6f7070 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc_from_new_expr.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inflight_ctor_doc_from_new_expr.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\ninflight $inflight_init: inflight (): Bob\n```\n---\n I'm bob the constructor (inflight)" + value: "```wing\ninflight new(): Bob\n```\n---\n I'm bob the constructor (inflight)" range: start: line: 5 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap b/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap index 123fa21d988..8feac2a5c0f 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstruct Data\n```\n---\n### Fields\n- `field` — `str`" + value: "```wing\nstruct Data {\n field: str;\n}\n```" range: start: line: 11 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inherited_interface_method_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/inherited_interface_method_doc.snap index 2e1e3dbb5d3..f6a194f22c5 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inherited_interface_method_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inherited_interface_method_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight do: preflight (): void\n```\n---\n Parent interface method doc" + value: "```wing\npreflight do(): void\n```\n---\n Parent interface method doc" range: start: line: 9 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap b/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap index d7296f2116b..726a611afac 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight my_bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `copy` — `inflight (srcKey: str, dstKey: str): void` — Copy an object to a new location in the bucket.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str, options: BucketGetOptions?): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateOptions?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteOptions?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventOptions?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateOptions?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str, options: BucketPutOptions?): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `rename` — `inflight (srcKey: str, dstKey: str): void` — Move an object to a new location in the bucket.\n- `signedUrl` — `inflight (key: str, options: BucketSignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str, options: BucketTryGetOptions?): str?` — Get an object from the bucket if it exists If the bytes returned are not a valid UTF-8 string, an error is thrown.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\npreflight my_bucket: class Bucket {\n addFile(): void;\n addObject(): void;\n onCreate(): void;\n onDelete(): void;\n onEvent(): void;\n onUpdate(): void;\n /* ... */\n}\n```\n---\nA cloud object store." range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/interface_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/interface_doc.snap index c592b65eac3..d085a5e4263 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/interface_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/interface_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\ninterface Foo extends IResource\n```\n---\n Interface doc" + value: "```wing\ninterface Foo extends IResource {\n // No public members\n}\n```\n---\n Interface doc" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/interface_method_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/interface_method_doc.snap index 954448ae875..9e25195b051 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/interface_method_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/interface_method_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight do: preflight (): void\n```\n---\n Interface method doc" + value: "```wing\npreflight do(): void\n```\n---\n Interface method doc" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap index ad31f363750..fe1340ae611 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget(key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n#### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap b/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap index f95e3d6aa6c..6aeb8bd32c5 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight new: preflight (props: BucketProps?): Bucket\n```\n---\n### Parameters\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nnew(...props: BucketProps?): Bucket\n```\n---\nA cloud object store." range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_method.snap b/libs/wingc/src/lsp/snapshots/hovers/static_method.snap index c64075a0b40..9b2d87b76b2 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight my: preflight (a: str, b: bool): str\n```\n---\n### Parameters\n- `a` — `str`\n- `b` — `bool`" + value: "```wing\nstatic preflight my(a: str, b: bool): str\n```" range: start: line: 5 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap b/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap index e1800e030c5..37576f2bd93 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Json\n```\n---\nImmutable Json.\n\n### Methods\n- `asBool` — `(): bool` — Convert Json element to boolean if possible.\n- `asNum` — `(): num` — Convert Json element to number if possible.\n- `asStr` — `(): str` — Convert Json element to string if possible.\n- `deepCopy` — `(json: MutJson): Json` — Creates an immutable deep copy of the Json.\n- `deepCopyMut` — `(json: Json): MutJson` — Creates a mutable deep copy of the Json.\n- `delete` — `(json: MutJson, key: str): void` — Deletes a key in a given Json.\n- `entries` — `(json: Json): Array` — Returns the entries from the Json.\n- `get` — `(key: str): Json` — Returns the value associated with the specified Json key.\n- `getAt` — `(index: num): Json` — Returns a specified element at a given index from Json Array.\n- `has` — `(key: str): bool` — Checks if a Json object has a given key.\n- `keys` — `(json: any): Array` — Returns the keys from the Json.\n- `parse` — `(str: str): Json` — Parse a string into a Json.\n- `stringify` — `(json: any, options: JsonStringifyOptions?): str` — Formats Json as string.\n- `tryAsBool` — `(): bool?` — Convert Json element to boolean if possible.\n- `tryAsNum` — `(): num?` — Convert Json element to number if possible.\n- `tryAsStr` — `(): str?` — Convert Json element to string if possible.\n- `tryGet` — `(key: str): Json?` — Optionally returns an specified element from the Json.\n- `tryGetAt` — `(index: num): Json?` — Optionally returns a specified element at a given index from Json Array.\n- `tryParse` — `(str: str?): Json?` — Try to parse a string into a Json.\n- `values` — `(json: Json): Array` — Returns the values from the Json." + value: "```wing\nclass Json {\n asBool(): bool;\n asNum(): num;\n asStr(): str;\n get(): Json;\n getAt(): Json;\n has(): bool;\n /* ... */\n}\n```\n---\nImmutable Json." range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap index 5e600f09898..80316b4e50a 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify(json: any, ...options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n#### Returns\nstring representation of the Json" range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/struct_doc.snap b/libs/wingc/src/lsp/snapshots/hovers/struct_doc.snap index 39014c15229..a3c19a15423 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/struct_doc.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/struct_doc.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstruct Foo\n```\n---\n Struct doc" + value: "```wing\nstruct Foo {\n // No public members\n}\n```\n---\n Struct doc" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap index 002b30cd7a2..6b13f2f31fc 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n // No public members\n}\n```" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap index 26a7d1623a8..c27d7bf34b3 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_property.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight static_method: preflight (): void\n```" + value: "```wing\nstatic preflight static_method(): void\n```" range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap index f084b4e390d..12427da76ad 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n // No public members\n}\n```" range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap index 4356a3c6cef..dcdd73534f3 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onLift` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this resource inflight.\n- `onLiftType` — `preflight (host: IInflightHost, ops: Array): void` — A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.\n- `toInflight` — `preflight (obj: IResource): str` — Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." + value: "```wing\nclass Foo {\n // No public members\n}\n```" range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/variadic_args.snap b/libs/wingc/src/lsp/snapshots/hovers/variadic_args.snap index 0b2a74a3189..b5b91c403d4 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/variadic_args.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/variadic_args.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight addMany: preflight (...items: Array): void\n```\n---\n### Parameters\n- `...items` — `Array`" + value: "```wing\npreflight addMany(...items: Array): void\n```" range: start: line: 8 diff --git a/libs/wingc/src/lsp/snapshots/signature/class_super.snap b/libs/wingc/src/lsp/snapshots/signature/class_super.snap index 8ecafb06e2e..131e973ddbd 100644 --- a/libs/wingc/src/lsp/snapshots/signature/class_super.snap +++ b/libs/wingc/src/lsp/snapshots/signature/class_super.snap @@ -5,7 +5,7 @@ signatures: - label: "(hello: num): Base" documentation: kind: markdown - value: "### Parameters\n- `hello` — `num`" + value: "" parameters: - label: "hello: num" activeParameter: 0 diff --git a/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap b/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap index f1a79843375..6b86677c6f7 100644 --- a/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap +++ b/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap @@ -5,11 +5,11 @@ signatures: - label: "(...props): Bucket" documentation: kind: markdown - value: "### Parameters\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "" parameters: - label: "...props" documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps {\n public?: bool;\n}\n```\n" activeParameter: 0 diff --git a/libs/wingc/src/lsp/snapshots/signature/inflight_class_super.snap b/libs/wingc/src/lsp/snapshots/signature/inflight_class_super.snap index 625090611a2..3a637ac7751 100644 --- a/libs/wingc/src/lsp/snapshots/signature/inflight_class_super.snap +++ b/libs/wingc/src/lsp/snapshots/signature/inflight_class_super.snap @@ -5,7 +5,7 @@ signatures: - label: "(sound: str): A" documentation: kind: markdown - value: "### Parameters\n- `sound` — `str`" + value: "" parameters: - label: "sound: str" activeParameter: 0 diff --git a/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap b/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap index 8ca3aaf4291..d9895f0f06f 100644 --- a/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap +++ b/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap @@ -5,12 +5,15 @@ signatures: - label: "(key: str, ...opts): void" documentation: kind: markdown - value: "Delete an existing object using a key from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...opts` — `BucketDeleteOptions?` — Options available for delete an item from a bucket.\n \n - `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: Delete an existing object using a key from the bucket. parameters: - label: "key: str" + documentation: + kind: markdown + value: "Key of the object.\n\n" - label: "...opts" documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nOptions for `Bucket.delete()`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions {\n mustExist?: bool;\n}\n```\n" activeParameter: 1 diff --git a/libs/wingc/src/lsp/snapshots/signature/nested_class_calls.snap b/libs/wingc/src/lsp/snapshots/signature/nested_class_calls.snap index b363947bba6..7a3ccd03b76 100644 --- a/libs/wingc/src/lsp/snapshots/signature/nested_class_calls.snap +++ b/libs/wingc/src/lsp/snapshots/signature/nested_class_calls.snap @@ -5,12 +5,15 @@ signatures: - label: "(url: str, ...options): Response" documentation: kind: markdown - value: "Executes a GET request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the GET request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the GET request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" + value: Executes a GET request to a specified URL and provides a formatted response. parameters: - label: "url: str" + documentation: + kind: markdown + value: "The target URL for the GET request.\n\n" - label: "...options" documentation: kind: markdown - value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — `str?` — Any body that you want to add to your request.\n- `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n- `headers?` — `Map?` — Any headers you want to add to your request.\n- `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — `RequestRedirect?` — An enum specifying the redirect mode to use: follow, error or manual.\n- `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL." + value: "```wing\nstruct RequestOptions {\n body?: str;\n cache?: RequestCache;\n headers?: Map;\n method?: HttpMethod;\n redirect?: RequestRedirect;\n referrer?: str;\n}\n```\n" activeParameter: 0 diff --git a/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap b/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap index f0bc836a384..2124e2e73a7 100644 --- a/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap +++ b/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap @@ -5,7 +5,7 @@ signatures: - label: "(key: str, body: str): void" documentation: kind: markdown - value: "Add a file to the bucket that is uploaded when the app is deployed.\n### Parameters\n- `key` — `str`\n- `body` — `str`\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." + value: Add a file to the bucket that is uploaded when the app is deployed. parameters: - label: "key: str" - label: "body: str"