refactor: Restructure source code folder

This way the location of certain classes should make more sense
This commit is contained in:
Joachim Van Herwegen
2021-10-08 10:58:35 +02:00
parent 012d9e0864
commit b3da9c9fcf
280 changed files with 684 additions and 673 deletions

35
src/http/Operation.ts Normal file
View File

@@ -0,0 +1,35 @@
import type { PermissionSet } from '../authorization/permissions/Permissions';
import type { Conditions } from '../storage/Conditions';
import type { Representation } from './representation/Representation';
import type { RepresentationPreferences } from './representation/RepresentationPreferences';
import type { ResourceIdentifier } from './representation/ResourceIdentifier';
/**
* A single REST operation.
*/
export interface Operation {
/**
* The HTTP method (GET/POST/PUT/PATCH/DELETE/etc.).
*/
method: string;
/**
* Identifier of the target.
*/
target: ResourceIdentifier;
/**
* Representation preferences of the response. Will be empty if there are none.
*/
preferences: RepresentationPreferences;
/**
* Conditions the resource must fulfill for a valid operation.
*/
conditions?: Conditions;
/**
* The permissions available for the current operation.
*/
permissionSet?: PermissionSet;
/**
* Optional representation of the body.
*/
body?: Representation;
}