@opfelmusig/lib 0.0.0-ci.0.sha-3e76884
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/README.md +8 -0
- package/dist/clients/catalog/album.d.ts +12 -0
- package/dist/clients/catalog/album.js +14 -0
- package/dist/clients/catalog/genre.d.ts +13 -0
- package/dist/clients/catalog/genre.js +17 -0
- package/dist/clients/catalog/index.d.ts +71 -0
- package/dist/clients/catalog/index.js +99 -0
- package/dist/clients/catalog/musicVideo.d.ts +12 -0
- package/dist/clients/catalog/musicVideo.js +14 -0
- package/dist/clients/catalog/playlist.d.ts +12 -0
- package/dist/clients/catalog/playlist.js +16 -0
- package/dist/clients/catalog/song.d.ts +12 -0
- package/dist/clients/catalog/song.js +14 -0
- package/dist/clients/catalog/station.d.ts +14 -0
- package/dist/clients/catalog/station.js +34 -0
- package/dist/clients/catalog/stationGenre.d.ts +12 -0
- package/dist/clients/catalog/stationGenre.js +14 -0
- package/dist/clients/library/index.d.ts +39 -0
- package/dist/clients/library/index.js +68 -0
- package/dist/clients/library/playlistFolder.d.ts +12 -0
- package/dist/clients/library/playlistFolder.js +16 -0
- package/dist/clients/me/index.d.ts +25 -0
- package/dist/clients/me/index.js +49 -0
- package/dist/clients/me/musicSummary.d.ts +12 -0
- package/dist/clients/me/musicSummary.js +14 -0
- package/dist/clients/me/ratings.d.ts +15 -0
- package/dist/clients/me/ratings.js +34 -0
- package/dist/clients/me/recent.d.ts +17 -0
- package/dist/clients/me/recent.js +37 -0
- package/dist/clients/me/recommendation.d.ts +12 -0
- package/dist/clients/me/recommendation.js +14 -0
- package/dist/clients/me/station.d.ts +10 -0
- package/dist/clients/me/station.js +13 -0
- package/dist/clients/playback.d.ts +9 -0
- package/dist/clients/playback.js +68 -0
- package/dist/clients/resource.d.ts +34 -0
- package/dist/clients/resource.js +105 -0
- package/dist/clients/shared/equivalent.d.ts +10 -0
- package/dist/clients/shared/equivalent.js +15 -0
- package/dist/clients/social/index.d.ts +7 -0
- package/dist/clients/social/index.js +9 -0
- package/dist/clients/social/profile.d.ts +12 -0
- package/dist/clients/social/profile.js +14 -0
- package/dist/clients/storefront.d.ts +12 -0
- package/dist/clients/storefront.js +14 -0
- package/dist/core/client.d.ts +40 -0
- package/dist/core/client.js +82 -0
- package/dist/core/error.d.ts +23 -0
- package/dist/core/error.js +24 -0
- package/dist/core/http.d.ts +22 -0
- package/dist/core/http.js +232 -0
- package/dist/helpers/language.d.ts +1 -0
- package/dist/helpers/language.js +48 -0
- package/dist/helpers/public.d.ts +19 -0
- package/dist/helpers/public.js +35 -0
- package/dist/helpers/requestQuery.d.ts +17 -0
- package/dist/helpers/requestQuery.js +153 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -0
- package/dist/schemas/error.d.ts +29 -0
- package/dist/schemas/error.js +16 -0
- package/dist/schemas/request.d.ts +42 -0
- package/dist/schemas/request.js +28 -0
- package/dist/types/combined.d.ts +15 -0
- package/dist/types/combined.js +0 -0
- package/dist/types/config.d.ts +63 -0
- package/dist/types/config.js +0 -0
- package/dist/types/params.d.ts +22 -0
- package/dist/types/params.js +0 -0
- package/dist/types/playback.d.ts +199 -0
- package/dist/types/playback.js +103 -0
- package/dist/types/public.d.ts +56 -0
- package/dist/types/public.js +1 -0
- package/dist/types/query/helpers.d.ts +27 -0
- package/dist/types/query/helpers.js +0 -0
- package/dist/types/query/registry.d.ts +74 -0
- package/dist/types/query/registry.js +0 -0
- package/dist/types/query/resource.d.ts +29 -0
- package/dist/types/query/resource.js +0 -0
- package/dist/types/query/response.d.ts +3 -0
- package/dist/types/query/response.js +0 -0
- package/dist/types/query/results.d.ts +45 -0
- package/dist/types/query/results.js +0 -0
- package/dist/types/query/scopes.d.ts +77 -0
- package/dist/types/query/scopes.js +0 -0
- package/dist/types/request.d.ts +14 -0
- package/dist/types/request.js +0 -0
- package/dist/types/resources/catalog/activity.d.ts +15 -0
- package/dist/types/resources/catalog/activity.js +0 -0
- package/dist/types/resources/catalog/album.d.ts +47 -0
- package/dist/types/resources/catalog/album.js +0 -0
- package/dist/types/resources/catalog/artist.d.ts +57 -0
- package/dist/types/resources/catalog/artist.js +0 -0
- package/dist/types/resources/catalog/concert.d.ts +32 -0
- package/dist/types/resources/catalog/concert.js +0 -0
- package/dist/types/resources/catalog/creditArtist.d.ts +11 -0
- package/dist/types/resources/catalog/creditArtist.js +0 -0
- package/dist/types/resources/catalog/curator.d.ts +27 -0
- package/dist/types/resources/catalog/curator.js +0 -0
- package/dist/types/resources/catalog/genre.d.ts +11 -0
- package/dist/types/resources/catalog/genre.js +0 -0
- package/dist/types/resources/catalog/lyrics.d.ts +8 -0
- package/dist/types/resources/catalog/lyrics.js +0 -0
- package/dist/types/resources/catalog/musicVideo.d.ts +34 -0
- package/dist/types/resources/catalog/musicVideo.js +0 -0
- package/dist/types/resources/catalog/playlist.d.ts +35 -0
- package/dist/types/resources/catalog/playlist.js +0 -0
- package/dist/types/resources/catalog/recordLabel.d.ts +16 -0
- package/dist/types/resources/catalog/recordLabel.js +0 -0
- package/dist/types/resources/catalog/roleCategory.d.ts +12 -0
- package/dist/types/resources/catalog/roleCategory.js +0 -0
- package/dist/types/resources/catalog/song.d.ts +50 -0
- package/dist/types/resources/catalog/song.js +0 -0
- package/dist/types/resources/catalog/station.d.ts +21 -0
- package/dist/types/resources/catalog/station.js +0 -0
- package/dist/types/resources/catalog/stationGenre.d.ts +11 -0
- package/dist/types/resources/catalog/stationGenre.js +0 -0
- package/dist/types/resources/catalog/syllableLyrics.d.ts +9 -0
- package/dist/types/resources/catalog/syllableLyrics.js +0 -0
- package/dist/types/resources/catalog/venue.d.ts +20 -0
- package/dist/types/resources/catalog/venue.js +0 -0
- package/dist/types/resources/library/album.d.ts +17 -0
- package/dist/types/resources/library/album.js +0 -0
- package/dist/types/resources/library/artist.d.ts +13 -0
- package/dist/types/resources/library/artist.js +0 -0
- package/dist/types/resources/library/musicVideo.d.ts +15 -0
- package/dist/types/resources/library/musicVideo.js +0 -0
- package/dist/types/resources/library/playlist.d.ts +24 -0
- package/dist/types/resources/library/playlist.js +0 -0
- package/dist/types/resources/library/playlistFolder.d.ts +13 -0
- package/dist/types/resources/library/playlistFolder.js +0 -0
- package/dist/types/resources/library/song.d.ts +15 -0
- package/dist/types/resources/library/song.js +0 -0
- package/dist/types/resources/me/musicSummary.d.ts +37 -0
- package/dist/types/resources/me/musicSummary.js +0 -0
- package/dist/types/resources/me/profile.d.ts +32 -0
- package/dist/types/resources/me/profile.js +0 -0
- package/dist/types/resources/me/rating.d.ts +11 -0
- package/dist/types/resources/me/rating.js +0 -0
- package/dist/types/resources/me/recommendation.d.ts +27 -0
- package/dist/types/resources/me/recommendation.js +0 -0
- package/dist/types/resources/me/summaries/albumPeriodSummary.d.ts +15 -0
- package/dist/types/resources/me/summaries/albumPeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/artistPeriodSummary.d.ts +15 -0
- package/dist/types/resources/me/summaries/artistPeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/genrePeriodSummary.d.ts +12 -0
- package/dist/types/resources/me/summaries/genrePeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/monthlySongPeriodSummary.d.ts +13 -0
- package/dist/types/resources/me/summaries/monthlySongPeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/playlistPeriodSummary.d.ts +14 -0
- package/dist/types/resources/me/summaries/playlistPeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/songPeriodSummary.d.ts +15 -0
- package/dist/types/resources/me/summaries/songPeriodSummary.js +0 -0
- package/dist/types/resources/me/summaries/stationPeriodSummary.d.ts +14 -0
- package/dist/types/resources/me/summaries/stationPeriodSummary.js +0 -0
- package/dist/types/resources/other/storefront.d.ts +8 -0
- package/dist/types/resources/other/storefront.js +0 -0
- package/dist/types/resources/shared/album.d.ts +11 -0
- package/dist/types/resources/shared/album.js +0 -0
- package/dist/types/resources/shared/artist.d.ts +3 -0
- package/dist/types/resources/shared/artist.js +0 -0
- package/dist/types/resources/shared/lyrics.d.ts +5 -0
- package/dist/types/resources/shared/lyrics.js +0 -0
- package/dist/types/resources/shared/musicVideo.d.ts +13 -0
- package/dist/types/resources/shared/musicVideo.js +0 -0
- package/dist/types/resources/shared/playlist.d.ts +7 -0
- package/dist/types/resources/shared/playlist.js +0 -0
- package/dist/types/resources/shared/song.d.ts +15 -0
- package/dist/types/resources/shared/song.js +0 -0
- package/dist/types/results/chart.d.ts +8 -0
- package/dist/types/results/chart.js +0 -0
- package/dist/types/results/search.d.ts +30 -0
- package/dist/types/results/search.js +0 -0
- package/dist/types/shared.d.ts +81 -0
- package/dist/types/shared.js +0 -0
- package/package.json +64 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { CatalogActivity } from "../../types/resources/catalog/activity.js";
|
|
2
|
+
import type { CatalogAlbum } from "../../types/resources/catalog/album.js";
|
|
3
|
+
import type { CatalogArtist } from "../../types/resources/catalog/artist.js";
|
|
4
|
+
import type { CatalogConcert } from "../../types/resources/catalog/concert.js";
|
|
5
|
+
import type { CatalogCreditArtist } from "../../types/resources/catalog/creditArtist.js";
|
|
6
|
+
import type { CatalogAppleCurator, CatalogCurator } from "../../types/resources/catalog/curator.js";
|
|
7
|
+
import type { CatalogGenre } from "../../types/resources/catalog/genre.js";
|
|
8
|
+
import type { CatalogLyrics } from "../../types/resources/catalog/lyrics.js";
|
|
9
|
+
import type { CatalogMusicVideo } from "../../types/resources/catalog/musicVideo.js";
|
|
10
|
+
import type { CatalogPlaylist } from "../../types/resources/catalog/playlist.js";
|
|
11
|
+
import type { CatalogRecordLabel } from "../../types/resources/catalog/recordLabel.js";
|
|
12
|
+
import type { CatalogRoleCategory } from "../../types/resources/catalog/roleCategory.js";
|
|
13
|
+
import type { CatalogSong } from "../../types/resources/catalog/song.js";
|
|
14
|
+
import type { CatalogStation } from "../../types/resources/catalog/station.js";
|
|
15
|
+
import type { CatalogStationGenre } from "../../types/resources/catalog/stationGenre.js";
|
|
16
|
+
import type { CatalogSyllableLyrics } from "../../types/resources/catalog/syllableLyrics.js";
|
|
17
|
+
import type { CatalogVenue } from "../../types/resources/catalog/venue.js";
|
|
18
|
+
import type { LibraryAlbum } from "../../types/resources/library/album.js";
|
|
19
|
+
import type { LibraryArtist } from "../../types/resources/library/artist.js";
|
|
20
|
+
import type { LibraryMusicVideo } from "../../types/resources/library/musicVideo.js";
|
|
21
|
+
import type { LibraryPlaylist } from "../../types/resources/library/playlist.js";
|
|
22
|
+
import type { LibraryPlaylistFolder } from "../../types/resources/library/playlistFolder.js";
|
|
23
|
+
import type { LibrarySong } from "../../types/resources/library/song.js";
|
|
24
|
+
import type { MusicSummary } from "../../types/resources/me/musicSummary.js";
|
|
25
|
+
import type { PersonalSocialProfile, SocialProfile } from "../../types/resources/me/profile.js";
|
|
26
|
+
import type { Rating } from "../../types/resources/me/rating.js";
|
|
27
|
+
import type { Recommendation } from "../../types/resources/me/recommendation.js";
|
|
28
|
+
import type { AlbumPeriodSummary } from "../../types/resources/me/summaries/albumPeriodSummary.js";
|
|
29
|
+
import type { ArtistPeriodSummary } from "../../types/resources/me/summaries/artistPeriodSummary.js";
|
|
30
|
+
import type { GenrePeriodSummary } from "../../types/resources/me/summaries/genrePeriodSummary.js";
|
|
31
|
+
import type { MonthlySongPeriodSummary } from "../../types/resources/me/summaries/monthlySongPeriodSummary.js";
|
|
32
|
+
import type { PlaylistPeriodSummary } from "../../types/resources/me/summaries/playlistPeriodSummary.js";
|
|
33
|
+
import type { SongPeriodSummary } from "../../types/resources/me/summaries/songPeriodSummary.js";
|
|
34
|
+
import type { StationPeriodSummary } from "../../types/resources/me/summaries/stationPeriodSummary.js";
|
|
35
|
+
import type { Storefront } from "../../types/resources/other/storefront.js";
|
|
36
|
+
export type Registry = {
|
|
37
|
+
activities: CatalogActivity;
|
|
38
|
+
albums: CatalogAlbum;
|
|
39
|
+
"apple-curators": CatalogAppleCurator;
|
|
40
|
+
artists: CatalogArtist;
|
|
41
|
+
concerts: CatalogConcert;
|
|
42
|
+
"credit-artists": CatalogCreditArtist;
|
|
43
|
+
curators: CatalogCurator;
|
|
44
|
+
genres: CatalogGenre;
|
|
45
|
+
lyrics: CatalogLyrics;
|
|
46
|
+
"music-videos": CatalogMusicVideo;
|
|
47
|
+
playlists: CatalogPlaylist;
|
|
48
|
+
"record-labels": CatalogRecordLabel;
|
|
49
|
+
"role-categories": CatalogRoleCategory;
|
|
50
|
+
songs: CatalogSong;
|
|
51
|
+
stations: CatalogStation;
|
|
52
|
+
"station-genres": CatalogStationGenre;
|
|
53
|
+
"syllable-lyrics": CatalogSyllableLyrics;
|
|
54
|
+
venues: CatalogVenue;
|
|
55
|
+
"library-albums": LibraryAlbum;
|
|
56
|
+
"library-artists": LibraryArtist;
|
|
57
|
+
"library-music-videos": LibraryMusicVideo;
|
|
58
|
+
"library-playlist-folders": LibraryPlaylistFolder;
|
|
59
|
+
"library-playlists": LibraryPlaylist;
|
|
60
|
+
"library-songs": LibrarySong;
|
|
61
|
+
"personal-recommendation": Recommendation;
|
|
62
|
+
ratings: Rating;
|
|
63
|
+
"personal-social-profiles": PersonalSocialProfile;
|
|
64
|
+
storefronts: Storefront;
|
|
65
|
+
"music-summaries": MusicSummary;
|
|
66
|
+
"album-period-summaries": AlbumPeriodSummary;
|
|
67
|
+
"genre-period-summaries": GenrePeriodSummary;
|
|
68
|
+
"monthly-song-period-summaries": MonthlySongPeriodSummary;
|
|
69
|
+
"playlist-period-summaries": PlaylistPeriodSummary;
|
|
70
|
+
"song-period-summaries": SongPeriodSummary;
|
|
71
|
+
"station-period-summaries": StationPeriodSummary;
|
|
72
|
+
"artist-period-summaries": ArtistPeriodSummary;
|
|
73
|
+
"social-profiles": SocialProfile;
|
|
74
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Registry } from "../../types/query/registry.js";
|
|
2
|
+
export interface Collection<TData> {
|
|
3
|
+
href?: string;
|
|
4
|
+
next?: string;
|
|
5
|
+
data: TData[];
|
|
6
|
+
meta?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface ResourceRef<TType extends keyof Registry = keyof Registry> {
|
|
9
|
+
id: string;
|
|
10
|
+
type: TType;
|
|
11
|
+
href?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface Resource<TType extends keyof Registry, TAttributes extends object = {}, TExtendables extends object = {}, TRelationships extends Record<string, AnyResource> = {}, TViews extends Record<string, AnyResource> = {}> extends ResourceRef<TType> {
|
|
14
|
+
attributes?: TAttributes;
|
|
15
|
+
extendables?: TExtendables;
|
|
16
|
+
relationships?: TRelationships;
|
|
17
|
+
views?: TViews;
|
|
18
|
+
}
|
|
19
|
+
export type AnyResource = Resource<keyof Registry>;
|
|
20
|
+
export type TypeOf<TResource extends AnyResource> = TResource["type"];
|
|
21
|
+
export type AttributesOf<TResource extends AnyResource> = NonNullable<TResource["attributes"]>;
|
|
22
|
+
export type ExtendablesOf<TResource extends AnyResource> = NonNullable<TResource["extendables"]>;
|
|
23
|
+
export type RelationshipsOf<TResource extends AnyResource> = NonNullable<TResource["relationships"]>;
|
|
24
|
+
export type ViewsOf<TResource extends AnyResource> = NonNullable<TResource["views"]>;
|
|
25
|
+
export type AttributeNames<TResource extends AnyResource> = Extract<keyof AttributesOf<TResource>, string>;
|
|
26
|
+
export type ExtendableNames<TResource extends AnyResource> = Extract<keyof ExtendablesOf<TResource>, string>;
|
|
27
|
+
export type RelationshipNames<TResource extends AnyResource> = Extract<keyof RelationshipsOf<TResource>, string>;
|
|
28
|
+
export type ViewNames<TResource extends AnyResource> = Extract<keyof ViewsOf<TResource>, string>;
|
|
29
|
+
export type ResourceLink<TResource extends AnyResource> = ResourceRef<TypeOf<TResource>>;
|
|
File without changes
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AnyResource, Collection } from "../../types/query/resource.js";
|
|
2
|
+
import type { ResourceScopes, ScopedResource } from "../../types/query/scopes.js";
|
|
3
|
+
export type ResourceResponse<TRoot extends AnyResource, TScopes extends ResourceScopes = {}> = Collection<ScopedResource<TRoot, TScopes>>;
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RequiredProps } from "../../types/query/helpers.js";
|
|
2
|
+
import type { AnyResource } from "../../types/query/resource.js";
|
|
3
|
+
import type { ResourceResponse } from "../../types/query/response.js";
|
|
4
|
+
import type { ResourceScopes } from "../../types/query/scopes.js";
|
|
5
|
+
export interface Result<TTypes extends Record<string, AnyResource> = {}, TWith extends Record<string, AnyResource> = {}, TMap extends Partial<Record<keyof TTypes | keyof TWith, string>> = {}> {
|
|
6
|
+
types: TTypes;
|
|
7
|
+
with: TWith;
|
|
8
|
+
map: TMap;
|
|
9
|
+
}
|
|
10
|
+
export type AnyResult = Result<{}, {}, {}>;
|
|
11
|
+
export type TypesOf<TResult extends AnyResult> = NonNullable<TResult["types"]>;
|
|
12
|
+
export type WithOf<TResult extends AnyResult> = NonNullable<TResult["with"]>;
|
|
13
|
+
export type MapOf<TResult extends AnyResult> = NonNullable<TResult["map"]>;
|
|
14
|
+
export type TypesNames<TResult extends AnyResult> = Extract<keyof TypesOf<TResult>, string>;
|
|
15
|
+
export type WithNames<TResult extends AnyResult> = Extract<keyof WithOf<TResult>, string>;
|
|
16
|
+
export type MapNames<TResult extends AnyResult> = Extract<keyof MapOf<TResult>, string>;
|
|
17
|
+
export type TypesItem<TResult extends AnyResult, K extends TypesNames<TResult>> = Extract<TypesOf<TResult>[K], AnyResource>;
|
|
18
|
+
export type WithItem<TResult extends AnyResult, K extends WithNames<TResult>> = Extract<WithOf<TResult>[K], AnyResource>;
|
|
19
|
+
export type ResultShape<TResult extends AnyResult> = {
|
|
20
|
+
types: readonly [TypesNames<TResult>, ...TypesNames<TResult>[]];
|
|
21
|
+
} & ([WithNames<TResult>] extends [never] ? {} : {
|
|
22
|
+
with?: readonly WithNames<TResult>[];
|
|
23
|
+
});
|
|
24
|
+
export declare const internalTypesSymbol: unique symbol;
|
|
25
|
+
export declare const internalWithSymbol: unique symbol;
|
|
26
|
+
type ArrayPropItem<TShape, K extends PropertyKey> = TShape extends {
|
|
27
|
+
[P in K]?: readonly (infer U)[];
|
|
28
|
+
} ? U : never;
|
|
29
|
+
type SelectedTypes<TResult extends AnyResult, TShape extends ResultShape<TResult>> = Extract<ArrayPropItem<TShape, "types">, TypesNames<TResult>>;
|
|
30
|
+
type SelectedWith<TResult extends AnyResult, TShape extends ResultShape<TResult>> = Extract<ArrayPropItem<TShape, "with">, WithNames<TResult>>;
|
|
31
|
+
type ShapedTypes<TResult extends AnyResult, TShape extends ResultShape<TResult>> = RequiredProps<TypesOf<TResult>, SelectedTypes<TResult, TShape>>;
|
|
32
|
+
type ShapedWith<TResult extends AnyResult, TShape extends ResultShape<TResult>> = RequiredProps<WithOf<TResult>, SelectedWith<TResult, TShape>>;
|
|
33
|
+
type ShapedCombined<TResult extends AnyResult, TShape extends ResultShape<TResult>> = ShapedTypes<TResult, TShape> & ShapedWith<TResult, TShape>;
|
|
34
|
+
type ShapedResults<TResult extends AnyResult, TShape extends ResultShape<TResult>, TScopes extends ResourceScopes = {}> = {
|
|
35
|
+
[K in keyof ShapedCombined<TResult, TShape> as K extends keyof MapOf<TResult> ? Extract<MapOf<TResult>[K], string> : K]: ResourceResponse<Extract<ShapedCombined<TResult, TShape>[K], AnyResource>, TScopes>;
|
|
36
|
+
};
|
|
37
|
+
export type ShapedResult<TResult extends AnyResult, TShape extends ResultShape<TResult>, TScopes extends ResourceScopes = {}> = {
|
|
38
|
+
meta: Record<string, unknown>;
|
|
39
|
+
results: ShapedResults<TResult, TShape, TScopes>;
|
|
40
|
+
[internalTypesSymbol]?: ShapedTypes<TResult, TShape>;
|
|
41
|
+
[internalWithSymbol]?: ShapedWith<TResult, TShape>;
|
|
42
|
+
};
|
|
43
|
+
export type AnyShapedResult = ShapedResult<AnyResult, ResultShape<AnyResult>, ResourceScopes>;
|
|
44
|
+
export type ResultsOf<TShaped extends AnyShapedResult> = TShaped["results"];
|
|
45
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { RequiredProps } from "../../types/query/helpers.js";
|
|
2
|
+
import type { Registry } from "../../types/query/registry.js";
|
|
3
|
+
import type { AnyResource, AttributeNames, AttributesOf, Collection, ExtendableNames, ExtendablesOf, RelationshipNames, RelationshipsOf, ResourceLink, TypeOf, ViewNames, ViewsOf } from "../../types/query/resource.js";
|
|
4
|
+
export type RelationshipItem<TResource extends AnyResource, K extends RelationshipNames<TResource>> = Extract<RelationshipsOf<TResource>[K], AnyResource>;
|
|
5
|
+
export type ViewItem<TResource extends AnyResource, K extends ViewNames<TResource>> = Extract<ViewsOf<TResource>[K], AnyResource>;
|
|
6
|
+
type RelationshipMode = "include" | "relate";
|
|
7
|
+
type RelationshipSelection = RelationshipMode | {
|
|
8
|
+
mode: RelationshipMode;
|
|
9
|
+
limit?: number;
|
|
10
|
+
};
|
|
11
|
+
type RelationshipSelections<TResource extends AnyResource> = Partial<Record<RelationshipNames<TResource>, RelationshipSelection>>;
|
|
12
|
+
type ViewSelection = boolean | {
|
|
13
|
+
limit: number;
|
|
14
|
+
};
|
|
15
|
+
type ViewSelections<TResource extends AnyResource> = Partial<Record<ViewNames<TResource>, ViewSelection>>;
|
|
16
|
+
type ResourceScope<TResource extends AnyResource> = {
|
|
17
|
+
fields?: readonly AttributeNames<TResource>[];
|
|
18
|
+
relationships?: RelationshipSelections<TResource>;
|
|
19
|
+
} & ([ExtendableNames<TResource>] extends [never] ? {} : {
|
|
20
|
+
extend?: readonly ExtendableNames<TResource>[];
|
|
21
|
+
}) & ([ViewNames<TResource>] extends [never] ? {} : {
|
|
22
|
+
/** Views are only returned when this resource is the root resource. */
|
|
23
|
+
views?: ViewSelections<TResource>;
|
|
24
|
+
});
|
|
25
|
+
export type ResourceScopes = Partial<{
|
|
26
|
+
[K in Extract<keyof Registry, string>]: ResourceScope<Registry[K]>;
|
|
27
|
+
}>;
|
|
28
|
+
export type ScopeFor<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = TypeOf<TResource> extends keyof TScopes ? TScopes[TypeOf<TResource>] : {};
|
|
29
|
+
type RelationshipSelectionValue<TResource extends AnyResource, PScope, K extends RelationshipNames<TResource>> = PScope extends {
|
|
30
|
+
relationships?: infer TRelationships;
|
|
31
|
+
} ? K extends keyof TRelationships ? TRelationships[K] : never : never;
|
|
32
|
+
type RelationshipSelectionMode<TResource extends AnyResource, PScope, K extends RelationshipNames<TResource>> = RelationshipSelectionValue<TResource, PScope, K> extends {
|
|
33
|
+
mode: infer TMode;
|
|
34
|
+
} ? Extract<TMode, RelationshipMode> : Extract<RelationshipSelectionValue<TResource, PScope, K>, RelationshipMode>;
|
|
35
|
+
type RelationshipKeysByMode<TResource extends AnyResource, PScope, TMode extends RelationshipMode> = {
|
|
36
|
+
[K in RelationshipNames<TResource>]: Extract<RelationshipSelectionMode<TResource, PScope, K>, TMode> extends never ? never : K;
|
|
37
|
+
}[RelationshipNames<TResource>];
|
|
38
|
+
export type SelectedRelationshipKeys<TResource extends AnyResource, PScope> = RelationshipKeysByMode<TResource, PScope, RelationshipMode>;
|
|
39
|
+
export type IncludedRelationshipKeys<TResource extends AnyResource, PScope> = RelationshipKeysByMode<TResource, PScope, "include">;
|
|
40
|
+
export type IncludedViewKeys<TResource extends AnyResource, PScope> = SelectedViewKeys<TResource, PScope>;
|
|
41
|
+
export type SelectedViewKeys<TResource extends AnyResource, PScope> = PScope extends {
|
|
42
|
+
views?: infer TViews;
|
|
43
|
+
} ? {
|
|
44
|
+
[K in ViewNames<TResource>]: K extends keyof TViews ? TViews[K] extends false | undefined ? never : K : never;
|
|
45
|
+
}[ViewNames<TResource>] : never;
|
|
46
|
+
type ArrayPropItem<PScope, K extends PropertyKey> = PScope extends {
|
|
47
|
+
[P in K]?: readonly (infer U)[];
|
|
48
|
+
} ? U : never;
|
|
49
|
+
type SelectedFields<TResource extends AnyResource, PScope> = [
|
|
50
|
+
Extract<ArrayPropItem<PScope, "fields">, AttributeNames<TResource>>
|
|
51
|
+
] extends [never] ? AttributeNames<TResource> : Extract<ArrayPropItem<PScope, "fields">, AttributeNames<TResource>>;
|
|
52
|
+
type SelectedExtendables<TResource extends AnyResource, PScope> = Extract<ArrayPropItem<PScope, "extend">, ExtendableNames<TResource>>;
|
|
53
|
+
type ScopedRelationshipItem<TResource extends AnyResource, PScope, K extends RelationshipNames<TResource>> = (Extract<RelationshipSelectionMode<TResource, PScope, K>, "include"> extends never ? never : RelationshipItem<TResource, K>) | (Extract<RelationshipSelectionMode<TResource, PScope, K>, "relate"> extends never ? never : ResourceLink<RelationshipItem<TResource, K>>);
|
|
54
|
+
type ScopedRelationships<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = {
|
|
55
|
+
relationships?: {
|
|
56
|
+
[K in SelectedRelationshipKeys<TResource, ScopeFor<TResource, TScopes>>]: Collection<ScopedResource<ScopedRelationshipItem<TResource, ScopeFor<TResource, TScopes>, K>, TScopes>>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
type ScopedViews<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = {
|
|
60
|
+
views?: {
|
|
61
|
+
[K in SelectedViewKeys<TResource, ScopeFor<TResource, TScopes>>]: Collection<ScopedResource<ViewItem<TResource, K>, TScopes>>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
type ScopedFields<TResource extends AnyResource, PScope> = Pick<AttributesOf<TResource>, SelectedFields<TResource, PScope>> & Pick<ExtendablesOf<TResource>, SelectedExtendables<TResource, PScope>>;
|
|
65
|
+
type ScopedAttributes<TResource extends AnyResource, PScope> = RequiredProps<AttributesOf<TResource>, SelectedFields<TResource, PScope>>;
|
|
66
|
+
type ScopedExtendables<TResource extends AnyResource, PScope> = RequiredProps<ExtendablesOf<TResource>, SelectedExtendables<TResource, PScope>>;
|
|
67
|
+
export declare const internalAttributesSymbol: unique symbol;
|
|
68
|
+
export declare const internalExtendablesSymbol: unique symbol;
|
|
69
|
+
type ScopedResourceItem<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = ResourceLink<TResource> & {
|
|
70
|
+
attributes?: ScopedFields<TResource, ScopeFor<TResource, TScopes>>;
|
|
71
|
+
[internalAttributesSymbol]?: ScopedAttributes<TResource, ScopeFor<TResource, TScopes>>;
|
|
72
|
+
[internalExtendablesSymbol]?: ScopedExtendables<TResource, ScopeFor<TResource, TScopes>>;
|
|
73
|
+
} & ScopedRelationships<TResource, TScopes> & ScopedViews<TResource, TScopes>;
|
|
74
|
+
export type ScopedResource<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = TResource extends AnyResource ? ScopedResourceItem<TResource, TScopes> : never;
|
|
75
|
+
export type ScopedResourceOf<TKey extends keyof Registry, TScopes extends ResourceScopes = {}> = ScopedResource<Registry[TKey], TScopes>;
|
|
76
|
+
export type ScopedResourceIterator<TResource extends AnyResource, TScopes extends ResourceScopes = {}> = AsyncGenerator<ScopedResource<TResource, TScopes>, void, unknown>;
|
|
77
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RequestQueryBuilder } from "../helpers/requestQuery.js";
|
|
2
|
+
import type { RequestConfig } from "../types/config.js";
|
|
3
|
+
export interface OpfelMusigHttpRequest {
|
|
4
|
+
body?: BodyInit | null | ((tokens: HeaderConfig) => BodyInit | null);
|
|
5
|
+
config?: RequestConfig;
|
|
6
|
+
headers?: Record<string, string>;
|
|
7
|
+
method?: "GET" | "POST";
|
|
8
|
+
query?: RequestQueryBuilder;
|
|
9
|
+
}
|
|
10
|
+
export interface HeaderConfig {
|
|
11
|
+
developerToken?: string | null;
|
|
12
|
+
userToken?: string | null;
|
|
13
|
+
excludeOrigin?: boolean;
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogPlaylist } from "../../../types/resources/catalog/playlist.js";
|
|
3
|
+
import type { Artwork, EditorialNote } from "../../../types/shared.js";
|
|
4
|
+
interface CatalogActivityAttributes {
|
|
5
|
+
artwork: Artwork;
|
|
6
|
+
editorialNotes?: EditorialNote;
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
interface CatalogActivityExtend {
|
|
11
|
+
}
|
|
12
|
+
export type CatalogActivity = Resource<"activities", CatalogActivityAttributes, CatalogActivityExtend, {
|
|
13
|
+
playlists: CatalogPlaylist;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogArtist } from "../../../types/resources/catalog/artist.js";
|
|
3
|
+
import type { CatalogGenre } from "../../../types/resources/catalog/genre.js";
|
|
4
|
+
import type { CatalogMusicVideo } from "../../../types/resources/catalog/musicVideo.js";
|
|
5
|
+
import type { CatalogPlaylist } from "../../../types/resources/catalog/playlist.js";
|
|
6
|
+
import type { CatalogRecordLabel } from "../../../types/resources/catalog/recordLabel.js";
|
|
7
|
+
import type { CatalogSong } from "../../../types/resources/catalog/song.js";
|
|
8
|
+
import type { CatalogStation } from "../../../types/resources/catalog/station.js";
|
|
9
|
+
import type { LibraryAlbum } from "../../../types/resources/library/album.js";
|
|
10
|
+
import type { BaseAlbumAttributes } from "../../../types/resources/shared/album.js";
|
|
11
|
+
import type { AssetUrls, AudioVariants, EditorialArtwork, EditorialNote, EditorialVideo, RatingValue } from "../../../types/shared.js";
|
|
12
|
+
interface CatalogAlbumAttributes extends BaseAlbumAttributes {
|
|
13
|
+
copyright?: string;
|
|
14
|
+
editorialNotes?: EditorialNote;
|
|
15
|
+
isMasteredForItunes: boolean;
|
|
16
|
+
isSingle: boolean;
|
|
17
|
+
isCompilation: boolean;
|
|
18
|
+
isComplete: boolean;
|
|
19
|
+
isPrerelease: boolean;
|
|
20
|
+
recordLabel?: string;
|
|
21
|
+
audioTraits?: AudioVariants[];
|
|
22
|
+
upc?: string;
|
|
23
|
+
url: string;
|
|
24
|
+
}
|
|
25
|
+
interface CatalogAlbumExtend {
|
|
26
|
+
artistUrl?: string;
|
|
27
|
+
editorialVideo?: EditorialVideo;
|
|
28
|
+
editorialArtwork?: EditorialArtwork;
|
|
29
|
+
personalRating?: RatingValue;
|
|
30
|
+
extendedAssetUrls?: AssetUrls;
|
|
31
|
+
}
|
|
32
|
+
export type CatalogAlbum = Resource<"albums", CatalogAlbumAttributes, CatalogAlbumExtend, {
|
|
33
|
+
artists: CatalogArtist;
|
|
34
|
+
genres: CatalogGenre;
|
|
35
|
+
library: LibraryAlbum;
|
|
36
|
+
"record-labels": CatalogRecordLabel;
|
|
37
|
+
tracks: CatalogSong | CatalogMusicVideo;
|
|
38
|
+
}, {
|
|
39
|
+
"appears-on": CatalogPlaylist;
|
|
40
|
+
"audio-extras": CatalogStation;
|
|
41
|
+
"more-by-artist": CatalogAlbum;
|
|
42
|
+
"other-versions": CatalogAlbum;
|
|
43
|
+
"related-videos": CatalogMusicVideo;
|
|
44
|
+
"video-extras": CatalogMusicVideo;
|
|
45
|
+
"you-might-also-like": CatalogAlbum;
|
|
46
|
+
}>;
|
|
47
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogAlbum } from "../../../types/resources/catalog/album.js";
|
|
3
|
+
import type { CatalogConcert } from "../../../types/resources/catalog/concert.js";
|
|
4
|
+
import type { CatalogGenre } from "../../../types/resources/catalog/genre.js";
|
|
5
|
+
import type { CatalogMusicVideo } from "../../../types/resources/catalog/musicVideo.js";
|
|
6
|
+
import type { CatalogPlaylist } from "../../../types/resources/catalog/playlist.js";
|
|
7
|
+
import type { CatalogSong } from "../../../types/resources/catalog/song.js";
|
|
8
|
+
import type { CatalogStation } from "../../../types/resources/catalog/station.js";
|
|
9
|
+
import type { BaseArtistAttributes } from "../../../types/resources/shared/artist.js";
|
|
10
|
+
import type { Artwork, AssetUrls, EditorialArtwork, EditorialNote, EditorialVideo, RatingValue } from "../../../types/shared.js";
|
|
11
|
+
interface ArtistHero {
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
interface CatalogArtistAttributes extends BaseArtistAttributes {
|
|
15
|
+
artwork?: Artwork;
|
|
16
|
+
genreNames: string[];
|
|
17
|
+
url: string;
|
|
18
|
+
editorialNotes?: EditorialNote;
|
|
19
|
+
}
|
|
20
|
+
interface CatalogArtistExtend {
|
|
21
|
+
editorialVideo?: EditorialVideo;
|
|
22
|
+
editorialArtwork?: EditorialArtwork;
|
|
23
|
+
personalRating?: RatingValue;
|
|
24
|
+
artistBio?: string;
|
|
25
|
+
bornOrFormed?: string;
|
|
26
|
+
hero?: ArtistHero;
|
|
27
|
+
isGroup?: boolean;
|
|
28
|
+
origin?: string;
|
|
29
|
+
extendedAssetUrls?: AssetUrls;
|
|
30
|
+
}
|
|
31
|
+
export type CatalogArtist = Resource<"artists", CatalogArtistAttributes, CatalogArtistExtend, {
|
|
32
|
+
albums: CatalogAlbum;
|
|
33
|
+
bands: CatalogArtist;
|
|
34
|
+
"default-playable-content": CatalogStation;
|
|
35
|
+
genres: CatalogGenre;
|
|
36
|
+
"music-videos": CatalogMusicVideo;
|
|
37
|
+
persons: CatalogArtist;
|
|
38
|
+
playlists: CatalogPlaylist;
|
|
39
|
+
station: CatalogStation;
|
|
40
|
+
}, {
|
|
41
|
+
"all-upcoming-concerts": CatalogConcert;
|
|
42
|
+
"appears-on-albums": CatalogAlbum;
|
|
43
|
+
"compilation-albums": CatalogAlbum;
|
|
44
|
+
"featured-albums": CatalogAlbum;
|
|
45
|
+
"featured-on-albums": CatalogAlbum;
|
|
46
|
+
"featured-release": CatalogAlbum;
|
|
47
|
+
"full-albums": CatalogAlbum;
|
|
48
|
+
"latest-release": CatalogAlbum;
|
|
49
|
+
"live-albums": CatalogAlbum;
|
|
50
|
+
"more-to-hear": CatalogStation;
|
|
51
|
+
"music-videos": CatalogMusicVideo;
|
|
52
|
+
playlists: CatalogPlaylist;
|
|
53
|
+
"similar-artists": CatalogArtist;
|
|
54
|
+
singles: CatalogAlbum;
|
|
55
|
+
"top-songs": CatalogSong;
|
|
56
|
+
}>;
|
|
57
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogArtist } from "../../../types/resources/catalog/artist.js";
|
|
3
|
+
import type { CatalogPlaylist } from "../../../types/resources/catalog/playlist.js";
|
|
4
|
+
import type { CatalogVenue } from "../../../types/resources/catalog/venue.js";
|
|
5
|
+
interface ConcertProvider {
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
interface ConcertTicket {
|
|
10
|
+
provider: ConcertProvider;
|
|
11
|
+
vendor: string;
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
interface CatalogConcertAttributes {
|
|
15
|
+
endISODateTime: string;
|
|
16
|
+
startISODateTime: string;
|
|
17
|
+
timezone: string;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
interface CatalogConcertExtend {
|
|
21
|
+
eventDataProviders?: ConcertProvider[];
|
|
22
|
+
ticketDataProvider?: ConcertProvider | ConcertProvider[];
|
|
23
|
+
tickets?: ConcertTicket[];
|
|
24
|
+
}
|
|
25
|
+
export type CatalogConcert = Resource<"concerts", CatalogConcertAttributes, CatalogConcertExtend, {
|
|
26
|
+
artists: CatalogArtist;
|
|
27
|
+
playlists: CatalogPlaylist;
|
|
28
|
+
venues: CatalogVenue;
|
|
29
|
+
}, {
|
|
30
|
+
"more-upcoming-concerts": CatalogConcert;
|
|
31
|
+
}>;
|
|
32
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { Artwork } from "../../../types/shared.js";
|
|
3
|
+
interface CatalogCreditArtistAttributes {
|
|
4
|
+
artwork?: Artwork;
|
|
5
|
+
name: string;
|
|
6
|
+
roleNames: string[];
|
|
7
|
+
}
|
|
8
|
+
interface CatalogCreditArtistExtend {
|
|
9
|
+
}
|
|
10
|
+
export type CatalogCreditArtist = Resource<"credit-artists", CatalogCreditArtistAttributes, CatalogCreditArtistExtend>;
|
|
11
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogPlaylist } from "../../../types/resources/catalog/playlist.js";
|
|
3
|
+
import type { Artwork, EditorialNote } from "../../../types/shared.js";
|
|
4
|
+
interface CatalogCuratorBaseAttributes {
|
|
5
|
+
artwork: Artwork;
|
|
6
|
+
editorialNotes?: EditorialNote;
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
interface CatalogCuratorAttributes extends CatalogCuratorBaseAttributes {
|
|
11
|
+
}
|
|
12
|
+
interface CatalogAppleCuratorAttributes extends CatalogCuratorBaseAttributes {
|
|
13
|
+
kind: "Curator" | "Genre" | "Show";
|
|
14
|
+
shortName?: string;
|
|
15
|
+
showHostName?: string;
|
|
16
|
+
}
|
|
17
|
+
interface CatalogCuratorExtend {
|
|
18
|
+
}
|
|
19
|
+
interface CatalogAppleCuratorExtend {
|
|
20
|
+
}
|
|
21
|
+
export type CatalogCurator = Resource<"curators", CatalogCuratorAttributes, CatalogCuratorExtend, {
|
|
22
|
+
playlists: CatalogPlaylist;
|
|
23
|
+
}>;
|
|
24
|
+
export type CatalogAppleCurator = Resource<"apple-curators", CatalogAppleCuratorAttributes, CatalogAppleCuratorExtend, {
|
|
25
|
+
playlists: CatalogPlaylist;
|
|
26
|
+
}>;
|
|
27
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
interface CatalogGenreAttributes {
|
|
3
|
+
chartLabel?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
parentId?: string;
|
|
6
|
+
parentName?: string;
|
|
7
|
+
}
|
|
8
|
+
interface CatalogGenreExtend {
|
|
9
|
+
}
|
|
10
|
+
export type CatalogGenre = Resource<"genres", CatalogGenreAttributes, CatalogGenreExtend>;
|
|
11
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { BaseLyricsAttributes } from "../../../types/resources/shared/lyrics.js";
|
|
3
|
+
interface CatalogLyricsAttributes extends BaseLyricsAttributes {
|
|
4
|
+
}
|
|
5
|
+
interface CatalogLyricsExtend {
|
|
6
|
+
}
|
|
7
|
+
export type CatalogLyrics = Resource<"lyrics", CatalogLyricsAttributes, CatalogLyricsExtend>;
|
|
8
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogAlbum } from "../../../types/resources/catalog/album.js";
|
|
3
|
+
import type { CatalogArtist } from "../../../types/resources/catalog/artist.js";
|
|
4
|
+
import type { CatalogGenre } from "../../../types/resources/catalog/genre.js";
|
|
5
|
+
import type { CatalogSong } from "../../../types/resources/catalog/song.js";
|
|
6
|
+
import type { LibraryMusicVideo } from "../../../types/resources/library/musicVideo.js";
|
|
7
|
+
import type { BaseMusicVideoAttributes } from "../../../types/resources/shared/musicVideo.js";
|
|
8
|
+
import type { EditorialNote, Preview, RatingValue } from "../../../types/shared.js";
|
|
9
|
+
interface CatalogMusicVideoAttributes extends BaseMusicVideoAttributes {
|
|
10
|
+
editorialNotes?: EditorialNote;
|
|
11
|
+
has4K: boolean;
|
|
12
|
+
hasHDR: boolean;
|
|
13
|
+
isrc?: string;
|
|
14
|
+
previews: Preview[];
|
|
15
|
+
url: string;
|
|
16
|
+
videoSubType?: "preview";
|
|
17
|
+
workId?: string;
|
|
18
|
+
workName?: string;
|
|
19
|
+
}
|
|
20
|
+
interface CatalogMusicVideoExtend {
|
|
21
|
+
artistUrl?: string;
|
|
22
|
+
personalRating?: RatingValue;
|
|
23
|
+
}
|
|
24
|
+
export type CatalogMusicVideo = Resource<"music-videos", CatalogMusicVideoAttributes, CatalogMusicVideoExtend, {
|
|
25
|
+
albums: CatalogAlbum;
|
|
26
|
+
artists: CatalogArtist;
|
|
27
|
+
genres: CatalogGenre;
|
|
28
|
+
library: LibraryMusicVideo;
|
|
29
|
+
songs: CatalogSong;
|
|
30
|
+
}, {
|
|
31
|
+
"more-by-artist": CatalogMusicVideo;
|
|
32
|
+
"more-in-genre": CatalogMusicVideo;
|
|
33
|
+
}>;
|
|
34
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogActivity } from "../../../types/resources/catalog/activity.js";
|
|
3
|
+
import type { CatalogArtist } from "../../../types/resources/catalog/artist.js";
|
|
4
|
+
import type { CatalogAppleCurator, CatalogCurator } from "../../../types/resources/catalog/curator.js";
|
|
5
|
+
import type { CatalogMusicVideo } from "../../../types/resources/catalog/musicVideo.js";
|
|
6
|
+
import type { CatalogSong } from "../../../types/resources/catalog/song.js";
|
|
7
|
+
import type { LibraryPlaylist } from "../../../types/resources/library/playlist.js";
|
|
8
|
+
import type { SocialProfile } from "../../../types/resources/me/profile.js";
|
|
9
|
+
import type { BasePlaylistAttributes } from "../../../types/resources/shared/playlist.js";
|
|
10
|
+
import type { EditorialArtwork, EditorialVideo, RatingValue } from "../../../types/shared.js";
|
|
11
|
+
type CatalogPlaylistType = "editorial" | "external" | "personal-mix" | "replay" | "user-shared";
|
|
12
|
+
interface CatalogPlaylistAttributes extends BasePlaylistAttributes {
|
|
13
|
+
curatorName: string;
|
|
14
|
+
curatorSocialHandle?: string;
|
|
15
|
+
isChart: boolean;
|
|
16
|
+
lastModifiedDate?: string;
|
|
17
|
+
playlistType: CatalogPlaylistType;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
interface CatalogPlaylistExtend {
|
|
21
|
+
personalRating?: RatingValue;
|
|
22
|
+
editorialVideo?: EditorialVideo;
|
|
23
|
+
editorialArtwork?: EditorialArtwork;
|
|
24
|
+
trackTypes?: ("music-videos" | "songs")[];
|
|
25
|
+
trackCount?: number;
|
|
26
|
+
}
|
|
27
|
+
export type CatalogPlaylist = Resource<"playlists", CatalogPlaylistAttributes, CatalogPlaylistExtend, {
|
|
28
|
+
curator: CatalogActivity | CatalogAppleCurator | CatalogCurator | SocialProfile;
|
|
29
|
+
library: LibraryPlaylist;
|
|
30
|
+
tracks: CatalogSong | CatalogMusicVideo;
|
|
31
|
+
}, {
|
|
32
|
+
"featured-artists": CatalogArtist;
|
|
33
|
+
"more-by-curator": CatalogPlaylist;
|
|
34
|
+
}>;
|
|
35
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogAlbum } from "../../../types/resources/catalog/album.js";
|
|
3
|
+
import type { Artwork, Description } from "../../../types/shared.js";
|
|
4
|
+
interface CatalogRecordLabelAttributes {
|
|
5
|
+
artwork: Artwork;
|
|
6
|
+
description?: Description;
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
interface CatalogRecordLabelExtend {
|
|
11
|
+
}
|
|
12
|
+
export type CatalogRecordLabel = Resource<"record-labels", CatalogRecordLabelAttributes, CatalogRecordLabelExtend, {}, {
|
|
13
|
+
"latest-releases": CatalogAlbum;
|
|
14
|
+
"top-releases": CatalogAlbum;
|
|
15
|
+
}>;
|
|
16
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Resource } from "../../../types/query/resource.js";
|
|
2
|
+
import type { CatalogCreditArtist } from "../../../types/resources/catalog/creditArtist.js";
|
|
3
|
+
interface CatalogRoleCategoryAttributes {
|
|
4
|
+
kind: string;
|
|
5
|
+
title: string;
|
|
6
|
+
}
|
|
7
|
+
interface CatalogRoleCategoryExtend {
|
|
8
|
+
}
|
|
9
|
+
export type CatalogRoleCategory = Resource<"role-categories", CatalogRoleCategoryAttributes, CatalogRoleCategoryExtend, {
|
|
10
|
+
"credit-artists": CatalogCreditArtist;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
File without changes
|