@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,42 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const RelationshipModeSchema: z.ZodEnum<{
|
|
3
|
+
include: "include";
|
|
4
|
+
relate: "relate";
|
|
5
|
+
}>;
|
|
6
|
+
export declare const RelationshipConfigSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
7
|
+
include: "include";
|
|
8
|
+
relate: "relate";
|
|
9
|
+
}>, z.ZodObject<{
|
|
10
|
+
mode: z.ZodEnum<{
|
|
11
|
+
include: "include";
|
|
12
|
+
relate: "relate";
|
|
13
|
+
}>;
|
|
14
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>]>;
|
|
16
|
+
export declare const ViewConfigSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
17
|
+
limit: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>]>;
|
|
19
|
+
export declare const ScopeSchema: z.ZodObject<{
|
|
20
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
21
|
+
extend: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodEnum<{
|
|
23
|
+
include: "include";
|
|
24
|
+
relate: "relate";
|
|
25
|
+
}>, z.ZodObject<{
|
|
26
|
+
mode: z.ZodEnum<{
|
|
27
|
+
include: "include";
|
|
28
|
+
relate: "relate";
|
|
29
|
+
}>;
|
|
30
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>]>>>;
|
|
32
|
+
views: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
33
|
+
limit: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>]>>>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export declare const ScopesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
37
|
+
export type Scope = z.infer<typeof ScopeSchema>;
|
|
38
|
+
export declare const ShapeSchema: z.ZodObject<{
|
|
39
|
+
types: z.ZodArray<z.ZodString>;
|
|
40
|
+
with: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
export type Shape = z.infer<typeof ShapeSchema>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export const RelationshipModeSchema = z.enum(["include", "relate"]);
|
|
3
|
+
export const RelationshipConfigSchema = z.union([
|
|
4
|
+
RelationshipModeSchema,
|
|
5
|
+
z.object({
|
|
6
|
+
mode: RelationshipModeSchema,
|
|
7
|
+
limit: z.number().int().positive().optional(),
|
|
8
|
+
}),
|
|
9
|
+
]);
|
|
10
|
+
export const ViewConfigSchema = z.union([
|
|
11
|
+
z.boolean(),
|
|
12
|
+
z.object({
|
|
13
|
+
limit: z.number().int().positive(),
|
|
14
|
+
}),
|
|
15
|
+
]);
|
|
16
|
+
export const ScopeSchema = z
|
|
17
|
+
.strictObject({
|
|
18
|
+
fields: z.array(z.string()),
|
|
19
|
+
extend: z.array(z.string()),
|
|
20
|
+
relationships: z.record(z.string(), RelationshipConfigSchema),
|
|
21
|
+
views: z.record(z.string(), ViewConfigSchema),
|
|
22
|
+
})
|
|
23
|
+
.partial();
|
|
24
|
+
export const ScopesSchema = z.record(z.string(), z.unknown());
|
|
25
|
+
export const ShapeSchema = z.strictObject({
|
|
26
|
+
types: z.array(z.string()),
|
|
27
|
+
with: z.array(z.string()).optional(),
|
|
28
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ResourceOf, ValidateResourceName } from "../types/query/helpers.js";
|
|
2
|
+
export type PinnableResources = ResourceOf<"library-albums" | "library-artists" | "library-music-videos" | "library-playlists" | "library-songs">;
|
|
3
|
+
export type RecentlyAddedResources = ResourceOf<"library-albums" | "library-playlists">;
|
|
4
|
+
export type CatalogResourceTypes = ValidateResourceName<"activities" | "albums" | "apple-curators" | "artists" | "concerts" | "credit-artists" | "curators" | "genres" | "music-videos" | "playlists" | "record-labels" | "role-categories" | "songs" | "stations" | "station-genres" | "lyrics" | "syllable-lyrics" | "venues">;
|
|
5
|
+
export type LibraryResourceTypes = ValidateResourceName<"library-albums" | "library-artists" | "library-music-videos" | "library-playlist-folders" | "library-playlists" | "library-songs">;
|
|
6
|
+
export type MeResourceTypes = ValidateResourceName<"genre-period-summaries" | "playlist-period-summaries" | "artist-period-summaries" | "monthly-song-period-summaries" | "song-period-summaries" | "album-period-summaries" | "music-summaries" | "station-period-summaries" | "personal-social-profiles" | "ratings" | "personal-recommendation">;
|
|
7
|
+
export type SocialResourceTypes = ValidateResourceName<"social-profiles">;
|
|
8
|
+
export type OtherResourceTypes = ValidateResourceName<"storefronts">;
|
|
9
|
+
export type ResourceTypes = ValidateResourceName<CatalogResourceTypes | LibraryResourceTypes | MeResourceTypes | SocialResourceTypes | OtherResourceTypes>;
|
|
10
|
+
export type CatalogResources = ResourceOf<CatalogResourceTypes>;
|
|
11
|
+
export type LibraryResources = ResourceOf<LibraryResourceTypes>;
|
|
12
|
+
export type MeResources = ResourceOf<MeResourceTypes>;
|
|
13
|
+
export type SocialResources = ResourceOf<SocialResourceTypes>;
|
|
14
|
+
export type OtherResources = ResourceOf<OtherResourceTypes>;
|
|
15
|
+
export type Resources = ResourceOf<ResourceTypes>;
|
|
File without changes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface LanguageConfig {
|
|
2
|
+
/** Default language used for the whole catalog, use one of the users storefront languages */
|
|
3
|
+
default?: string;
|
|
4
|
+
/** Default lyrics language */
|
|
5
|
+
lyrics?: string;
|
|
6
|
+
/** Default script language, be sure to have lyrics language defined if this is set */
|
|
7
|
+
script?: string;
|
|
8
|
+
}
|
|
9
|
+
export type TokenProvider = string | null | (() => string | undefined | Promise<string | undefined>);
|
|
10
|
+
export interface HttpEvent {
|
|
11
|
+
method: string;
|
|
12
|
+
url: string;
|
|
13
|
+
status?: number;
|
|
14
|
+
statusText?: string;
|
|
15
|
+
durationMs: number;
|
|
16
|
+
response?: unknown;
|
|
17
|
+
error?: {
|
|
18
|
+
name: string;
|
|
19
|
+
message: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface OpfelMusigConfig {
|
|
23
|
+
developerToken?: TokenProvider;
|
|
24
|
+
userToken?: TokenProvider;
|
|
25
|
+
language?: LanguageConfig;
|
|
26
|
+
/** The storefront used, be sure to set this to the user storefront */
|
|
27
|
+
storefront?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Override the api base url to add a proxy.
|
|
30
|
+
*
|
|
31
|
+
* Proxy the request to `https://amp-api.music.apple.com`
|
|
32
|
+
*/
|
|
33
|
+
baseUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Excludes the origin header for proxies.
|
|
36
|
+
* Make sure the proxy adds the header back in.
|
|
37
|
+
*
|
|
38
|
+
* Required Headers:
|
|
39
|
+
* - `origin: https://music.apple.com`
|
|
40
|
+
* - `Authorization: Bearer {DEVELOPER_TOKEN}`
|
|
41
|
+
*
|
|
42
|
+
* Optional Headers:
|
|
43
|
+
* - `Music-User-Token: {USER_TOKEN}` // fetch user library
|
|
44
|
+
* - `Media-User-Token: {USER_TOKEN}` // streaming
|
|
45
|
+
*
|
|
46
|
+
* On your proxy you can import `getDefaultHeaders` from `/helpers`.
|
|
47
|
+
*/
|
|
48
|
+
excludeOrigin?: boolean;
|
|
49
|
+
extraHeaders?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Custom fetch implementation. Defaults to `globalThis.fetch`.
|
|
52
|
+
*/
|
|
53
|
+
fetch?: typeof globalThis.fetch;
|
|
54
|
+
onHttpEvent?: (event: HttpEvent) => void | Promise<void>;
|
|
55
|
+
debug?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface RequestConfig {
|
|
58
|
+
language?: LanguageConfig;
|
|
59
|
+
storefront?: string;
|
|
60
|
+
extraParams?: Record<string, string>;
|
|
61
|
+
extraHeaders?: Record<string, string>;
|
|
62
|
+
signal?: AbortSignal;
|
|
63
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RequestConfig } from "../types/config.js";
|
|
2
|
+
import type { AnyResult, ResultShape } from "../types/query/results.js";
|
|
3
|
+
import type { ResourceScopes } from "../types/query/scopes.js";
|
|
4
|
+
export interface LimitParam {
|
|
5
|
+
limit?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface PaginationParams {
|
|
8
|
+
limit?: number;
|
|
9
|
+
offset?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ConfigParm {
|
|
12
|
+
config?: RequestConfig;
|
|
13
|
+
}
|
|
14
|
+
export interface DefaultParams<TScopes extends ResourceScopes = {}> extends ConfigParm {
|
|
15
|
+
scopes?: TScopes & ResourceScopes;
|
|
16
|
+
}
|
|
17
|
+
export interface ResultParams<TResult extends AnyResult, TTypes extends ResultShape<TResult>, TScopes extends ResourceScopes = {}> extends DefaultParams<TScopes> {
|
|
18
|
+
shape: TTypes & ResultShape<TResult>;
|
|
19
|
+
}
|
|
20
|
+
export interface SortParams<TSort extends string> {
|
|
21
|
+
sort?: `-${TSort}` | TSort | (string & {});
|
|
22
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export interface PlaybackSongIds {
|
|
2
|
+
catalogId?: string;
|
|
3
|
+
libraryId?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface PlaybackAssetMetadata {
|
|
6
|
+
bitRate?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
fileExtension?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PlaybackAsset {
|
|
11
|
+
URL: string;
|
|
12
|
+
flavor?: string;
|
|
13
|
+
metadata?: PlaybackAssetMetadata;
|
|
14
|
+
}
|
|
15
|
+
export interface PlaybackSong {
|
|
16
|
+
assets: PlaybackAsset[];
|
|
17
|
+
needsPlaybackReporting?: boolean;
|
|
18
|
+
songId: string | number;
|
|
19
|
+
"widevine-cert-url"?: string;
|
|
20
|
+
"hls-key-server-url"?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PlaybackResponse {
|
|
23
|
+
songList?: PlaybackSong[];
|
|
24
|
+
status?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare enum PlayActivityEventType {
|
|
27
|
+
PlayEnd = 0,
|
|
28
|
+
PlayStart = 1
|
|
29
|
+
}
|
|
30
|
+
export declare enum PlayActivityEndReasonType {
|
|
31
|
+
NotApplicable = 0,
|
|
32
|
+
Other = 1,
|
|
33
|
+
TrackSkippedForwards = 2,
|
|
34
|
+
PlaybackManuallyPaused = 3,
|
|
35
|
+
PlaybackSuspended = 4,
|
|
36
|
+
ManuallySelectedPlaybackOfDifferentItem = 5,
|
|
37
|
+
PlaybackPausedDueToInactivity = 6,
|
|
38
|
+
NaturalEndOfTrack = 7,
|
|
39
|
+
PlaybackStoppedDueToSessionTimeout = 8,
|
|
40
|
+
TrackBanned = 9,
|
|
41
|
+
FailedToLoad = 10,
|
|
42
|
+
PausedOnTimeout = 11,
|
|
43
|
+
ScrubBegin = 12,
|
|
44
|
+
ScrubEnd = 13,
|
|
45
|
+
TrackSkippedBackwards = 14,
|
|
46
|
+
NotSupportedByClient = 15,
|
|
47
|
+
QuickPlay = 16,
|
|
48
|
+
ExitedApplication = 17
|
|
49
|
+
}
|
|
50
|
+
export declare enum PlayActivityEventReasonHintType {
|
|
51
|
+
NotSpecified = 0,
|
|
52
|
+
ContainerChanged = 1
|
|
53
|
+
}
|
|
54
|
+
export declare enum PlayActivityContainerType {
|
|
55
|
+
Unknown = 0,
|
|
56
|
+
Radio = 1,
|
|
57
|
+
Playlist = 2,
|
|
58
|
+
Album = 3,
|
|
59
|
+
Artist = 4
|
|
60
|
+
}
|
|
61
|
+
export declare enum PlayActivityItemType {
|
|
62
|
+
Invalid = 0,
|
|
63
|
+
ItunesStoreContent = 1,
|
|
64
|
+
NonSongClip = 2,
|
|
65
|
+
Ad = 3,
|
|
66
|
+
Stream = 4,
|
|
67
|
+
AudioAd = 5,
|
|
68
|
+
VideoAd = 6,
|
|
69
|
+
TimedMetadataPing = 7,
|
|
70
|
+
ArtistUploadedContent = 8,
|
|
71
|
+
AggregateNonCatalogPlayTime = 9,
|
|
72
|
+
OriginalContentMovies = 10,
|
|
73
|
+
OriginalContentShows = 11
|
|
74
|
+
}
|
|
75
|
+
export declare enum PlayActivityMediaType {
|
|
76
|
+
Audio = 0,
|
|
77
|
+
Video = 1
|
|
78
|
+
}
|
|
79
|
+
export declare enum PlayActivitySourceType {
|
|
80
|
+
OriginatingDevice = 0,
|
|
81
|
+
PairedWatch = 1,
|
|
82
|
+
Sonos = 2,
|
|
83
|
+
CarPlay = 3,
|
|
84
|
+
WebAuc = 4,
|
|
85
|
+
TwitterAuc = 5,
|
|
86
|
+
MusicSdk = 6,
|
|
87
|
+
AtvRemote = 7,
|
|
88
|
+
WebPlayer = 8,
|
|
89
|
+
WholeHouseAudio = 9,
|
|
90
|
+
MusicKit = 10,
|
|
91
|
+
Vw = 11,
|
|
92
|
+
Unknown = 12,
|
|
93
|
+
Amazon = 13,
|
|
94
|
+
Porsche = 14,
|
|
95
|
+
Chromecast = 15,
|
|
96
|
+
WebApp = 16,
|
|
97
|
+
MercedesBenz = 17,
|
|
98
|
+
ThirdPartyTv = 18,
|
|
99
|
+
Seat = 19,
|
|
100
|
+
Cupra = 20
|
|
101
|
+
}
|
|
102
|
+
export declare enum PlayActivityRepeatMode {
|
|
103
|
+
Unknown = 0,
|
|
104
|
+
Off = 1,
|
|
105
|
+
One = 2,
|
|
106
|
+
All = 3
|
|
107
|
+
}
|
|
108
|
+
export declare enum PlayActivityShuffleMode {
|
|
109
|
+
Unknown = 0,
|
|
110
|
+
Off = 1,
|
|
111
|
+
On = 2
|
|
112
|
+
}
|
|
113
|
+
export declare enum PlayActivityAutoplayMode {
|
|
114
|
+
Unknown = 0,
|
|
115
|
+
Off = 1,
|
|
116
|
+
On = 2,
|
|
117
|
+
OnContentUnsupported = 3
|
|
118
|
+
}
|
|
119
|
+
export interface PlayActivityIds {
|
|
120
|
+
"auc-adam-id"?: string | number;
|
|
121
|
+
"cloud-id"?: string;
|
|
122
|
+
"lyric-id"?: string | number;
|
|
123
|
+
"purchased-adam-id"?: string | number;
|
|
124
|
+
"radio-adam-id"?: string | number;
|
|
125
|
+
"reporting-adam-id"?: string | number;
|
|
126
|
+
"subscription-adam-id"?: string | number;
|
|
127
|
+
}
|
|
128
|
+
export interface PlayActivityContainerIds {
|
|
129
|
+
"album-adam-id"?: string | number;
|
|
130
|
+
"global-playlist-id"?: string;
|
|
131
|
+
"station-hash"?: string;
|
|
132
|
+
"station-id"?: string;
|
|
133
|
+
"universal-library-id"?: string;
|
|
134
|
+
}
|
|
135
|
+
export interface PlayActivityPlayMode {
|
|
136
|
+
"auto-play-mode": PlayActivityAutoplayMode;
|
|
137
|
+
"repeat-play-mode": PlayActivityRepeatMode;
|
|
138
|
+
"shuffle-play-mode": PlayActivityShuffleMode;
|
|
139
|
+
}
|
|
140
|
+
interface PlayActivityEventBase {
|
|
141
|
+
"build-version": string;
|
|
142
|
+
"internal-build": boolean;
|
|
143
|
+
"media-duration-in-milliseconds": number;
|
|
144
|
+
"media-type": PlayActivityMediaType;
|
|
145
|
+
"milliseconds-since-play": number;
|
|
146
|
+
offline: boolean;
|
|
147
|
+
"persistent-id": string;
|
|
148
|
+
"play-mode": PlayActivityPlayMode;
|
|
149
|
+
"private-enabled": boolean;
|
|
150
|
+
"sb-enabled": boolean;
|
|
151
|
+
"siri-initiated": boolean;
|
|
152
|
+
"source-type": PlayActivitySourceType;
|
|
153
|
+
"start-position-in-milliseconds": number;
|
|
154
|
+
"store-front": string;
|
|
155
|
+
"user-agent": string;
|
|
156
|
+
"utc-offset-in-seconds": number;
|
|
157
|
+
}
|
|
158
|
+
interface PlayActivityIdentifiedEvent extends PlayActivityEventBase {
|
|
159
|
+
"container-ids"?: PlayActivityContainerIds;
|
|
160
|
+
"container-type": PlayActivityContainerType;
|
|
161
|
+
"feature-name": string;
|
|
162
|
+
ids: PlayActivityIds;
|
|
163
|
+
"reco-data"?: string;
|
|
164
|
+
type: Exclude<PlayActivityItemType, PlayActivityItemType.AggregateNonCatalogPlayTime>;
|
|
165
|
+
}
|
|
166
|
+
export interface PlayActivityStartEvent extends PlayActivityIdentifiedEvent {
|
|
167
|
+
"end-position-in-milliseconds"?: never;
|
|
168
|
+
"end-reason-type"?: never;
|
|
169
|
+
"event-reason-hint-type": PlayActivityEventReasonHintType;
|
|
170
|
+
"event-type": PlayActivityEventType.PlayStart;
|
|
171
|
+
}
|
|
172
|
+
export interface PlayActivityEndEvent extends PlayActivityIdentifiedEvent {
|
|
173
|
+
"end-position-in-milliseconds": number;
|
|
174
|
+
"end-reason-type": PlayActivityEndReasonType;
|
|
175
|
+
"event-reason-hint-type"?: never;
|
|
176
|
+
"event-type": PlayActivityEventType.PlayEnd;
|
|
177
|
+
}
|
|
178
|
+
export interface PlayActivityAggregateEndEvent extends PlayActivityEventBase {
|
|
179
|
+
"container-type"?: never;
|
|
180
|
+
"end-position-in-milliseconds": number;
|
|
181
|
+
"end-reason-type": PlayActivityEndReasonType.NotApplicable;
|
|
182
|
+
"event-reason-hint-type"?: never;
|
|
183
|
+
"event-type": PlayActivityEventType.PlayEnd;
|
|
184
|
+
"feature-name"?: never;
|
|
185
|
+
ids?: never;
|
|
186
|
+
"play-mode": {
|
|
187
|
+
"auto-play-mode": PlayActivityAutoplayMode.Unknown;
|
|
188
|
+
"repeat-play-mode": PlayActivityRepeatMode.Unknown;
|
|
189
|
+
"shuffle-play-mode": PlayActivityShuffleMode.Unknown;
|
|
190
|
+
};
|
|
191
|
+
"start-position-in-milliseconds": 0;
|
|
192
|
+
type: PlayActivityItemType.AggregateNonCatalogPlayTime;
|
|
193
|
+
"utc-offset-in-seconds": 0;
|
|
194
|
+
}
|
|
195
|
+
export type PlayActivityEvent = PlayActivityStartEvent | PlayActivityEndEvent | PlayActivityAggregateEndEvent;
|
|
196
|
+
export interface PlayActivityResponse {
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
}
|
|
199
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export var PlayActivityEventType;
|
|
2
|
+
(function (PlayActivityEventType) {
|
|
3
|
+
PlayActivityEventType[PlayActivityEventType["PlayEnd"] = 0] = "PlayEnd";
|
|
4
|
+
PlayActivityEventType[PlayActivityEventType["PlayStart"] = 1] = "PlayStart";
|
|
5
|
+
})(PlayActivityEventType || (PlayActivityEventType = {}));
|
|
6
|
+
export var PlayActivityEndReasonType;
|
|
7
|
+
(function (PlayActivityEndReasonType) {
|
|
8
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["NotApplicable"] = 0] = "NotApplicable";
|
|
9
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["Other"] = 1] = "Other";
|
|
10
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["TrackSkippedForwards"] = 2] = "TrackSkippedForwards";
|
|
11
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["PlaybackManuallyPaused"] = 3] = "PlaybackManuallyPaused";
|
|
12
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["PlaybackSuspended"] = 4] = "PlaybackSuspended";
|
|
13
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["ManuallySelectedPlaybackOfDifferentItem"] = 5] = "ManuallySelectedPlaybackOfDifferentItem";
|
|
14
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["PlaybackPausedDueToInactivity"] = 6] = "PlaybackPausedDueToInactivity";
|
|
15
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["NaturalEndOfTrack"] = 7] = "NaturalEndOfTrack";
|
|
16
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["PlaybackStoppedDueToSessionTimeout"] = 8] = "PlaybackStoppedDueToSessionTimeout";
|
|
17
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["TrackBanned"] = 9] = "TrackBanned";
|
|
18
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["FailedToLoad"] = 10] = "FailedToLoad";
|
|
19
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["PausedOnTimeout"] = 11] = "PausedOnTimeout";
|
|
20
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["ScrubBegin"] = 12] = "ScrubBegin";
|
|
21
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["ScrubEnd"] = 13] = "ScrubEnd";
|
|
22
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["TrackSkippedBackwards"] = 14] = "TrackSkippedBackwards";
|
|
23
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["NotSupportedByClient"] = 15] = "NotSupportedByClient";
|
|
24
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["QuickPlay"] = 16] = "QuickPlay";
|
|
25
|
+
PlayActivityEndReasonType[PlayActivityEndReasonType["ExitedApplication"] = 17] = "ExitedApplication";
|
|
26
|
+
})(PlayActivityEndReasonType || (PlayActivityEndReasonType = {}));
|
|
27
|
+
export var PlayActivityEventReasonHintType;
|
|
28
|
+
(function (PlayActivityEventReasonHintType) {
|
|
29
|
+
PlayActivityEventReasonHintType[PlayActivityEventReasonHintType["NotSpecified"] = 0] = "NotSpecified";
|
|
30
|
+
PlayActivityEventReasonHintType[PlayActivityEventReasonHintType["ContainerChanged"] = 1] = "ContainerChanged";
|
|
31
|
+
})(PlayActivityEventReasonHintType || (PlayActivityEventReasonHintType = {}));
|
|
32
|
+
export var PlayActivityContainerType;
|
|
33
|
+
(function (PlayActivityContainerType) {
|
|
34
|
+
PlayActivityContainerType[PlayActivityContainerType["Unknown"] = 0] = "Unknown";
|
|
35
|
+
PlayActivityContainerType[PlayActivityContainerType["Radio"] = 1] = "Radio";
|
|
36
|
+
PlayActivityContainerType[PlayActivityContainerType["Playlist"] = 2] = "Playlist";
|
|
37
|
+
PlayActivityContainerType[PlayActivityContainerType["Album"] = 3] = "Album";
|
|
38
|
+
PlayActivityContainerType[PlayActivityContainerType["Artist"] = 4] = "Artist";
|
|
39
|
+
})(PlayActivityContainerType || (PlayActivityContainerType = {}));
|
|
40
|
+
export var PlayActivityItemType;
|
|
41
|
+
(function (PlayActivityItemType) {
|
|
42
|
+
PlayActivityItemType[PlayActivityItemType["Invalid"] = 0] = "Invalid";
|
|
43
|
+
PlayActivityItemType[PlayActivityItemType["ItunesStoreContent"] = 1] = "ItunesStoreContent";
|
|
44
|
+
PlayActivityItemType[PlayActivityItemType["NonSongClip"] = 2] = "NonSongClip";
|
|
45
|
+
PlayActivityItemType[PlayActivityItemType["Ad"] = 3] = "Ad";
|
|
46
|
+
PlayActivityItemType[PlayActivityItemType["Stream"] = 4] = "Stream";
|
|
47
|
+
PlayActivityItemType[PlayActivityItemType["AudioAd"] = 5] = "AudioAd";
|
|
48
|
+
PlayActivityItemType[PlayActivityItemType["VideoAd"] = 6] = "VideoAd";
|
|
49
|
+
PlayActivityItemType[PlayActivityItemType["TimedMetadataPing"] = 7] = "TimedMetadataPing";
|
|
50
|
+
PlayActivityItemType[PlayActivityItemType["ArtistUploadedContent"] = 8] = "ArtistUploadedContent";
|
|
51
|
+
PlayActivityItemType[PlayActivityItemType["AggregateNonCatalogPlayTime"] = 9] = "AggregateNonCatalogPlayTime";
|
|
52
|
+
PlayActivityItemType[PlayActivityItemType["OriginalContentMovies"] = 10] = "OriginalContentMovies";
|
|
53
|
+
PlayActivityItemType[PlayActivityItemType["OriginalContentShows"] = 11] = "OriginalContentShows";
|
|
54
|
+
})(PlayActivityItemType || (PlayActivityItemType = {}));
|
|
55
|
+
export var PlayActivityMediaType;
|
|
56
|
+
(function (PlayActivityMediaType) {
|
|
57
|
+
PlayActivityMediaType[PlayActivityMediaType["Audio"] = 0] = "Audio";
|
|
58
|
+
PlayActivityMediaType[PlayActivityMediaType["Video"] = 1] = "Video";
|
|
59
|
+
})(PlayActivityMediaType || (PlayActivityMediaType = {}));
|
|
60
|
+
export var PlayActivitySourceType;
|
|
61
|
+
(function (PlayActivitySourceType) {
|
|
62
|
+
PlayActivitySourceType[PlayActivitySourceType["OriginatingDevice"] = 0] = "OriginatingDevice";
|
|
63
|
+
PlayActivitySourceType[PlayActivitySourceType["PairedWatch"] = 1] = "PairedWatch";
|
|
64
|
+
PlayActivitySourceType[PlayActivitySourceType["Sonos"] = 2] = "Sonos";
|
|
65
|
+
PlayActivitySourceType[PlayActivitySourceType["CarPlay"] = 3] = "CarPlay";
|
|
66
|
+
PlayActivitySourceType[PlayActivitySourceType["WebAuc"] = 4] = "WebAuc";
|
|
67
|
+
PlayActivitySourceType[PlayActivitySourceType["TwitterAuc"] = 5] = "TwitterAuc";
|
|
68
|
+
PlayActivitySourceType[PlayActivitySourceType["MusicSdk"] = 6] = "MusicSdk";
|
|
69
|
+
PlayActivitySourceType[PlayActivitySourceType["AtvRemote"] = 7] = "AtvRemote";
|
|
70
|
+
PlayActivitySourceType[PlayActivitySourceType["WebPlayer"] = 8] = "WebPlayer";
|
|
71
|
+
PlayActivitySourceType[PlayActivitySourceType["WholeHouseAudio"] = 9] = "WholeHouseAudio";
|
|
72
|
+
PlayActivitySourceType[PlayActivitySourceType["MusicKit"] = 10] = "MusicKit";
|
|
73
|
+
PlayActivitySourceType[PlayActivitySourceType["Vw"] = 11] = "Vw";
|
|
74
|
+
PlayActivitySourceType[PlayActivitySourceType["Unknown"] = 12] = "Unknown";
|
|
75
|
+
PlayActivitySourceType[PlayActivitySourceType["Amazon"] = 13] = "Amazon";
|
|
76
|
+
PlayActivitySourceType[PlayActivitySourceType["Porsche"] = 14] = "Porsche";
|
|
77
|
+
PlayActivitySourceType[PlayActivitySourceType["Chromecast"] = 15] = "Chromecast";
|
|
78
|
+
PlayActivitySourceType[PlayActivitySourceType["WebApp"] = 16] = "WebApp";
|
|
79
|
+
PlayActivitySourceType[PlayActivitySourceType["MercedesBenz"] = 17] = "MercedesBenz";
|
|
80
|
+
PlayActivitySourceType[PlayActivitySourceType["ThirdPartyTv"] = 18] = "ThirdPartyTv";
|
|
81
|
+
PlayActivitySourceType[PlayActivitySourceType["Seat"] = 19] = "Seat";
|
|
82
|
+
PlayActivitySourceType[PlayActivitySourceType["Cupra"] = 20] = "Cupra";
|
|
83
|
+
})(PlayActivitySourceType || (PlayActivitySourceType = {}));
|
|
84
|
+
export var PlayActivityRepeatMode;
|
|
85
|
+
(function (PlayActivityRepeatMode) {
|
|
86
|
+
PlayActivityRepeatMode[PlayActivityRepeatMode["Unknown"] = 0] = "Unknown";
|
|
87
|
+
PlayActivityRepeatMode[PlayActivityRepeatMode["Off"] = 1] = "Off";
|
|
88
|
+
PlayActivityRepeatMode[PlayActivityRepeatMode["One"] = 2] = "One";
|
|
89
|
+
PlayActivityRepeatMode[PlayActivityRepeatMode["All"] = 3] = "All";
|
|
90
|
+
})(PlayActivityRepeatMode || (PlayActivityRepeatMode = {}));
|
|
91
|
+
export var PlayActivityShuffleMode;
|
|
92
|
+
(function (PlayActivityShuffleMode) {
|
|
93
|
+
PlayActivityShuffleMode[PlayActivityShuffleMode["Unknown"] = 0] = "Unknown";
|
|
94
|
+
PlayActivityShuffleMode[PlayActivityShuffleMode["Off"] = 1] = "Off";
|
|
95
|
+
PlayActivityShuffleMode[PlayActivityShuffleMode["On"] = 2] = "On";
|
|
96
|
+
})(PlayActivityShuffleMode || (PlayActivityShuffleMode = {}));
|
|
97
|
+
export var PlayActivityAutoplayMode;
|
|
98
|
+
(function (PlayActivityAutoplayMode) {
|
|
99
|
+
PlayActivityAutoplayMode[PlayActivityAutoplayMode["Unknown"] = 0] = "Unknown";
|
|
100
|
+
PlayActivityAutoplayMode[PlayActivityAutoplayMode["Off"] = 1] = "Off";
|
|
101
|
+
PlayActivityAutoplayMode[PlayActivityAutoplayMode["On"] = 2] = "On";
|
|
102
|
+
PlayActivityAutoplayMode[PlayActivityAutoplayMode["OnContentUnsupported"] = 3] = "OnContentUnsupported";
|
|
103
|
+
})(PlayActivityAutoplayMode || (PlayActivityAutoplayMode = {}));
|
|
@@ -0,0 +1,56 @@
|
|
|
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 } from "../types/resources/me/profile.js";
|
|
26
|
+
import type { Rating, RatingResources } 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 { AnyResource } from "../types/query/resource.js";
|
|
37
|
+
export type { Registry } from "../types/query/registry.js";
|
|
38
|
+
export type { ResourceResponse } from "../types/query/response.js";
|
|
39
|
+
export type { ResourceScopes, ScopedResource, ScopedResourceOf } from "../types/query/scopes.js";
|
|
40
|
+
export type { PlayActivityAggregateEndEvent, PlayActivityContainerIds, PlayActivityEndEvent, PlayActivityEvent, PlayActivityIds, PlayActivityPlayMode, PlayActivityResponse, PlayActivityStartEvent, PlaybackAsset, PlaybackAssetMetadata, PlaybackResponse, PlaybackSong, PlaybackSongIds, } from "../types/playback.js";
|
|
41
|
+
export { PlayActivityAutoplayMode, PlayActivityContainerType, PlayActivityEndReasonType, PlayActivityEventReasonHintType, PlayActivityEventType, PlayActivityItemType, PlayActivityMediaType, PlayActivityRepeatMode, PlayActivityShuffleMode, PlayActivitySourceType, } from "../types/playback.js";
|
|
42
|
+
export type { Artwork, ArtworkColor, AudioVariants, ContentRating, Description, EditorialNote, PlayParameters, Preview, RatingValue, MotionVideo, EditorialVideo, } from "../types/shared.js";
|
|
43
|
+
type Song = CatalogSong | LibrarySong;
|
|
44
|
+
export type { CatalogSong, LibrarySong, Song };
|
|
45
|
+
type Album = CatalogAlbum | LibraryAlbum;
|
|
46
|
+
export type { Album, CatalogAlbum, LibraryAlbum };
|
|
47
|
+
type Artist = CatalogArtist | LibraryArtist;
|
|
48
|
+
export type { Artist, CatalogArtist, LibraryArtist };
|
|
49
|
+
type MusicVideo = CatalogMusicVideo | LibraryMusicVideo;
|
|
50
|
+
export type { CatalogMusicVideo, LibraryMusicVideo, MusicVideo };
|
|
51
|
+
type Playlist = CatalogPlaylist | LibraryPlaylist;
|
|
52
|
+
export type { CatalogPlaylist, LibraryPlaylist, Playlist };
|
|
53
|
+
export type { CatalogActivity, CatalogAppleCurator, CatalogConcert, CatalogCreditArtist, CatalogCurator, CatalogGenre, CatalogLyrics, CatalogRecordLabel, CatalogRoleCategory, CatalogStation, CatalogStationGenre, CatalogSyllableLyrics, CatalogVenue, LibraryPlaylistFolder, };
|
|
54
|
+
export type { AlbumPeriodSummary, ArtistPeriodSummary, GenrePeriodSummary, MonthlySongPeriodSummary, MusicSummary, PlaylistPeriodSummary, PersonalSocialProfile, RatingResources, Rating, Recommendation, SongPeriodSummary, StationPeriodSummary, };
|
|
55
|
+
export type { Storefront };
|
|
56
|
+
export type * from "../types/combined.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PlayActivityAutoplayMode, PlayActivityContainerType, PlayActivityEndReasonType, PlayActivityEventReasonHintType, PlayActivityEventType, PlayActivityItemType, PlayActivityMediaType, PlayActivityRepeatMode, PlayActivityShuffleMode, PlayActivitySourceType, } from "../types/playback.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Registry } from "../../types/query/registry.js";
|
|
2
|
+
import type { AnyResource, AttributeNames, AttributesOf, Collection, ExtendableNames, ExtendablesOf, RelationshipNames, ResourceLink, ViewNames } from "../../types/query/resource.js";
|
|
3
|
+
import type { internalAttributesSymbol, internalExtendablesSymbol, RelationshipItem, ViewItem } from "../../types/query/scopes.js";
|
|
4
|
+
export type ResourceOf<TKey extends keyof Registry> = Registry[TKey];
|
|
5
|
+
export type ValidateResourceName<TKey extends keyof Registry> = TKey;
|
|
6
|
+
type RelationshipCollections<TRelationships> = {
|
|
7
|
+
[K in keyof TRelationships as K extends string ? K : never]: Collection<NonNullable<TRelationships[K]>>;
|
|
8
|
+
} & Record<never, never>;
|
|
9
|
+
type ResourceTemplateRelationships<TResource extends AnyResource> = {
|
|
10
|
+
[K in RelationshipNames<TResource>]?: ResourceTemplate<RelationshipItem<TResource, K>>;
|
|
11
|
+
};
|
|
12
|
+
type ResourceTemplateViews<TResource extends AnyResource> = {
|
|
13
|
+
[K in ViewNames<TResource>]?: ResourceTemplate<ViewItem<TResource, K>>;
|
|
14
|
+
};
|
|
15
|
+
type ResourceTemplateItem<TResource extends AnyResource, TAttributes extends AttributeNames<TResource> = never, TExtendables extends ExtendableNames<TResource> = never, TRelationships = {}, TViews = {}> = ResourceLink<TResource> & {
|
|
16
|
+
attributes?: Pick<AttributesOf<TResource>, TAttributes> & Pick<ExtendablesOf<TResource>, TExtendables>;
|
|
17
|
+
[internalAttributesSymbol]?: RequiredProps<AttributesOf<TResource>, TAttributes>;
|
|
18
|
+
[internalExtendablesSymbol]?: RequiredProps<ExtendablesOf<TResource>, TExtendables>;
|
|
19
|
+
relationships?: RelationshipCollections<TRelationships>;
|
|
20
|
+
views?: RelationshipCollections<TViews>;
|
|
21
|
+
};
|
|
22
|
+
export type ResourceTemplate<TResource extends AnyResource, TAttributes extends AttributeNames<TResource> = never, TExtendables extends ExtendableNames<TResource> = never, TRelationships extends ResourceTemplateRelationships<TResource> = {}, TViews extends ResourceTemplateViews<TResource> = {}> = TResource extends AnyResource ? ResourceTemplateItem<TResource, Extract<TAttributes, AttributeNames<TResource>>, Extract<TExtendables, ExtendableNames<TResource>>, Pick<TRelationships, Extract<keyof TRelationships, RelationshipNames<TResource>>>, Pick<TViews, Extract<keyof TViews, ViewNames<TResource>>>> : never;
|
|
23
|
+
export type ResourceTemplateOf<TKey extends keyof Registry, TAttributes extends AttributeNames<ResourceOf<TKey>> = never, TExtendables extends ExtendableNames<ResourceOf<TKey>> = never, TRelationships extends ResourceTemplateRelationships<ResourceOf<TKey>> = {}, TViews extends ResourceTemplateViews<ResourceOf<TKey>> = {}> = ResourceTemplate<ResourceOf<TKey>, TAttributes, TExtendables, TRelationships, TViews>;
|
|
24
|
+
export type RequiredProps<T, K extends keyof T> = {
|
|
25
|
+
[P in K]-?: T[P];
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
File without changes
|