wp_mini/
types.rs

1//! Defines the public type aliases for the data structures returned by API endpoints.
2//!
3//! These aliases provide a clear and consistent naming convention (e.g., `UserResponse`)
4//! for the types that consumers of this library will receive, distinguishing them from
5//! the internal `model` structs. This makes the library's public API more explicit.
6
7use crate::model;
8
9/// Represents the response data for a full user object. Alias for [`model::User`].
10pub type UserResponse = model::User;
11
12/// Represents the response data for a lightweight user stub. Alias for [`model::UserStub`].
13pub type UserStubResponse = model::UserStub;
14
15/// Represents the response data for a full story object. Alias for [`model::Story`].
16pub type StoryResponse = model::Story;
17
18/// Represents the response data for a lightweight story part reference. Alias for [`model::PartReference`].
19pub type PartReferenceResponse = model::PartReference;
20
21/// Represents the response data for a lightweight story part stub. Alias for [`model::PartStub`].
22pub type PartStubResponse = model::PartStub;
23
24/// Represents the response data for a full story part object. Alias for [`model::Part`].
25pub type PartResponse = model::Part;
26
27/// Represents the response data for a text URL object. Alias for [`model::TextUrl`].
28pub type TextUrlResponse = model::TextUrl;
29
30/// Represents the response data for a story part's content. Alias for [`model::PartContent`].
31pub type PartContentResponse = model::PartContent;