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. |
label
Required
- Type: str
handler
Required
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Button.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
label
Required
- Type: str
handler
Required
- Type: IFieldHandler
props
Optional
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Field.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
label
Required
- Type: str
handlers
Required
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.FileBrowser.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
label
Required
- Type: str
getUrlHandler
Required
- Type: IHttpClientGetUrlHandler
getApiSpecHandler
Required
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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.HttpClient.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
props
Optional
- 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.
components
Required
- Type: VisualComponent
addButton
addButton(label: str, handler: IButtonHandler): void
Adds a button to the section.
Shorthand for add(new ui.Button(...))
.
label
Required
- Type: str
handler
Required
- Type: IButtonHandler
addField
addField(label: str, handler: IFieldHandler, props?: FieldProps): void
Adds a field to the section.
Shorthand for add(new ui.Field(...))
.
label
Required
- Type: str
handler
Required
- Type: IFieldHandler
props
Optional
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Section.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
handlers
Required
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.Table.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
label
Required
- Type: str
value
Required
- 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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.ValueField.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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.
host
Required
- Type: IInflightHost
ops
Required
- 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.
obj
Required
- Type: IResource
isVisualComponent
bring ui;
ui.VisualComponent.isVisualComponent(c: IConstruct);
Returns whether the given construct is a visual component.
c
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
| constructs.Node | The tree node. |
node
Required
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. |
link
Optional
link: bool;
- Type: bool
- Default: false
Indicates that this field is a link.
refreshRate
Optional
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. |
delete
Required
delete: IFileBrowserDeleteHandler;
Handler for deleting a file.
get
Required
get: IFileBrowserGetHandler;
- Type: IFileBrowserGetHandler
Handler for getting a file.
list
Required
list: IFileBrowserListHandler;
- Type: IFileBrowserListHandler
Handler for listing files.
put
Required
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. |
label
Optional
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. |
scan
Required
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
.
IFieldHandlerClient
- Implemented By: IFieldHandlerClient
Inflight client for IFieldHandler
.
Methods
Name | Description |
---|---|
| Function that returns a string to display. |
handle
inflight handle(): str
Function that returns a string to display.
IFileBrowserDeleteHandler
-
Extends: IInflight
-
Implemented By: IFileBrowserDeleteHandler
Inflight client: @winglang/sdk.ui.IFileBrowserDeleteHandlerClient
A resource with an inflight "handle" method that can be passed to IFileBrowser
.
IFileBrowserDeleteHandlerClient
- Implemented By: IFileBrowserDeleteHandlerClient
Inflight client for IFileBrowserDeleteHandler
.
Methods
Name | Description |
---|---|
| Function that performs an action. |
handle
inflight handle(fileName: str): void
Function that performs an action.
fileName
Required
- Type: str
IFileBrowserGetHandler
-
Extends: IInflight
-
Implemented By: IFileBrowserGetHandler
Inflight client: @winglang/sdk.ui.IFileBrowserGetHandlerClient
A resource with an inflight "handle" method that can be passed to IFileBrowser
.
IFileBrowserGetHandlerClient
- Implemented By: IFileBrowserGetHandlerClient
Inflight client for IFileBrowserGetHandler
.
Methods
Name | Description |
---|---|
| Function that performs an action. |
handle
inflight handle(fileName: str): str
Function that performs an action.
fileName
Required
- Type: str
IFileBrowserListHandler
-
Extends: IInflight
-
Implemented By: IFileBrowserListHandler
Inflight client: @winglang/sdk.ui.IFileBrowserListHandlerClient
A resource with an inflight "handle" method that can be passed to IFileBrowser
.
IFileBrowserListHandlerClient
- Implemented By: IFileBrowserListHandlerClient
Inflight client for IFileBrowserListHandler
.
Methods
Name | Description |
---|---|
| Function that performs an action. |
handle
inflight handle(): MutArray<str>
Function that performs an action.
IFileBrowserPutHandler
-
Extends: IInflight
-
Implemented By: IFileBrowserPutHandler
Inflight client: @winglang/sdk.ui.IFileBrowserPutHandlerClient
A resource with an inflight "handle" method that can be passed to IFileBrowser
.
IFileBrowserPutHandlerClient
- Implemented By: IFileBrowserPutHandlerClient
Inflight client for IFileBrowserVoidHandler
.
Methods
Name | Description |
---|---|
| Function that performs an action. |
handle
inflight handle(fileName: str, fileContent: str): void
Function that performs an action.
fileName
Required
- Type: str
fileContent
Required
- Type: str
IHttpClientGetApiSpecHandler
-
Extends: IInflight
-
Implemented By: IHttpClientGetApiSpecHandler
Inflight client: @winglang/sdk.ui.IHttpClientGetApiSpecHandlerClient
A resource with an inflight "handle" method that can be passed to IHttpClient
.
IHttpClientGetApiSpecHandlerClient
- Implemented By: IHttpClientGetApiSpecHandlerClient
Inflight client for IHttpClientGetApiSpecHandler
.
Methods
Name | Description |
---|---|
| Function that returns the OpenAPI spec. |
handle
inflight handle(): str
Function that returns the OpenAPI spec.
IHttpClientGetUrlHandler
-
Extends: IInflight
-
Implemented By: IHttpClientGetUrlHandler
Inflight client: @winglang/sdk.ui.IHttpClientGetUrlHandlerClient
A resource with an inflight "handle" method that can be passed to IHttpClient
.
IHttpClientGetUrlHandlerClient
- Implemented By: IHttpClientGetUrlHandlerClient
Inflight client for IHttpClientGetUrlHandler
.
Methods
Name | Description |
---|---|
| 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
-
Extends: IInflight
-
Implemented By: ITableScanHandler
Inflight client: @winglang/sdk.ui.ITableScanHandlerClient
A resource with an inflight "handle" method that can be passed to ITable
.
ITableScanHandlerClient
- Implemented By: ITableScanHandlerClient
Inflight client for ITableScanHandler
.
Methods
Name | Description |
---|---|
| Function that performs an action. |
handle
inflight handle(): MutArray<Json>
Function that performs an action.