aboutsummaryrefslogtreecommitdiff
path: root/src/models/search.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/search.rs')
-rw-r--r--src/models/search.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/models/search.rs b/src/models/search.rs
index 6acf847..6de3c8a 100644
--- a/src/models/search.rs
+++ b/src/models/search.rs
@@ -19,13 +19,6 @@ pub enum SortTimestamp {
#[derive(Serialize, Debug, Eq, PartialEq, Hash, Copy, Clone)]
#[serde(rename_all = "snake_case")]
-pub enum DatabaseSortTimestamp {
- CreatedTime,
- LastEditedTime,
-}
-
-#[derive(Serialize, Debug, Eq, PartialEq, Hash, Copy, Clone)]
-#[serde(rename_all = "snake_case")]
pub enum FilterValue {
Page,
Database,
@@ -276,15 +269,22 @@ pub struct FilterCondition {
pub condition: PropertyCondition,
}
+#[derive(Serialize, Debug, Eq, PartialEq, Hash, Copy, Clone)]
+#[serde(rename_all = "snake_case")]
+pub enum DatabaseSortTimestamp {
+ CreatedTime,
+ LastEditedTime,
+}
+
#[derive(Serialize, Debug, Eq, PartialEq, Clone)]
pub struct DatabaseSort {
// Todo: Should property and timestamp be mutually exclusive? (i.e a flattened enum?)
// the documentation is not clear:
// https://developers.notion.com/reference/post-database-query#post-database-query-sort
- property: Option<String>,
+ pub property: Option<String>,
/// The name of the timestamp to sort against.
- timestamp: Option<SortTimestamp>,
- direction: SortDirection,
+ pub timestamp: Option<DatabaseSortTimestamp>,
+ pub direction: SortDirection,
}
#[derive(Serialize, Debug, Eq, PartialEq, Default)]
@@ -322,13 +322,13 @@ impl From<NotionSearch> for SearchRequest {
timestamp,
} => SearchRequest {
sort: Some(Sort {
- direction,
timestamp,
+ direction,
}),
..Default::default()
},
- NotionSearch::Filter { value, property } => SearchRequest {
- filter: Some(Filter { value, property }),
+ NotionSearch::Filter { property, value } => SearchRequest {
+ filter: Some(Filter { property, value }),
..Default::default()
},
}
er Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-06-22Move builtins to src/javascript/jsc/builtinsGravatar Jarred Sumner 72-6/+2285
2022-06-22Tweak test runner outputGravatar Jarred Sumner 1-90/+44
2022-06-22Cleanup some testsGravatar Jarred Sumner 2-8/+46
2022-06-22Update Dockerfile.baseGravatar Jarred Sumner 1-1/+1
2022-06-22Update WebKitGravatar Jarred Sumner 1-0/+0
2022-06-22cleanup websocket testGravatar Jarred Sumner 1-3/+6
2022-06-22Fix `WebSocket` when HTTP server is not runningGravatar Jarred Sumner 14-38/+103
2022-06-22Update build-idGravatar Jarred Sumner 1-1/+1
2022-06-22cleanupGravatar Jarred Sumner 6-719/+3
2022-06-22Update index.d.tsGravatar Jarred Sumner 1-0/+1
2022-06-22types for `bun:jsc`Gravatar Jarred Sumner 2-1/+37
2022-06-22Slightly customize the `events` polyfill so it uses ESMGravatar Jarred Sumner 1-1/+522
2022-06-22Fix memory bugs in escapeHTML & arrayBufferToStringGravatar Jarred Sumner 1-65/+61