Documentation / commands/ICommand
commands/ICommand
Interfaces
ICommand<TCommandContent, TCommandResponse>
Defines the base of a command.
Extends
Type Parameters
• TCommandContent = object
• TCommandResponse = object
Properties
hasChanges
readonly
hasChanges:boolean
Gets whether or not there are changes to any properties.
Defined in
route
readonly
route:string
Gets the route information for the command.
Defined in
Methods
clear()
clear():
void
Clear the command properties and reset them to their default values. This will also clear the initial values. This is used when the command is not needed anymore and should be cleared.
Returns
void
Defined in
execute()
execute():
Promise
<CommandResult
<TCommandResponse
>>
Execute the ICommand.
Returns
Promise
<CommandResult
<TCommandResponse
>>
for the execution.
Defined in
onPropertyChanged()
onPropertyChanged(
callback
,thisArg
):void
Register callback that gets called when a property changes.
Parameters
callback
Callback to register.
thisArg
object
The this arg to use when calling.
Returns
void
Defined in
propertyChanged()
propertyChanged(
property
):void
Notify about a property that has had its value changed.
Parameters
property
string
Name of property that changes.
Returns
void
Defined in
revertChanges()
revertChanges():
void
Revert any changes on the command.
Returns
void
Defined in
setApiBasePath()
setApiBasePath(
apiBasePath
):void
Set the base path for the API to use for the query. This is used to prepend to the path to any fetch operation.
Parameters
apiBasePath
string
Base path for the API
Returns
void
Inherited from
ICanBeConfigured
.setApiBasePath
Defined in
setInitialValues()
setInitialValues(
values
):void
Set the initial values for the command. This is used for tracking if there are changes to a command or not.
Parameters
values
TCommandContent
Values to set.
Returns
void
Defined in
setInitialValuesFromCurrentValues()
setInitialValuesFromCurrentValues():
void
Set the initial values for the command to be the current value of the properties.
Returns
void
Defined in
setMicroservice()
setMicroservice(
microservice
):any
Set the microservice to be used for the query. This is passed along to the server to identify the microservice.
Parameters
microservice
string
Name of microservice
Returns
any
Inherited from
ICanBeConfigured
.setMicroservice
Defined in
Type Aliases
PropertyChanged()
PropertyChanged: (
property
) =>void
Callback for when a property changes.
Parameters
property
string
Returns
void