refactor: standardize frontend
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -6,12 +6,6 @@ import type { ListFilter, ListSort, SourceSelector } from './common';
|
||||
/**
|
||||
* Collection information
|
||||
*/
|
||||
export interface CollectionContentsInterface {
|
||||
event?: boolean;
|
||||
task?: boolean;
|
||||
journal?: boolean;
|
||||
}
|
||||
|
||||
export interface CollectionInterface {
|
||||
provider: string;
|
||||
service: string | number;
|
||||
@@ -23,14 +17,15 @@ export interface CollectionInterface {
|
||||
properties: CollectionPropertiesInterface;
|
||||
}
|
||||
|
||||
export type CollectionContentTypes = 'event' | 'task' | 'journal';
|
||||
|
||||
export interface CollectionBaseProperties {
|
||||
'@type': string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
export interface CollectionImmutableProperties extends CollectionBaseProperties {
|
||||
total?: number;
|
||||
contents: CollectionContentsInterface;
|
||||
content: CollectionContentTypes[];
|
||||
}
|
||||
|
||||
export interface CollectionMutableProperties extends CollectionBaseProperties {
|
||||
@@ -119,7 +114,6 @@ export interface CollectionDeleteRequest {
|
||||
identifier: string | number;
|
||||
options?: {
|
||||
force?: boolean; // Whether to force delete even if collection is not empty
|
||||
recursive?: boolean; // Whether to delete child collections/items as well
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@ export interface ServiceCapabilitiesInterface {
|
||||
EntityDelete?: boolean;
|
||||
EntityMove?: boolean;
|
||||
EntityCopy?: boolean;
|
||||
// Send capability
|
||||
EntityTransmit?: boolean;
|
||||
[key: string]: boolean | object | string | string[] | undefined;
|
||||
}
|
||||
|
||||
@@ -271,7 +269,10 @@ export type ServiceListFilterCollection = {
|
||||
};
|
||||
|
||||
export type ServiceListFilterEntity = {
|
||||
'*'?: string;
|
||||
'text'?: string;
|
||||
'label'?: string;
|
||||
'description'?: string;
|
||||
'location'?: string;
|
||||
'before'?: string;
|
||||
'after'?: string;
|
||||
[attribute: string]: string | undefined;
|
||||
@@ -281,7 +282,7 @@ export type ServiceListFilterEntity = {
|
||||
* Service list sort specification
|
||||
*/
|
||||
export type ServiceListSortCollection = ("label" | "rank" | string)[];
|
||||
export type ServiceListSortEntity = ( "sent" | "size" | string)[];
|
||||
export type ServiceListSortEntity = ( "label" | "start" | string)[];
|
||||
|
||||
export type ServiceListRange = {
|
||||
'tally'?: string[];
|
||||
|
||||
Reference in New Issue
Block a user