type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus,
+ ResponseStatus
} from '@/types'
import config from '@/assets/config'
public async openConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
- hashIds: [hashId],
+ hashIds: [hashId]
})
}
public async closeConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
- hashIds: [hashId],
+ hashIds: [hashId]
})
}
return this.sendRequest(ProcedureName.START_TRANSACTION, {
hashIds: [hashId],
connectorId,
- idTag,
+ idTag
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_TRANSACTION, {
hashIds: [hashId],
- transactionId,
+ transactionId
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId],
+ connectorIds: [connectorId]
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId],
+ connectorIds: [connectorId]
})
}
config.uiServer.protocol
)
this.ws.onmessage = this.responseHandler.bind(this)
- this.ws.onerror = (errorEvent) => {
+ this.ws.onerror = errorEvent => {
console.error('WebSocket error: ', errorEvent)
}
- this.ws.onclose = (closeEvent) => {
+ this.ws.onclose = closeEvent => {
console.info('WebSocket closed: ', closeEvent)
}
}