@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.
Files changed (176) hide show
  1. package/README.md +8 -0
  2. package/dist/clients/catalog/album.d.ts +12 -0
  3. package/dist/clients/catalog/album.js +14 -0
  4. package/dist/clients/catalog/genre.d.ts +13 -0
  5. package/dist/clients/catalog/genre.js +17 -0
  6. package/dist/clients/catalog/index.d.ts +71 -0
  7. package/dist/clients/catalog/index.js +99 -0
  8. package/dist/clients/catalog/musicVideo.d.ts +12 -0
  9. package/dist/clients/catalog/musicVideo.js +14 -0
  10. package/dist/clients/catalog/playlist.d.ts +12 -0
  11. package/dist/clients/catalog/playlist.js +16 -0
  12. package/dist/clients/catalog/song.d.ts +12 -0
  13. package/dist/clients/catalog/song.js +14 -0
  14. package/dist/clients/catalog/station.d.ts +14 -0
  15. package/dist/clients/catalog/station.js +34 -0
  16. package/dist/clients/catalog/stationGenre.d.ts +12 -0
  17. package/dist/clients/catalog/stationGenre.js +14 -0
  18. package/dist/clients/library/index.d.ts +39 -0
  19. package/dist/clients/library/index.js +68 -0
  20. package/dist/clients/library/playlistFolder.d.ts +12 -0
  21. package/dist/clients/library/playlistFolder.js +16 -0
  22. package/dist/clients/me/index.d.ts +25 -0
  23. package/dist/clients/me/index.js +49 -0
  24. package/dist/clients/me/musicSummary.d.ts +12 -0
  25. package/dist/clients/me/musicSummary.js +14 -0
  26. package/dist/clients/me/ratings.d.ts +15 -0
  27. package/dist/clients/me/ratings.js +34 -0
  28. package/dist/clients/me/recent.d.ts +17 -0
  29. package/dist/clients/me/recent.js +37 -0
  30. package/dist/clients/me/recommendation.d.ts +12 -0
  31. package/dist/clients/me/recommendation.js +14 -0
  32. package/dist/clients/me/station.d.ts +10 -0
  33. package/dist/clients/me/station.js +13 -0
  34. package/dist/clients/playback.d.ts +9 -0
  35. package/dist/clients/playback.js +68 -0
  36. package/dist/clients/resource.d.ts +34 -0
  37. package/dist/clients/resource.js +105 -0
  38. package/dist/clients/shared/equivalent.d.ts +10 -0
  39. package/dist/clients/shared/equivalent.js +15 -0
  40. package/dist/clients/social/index.d.ts +7 -0
  41. package/dist/clients/social/index.js +9 -0
  42. package/dist/clients/social/profile.d.ts +12 -0
  43. package/dist/clients/social/profile.js +14 -0
  44. package/dist/clients/storefront.d.ts +12 -0
  45. package/dist/clients/storefront.js +14 -0
  46. package/dist/core/client.d.ts +40 -0
  47. package/dist/core/client.js +82 -0
  48. package/dist/core/error.d.ts +23 -0
  49. package/dist/core/error.js +24 -0
  50. package/dist/core/http.d.ts +22 -0
  51. package/dist/core/http.js +232 -0
  52. package/dist/helpers/language.d.ts +1 -0
  53. package/dist/helpers/language.js +48 -0
  54. package/dist/helpers/public.d.ts +19 -0
  55. package/dist/helpers/public.js +35 -0
  56. package/dist/helpers/requestQuery.d.ts +17 -0
  57. package/dist/helpers/requestQuery.js +153 -0
  58. package/dist/index.d.ts +7 -0
  59. package/dist/index.js +4 -0
  60. package/dist/schemas/error.d.ts +29 -0
  61. package/dist/schemas/error.js +16 -0
  62. package/dist/schemas/request.d.ts +42 -0
  63. package/dist/schemas/request.js +28 -0
  64. package/dist/types/combined.d.ts +15 -0
  65. package/dist/types/combined.js +0 -0
  66. package/dist/types/config.d.ts +63 -0
  67. package/dist/types/config.js +0 -0
  68. package/dist/types/params.d.ts +22 -0
  69. package/dist/types/params.js +0 -0
  70. package/dist/types/playback.d.ts +199 -0
  71. package/dist/types/playback.js +103 -0
  72. package/dist/types/public.d.ts +56 -0
  73. package/dist/types/public.js +1 -0
  74. package/dist/types/query/helpers.d.ts +27 -0
  75. package/dist/types/query/helpers.js +0 -0
  76. package/dist/types/query/registry.d.ts +74 -0
  77. package/dist/types/query/registry.js +0 -0
  78. package/dist/types/query/resource.d.ts +29 -0
  79. package/dist/types/query/resource.js +0 -0
  80. package/dist/types/query/response.d.ts +3 -0
  81. package/dist/types/query/response.js +0 -0
  82. package/dist/types/query/results.d.ts +45 -0
  83. package/dist/types/query/results.js +0 -0
  84. package/dist/types/query/scopes.d.ts +77 -0
  85. package/dist/types/query/scopes.js +0 -0
  86. package/dist/types/request.d.ts +14 -0
  87. package/dist/types/request.js +0 -0
  88. package/dist/types/resources/catalog/activity.d.ts +15 -0
  89. package/dist/types/resources/catalog/activity.js +0 -0
  90. package/dist/types/resources/catalog/album.d.ts +47 -0
  91. package/dist/types/resources/catalog/album.js +0 -0
  92. package/dist/types/resources/catalog/artist.d.ts +57 -0
  93. package/dist/types/resources/catalog/artist.js +0 -0
  94. package/dist/types/resources/catalog/concert.d.ts +32 -0
  95. package/dist/types/resources/catalog/concert.js +0 -0
  96. package/dist/types/resources/catalog/creditArtist.d.ts +11 -0
  97. package/dist/types/resources/catalog/creditArtist.js +0 -0
  98. package/dist/types/resources/catalog/curator.d.ts +27 -0
  99. package/dist/types/resources/catalog/curator.js +0 -0
  100. package/dist/types/resources/catalog/genre.d.ts +11 -0
  101. package/dist/types/resources/catalog/genre.js +0 -0
  102. package/dist/types/resources/catalog/lyrics.d.ts +8 -0
  103. package/dist/types/resources/catalog/lyrics.js +0 -0
  104. package/dist/types/resources/catalog/musicVideo.d.ts +34 -0
  105. package/dist/types/resources/catalog/musicVideo.js +0 -0
  106. package/dist/types/resources/catalog/playlist.d.ts +35 -0
  107. package/dist/types/resources/catalog/playlist.js +0 -0
  108. package/dist/types/resources/catalog/recordLabel.d.ts +16 -0
  109. package/dist/types/resources/catalog/recordLabel.js +0 -0
  110. package/dist/types/resources/catalog/roleCategory.d.ts +12 -0
  111. package/dist/types/resources/catalog/roleCategory.js +0 -0
  112. package/dist/types/resources/catalog/song.d.ts +50 -0
  113. package/dist/types/resources/catalog/song.js +0 -0
  114. package/dist/types/resources/catalog/station.d.ts +21 -0
  115. package/dist/types/resources/catalog/station.js +0 -0
  116. package/dist/types/resources/catalog/stationGenre.d.ts +11 -0
  117. package/dist/types/resources/catalog/stationGenre.js +0 -0
  118. package/dist/types/resources/catalog/syllableLyrics.d.ts +9 -0
  119. package/dist/types/resources/catalog/syllableLyrics.js +0 -0
  120. package/dist/types/resources/catalog/venue.d.ts +20 -0
  121. package/dist/types/resources/catalog/venue.js +0 -0
  122. package/dist/types/resources/library/album.d.ts +17 -0
  123. package/dist/types/resources/library/album.js +0 -0
  124. package/dist/types/resources/library/artist.d.ts +13 -0
  125. package/dist/types/resources/library/artist.js +0 -0
  126. package/dist/types/resources/library/musicVideo.d.ts +15 -0
  127. package/dist/types/resources/library/musicVideo.js +0 -0
  128. package/dist/types/resources/library/playlist.d.ts +24 -0
  129. package/dist/types/resources/library/playlist.js +0 -0
  130. package/dist/types/resources/library/playlistFolder.d.ts +13 -0
  131. package/dist/types/resources/library/playlistFolder.js +0 -0
  132. package/dist/types/resources/library/song.d.ts +15 -0
  133. package/dist/types/resources/library/song.js +0 -0
  134. package/dist/types/resources/me/musicSummary.d.ts +37 -0
  135. package/dist/types/resources/me/musicSummary.js +0 -0
  136. package/dist/types/resources/me/profile.d.ts +32 -0
  137. package/dist/types/resources/me/profile.js +0 -0
  138. package/dist/types/resources/me/rating.d.ts +11 -0
  139. package/dist/types/resources/me/rating.js +0 -0
  140. package/dist/types/resources/me/recommendation.d.ts +27 -0
  141. package/dist/types/resources/me/recommendation.js +0 -0
  142. package/dist/types/resources/me/summaries/albumPeriodSummary.d.ts +15 -0
  143. package/dist/types/resources/me/summaries/albumPeriodSummary.js +0 -0
  144. package/dist/types/resources/me/summaries/artistPeriodSummary.d.ts +15 -0
  145. package/dist/types/resources/me/summaries/artistPeriodSummary.js +0 -0
  146. package/dist/types/resources/me/summaries/genrePeriodSummary.d.ts +12 -0
  147. package/dist/types/resources/me/summaries/genrePeriodSummary.js +0 -0
  148. package/dist/types/resources/me/summaries/monthlySongPeriodSummary.d.ts +13 -0
  149. package/dist/types/resources/me/summaries/monthlySongPeriodSummary.js +0 -0
  150. package/dist/types/resources/me/summaries/playlistPeriodSummary.d.ts +14 -0
  151. package/dist/types/resources/me/summaries/playlistPeriodSummary.js +0 -0
  152. package/dist/types/resources/me/summaries/songPeriodSummary.d.ts +15 -0
  153. package/dist/types/resources/me/summaries/songPeriodSummary.js +0 -0
  154. package/dist/types/resources/me/summaries/stationPeriodSummary.d.ts +14 -0
  155. package/dist/types/resources/me/summaries/stationPeriodSummary.js +0 -0
  156. package/dist/types/resources/other/storefront.d.ts +8 -0
  157. package/dist/types/resources/other/storefront.js +0 -0
  158. package/dist/types/resources/shared/album.d.ts +11 -0
  159. package/dist/types/resources/shared/album.js +0 -0
  160. package/dist/types/resources/shared/artist.d.ts +3 -0
  161. package/dist/types/resources/shared/artist.js +0 -0
  162. package/dist/types/resources/shared/lyrics.d.ts +5 -0
  163. package/dist/types/resources/shared/lyrics.js +0 -0
  164. package/dist/types/resources/shared/musicVideo.d.ts +13 -0
  165. package/dist/types/resources/shared/musicVideo.js +0 -0
  166. package/dist/types/resources/shared/playlist.d.ts +7 -0
  167. package/dist/types/resources/shared/playlist.js +0 -0
  168. package/dist/types/resources/shared/song.d.ts +15 -0
  169. package/dist/types/resources/shared/song.js +0 -0
  170. package/dist/types/results/chart.d.ts +8 -0
  171. package/dist/types/results/chart.js +0 -0
  172. package/dist/types/results/search.d.ts +30 -0
  173. package/dist/types/results/search.js +0 -0
  174. package/dist/types/shared.d.ts +81 -0
  175. package/dist/types/shared.js +0 -0
  176. 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
+ }