···1616pub mod library;
1717pub mod like;
1818pub mod mirror;
1919+pub mod notification;
1920pub mod player;
2021pub mod playlist;
2122pub mod playlist_item;
···33 "Official Erlang SDK for Rocksky — a Rustler NIF over the shared Rust core "
44 "(rocksky-sdk): AppView reads, record writes (scrobble fan-out, like, "
55 "follow, shout), and the identity hashes shared across every Rocksky SDK."},
66- {vsn, "0.4.0"},
66+ {vsn, "0.5.0"},
77 {registered, []},
88 %% crypto/inets/ssl/public_key back the first-load NIF download + checksum
99 %% verify in rocksky_nif. kernel/stdlib are mandatory.
···491491 Feeds []FeedUriView `json:"feeds,omitempty"`
492492}
493493494494-type DescribeFeedGeneratorParams struct {
495495-}
496496-497494type DislikeShoutInput struct {
498495 // The unique identifier of the shout to dislike
499496 URI string `json:"uri,omitempty"`
···13761373 URI string `json:"uri,omitempty"`
13771374}
1378137513761376+type GetUnreadCountOutput struct {
13771377+ // The number of unread notifications.
13781378+ Count int `json:"count,omitempty"`
13791379+}
13801380+13791381type GetUserOutput struct {
13801382}
13811383···15271529 URI string `json:"uri,omitempty"`
15281530}
1529153115321532+type ListNotificationsOutput struct {
15331533+ Notifications []NotificationView `json:"notifications,omitempty"`
15341534+ // The number of unread notifications.
15351535+ UnreadCount int `json:"unreadCount,omitempty"`
15361536+ // A cursor value to pass to subsequent calls to get the next page of results.
15371537+ Cursor string `json:"cursor,omitempty"`
15381538+}
15391539+15401540+type ListNotificationsParams struct {
15411541+ Limit int `json:"limit,omitempty"`
15421542+ Cursor string `json:"cursor,omitempty"`
15431543+}
15441544+15301545type MatchSongParams struct {
15311546 // The title of the song to retrieve
15321547 Title string `json:"title,omitempty"`
···15531568 LastScrobbleSeenAt string `json:"lastScrobbleSeenAt,omitempty"`
15541569}
1555157015711571+// NotificationActor The user who triggered a notification.
15721572+type NotificationActor struct {
15731573+ // The unique identifier of the actor.
15741574+ ID string `json:"id,omitempty"`
15751575+ // The decentralized identifier of the actor.
15761576+ DID string `json:"did,omitempty"`
15771577+ // The handle of the actor.
15781578+ Handle string `json:"handle,omitempty"`
15791579+ // The display name of the actor.
15801580+ DisplayName string `json:"displayName,omitempty"`
15811581+ // The URL of the actor's avatar image.
15821582+ Avatar string `json:"avatar,omitempty"`
15831583+}
15841584+15851585+type NotificationView struct {
15861586+ // The unique identifier of the notification.
15871587+ ID string `json:"id,omitempty"`
15881588+ // The notification type: like_scrobble, follow, comment_scrobble, comment_profile, reply, or react_comment.
15891589+ Type string `json:"type,omitempty"`
15901590+ // Whether the notification has been viewed.
15911591+ Read bool `json:"read,omitempty"`
15921592+ // When the notification was created.
15931593+ CreatedAt string `json:"createdAt,omitempty"`
15941594+ // The at-uri of the subject the notification relates to.
15951595+ SubjectURI string `json:"subjectUri,omitempty"`
15961596+ // The id of the related shout, if any.
15971597+ ShoutID string `json:"shoutId,omitempty"`
15981598+ // The content of the related shout, if any.
15991599+ ShoutContent string `json:"shoutContent,omitempty"`
16001600+ Actor *NotificationActor `json:"actor,omitempty"`
16011601+}
16021602+15561603type PingOutput struct {
15571604}
15581605···20882135 Avatar string `json:"avatar,omitempty"`
20892136}
2090213721382138+// ShoutGif A GIF, sticker, or clip embedded in a shout. `url` may point at an image (GIF/WebP) or a video (MP4); the client decides how to render it from the file extension.
21392139+type ShoutGif struct {
21402140+ // Direct URL of the animated GIF/MP4.
21412141+ URL string `json:"url,omitempty"`
21422142+ // Smaller still/preview image URL.
21432143+ PreviewURL string `json:"previewUrl,omitempty"`
21442144+ // Alternative text describing the media.
21452145+ Alt string `json:"alt,omitempty"`
21462146+ // The intrinsic width of the media in pixels.
21472147+ Width int `json:"width,omitempty"`
21482148+ // The intrinsic height of the media in pixels.
21492149+ Height int `json:"height,omitempty"`
21502150+}
21512151+21522152+// ShoutMention A mention of another actor within the shout message, anchored to a UTF-8 byte range in the message.
21532153+type ShoutMention struct {
21542154+ // The DID of the mentioned actor.
21552155+ DID string `json:"did,omitempty"`
21562156+ // Inclusive UTF-8 byte offset of the mention start.
21572157+ ByteStart int `json:"byteStart,omitempty"`
21582158+ // Exclusive UTF-8 byte offset of the mention end.
21592159+ ByteEnd int `json:"byteEnd,omitempty"`
21602160+}
21612161+20912162type ShoutRecord struct {
20922092- // The message of the shout.
21632163+ // The message of the shout. Optional when a gif/sticker/clip is attached.
20932164 Message string `json:"message,omitempty"`
20942165 // The date when the shout was created.
20952166 CreatedAt string `json:"createdAt,omitempty"`
20962167 Parent *StrongRef `json:"parent,omitempty"`
20972168 Subject *StrongRef `json:"subject,omitempty"`
21692169+ // An attached GIF, sticker, or clip (e.g. from KLIPY).
21702170+ Gif *ShoutGif `json:"gif,omitempty"`
21712171+ // Mentions of other actors within the message, anchored to UTF-8 byte ranges.
21722172+ Facets []ShoutMention `json:"facets,omitempty"`
20982173}
2099217421002175type ShoutView struct {
···21082183 CreatedAt string `json:"createdAt,omitempty"`
21092184 // The author of the shout.
21102185 Author *ShoutAuthor `json:"author,omitempty"`
21862186+ // An attached GIF, sticker, or clip.
21872187+ Gif *ShoutGif `json:"gif,omitempty"`
21882188+ // Mentions of other actors within the message, anchored to UTF-8 byte ranges.
21892189+ Facets []ShoutMention `json:"facets,omitempty"`
21112190}
2112219121132192type SongFirstScrobbleView struct {
···2542262125432622type UpdatePlaylistOutput struct {
25442623}
26242624+26252625+type UpdateSeenInput struct {
26262626+ // The ids of the notifications to mark as viewed. Omit to mark all.
26272627+ Ids []string `json:"ids,omitempty"`
26282628+}
26292629+26302630+type UpdateSeenOutput struct {
26312631+ // The number of unread notifications remaining.
26322632+ UnreadCount int `json:"unreadCount,omitempty"`
26332633+}
···492492 feeds?: FeedUriView[];
493493}
494494495495-export interface DescribeFeedGeneratorParams {
496496-497497-}
498498-499495export interface DislikeShoutInput {
500496 /** The unique identifier of the shout to dislike */
501497 uri?: AtUri;
···14071403 uri: AtUri;
14081404}
1409140514061406+export interface GetUnreadCountOutput {
14071407+ /** The number of unread notifications. */
14081408+ count: number;
14091409+}
14101410+14101411export interface GetUserOutput {
1411141214121413}
···15701571 uri?: AtUri;
15711572}
1572157315741574+export interface ListNotificationsOutput {
15751575+ notifications: NotificationView[];
15761576+ /** The number of unread notifications. */
15771577+ unreadCount: number;
15781578+ /** A cursor value to pass to subsequent calls to get the next page of results. */
15791579+ cursor?: string;
15801580+}
15811581+15821582+export interface ListNotificationsParams {
15831583+ limit?: number;
15841584+ cursor?: string;
15851585+}
15861586+15731587export interface MatchSongParams {
15741588 /** The title of the song to retrieve */
15751589 title: string;
···15961610 lastScrobbleSeenAt?: DateTime;
15971611}
1598161216131613+/** The user who triggered a notification. */
16141614+export interface NotificationActor {
16151615+ /** The unique identifier of the actor. */
16161616+ id?: string;
16171617+ /** The decentralized identifier of the actor. */
16181618+ did?: Did;
16191619+ /** The handle of the actor. */
16201620+ handle?: AtIdentifier;
16211621+ /** The display name of the actor. */
16221622+ displayName?: string;
16231623+ /** The URL of the actor's avatar image. */
16241624+ avatar?: Uri;
16251625+}
16261626+16271627+export interface NotificationView {
16281628+ /** The unique identifier of the notification. */
16291629+ id: string;
16301630+ /** The notification type: like_scrobble, follow, comment_scrobble, comment_profile, reply, or react_comment. */
16311631+ type: string;
16321632+ /** Whether the notification has been viewed. */
16331633+ read: boolean;
16341634+ /** When the notification was created. */
16351635+ createdAt: DateTime;
16361636+ /** The at-uri of the subject the notification relates to. */
16371637+ subjectUri?: string;
16381638+ /** The id of the related shout, if any. */
16391639+ shoutId?: string;
16401640+ /** The content of the related shout, if any. */
16411641+ shoutContent?: string;
16421642+ actor?: NotificationActor;
16431643+}
16441644+15991645export interface PingOutput {
1600164616011647}
···21332179 displayName?: string;
21342180 /** The URL of the author's avatar image. */
21352181 avatar?: Uri;
21822182+}
21832183+21842184+/** A GIF, sticker, or clip embedded in a shout. `url` may point at an image (GIF/WebP) or a video (MP4); the client decides how to render it from the file extension. */
21852185+export interface ShoutGif {
21862186+ /** Direct URL of the animated GIF/MP4. */
21872187+ url: Uri;
21882188+ /** Smaller still/preview image URL. */
21892189+ previewUrl?: Uri;
21902190+ /** Alternative text describing the media. */
21912191+ alt?: string;
21922192+ /** The intrinsic width of the media in pixels. */
21932193+ width?: number;
21942194+ /** The intrinsic height of the media in pixels. */
21952195+ height?: number;
21962196+}
21972197+21982198+/** A mention of another actor within the shout message, anchored to a UTF-8 byte range in the message. */
21992199+export interface ShoutMention {
22002200+ /** The DID of the mentioned actor. */
22012201+ did: Did;
22022202+ /** Inclusive UTF-8 byte offset of the mention start. */
22032203+ byteStart: number;
22042204+ /** Exclusive UTF-8 byte offset of the mention end. */
22052205+ byteEnd: number;
21362206}
2137220721382208export interface ShoutRecord {
21392139- /** The message of the shout. */
21402140- message: string;
22092209+ /** The message of the shout. Optional when a gif/sticker/clip is attached. */
22102210+ message?: string;
21412211 /** The date when the shout was created. */
21422212 createdAt: DateTime;
21432213 parent?: StrongRef;
21442214 subject: StrongRef;
22152215+ /** An attached GIF, sticker, or clip (e.g. from KLIPY). */
22162216+ gif?: ShoutGif;
22172217+ /** Mentions of other actors within the message, anchored to UTF-8 byte ranges. */
22182218+ facets?: ShoutMention[];
21452219}
2146222021472221export interface ShoutView {
···21552229 createdAt?: DateTime;
21562230 /** The author of the shout. */
21572231 author?: ShoutAuthor;
22322232+ /** An attached GIF, sticker, or clip. */
22332233+ gif?: ShoutGif;
22342234+ /** Mentions of other actors within the message, anchored to UTF-8 byte ranges. */
22352235+ facets?: ShoutMention[];
21582236}
2159223721602238export interface SongFirstScrobbleView {
···2596267425972675}
2598267626772677+export interface UpdateSeenInput {
26782678+ /** The ids of the notifications to mark as viewed. Omit to mark all. */
26792679+ ids?: string[];
26802680+}
26812681+26822682+export interface UpdateSeenOutput {
26832683+ /** The number of unread notifications remaining. */
26842684+ unreadCount: number;
26852685+}
26862686+25992687/**
26002688 * Map of every XRPC method (NSID) to the type of its response body.
26012689 * Endpoints with no output map to `void`. Used by the SDK to type method
···26972785 "app.rocksky.like.likeSong": SongViewDetailed;
26982786 "app.rocksky.mirror.getMirrorSources": GetMirrorSourcesOutput;
26992787 "app.rocksky.mirror.putMirrorSource": MirrorSourceView;
27882788+ "app.rocksky.notification.getUnreadCount": GetUnreadCountOutput;
27892789+ "app.rocksky.notification.listNotifications": ListNotificationsOutput;
27902790+ "app.rocksky.notification.updateSeen": UpdateSeenOutput;
27002791 "app.rocksky.player.addDirectoryToQueue": void;
27012792 "app.rocksky.player.addItemsToQueue": void;
27022793 "app.rocksky.player.getCurrentlyPlaying": PlayerCurrentlyPlayingViewDetailed;