Skip to main content

API Reference

Resources

Button

A button can be used to perform an action.

Initializers

bring ui;

new ui.Button(label: str, handler: IButtonHandler);
NameTypeDescription
label
strNo description.
handler
IButtonHandler
No description.

labelRequired
  • Type: str

handlerRequired

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.Button.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
label
strNo description.
handler
IFieldHandler
No description.
props
FieldProps
No description.

labelRequired
  • Type: str

handlerRequired

propsOptional

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.Field.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
label
strNo description.
handlers
FileBrowserHandlers
No description.

labelRequired
  • Type: str

handlersRequired

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.FileBrowser.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
label
strNo description.
getUrlHandler
IHttpClientGetUrlHandler
No description.
getApiSpecHandler
IHttpClientGetApiSpecHandler
No description.

labelRequired
  • Type: str

getUrlHandlerRequired

getApiSpecHandlerRequired

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.HttpClient.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
props
SectionProps
No description.

propsOptional

Methods

NameDescription
add
Adds a visual component to the section.
addButton
Adds a button to the section.
addField
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

addButton
addButton(label: str, handler: IButtonHandler): void

Adds a button to the section.

Shorthand for add(new ui.Button(...)).

labelRequired
  • Type: str

handlerRequired

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

propsOptional

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.Section.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
handlers
TableHandlers
No description.

handlersRequired

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.Table.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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);
NameTypeDescription
label
strNo description.
value
strNo description.

labelRequired
  • Type: str

valueRequired
  • Type: str

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.ValueField.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe 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();
NameTypeDescription

Static Functions

NameDescription
onLiftType
A hook called by the Wing compiler once for each inflight host that needs to use this type inflight.
toInflight
Generates an asynchronous JavaScript statement which can be used to create an inflight client for a resource.
isVisualComponent
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

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

isVisualComponent
bring ui;

ui.VisualComponent.isVisualComponent(c: IConstruct);

Returns whether the given construct is a visual component.

cRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
node
constructs.NodeThe tree node.

nodeRequired
node: Node;
  • Type: constructs.Node

The tree node.


Structs

FieldProps

Props for Field.

Initializer

bring ui;

let FieldProps = ui.FieldProps{ ... };

Properties

NameTypeDescription
link
boolIndicates that this field is a link.
refreshRate
duration
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

NameTypeDescription
delete
IFileBrowserDeleteHandler
Handler for deleting a file.
get
IFileBrowserGetHandler
Handler for getting a file.
list
IFileBrowserListHandler
Handler for listing files.
put
IFileBrowserPutHandler
Handler for putting a file.

deleteRequired
delete: IFileBrowserDeleteHandler;

Handler for deleting a file.


getRequired
get: IFileBrowserGetHandler;

Handler for getting a file.


listRequired
list: IFileBrowserListHandler;

Handler for listing files.


putRequired
put: IFileBrowserPutHandler;

Handler for putting a file.


SectionProps

Props for Section.

Initializer

bring ui;

let SectionProps = ui.SectionProps{ ... };

Properties

NameTypeDescription
label
strThe 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

NameTypeDescription
scan
ITableScanHandler
Handler for scanning rows.

scanRequired
scan: ITableScanHandler;

Handler for scanning rows.


Protocols

IButtonHandler

Inflight client: @winglang/sdk.ui.IButtonHandlerClient

A resource with an inflight "handle" method that can be passed to Button.

IButtonHandlerClient

Inflight client for IButtonHandler.

Methods

NameDescription
handle
Function that peforms an action.

handle
inflight handle(): void

Function that peforms an action.

IFieldHandler

Inflight client: @winglang/sdk.ui.IFieldHandlerClient

A resource with an inflight "handle" method that can be passed to addField.

IFieldHandlerClient

Inflight client for IFieldHandler.

Methods

NameDescription
handle
Function that returns a string to display.

handle
inflight handle(): str

Function that returns a string to display.

IFileBrowserDeleteHandler

Inflight client: @winglang/sdk.ui.IFileBrowserDeleteHandlerClient

A resource with an inflight "handle" method that can be passed to IFileBrowser.

IFileBrowserDeleteHandlerClient

Inflight client for IFileBrowserDeleteHandler.

Methods

NameDescription
handle
Function that performs an action.

handle
inflight handle(fileName: str): void

Function that performs an action.

fileNameRequired
  • Type: str

IFileBrowserGetHandler

Inflight client: @winglang/sdk.ui.IFileBrowserGetHandlerClient

A resource with an inflight "handle" method that can be passed to IFileBrowser.

IFileBrowserGetHandlerClient

Inflight client for IFileBrowserGetHandler.

Methods

NameDescription
handle
Function that performs an action.

handle
inflight handle(fileName: str): str

Function that performs an action.

fileNameRequired
  • Type: str

IFileBrowserListHandler

Inflight client: @winglang/sdk.ui.IFileBrowserListHandlerClient

A resource with an inflight "handle" method that can be passed to IFileBrowser.

IFileBrowserListHandlerClient

Inflight client for IFileBrowserListHandler.

Methods

NameDescription
handle
Function that performs an action.

handle
inflight handle(): MutArray<str>

Function that performs an action.

IFileBrowserPutHandler

Inflight client: @winglang/sdk.ui.IFileBrowserPutHandlerClient

A resource with an inflight "handle" method that can be passed to IFileBrowser.

IFileBrowserPutHandlerClient

Inflight client for IFileBrowserVoidHandler.

Methods

NameDescription
handle
Function that performs an action.

handle
inflight handle(fileName: str, fileContent: str): void

Function that performs an action.

fileNameRequired
  • Type: str

fileContentRequired
  • Type: str

IHttpClientGetApiSpecHandler

Inflight client: @winglang/sdk.ui.IHttpClientGetApiSpecHandlerClient

A resource with an inflight "handle" method that can be passed to IHttpClient.

IHttpClientGetApiSpecHandlerClient

Inflight client for IHttpClientGetApiSpecHandler.

Methods

NameDescription
handle
Function that returns the OpenAPI spec.

handle
inflight handle(): str

Function that returns the OpenAPI spec.

IHttpClientGetUrlHandler

Inflight client: @winglang/sdk.ui.IHttpClientGetUrlHandlerClient

A resource with an inflight "handle" method that can be passed to IHttpClient.

IHttpClientGetUrlHandlerClient

Inflight client for IHttpClientGetUrlHandler.

Methods

NameDescription
handle
Function that returns the URL to make a request to.

handle
inflight handle(): str

Function that returns the URL to make a request to.

ITableScanHandler

Inflight client: @winglang/sdk.ui.ITableScanHandlerClient

A resource with an inflight "handle" method that can be passed to ITable.

ITableScanHandlerClient

Inflight client for ITableScanHandler.

Methods

NameDescription
handle
Function that performs an action.

handle
inflight handle(): MutArray<Json>

Function that performs an action.