Skip to content

@line/bot-sdkDocs


@line/bot-sdk / LINEThingsScenarioExecutionEvent

Type Alias: LINEThingsScenarioExecutionEvent

LINEThingsScenarioExecutionEvent: ReplyableEvent & object

Type declaration

things

things: object

things.deviceId

deviceId: string

Device ID of the device that executed the scenario

things.result

result: object

things.result.actionResults

actionResults: LINEThingsActionResult[]

Execution result of individual operations specified in action Note that an array of actions specified in a scenario has the following characteristics

  • The actions defined in a scenario are performed sequentially, from top to bottom.
  • Each action produces some result when executed. Even actions that do not generate data, such as SLEEP, return an execution result of type void. The number of items in an action array may be 0.

Therefore, things.actionResults has the following properties:

  • The number of items in the array matches the number of actions defined in the scenario.
  • The order of execution results matches the order in which actions are performed. That is, in a scenario set with multiple GATT_READ actions, the results are returned in the order in which each individual GATT_READ action was performed.
  • If 0 actions are defined in the scenario, the number of items in things.actionResults will be 0.

things.result.bleNotificationPayload?

optional bleNotificationPayload: string

Data contained in notification The value is Base64-encoded binary data. Only included for scenarios where trigger.type = BLE_NOTIFICATION.

things.result.endtime

endtime: number

Timestamp for when execution of scenario was completed (milliseconds, LINE app time)

things.result.errorReason?

optional errorReason: string

Error reason

things.result.resultCode

resultCode: "success" | "gatt_error" | "runtime_error"

Scenario execution completion status See also things.resultCode definitions.

things.result.revision

revision: number

Revision number of the scenario set containing the executed scenario

things.result.scenarioId

scenarioId: string

Scenario ID executed

things.result.startTime

startTime: number

Timestamp for when execution of scenario action started (milliseconds, LINE app time)

things.type

type: "scenarioResult"

type

type: "things"

Defined in

lib/types.ts:303