OpenSlides/docs/interfaces/action-service.txt

26 lines
563 B
Plaintext
Raw Normal View History

# Actions Service Interface
2020-01-20 07:43:25 +01:00
2020-01-21 18:05:47 +01:00
Exception ActionException(message: string);
2020-01-20 07:43:25 +01:00
/**
* Executes multiple actions in the conext of the user given by the user_id.
2020-02-03 23:32:24 +01:00
* All actions are processed independently.
*
* TODO: Maybe we do not want to run them independently.
2020-01-20 07:43:25 +01:00
*
2020-01-21 18:05:47 +01:00
*
* @throws ActionException
2020-01-20 07:43:25 +01:00
*/
2020-02-03 23:32:24 +01:00
handle_request (payload: Action[], user_id: number): ActionResult[]
2020-01-20 07:43:25 +01:00
interface Action {
2020-01-21 18:05:47 +01:00
action: string;
data: object[]; # An array of action specific data. See JSON schema defintions.
2020-02-03 23:32:24 +01:00
}
interface ActionResult {
success: boolean;
message: string;
2020-01-20 07:43:25 +01:00
}