API Reference
Resources 
Button 
A button can be used to perform an action.
Initializers 
bring ui;
new ui.Button(label: str, handler: IButtonHandler);
| Name | Type | Description | 
|---|---|---|
 | str | No description. | 
 |  | No description. | 
labelRequired 
- Type: str
 
handlerRequired 
- Type: IButtonHandler
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.Button.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.Button.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.Button.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
Field 
A field can be used to display a value.
Initializers 
bring ui;
new ui.Field(label: str, handler: IFieldHandler, props?: FieldProps);
| Name | Type | Description | 
|---|---|---|
 | str | No description. | 
 |  | No description. | 
 |  | No description. | 
labelRequired 
- Type: str
 
handlerRequired 
- Type: IFieldHandler
 
propsOptional 
- Type: FieldProps
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.Field.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.Field.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.Field.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
FileBrowser 
A file browser can be used to browse files.
Initializers 
bring ui;
new ui.FileBrowser(label: str, handlers: FileBrowserHandlers);
| Name | Type | Description | 
|---|---|---|
 | str | No description. | 
 |  | No description. | 
labelRequired 
- Type: str
 
handlersRequired 
- Type: FileBrowserHandlers
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.FileBrowser.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.FileBrowser.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.FileBrowser.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
HttpClient 
An HttpClient can be used to make HTTP requests.
Initializers 
bring ui;
new ui.HttpClient(label: str, getUrlHandler: IHttpClientGetUrlHandler, getApiSpecHandler: IHttpClientGetApiSpecHandler);
| Name | Type | Description | 
|---|---|---|
 | str | No description. | 
 |  | No description. | 
 |  | No description. | 
labelRequired 
- Type: str
 
getUrlHandlerRequired 
- Type: IHttpClientGetUrlHandler
 
getApiSpecHandlerRequired 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.HttpClient.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.HttpClient.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.HttpClient.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
Section 
A section can be used to group other visual components.
Initializers 
bring ui;
new ui.Section(props?: SectionProps);
| Name | Type | Description | 
|---|---|---|
 |  | No description. | 
propsOptional 
- Type: SectionProps
 
Methods 
| Name | Description | 
|---|---|
 | Adds a visual component to the section. | 
 | Adds a button to the section. | 
 | Adds a field to the section. | 
add 
add(...components: Array<VisualComponent>): void
Adds a visual component to the section.
The components will be rendered in the order they were added.
componentsRequired 
- Type: VisualComponent
 
addButton 
addButton(label: str, handler: IButtonHandler): void
Adds a button to the section.
Shorthand for add(new ui.Button(...)).
labelRequired 
- Type: str
 
handlerRequired 
- Type: IButtonHandler
 
addField 
addField(label: str, handler: IFieldHandler, props?: FieldProps): void
Adds a field to the section.
Shorthand for add(new ui.Field(...)).
labelRequired 
- Type: str
 
handlerRequired 
- Type: IFieldHandler
 
propsOptional 
- Type: FieldProps
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.Section.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.Section.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.Section.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
Table 
A table can be used to browse files.
Initializers 
bring ui;
new ui.Table(handlers: TableHandlers);
| Name | Type | Description | 
|---|---|---|
 |  | No description. | 
handlersRequired 
- Type: TableHandlers
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.Table.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.Table.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.Table.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
ValueField 
A value field can be used to display a string value.
Initializers 
bring ui;
new ui.ValueField(label: str, value: str);
| Name | Type | Description | 
|---|---|---|
 | str | No description. | 
 | str | No description. | 
labelRequired 
- Type: str
 
valueRequired 
- Type: str
 
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.ValueField.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.ValueField.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.ValueField.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
VisualComponent 
A visual component is used to customize the view of other classes in the Wing Console.
This is a base class for all other visual components.
Initializers 
bring ui;
new ui.VisualComponent();
| Name | Type | Description | 
|---|
Static Functions 
| Name | Description | 
|---|---|
 | A hook called by the Wing compiler once for each inflight host that needs to use this type inflight. | 
 | Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource. | 
 | Returns whether the given construct is a visual component. | 
onLiftType 
bring ui;
ui.VisualComponent.onLiftType(host: IInflightHost, ops: MutArray<str>);
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
The list of requested inflight methods
needed by the inflight host are given by ops.
This method is commonly used for adding permissions, environment variables, or other capabilities to the inflight host.
hostRequired 
- Type: IInflightHost
 
opsRequired 
- Type: MutArray<str>
 
toInflight 
bring ui;
ui.VisualComponent.toInflight(obj: IResource);
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
NOTE: This statement must be executed within an async context.
objRequired 
- Type: IResource
 
isVisualComponent 
bring ui;
ui.VisualComponent.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
cRequired 
- Type: constructs.IConstruct
 
Properties 
| Name | Type | Description | 
|---|---|---|
 | constructs.Node | The tree node. | 
nodeRequired 
node: Node;
- Type: constructs.Node
 
The tree node.
Structs 
FieldProps 
Props for Field.
Initializer 
bring ui;
let FieldProps = ui.FieldProps{ ... };
Properties 
| Name | Type | Description | 
|---|---|---|
 | bool | Indicates that this field is a link. | 
 |  | How often the field should be refreshed. | 
linkOptional 
link: bool;
- Type: bool
 - Default: false
 
Indicates that this field is a link.
refreshRateOptional 
refreshRate: duration;
- Type: duration
 - Default: no automatic refresh
 
How often the field should be refreshed.
FileBrowserHandlers 
File browser handlers.
Initializer 
bring ui;
let FileBrowserHandlers = ui.FileBrowserHandlers{ ... };
Properties 
| Name | Type | Description | 
|---|---|---|
 |  | Handler for deleting a file. | 
 |  | Handler for getting a file. | 
 |  | Handler for listing files. | 
 |  | Handler for putting a file. | 
deleteRequired 
delete: IFileBrowserDeleteHandler;
Handler for deleting a file.
getRequired 
get: IFileBrowserGetHandler;
- Type: IFileBrowserGetHandler
 
Handler for getting a file.
listRequired 
list: IFileBrowserListHandler;
- Type: IFileBrowserListHandler
 
Handler for listing files.
putRequired 
put: IFileBrowserPutHandler;
- Type: IFileBrowserPutHandler
 
Handler for putting a file.
SectionProps 
Props for Section.
Initializer 
bring ui;
let SectionProps = ui.SectionProps{ ... };
Properties 
| Name | Type | Description | 
|---|---|---|
 | str | The label of the section. | 
labelOptional 
label: str;
- Type: str
 - Default: no label
 
The label of the section.
TableHandlers 
Table handlers.
Initializer 
bring ui;
let TableHandlers = ui.TableHandlers{ ... };
Properties 
| Name | Type | Description | 
|---|---|---|
 |  | Handler for scanning rows. | 
scanRequired 
scan: ITableScanHandler;
- Type: ITableScanHandler
 
Handler for scanning rows.
Protocols 
IButtonHandler 
- 
Extends: IInflight
 - 
Implemented By: IButtonHandler
 
Inflight client: @winglang/sdk.ui.IButtonHandlerClient
A resource with an inflight "handle" method that can be passed to Button.
IButtonHandlerClient 
- Implemented By: IButtonHandlerClient
 
Inflight client for IButtonHandler.
Methods 
| Name | Description | 
|---|---|
 | Function that peforms an action. | 
handle 
inflight handle(): void
Function that peforms an action.
IFieldHandler 
- 
Extends: IInflight
 - 
Implemented By: IFieldHandler
 
Inflight client: @winglang/sdk.ui.IFieldHandlerClient
A resource with an inflight "handle" method that can be passed to addField.