musescore-downloader/src/types.ts

85 lines
1.5 KiB
TypeScript
Raw Normal View History

2019-11-03 19:13:06 +00:00
interface SourceData {
2020-05-17 22:57:28 +00:00
type: string; // "audio"
title: string; // "Musescore audio"
nid: number;
2019-11-03 19:13:06 +00:00
}
type CommentData = any;
interface PartData {
2020-05-17 22:57:28 +00:00
part: {
name: string;
program: number;
};
2019-11-03 19:13:06 +00:00
}
interface Metadata {
2020-05-17 22:57:28 +00:00
title: string;
subtitle?: string;
composer?: string;
poet?: string;
pages: number;
measures: number;
lyrics: number;
chordnames: number;
keysig: number;
duration: number;
dimensions: number;
parts: PartData[];
2019-11-03 19:13:06 +00:00
}
interface ScoreJson {
2020-05-17 22:57:28 +00:00
id: number;
vid: number;
dates: {
revised: number;
};
secret: string;
permalink: string;
custom_url: string;
format: string; // "0"
has_custom_audio: 0 | 1;
metadata: Metadata;
2019-11-03 19:13:06 +00:00
}
interface UrlsData {
2020-05-17 22:57:28 +00:00
midi: string;
mp3: string;
space: string;
image_path: string;
media?: string[];
2019-11-03 19:13:06 +00:00
}
interface AccessControlData {
2020-05-17 22:57:28 +00:00
enabled: boolean;
hasAccess: boolean;
2019-11-03 19:13:06 +00:00
}
interface PianoKeyboardData extends AccessControlData {
2020-05-17 22:57:28 +00:00
midiUrl: string;
2019-11-03 19:13:06 +00:00
}
interface PianoRollData extends AccessControlData {
2020-05-17 22:57:28 +00:00
resourcesUrl: string;
feedbackUrl: string;
forceShow: boolean;
2019-11-03 19:13:06 +00:00
}
export interface ScorePlayerData {
2020-05-17 22:57:28 +00:00
embed: boolean;
sources: SourceData[];
default_source?: SourceData;
mixer?: string;
secondaryMixer?: string;
bucket?: string; // "https://musescore.com/static/musescore/scoredata"
json: ScoreJson;
render_vector: boolean;
comments: CommentData[];
score_id: number;
urls: UrlsData;
sendEvents?: boolean;
pianoKeyboard: PianoKeyboardData;
pianoRoll: PianoRollData;
2019-11-03 19:13:06 +00:00
}