mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Restructure source code folder
This way the location of certain classes should make more sense
This commit is contained in:
35
src/http/Operation.ts
Normal file
35
src/http/Operation.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user