···11-{
22- "lexicon": 1,
33- "id": "fm.teal.alpha.actor.status",
44- "defs": {
55- "main": {
66- "type": "record",
77- "description": "This lexicon is in a not officially released state. It is subject to change. | A declaration of the status of the actor. Only one can be shown at a time. If there are multiple, the latest record should be picked and earlier records should be deleted or tombstoned.",
88- "key": "literal:self",
99- "record": {
1010- "type": "object",
1111- "required": [
1212- "time",
1313- "item"
1414- ],
1515- "properties": {
1616- "expiry": {
1717- "type": "string",
1818- "description": "The unix timestamp of the expiry time of the item. If unavailable, default to 10 minutes past the start time.",
1919- "format": "datetime"
2020- },
2121- "item": {
2222- "type": "ref",
2323- "ref": "fm.teal.alpha.feed.defs#playView"
2424- },
2525- "time": {
2626- "type": "string",
2727- "description": "The unix timestamp of when the item was recorded",
2828- "format": "datetime"
2929- }
3030- }
3131- }
3232- }
3333- }
3434-}
···11-{
22- "lexicon": 1,
33- "id": "fm.teal.alpha.feed.play",
44- "description": "This lexicon is in a not officially released state. It is subject to change. | A declaration of a teal.fm play. Plays are submitted as a result of a user listening to a track. Plays should be marked as tracked when a user has listened to the entire track if it's under 2 minutes long, or half of the track's duration up to 4 minutes, whichever is longest.",
55- "defs": {
66- "main": {
77- "type": "record",
88- "key": "tid",
99- "record": {
1010- "type": "object",
1111- "required": [
1212- "trackName"
1313- ],
1414- "properties": {
1515- "artistMbIds": {
1616- "type": "array",
1717- "description": "Array of Musicbrainz artist IDs. Prefer using 'artists'.",
1818- "items": {
1919- "type": "string"
2020- }
2121- },
2222- "artistNames": {
2323- "type": "array",
2424- "description": "Array of artist names in order of original appearance. Prefer using 'artists'.",
2525- "items": {
2626- "type": "string",
2727- "minLength": 1,
2828- "maxLength": 256,
2929- "maxGraphemes": 2560
3030- }
3131- },
3232- "artists": {
3333- "type": "array",
3434- "description": "Array of artists in order of original appearance.",
3535- "items": {
3636- "type": "ref",
3737- "ref": "fm.teal.alpha.feed.defs#artist"
3838- }
3939- },
4040- "duration": {
4141- "type": "integer",
4242- "description": "The length of the track in seconds"
4343- },
4444- "isrc": {
4545- "type": "string",
4646- "description": "The ISRC code associated with the recording"
4747- },
4848- "musicServiceBaseDomain": {
4949- "type": "string",
5050- "description": "The base domain of the music service. e.g. music.apple.com, tidal.com, spotify.com. Defaults to 'local' if unavailable or not provided."
5151- },
5252- "originUrl": {
5353- "type": "string",
5454- "description": "The URL associated with this track"
5555- },
5656- "playedTime": {
5757- "type": "string",
5858- "description": "The unix timestamp of when the track was played",
5959- "format": "datetime"
6060- },
6161- "recordingMbId": {
6262- "type": "string",
6363- "description": "The Musicbrainz recording ID of the track"
6464- },
6565- "releaseDiscriminant": {
6666- "type": "string",
6767- "description": "Distinguishing information for release variants (e.g. 'Deluxe Edition', 'Remastered', '2023 Remaster', 'Special Edition'). Used to differentiate between different versions of the same base release while maintaining grouping capabilities.",
6868- "maxLength": 128,
6969- "maxGraphemes": 1280
7070- },
7171- "releaseMbId": {
7272- "type": "string",
7373- "description": "The Musicbrainz release ID"
7474- },
7575- "releaseName": {
7676- "type": "string",
7777- "description": "The name of the release/album",
7878- "maxLength": 256,
7979- "maxGraphemes": 2560
8080- },
8181- "submissionClientAgent": {
8282- "type": "string",
8383- "description": "A metadata string specifying the user agent where the format is `<app-identifier>/<version> (<kernel/OS-base>; <platform/OS-version>; <device-model>)`. If string is provided, only `app-identifier` and `version` are required. `app-identifier` is recommended to be in reverse dns format. Defaults to 'manual/unknown' if unavailable or not provided.",
8484- "maxLength": 256,
8585- "maxGraphemes": 2560
8686- },
8787- "trackDiscriminant": {
8888- "type": "string",
8989- "description": "Distinguishing information for track variants (e.g. 'Acoustic Version', 'Live at Wembley', 'Radio Edit', 'Demo'). Used to differentiate between different versions of the same base track while maintaining grouping capabilities.",
9090- "maxLength": 128,
9191- "maxGraphemes": 1280
9292- },
9393- "trackMbId": {
9494- "type": "string",
9595- "description": "The Musicbrainz ID of the track"
9696- },
9797- "trackName": {
9898- "type": "string",
9999- "description": "The name of the track",
100100- "minLength": 1,
101101- "maxLength": 256,
102102- "maxGraphemes": 2560
103103- }
104104- }
105105- }
106106- }
107107- }
108108-}
···11-// @generated by jacquard-lexicon. DO NOT EDIT.
22-//
33-// This file was automatically generated from Lexicon schemas.
44-// Any manual changes will be overwritten on the next regeneration.
55-66-/// Marker type indicating a builder field has been set
77-pub struct Set<T>(pub T);
88-impl<T> Set<T> {
99- /// Extract the inner value
1010- #[inline]
1111- pub fn into_inner(self) -> T {
1212- self.0
1313- }
1414-}
1515-1616-/// Marker type indicating a builder field has not been set
1717-pub struct Unset;
1818-/// Trait indicating a builder field is set (has a value)
1919-#[rustversion::attr(
2020- since(1.78.0),
2121- diagnostic::on_unimplemented(
2222- message = "the field `{Self}` was not set, but this method requires it to be set",
2323- label = "the field `{Self}` was not set"
2424- )
2525-)]
2626-pub trait IsSet: private::Sealed {}
2727-/// Trait indicating a builder field is unset (no value yet)
2828-#[rustversion::attr(
2929- since(1.78.0),
3030- diagnostic::on_unimplemented(
3131- message = "the field `{Self}` was already set, but this method requires it to be unset",
3232- label = "the field `{Self}` was already set"
3333- )
3434-)]
3535-pub trait IsUnset: private::Sealed {}
3636-impl<T> IsSet for Set<T> {}
3737-impl IsUnset for Unset {}
3838-mod private {
3939- /// Sealed trait to prevent external implementations
4040- pub trait Sealed {}
4141- impl<T> Sealed for super::Set<T> {}
4242- impl Sealed for super::Unset {}
4343-}
-6
crates/lexicons/src/fm_teal.rs
···11-// @generated by jacquard-lexicon. DO NOT EDIT.
22-//
33-// This file was automatically generated from Lexicon schemas.
44-// Any manual changes will be overwritten on the next regeneration.
55-66-pub mod alpha;
-8
crates/lexicons/src/fm_teal/alpha.rs
···11-// @generated by jacquard-lexicon. DO NOT EDIT.
22-//
33-// This file was automatically generated from Lexicon schemas.
44-// Any manual changes will be overwritten on the next regeneration.
55-66-pub mod actor;
77-pub mod feed;
88-pub mod stats;
···11-// @generated by jacquard-lexicon. DO NOT EDIT.
22-//
33-// Lexicon: fm.teal.alpha.stats.getUserTopReleases
44-//
55-// This file was automatically generated from Lexicon schemas.
66-// Any manual changes will be overwritten on the next regeneration.
77-88-#[derive(
99- serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1010-)]
1111-#[serde(rename_all = "camelCase")]
1212-pub struct GetUserTopReleases<'a> {
1313- #[serde(borrow)]
1414- pub actor: jacquard_common::types::ident::AtIdentifier<'a>,
1515- #[serde(skip_serializing_if = "std::option::Option::is_none")]
1616- #[serde(borrow)]
1717- pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
1818- ///(default: 50, min: 1, max: 100)
1919- #[serde(skip_serializing_if = "std::option::Option::is_none")]
2020- pub limit: std::option::Option<i64>,
2121- ///(default: "30days")
2222- #[serde(skip_serializing_if = "std::option::Option::is_none")]
2323- #[serde(borrow)]
2424- pub period: std::option::Option<jacquard_common::CowStr<'a>>,
2525-}
2626-2727-pub mod get_user_top_releases_state {
2828-2929- pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
3030- #[allow(unused)]
3131- use ::core::marker::PhantomData;
3232- mod sealed {
3333- pub trait Sealed {}
3434- }
3535- /// State trait tracking which required fields have been set
3636- pub trait State: sealed::Sealed {
3737- type Actor;
3838- }
3939- /// Empty state - all required fields are unset
4040- pub struct Empty(());
4141- impl sealed::Sealed for Empty {}
4242- impl State for Empty {
4343- type Actor = Unset;
4444- }
4545- ///State transition - sets the `actor` field to Set
4646- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetActor<S> {}
4848- impl<S: State> State for SetActor<S> {
4949- type Actor = Set<members::actor>;
5050- }
5151- /// Marker types for field names
5252- #[allow(non_camel_case_types)]
5353- pub mod members {
5454- ///Marker type for the `actor` field
5555- pub struct actor(());
5656- }
5757-}
5858-5959-/// Builder for constructing an instance of this type
6060-pub struct GetUserTopReleasesBuilder<'a, S: get_user_top_releases_state::State> {
6161- _phantom_state: ::core::marker::PhantomData<fn() -> S>,
6262- __unsafe_private_named: (
6363- ::core::option::Option<jacquard_common::types::ident::AtIdentifier<'a>>,
6464- ::core::option::Option<jacquard_common::CowStr<'a>>,
6565- ::core::option::Option<i64>,
6666- ::core::option::Option<jacquard_common::CowStr<'a>>,
6767- ),
6868- _phantom: ::core::marker::PhantomData<&'a ()>,
6969-}
7070-7171-impl<'a> GetUserTopReleases<'a> {
7272- /// Create a new builder for this type
7373- pub fn new() -> GetUserTopReleasesBuilder<'a, get_user_top_releases_state::Empty> {
7474- GetUserTopReleasesBuilder::new()
7575- }
7676-}
7777-7878-impl<'a> GetUserTopReleasesBuilder<'a, get_user_top_releases_state::Empty> {
7979- /// Create a new builder with all fields unset
8080- pub fn new() -> Self {
8181- GetUserTopReleasesBuilder {
8282- _phantom_state: ::core::marker::PhantomData,
8383- __unsafe_private_named: (None, None, None, None),
8484- _phantom: ::core::marker::PhantomData,
8585- }
8686- }
8787-}
8888-8989-impl<'a, S> GetUserTopReleasesBuilder<'a, S>
9090-where
9191- S: get_user_top_releases_state::State,
9292- S::Actor: get_user_top_releases_state::IsUnset,
9393-{
9494- /// Set the `actor` field (required)
9595- pub fn actor(
9696- mut self,
9797- value: impl Into<jacquard_common::types::ident::AtIdentifier<'a>>,
9898- ) -> GetUserTopReleasesBuilder<'a, get_user_top_releases_state::SetActor<S>> {
9999- self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
100100- GetUserTopReleasesBuilder {
101101- _phantom_state: ::core::marker::PhantomData,
102102- __unsafe_private_named: self.__unsafe_private_named,
103103- _phantom: ::core::marker::PhantomData,
104104- }
105105- }
106106-}
107107-108108-impl<'a, S: get_user_top_releases_state::State> GetUserTopReleasesBuilder<'a, S> {
109109- /// Set the `cursor` field (optional)
110110- pub fn cursor(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
111111- self.__unsafe_private_named.1 = value.into();
112112- self
113113- }
114114- /// Set the `cursor` field to an Option value (optional)
115115- pub fn maybe_cursor(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
116116- self.__unsafe_private_named.1 = value;
117117- self
118118- }
119119-}
120120-121121-impl<'a, S: get_user_top_releases_state::State> GetUserTopReleasesBuilder<'a, S> {
122122- /// Set the `limit` field (optional)
123123- pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self {
124124- self.__unsafe_private_named.2 = value.into();
125125- self
126126- }
127127- /// Set the `limit` field to an Option value (optional)
128128- pub fn maybe_limit(mut self, value: Option<i64>) -> Self {
129129- self.__unsafe_private_named.2 = value;
130130- self
131131- }
132132-}
133133-134134-impl<'a, S: get_user_top_releases_state::State> GetUserTopReleasesBuilder<'a, S> {
135135- /// Set the `period` field (optional)
136136- pub fn period(mut self, value: impl Into<Option<jacquard_common::CowStr<'a>>>) -> Self {
137137- self.__unsafe_private_named.3 = value.into();
138138- self
139139- }
140140- /// Set the `period` field to an Option value (optional)
141141- pub fn maybe_period(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
142142- self.__unsafe_private_named.3 = value;
143143- self
144144- }
145145-}
146146-147147-impl<'a, S> GetUserTopReleasesBuilder<'a, S>
148148-where
149149- S: get_user_top_releases_state::State,
150150- S::Actor: get_user_top_releases_state::IsSet,
151151-{
152152- /// Build the final struct
153153- pub fn build(self) -> GetUserTopReleases<'a> {
154154- GetUserTopReleases {
155155- actor: self.__unsafe_private_named.0.unwrap(),
156156- cursor: self.__unsafe_private_named.1,
157157- limit: self.__unsafe_private_named.2,
158158- period: self.__unsafe_private_named.3,
159159- }
160160- }
161161-}
162162-163163-#[jacquard_derive::lexicon]
164164-#[derive(
165165- serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
166166-)]
167167-#[serde(rename_all = "camelCase")]
168168-pub struct GetUserTopReleasesOutput<'a> {
169169- /// Next page cursor
170170- #[serde(skip_serializing_if = "std::option::Option::is_none")]
171171- #[serde(borrow)]
172172- pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
173173- #[serde(borrow)]
174174- pub releases: Vec<crate::fm_teal::alpha::stats::ReleaseView<'a>>,
175175-}
176176-177177-/// Response type for
178178-///fm.teal.alpha.stats.getUserTopReleases
179179-pub struct GetUserTopReleasesResponse;
180180-impl jacquard_common::xrpc::XrpcResp for GetUserTopReleasesResponse {
181181- const NSID: &'static str = "fm.teal.alpha.stats.getUserTopReleases";
182182- const ENCODING: &'static str = "application/json";
183183- type Output<'de> = GetUserTopReleasesOutput<'de>;
184184- type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
185185-}
186186-187187-impl<'a> jacquard_common::xrpc::XrpcRequest for GetUserTopReleases<'a> {
188188- const NSID: &'static str = "fm.teal.alpha.stats.getUserTopReleases";
189189- const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
190190- type Response = GetUserTopReleasesResponse;
191191-}
192192-193193-/// Endpoint type for
194194-///fm.teal.alpha.stats.getUserTopReleases
195195-pub struct GetUserTopReleasesRequest;
196196-impl jacquard_common::xrpc::XrpcEndpoint for GetUserTopReleasesRequest {
197197- const PATH: &'static str = "/xrpc/fm.teal.alpha.stats.getUserTopReleases";
198198- const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
199199- type Request<'de> = GetUserTopReleases<'de>;
200200- type Response = GetUserTopReleasesResponse;
201201-}
-10
crates/lexicons/src/lib.rs
···11-// @generated by jacquard-lexicon. DO NOT EDIT.
22-//
33-// This file was automatically generated from Lexicon schemas.
44-// Any manual changes will be overwritten on the next regeneration.
55-66-extern crate alloc;
77-pub mod builder_types;
88-99-#[cfg(feature = "fm_teal")]
1010-pub mod fm_teal;