Skip to main content

sofie_core/
listing.rs

1//! The keys a page of a list is answered and asked under, from the database to the browser client.
2
3pub const ITEMS: &str = "items";
4pub const PAGE: &str = "page";
5pub const SIZE: &str = "size";
6pub const DEFAULT_SIZE: u64 = 20;
7pub const HAS_NEXT: &str = "has_next";
8pub const SORT: &str = "sort";
9pub const FILTER: &str = "filter";
10pub const QUERY: &str = "query";
11pub const CONTROLS: &str = "controls";
12pub const ERRORS: &str = "errors";
13pub const REFUSAL_KEY: &str = "key";
14pub const REFUSAL_ARGUMENTS: &str = "arguments";
15pub const REFUSAL_MESSAGE: &str = "message";
16
17pub const PAGE_FIELDS: [&str; 3] = [PAGE, SIZE, HAS_NEXT];
18pub const LISTED_FIELDS: [&str; 8] = [PAGE, SIZE, HAS_NEXT, SORT, FILTER, QUERY, CONTROLS, ERRORS];