@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,30 @@
|
|
|
1
|
+
import type { ResourceOf } from "../../types/query/helpers.js";
|
|
2
|
+
import type { Result } from "../../types/query/results.js";
|
|
3
|
+
export type SearchCatalogResult = Result<{
|
|
4
|
+
activities: ResourceOf<"activities">;
|
|
5
|
+
albums: ResourceOf<"albums">;
|
|
6
|
+
"apple-curators": ResourceOf<"apple-curators">;
|
|
7
|
+
artists: ResourceOf<"artists">;
|
|
8
|
+
curators: ResourceOf<"curators">;
|
|
9
|
+
"music-videos": ResourceOf<"music-videos">;
|
|
10
|
+
playlists: ResourceOf<"playlists">;
|
|
11
|
+
"record-labels": ResourceOf<"record-labels">;
|
|
12
|
+
songs: ResourceOf<"songs">;
|
|
13
|
+
stations: ResourceOf<"stations">;
|
|
14
|
+
}, {
|
|
15
|
+
topResults: ResourceOf<"activities" | "albums" | "apple-curators" | "artists" | "curators" | "music-videos" | "playlists" | "record-labels" | "songs" | "stations">;
|
|
16
|
+
}, {
|
|
17
|
+
topResults: "top";
|
|
18
|
+
}>;
|
|
19
|
+
export type SearchCatalogHintsResult = {
|
|
20
|
+
results: {
|
|
21
|
+
terms: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export type SearchLibraryResult = Result<{
|
|
25
|
+
"library-albums": ResourceOf<"library-albums">;
|
|
26
|
+
"library-artists": ResourceOf<"library-artists">;
|
|
27
|
+
"library-music-videos": ResourceOf<"library-music-videos">;
|
|
28
|
+
"library-playlists": ResourceOf<"library-playlists">;
|
|
29
|
+
"library-songs": ResourceOf<"library-songs">;
|
|
30
|
+
}>;
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface ArtworkColor {
|
|
2
|
+
bgColor?: string;
|
|
3
|
+
gradient?: {
|
|
4
|
+
color?: string;
|
|
5
|
+
y2?: number;
|
|
6
|
+
};
|
|
7
|
+
textColor1?: string;
|
|
8
|
+
textColor2?: string;
|
|
9
|
+
textColor3?: string;
|
|
10
|
+
textColor4?: string;
|
|
11
|
+
textGradient?: [string, string];
|
|
12
|
+
}
|
|
13
|
+
export interface Artwork extends ArtworkColor {
|
|
14
|
+
url: string;
|
|
15
|
+
hasP3?: boolean;
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
}
|
|
19
|
+
export interface Preview {
|
|
20
|
+
artwork?: Artwork;
|
|
21
|
+
url: string;
|
|
22
|
+
hlsUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface Description {
|
|
25
|
+
short?: string;
|
|
26
|
+
standard: string;
|
|
27
|
+
}
|
|
28
|
+
export interface EditorialNote {
|
|
29
|
+
short?: string;
|
|
30
|
+
standard?: string;
|
|
31
|
+
name?: string;
|
|
32
|
+
tagline?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PlayParameters {
|
|
35
|
+
format?: string;
|
|
36
|
+
hasDrm?: boolean;
|
|
37
|
+
id: string;
|
|
38
|
+
isLibrary?: boolean;
|
|
39
|
+
kind: string;
|
|
40
|
+
mediaType?: number;
|
|
41
|
+
reporting?: boolean;
|
|
42
|
+
reportingId?: string;
|
|
43
|
+
catalogId?: string;
|
|
44
|
+
stationHash?: string;
|
|
45
|
+
}
|
|
46
|
+
export type AudioVariants = "atmos" | "hi-res-lossless" | "lossless" | "lossy-stereo" | "spatial" | "dolby-atmos" | "dolby-audio";
|
|
47
|
+
export type ContentRating = "clean" | "explicit";
|
|
48
|
+
export type RatingValue = 1 | -1;
|
|
49
|
+
export interface MotionVideo {
|
|
50
|
+
previewFrame: Artwork;
|
|
51
|
+
video: string;
|
|
52
|
+
}
|
|
53
|
+
export interface EditorialVideo {
|
|
54
|
+
motionDetailSquare?: MotionVideo;
|
|
55
|
+
motionDetailTall?: MotionVideo;
|
|
56
|
+
motionSquareVideo1x1?: MotionVideo;
|
|
57
|
+
motionTallVideo3x4?: MotionVideo;
|
|
58
|
+
motionWideVideo21x9?: MotionVideo;
|
|
59
|
+
}
|
|
60
|
+
export interface EditorialArtwork {
|
|
61
|
+
musicContentColorLogoTrimmed?: Artwork;
|
|
62
|
+
staticDetailSquare?: Artwork;
|
|
63
|
+
staticDetailTall?: Artwork;
|
|
64
|
+
subscriptionCover?: Artwork;
|
|
65
|
+
subscriptionHero?: Artwork;
|
|
66
|
+
superHeroTall?: Artwork;
|
|
67
|
+
superHeroWide?: Artwork;
|
|
68
|
+
}
|
|
69
|
+
export interface AssetUrls {
|
|
70
|
+
enhancedHls?: string;
|
|
71
|
+
lightweight?: string;
|
|
72
|
+
lightweightPlus?: string;
|
|
73
|
+
plus?: string;
|
|
74
|
+
superLightweight?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface Offer {
|
|
77
|
+
buyParams: string;
|
|
78
|
+
price: number;
|
|
79
|
+
priceFormatted: string;
|
|
80
|
+
type: string;
|
|
81
|
+
}
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opfelmusig/lib",
|
|
3
|
+
"version": "0.0.0-ci.0.sha-3e76884",
|
|
4
|
+
"description": "Fully Typed Apple Music API Client",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"apple-music",
|
|
7
|
+
"apple-music-api",
|
|
8
|
+
"musickit",
|
|
9
|
+
"typescript"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/opfelmusig/lib.git"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./types": {
|
|
27
|
+
"types": "./dist/types/public.d.ts",
|
|
28
|
+
"import": "./dist/types/public.js"
|
|
29
|
+
},
|
|
30
|
+
"./helpers": {
|
|
31
|
+
"types": "./dist/helpers/public.d.ts",
|
|
32
|
+
"import": "./dist/helpers/public.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"registry": "https://registry.npmjs.org",
|
|
38
|
+
"tag": "latest"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"exp": "bun --console-depth 100 src/_experimenting.ts",
|
|
42
|
+
"lint": "oxlint .",
|
|
43
|
+
"lint:fix": "oxlint . --fix --fix-suggestions",
|
|
44
|
+
"format": "oxfmt",
|
|
45
|
+
"format:check": "oxfmt --check",
|
|
46
|
+
"setup": "lefthook install",
|
|
47
|
+
"build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
48
|
+
"dev": "bun x concurrently \"tsc -p tsconfig.build.json -w\" \"tsc-alias -p tsconfig.build.json -w\"",
|
|
49
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
50
|
+
"prepack": "bun run build"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"zod": "^4.4.3"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/node": "^26.2.0",
|
|
57
|
+
"lefthook": "^2.1.10",
|
|
58
|
+
"oxfmt": "^0.64.0",
|
|
59
|
+
"oxlint": "^1.78.0",
|
|
60
|
+
"thisval": "^0.1.1",
|
|
61
|
+
"tsc-alias": "^1.9.1",
|
|
62
|
+
"typescript": "^7.0.2"
|
|
63
|
+
}
|
|
64
|
+
}
|