Added first draft for restriction and presenter interfaces.
This commit is contained in:
parent
f7a18cef65
commit
f5548770dd
@ -1,4 +1,4 @@
|
||||
# Action Service Interface
|
||||
# Actions Service Interface
|
||||
|
||||
Exception ActionException(message: string);
|
||||
|
||||
@ -7,7 +7,7 @@ Exception ActionException(message: string);
|
||||
* Executes multiple actions in the conext of the user given by the user_id.
|
||||
* All actions are processed independently.
|
||||
*
|
||||
* TODO: Check if we need an interface or flag to process actions all together.
|
||||
* TODO: Maybe we do not want to run them independently.
|
||||
*
|
||||
*
|
||||
* @throws ActionException
|
||||
@ -16,7 +16,7 @@ handle_request (payload: Action[], user_id: number): ActionResult[]
|
||||
|
||||
interface Action {
|
||||
action: string;
|
||||
data: object[]; # An array of action specific data. See JSON schema defintions.
|
||||
data: object[]; # An array of action specific data. See JSON schema defintions.
|
||||
}
|
||||
|
||||
interface ActionResult {
|
||||
|
19
docs/interfaces/presenter-service.txt
Normal file
19
docs/interfaces/presenter-service.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# Presenter Service Interface
|
||||
|
||||
Exception PresenterException(message: string);
|
||||
|
||||
|
||||
/**
|
||||
* Presents some (restricted) data without autoupdate.
|
||||
*
|
||||
* @throws PresenterException
|
||||
*/
|
||||
handle_request (payload: Presenter[]): PresenterResult[]
|
||||
|
||||
interface Presenter {
|
||||
user_id: number;
|
||||
presentation: TODO;
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
interface PresenterResult {}
|
20
docs/interfaces/restriction-service.txt
Normal file
20
docs/interfaces/restriction-service.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Restrictions Service Interface
|
||||
|
||||
Exception RestrictionException(message: string);
|
||||
|
||||
|
||||
/**
|
||||
* Restricts data for given user
|
||||
*
|
||||
* @throws RestrictionException
|
||||
*/
|
||||
handle_request (payload: Restriction[]): RestrictionResult[]
|
||||
|
||||
interface Restriction {
|
||||
user_id: number;
|
||||
fqfields: Fqfield[];
|
||||
}
|
||||
|
||||
interface RestrictionResult {
|
||||
<fqfield>: Value;
|
||||
}
|
Loading…
Reference in New Issue
Block a user