Skip to main content

# IModule

Exposes MicroApp module specific methods

See ModuleEvents for supported events

## Extends​

- `IScriptingObject`

## Methods​

### _dispose()?​

    optional _dispose(): void;

#### Returns​

`void`

#### Inherited from​

`IScriptingObject`.`_dispose`

### _toJSON()​

    _toJSON(): RemotingScriptingObject;

#### Returns​

`RemotingScriptingObject`

#### Inherited from​

`IScriptingObject`.`_toJSON`

### getCapabilities()​

    getCapabilities(): Promise<Record<string, unknown>>;

get microapp module-specific capabilities or settings defined by the host application.

Helps to define the style and/or behavior of the module

#### Returns​

`Promise`<`Record`<`string`, `unknown`>>

capabilities or settings as key-value pairs

### getParameters()​

    getParameters(): Promise<ModuleParameters>;

get microapp module-specific parameters.

For example, a lender may select a set of loans within the host application which must be passed to a module that implements a specific workflow for those loans

#### Returns​

`Promise`<`ModuleParameters`>

parameters as key-value pairs

### log()​

    log(message: string | LogMessage, logLevel: "ERROR" | "INFO" | "DEBUG" | "AUDIT" | "WARN" | "FATAL"): Promise<void>;

log a message to host application's logs

#### Parameters​

##### message​

`string` | `LogMessage`

log message

##### logLevel​

`"ERROR"` | `"INFO"` | `"DEBUG"` | `"AUDIT"` | `"WARN"` | `"FATAL"`

log level

#### Returns​

`Promise`<`void`>

### unload()​

    unload(): Promise<void>;

unload the microapp module from the host application

#### Returns​

`Promise`<`void`>

## Properties​

### Close​

    readonly Close: IEvent;

event fired when the module to be closed

Use ModuleCloseListener to handle this event

### id​

    readonly id: string;

#### Inherited from​

`IScriptingObject`.`id`

### objectType​

    readonly objectType: string;

#### Inherited from​

`IScriptingObject`.`objectType`

### Unloading​

    readonly Unloading: IEvent;

event fired when the module is unloading

Use ModuleUnLoadingListener to handle this event