UnblockNeteaseMusic / server-rust

Rust 版本的 UnblockNeteaseMusic/server ,以效能、穩定性及可維護性為目標。
GNU Lesser General Public License v3.0
251 stars 28 forks source link

unm-resolver-napi: 產生 TypeScript definition #64

Closed pan93412 closed 2 years ago

pan93412 commented 2 years ago
/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

export class ExternalObject<T> {
  readonly '': {
    readonly '': unique symbol
    [K: symbol]: T
  }
}
/** (napi-rs) The engine uses to resolve audio. */
export const enum Engine {
  /** Bilibili Music. */
  Bilibili = 0,
  /** Unoffical Netease Cloud Music API */
  PyNCM = 1,
  /** YouTube with `yt-dlp`. */
  YtDlp = 2,
  /** YouTube with `youtube-dl`. */
  YtDl = 3
}
/** (napi-rs) The metadata of the artist of a song. */
export interface Artist {
  /** The identifier of this artist. */
  id: string
  /** The name of this artist. */
  name: string
}
/** (napi-rs) The metadata of the album of a song. */
export interface Album {
  /** The identifier of this artist. */
  id: string
  /** The name of this album. */
  name: string
  /** The song this album includes. */
  songs: Array<Song>
}
/** (napi-rs) The metadata of a song. */
export interface Song {
  /** The identifier of this song. */
  id: string
  /** The name of this song. */
  name: string
  /** The duration of this song. */
  duration?: number | undefined | null
  /** The artist of this song. */
  artists: Array<Artist>
  /** The album of this song. */
  album?: Album | undefined | null
}
/** (napi-rs) Resolve the `song` with the specified engines parallelly. */
export function resolve(engines: Array<Engine>, info: Song): Promise<string>