@nuclearplayer/plugin-sdk 2.6.0 → 2.7.0

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.
package/dist/index.d.ts CHANGED
@@ -148,6 +148,25 @@ export declare type DashboardProvider = ProviderDescriptor<'dashboard'> & {
148
148
  fetchNewReleases?: () => Promise<AlbumRef[]>;
149
149
  };
150
150
 
151
+ export declare class DiscoveryAPI {
152
+ #private;
153
+ constructor(host?: DiscoveryHost);
154
+ getRecommendations(context: Track[], options: DiscoveryOptions, providerId?: string): Promise<Track[]>;
155
+ }
156
+
157
+ export declare type DiscoveryHost = {
158
+ getRecommendations: (context: Track[], options: DiscoveryOptions, providerId?: string) => Promise<Track[]>;
159
+ };
160
+
161
+ export declare type DiscoveryOptions = {
162
+ variety: number;
163
+ limit?: number;
164
+ };
165
+
166
+ export declare type DiscoveryProvider = ProviderDescriptor<'discovery'> & {
167
+ getRecommendations: (context: Track[], options: DiscoveryOptions) => Promise<Track[]>;
168
+ };
169
+
151
170
  export declare type EnumOption = {
152
171
  value: string;
153
172
  label: string;
@@ -378,6 +397,7 @@ export declare class NuclearAPI {
378
397
  readonly Favorites: FavoritesAPI;
379
398
  readonly Logger: LoggerAPI;
380
399
  readonly Dashboard: DashboardAPI;
400
+ readonly Discovery: DiscoveryAPI;
381
401
  readonly Playback: PlaybackAPI;
382
402
  readonly Playlists: PlaylistsAPI;
383
403
  readonly Events: EventsAPI;
@@ -393,6 +413,7 @@ export declare class NuclearAPI {
393
413
  favoritesHost?: FavoritesHost;
394
414
  loggerHost?: LoggerHost;
395
415
  dashboardHost?: DashboardHost;
416
+ discoveryHost?: DiscoveryHost;
396
417
  playbackHost?: PlaybackHost;
397
418
  playlistsHost?: PlaylistsHost;
398
419
  eventsHost?: EventsHost;
@@ -434,6 +455,8 @@ export declare type NumberWidget = {
434
455
  max?: number;
435
456
  step?: number;
436
457
  unit?: string;
458
+ startLabel?: string;
459
+ endLabel?: string;
437
460
  } | {
438
461
  type: 'number-input';
439
462
  min?: number;
@@ -783,7 +806,7 @@ export declare type ProviderDescriptor<K extends ProviderKind = ProviderKind> =
783
806
  pluginId?: string;
784
807
  };
785
808
 
786
- export declare type ProviderKind = 'metadata' | 'streaming' | 'lyrics' | 'dashboard' | 'playlists' | (string & {});
809
+ export declare type ProviderKind = 'metadata' | 'streaming' | 'lyrics' | 'dashboard' | 'playlists' | 'discovery' | (string & {});
787
810
 
788
811
  export declare type ProviderRef = {
789
812
  provider: string;