@targoninc/lyda-shared 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,5 +3,6 @@ export declare enum FeedType {
3
3
  explore = "explore",
4
4
  history = "history",
5
5
  autoQueue = "autoQueue",
6
- profileTracks = "profileTracks"
6
+ profileTracks = "profileTracks",
7
+ profileReposts = "profileReposts"
7
8
  }
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Represents the different types of notification references. These are actually stored in the message.
3
+ */
1
4
  export declare enum NotificationReferenceType {
2
5
  user = "u",
3
6
  track = "t",
@@ -1,6 +1,9 @@
1
1
  import { TrackLike } from "./db/lyda/TrackLike.ts";
2
2
  import { AlbumLike } from "./db/lyda/AlbumLike.ts";
3
3
  import { PlaylistLike } from "./db/lyda/PlaylistLike.ts";
4
+ /**
5
+ * A generic interface for an entity that has an array of likes attached to it
6
+ */
4
7
  export interface Likable {
5
8
  likes?: (TrackLike | AlbumLike | PlaylistLike)[];
6
9
  }
@@ -1,4 +1,7 @@
1
1
  import { Track } from "./db/lyda/Track.ts";
2
+ /**
3
+ * A generic interface for tracks in lists (e.g. albums or playlists)
4
+ */
2
5
  export interface ListTrack {
3
6
  track_id: number;
4
7
  position: number;
@@ -1,5 +1,8 @@
1
+ /**
2
+ * Represents a part of a notification that can be displayed as a separate component
3
+ */
1
4
  export interface NotificationPart {
2
- type: string;
5
+ type: "profile" | "track" | "album" | "playlist";
3
6
  text?: string;
4
7
  id?: number;
5
8
  }
@@ -1,4 +1,10 @@
1
1
  import { NotificationReferenceType } from "../Enums/NotificationReferenceType.ts";
2
+ /**
3
+ * Represents a reference for a notification.
4
+ *
5
+ * This interface defines the structure of a notification reference object,
6
+ * which includes properties to identify and optionally associate an object with the notification.
7
+ */
2
8
  export interface NotificationReference {
3
9
  type: NotificationReferenceType;
4
10
  id: number;
@@ -1,5 +1,8 @@
1
1
  import { Album } from "./db/lyda/Album.ts";
2
2
  import { Playlist } from "./db/lyda/Playlist.ts";
3
+ /**
4
+ * Represents the source from where media is currently being played.
5
+ */
3
6
  export interface PlayingFrom {
4
7
  type: "album" | "playlist" | string;
5
8
  name: string;
@@ -8,6 +8,13 @@ import { Permission } from "./Permission.js";
8
8
  import { Entity } from "@targoninc/ts-search";
9
9
  import { UserTotp } from "./UserTotp.ts";
10
10
  import { PublicKey } from "./PublicKey.ts";
11
+ /**
12
+ * Represents a user entity with associated attributes and relationships.
13
+ *
14
+ * The `User` interface extends the `Entity` interface from our search library and defines additional properties
15
+ * related to the user, including information about permissions, subscriptions, settings, badges,
16
+ * security credentials, and activity logs.
17
+ */
11
18
  export interface User extends Entity {
12
19
  permissions?: Permission[];
13
20
  subscription?: Subscription;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@targoninc/lyda-shared",
3
3
  "type": "module",
4
- "version": "0.0.28",
4
+ "version": "0.0.30",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -4,4 +4,5 @@ export enum FeedType {
4
4
  history = "history",
5
5
  autoQueue = "autoQueue",
6
6
  profileTracks = "profileTracks",
7
+ profileReposts = "profileReposts",
7
8
  }
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Represents the different types of notification references. These are actually stored in the message.
3
+ */
1
4
  export enum NotificationReferenceType {
2
5
  user = "u",
3
6
  track = "t",
@@ -2,6 +2,9 @@ import {TrackLike} from "./db/lyda/TrackLike.ts";
2
2
  import {AlbumLike} from "./db/lyda/AlbumLike.ts";
3
3
  import {PlaylistLike} from "./db/lyda/PlaylistLike.ts";
4
4
 
5
+ /**
6
+ * A generic interface for an entity that has an array of likes attached to it
7
+ */
5
8
  export interface Likable {
6
9
  likes?: (TrackLike | AlbumLike | PlaylistLike)[];
7
10
  }
@@ -1,5 +1,8 @@
1
1
  import {Track} from "./db/lyda/Track.ts";
2
2
 
3
+ /**
4
+ * A generic interface for tracks in lists (e.g. albums or playlists)
5
+ */
3
6
  export interface ListTrack {
4
7
  track_id: number;
5
8
  position: number;
@@ -1,5 +1,8 @@
1
+ /**
2
+ * Represents a part of a notification that can be displayed as a separate component
3
+ */
1
4
  export interface NotificationPart {
2
- type: string,
5
+ type: "profile" | "track" | "album" | "playlist",
3
6
  text?: string,
4
7
  id?: number
5
8
  }
@@ -1,5 +1,11 @@
1
1
  import {NotificationReferenceType} from "../Enums/NotificationReferenceType.ts";
2
2
 
3
+ /**
4
+ * Represents a reference for a notification.
5
+ *
6
+ * This interface defines the structure of a notification reference object,
7
+ * which includes properties to identify and optionally associate an object with the notification.
8
+ */
3
9
  export interface NotificationReference {
4
10
  type: NotificationReferenceType;
5
11
  id: number;
@@ -1,6 +1,9 @@
1
1
  import {Album} from "./db/lyda/Album.ts";
2
2
  import {Playlist} from "./db/lyda/Playlist.ts";
3
3
 
4
+ /**
5
+ * Represents the source from where media is currently being played.
6
+ */
4
7
  export interface PlayingFrom {
5
8
  type: "album" | "playlist" | string;
6
9
  name: string;
@@ -9,6 +9,13 @@ import {Entity} from "@targoninc/ts-search";
9
9
  import {UserTotp} from "./UserTotp.ts";
10
10
  import {PublicKey} from "./PublicKey.ts";
11
11
 
12
+ /**
13
+ * Represents a user entity with associated attributes and relationships.
14
+ *
15
+ * The `User` interface extends the `Entity` interface from our search library and defines additional properties
16
+ * related to the user, including information about permissions, subscriptions, settings, badges,
17
+ * security credentials, and activity logs.
18
+ */
12
19
  export interface User extends Entity {
13
20
  permissions?: Permission[];
14
21
  subscription?: Subscription;