@wwdrew/expo-apple-music 1.0.0
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/ATTRIBUTION.md +24 -0
- package/LICENSE +190 -0
- package/NOTICE +7 -0
- package/README.md +81 -0
- package/android/build.gradle +26 -0
- package/android/libs/mediaplayback-release-1.1.1.aar +0 -0
- package/android/libs/musickitauth-release-1.1.2.aar +0 -0
- package/android/src/main/AndroidManifest.xml +16 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidCatalogService.kt +86 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidDeveloperToken.kt +39 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidHistoryService.kt +24 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidLibraryMutationsService.kt +30 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidLibraryService.kt +61 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidPlaybackController.kt +484 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidPlaybackObserver.kt +173 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidQueueService.kt +78 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidRatingsService.kt +27 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidRecommendationsService.kt +15 -0
- package/android/src/main/java/expo/modules/applemusic/AndroidSubscriptionService.kt +24 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicErrorCodes.kt +13 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicErrors.kt +46 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicHttpMethod.kt +8 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicJsonMapper.kt +258 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicNativeLoader.kt +32 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicRestJson.kt +40 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicRestQuery.kt +12 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicRestStack.kt +19 -0
- package/android/src/main/java/expo/modules/applemusic/AppleMusicRestTransport.kt +118 -0
- package/android/src/main/java/expo/modules/applemusic/AuthenticatedSession.kt +57 -0
- package/android/src/main/java/expo/modules/applemusic/BridgeResponses.kt +55 -0
- package/android/src/main/java/expo/modules/applemusic/CatalogRestClient.kt +306 -0
- package/android/src/main/java/expo/modules/applemusic/ExpoAppleMusicModule.kt +152 -0
- package/android/src/main/java/expo/modules/applemusic/HistoryRestClient.kt +60 -0
- package/android/src/main/java/expo/modules/applemusic/LibraryIds.kt +6 -0
- package/android/src/main/java/expo/modules/applemusic/LibraryMutationsRestClient.kt +95 -0
- package/android/src/main/java/expo/modules/applemusic/LibraryRestClient.kt +195 -0
- package/android/src/main/java/expo/modules/applemusic/MusicKitAuthContract.kt +78 -0
- package/android/src/main/java/expo/modules/applemusic/MusicKitAuthStorage.kt +76 -0
- package/android/src/main/java/expo/modules/applemusic/MusicKitTokenProvider.kt +13 -0
- package/android/src/main/java/expo/modules/applemusic/PaginationOptions.kt +14 -0
- package/android/src/main/java/expo/modules/applemusic/RatingsRestClient.kt +72 -0
- package/android/src/main/java/expo/modules/applemusic/RecommendationsRestClient.kt +37 -0
- package/android/src/main/java/expo/modules/applemusic/StorefrontRestClient.kt +44 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeAuth.kt +69 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeCatalog.kt +76 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeHistory.kt +35 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeLibrary.kt +54 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeLibraryMutations.kt +30 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgePlayer.kt +89 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeRatings.kt +29 -0
- package/android/src/main/java/expo/modules/applemusic/bridge/ExpoBridgeRecommendations.kt +18 -0
- package/app.plugin.js +1 -0
- package/build/ExpoAppleMusicModule.web.d.ts +15 -0
- package/build/ExpoAppleMusicModule.web.d.ts.map +1 -0
- package/build/ExpoAppleMusicModule.web.js +33 -0
- package/build/ExpoAppleMusicModule.web.js.map +1 -0
- package/build/api/call-native.d.ts +6 -0
- package/build/api/call-native.d.ts.map +1 -0
- package/build/api/call-native.js +35 -0
- package/build/api/call-native.js.map +1 -0
- package/build/api/decode-jwt-exp.d.ts +5 -0
- package/build/api/decode-jwt-exp.d.ts.map +1 -0
- package/build/api/decode-jwt-exp.js +28 -0
- package/build/api/decode-jwt-exp.js.map +1 -0
- package/build/api/library-ids.d.ts +4 -0
- package/build/api/library-ids.d.ts.map +1 -0
- package/build/api/library-ids.js +11 -0
- package/build/api/library-ids.js.map +1 -0
- package/build/api/pagination.d.ts +12 -0
- package/build/api/pagination.d.ts.map +1 -0
- package/build/api/pagination.js +13 -0
- package/build/api/pagination.js.map +1 -0
- package/build/api/parse-authorize-result.d.ts +3 -0
- package/build/api/parse-authorize-result.d.ts.map +1 -0
- package/build/api/parse-authorize-result.js +27 -0
- package/build/api/parse-authorize-result.js.map +1 -0
- package/build/api/require-music-user-token.d.ts +2 -0
- package/build/api/require-music-user-token.d.ts.map +1 -0
- package/build/api/require-music-user-token.js +14 -0
- package/build/api/require-music-user-token.js.map +1 -0
- package/build/api/sync-developer-token.d.ts +4 -0
- package/build/api/sync-developer-token.d.ts.map +1 -0
- package/build/api/sync-developer-token.js +27 -0
- package/build/api/sync-developer-token.js.map +1 -0
- package/build/bridge/bridge-methods.d.ts +17 -0
- package/build/bridge/bridge-methods.d.ts.map +1 -0
- package/build/bridge/bridge-methods.js +71 -0
- package/build/bridge/bridge-methods.js.map +1 -0
- package/build/bridge/bridge-responses.d.ts +64 -0
- package/build/bridge/bridge-responses.d.ts.map +1 -0
- package/build/bridge/bridge-responses.js +67 -0
- package/build/bridge/bridge-responses.js.map +1 -0
- package/build/bridge/handlers/auth-bridge.d.ts +11 -0
- package/build/bridge/handlers/auth-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/auth-bridge.js +49 -0
- package/build/bridge/handlers/auth-bridge.js.map +1 -0
- package/build/bridge/handlers/catalog-bridge.d.ts +34 -0
- package/build/bridge/handlers/catalog-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/catalog-bridge.js +58 -0
- package/build/bridge/handlers/catalog-bridge.js.map +1 -0
- package/build/bridge/handlers/history-bridge.d.ts +19 -0
- package/build/bridge/handlers/history-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/history-bridge.js +31 -0
- package/build/bridge/handlers/history-bridge.js.map +1 -0
- package/build/bridge/handlers/index.d.ts +124 -0
- package/build/bridge/handlers/index.d.ts.map +1 -0
- package/build/bridge/handlers/index.js +21 -0
- package/build/bridge/handlers/index.js.map +1 -0
- package/build/bridge/handlers/library-bridge.d.ts +23 -0
- package/build/bridge/handlers/library-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/library-bridge.js +41 -0
- package/build/bridge/handlers/library-bridge.js.map +1 -0
- package/build/bridge/handlers/library-mutations-bridge.d.ts +16 -0
- package/build/bridge/handlers/library-mutations-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/library-mutations-bridge.js +20 -0
- package/build/bridge/handlers/library-mutations-bridge.js.map +1 -0
- package/build/bridge/handlers/player-bridge.d.ts +18 -0
- package/build/bridge/handlers/player-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/player-bridge.js +42 -0
- package/build/bridge/handlers/player-bridge.js.map +1 -0
- package/build/bridge/handlers/ratings-bridge.d.ts +15 -0
- package/build/bridge/handlers/ratings-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/ratings-bridge.js +16 -0
- package/build/bridge/handlers/ratings-bridge.js.map +1 -0
- package/build/bridge/handlers/recommendations-bridge.d.ts +10 -0
- package/build/bridge/handlers/recommendations-bridge.d.ts.map +1 -0
- package/build/bridge/handlers/recommendations-bridge.js +14 -0
- package/build/bridge/handlers/recommendations-bridge.js.map +1 -0
- package/build/constants/apple-music-error-codes.d.ts +22 -0
- package/build/constants/apple-music-error-codes.d.ts.map +1 -0
- package/build/constants/apple-music-error-codes.js +21 -0
- package/build/constants/apple-music-error-codes.js.map +1 -0
- package/build/hooks/use-current-song.d.ts +10 -0
- package/build/hooks/use-current-song.d.ts.map +1 -0
- package/build/hooks/use-current-song.js +35 -0
- package/build/hooks/use-current-song.js.map +1 -0
- package/build/hooks/use-is-playing.d.ts +6 -0
- package/build/hooks/use-is-playing.d.ts.map +1 -0
- package/build/hooks/use-is-playing.js +21 -0
- package/build/hooks/use-is-playing.js.map +1 -0
- package/build/hooks/use-playback-state.d.ts +12 -0
- package/build/hooks/use-playback-state.d.ts.map +1 -0
- package/build/hooks/use-playback-state.js +41 -0
- package/build/hooks/use-playback-state.js.map +1 -0
- package/build/index.d.ts +52 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +44 -0
- package/build/index.js.map +1 -0
- package/build/mappers/apple-music-json-mapper.d.ts +94 -0
- package/build/mappers/apple-music-json-mapper.d.ts.map +1 -0
- package/build/mappers/apple-music-json-mapper.js +212 -0
- package/build/mappers/apple-music-json-mapper.js.map +1 -0
- package/build/modules/auth.d.ts +32 -0
- package/build/modules/auth.d.ts.map +1 -0
- package/build/modules/auth.js +60 -0
- package/build/modules/auth.js.map +1 -0
- package/build/modules/catalog.d.ts +46 -0
- package/build/modules/catalog.d.ts.map +1 -0
- package/build/modules/catalog.js +47 -0
- package/build/modules/catalog.js.map +1 -0
- package/build/modules/history.d.ts +17 -0
- package/build/modules/history.d.ts.map +1 -0
- package/build/modules/history.js +28 -0
- package/build/modules/history.js.map +1 -0
- package/build/modules/library-mutations.d.ts +9 -0
- package/build/modules/library-mutations.d.ts.map +1 -0
- package/build/modules/library-mutations.js +41 -0
- package/build/modules/library-mutations.js.map +1 -0
- package/build/modules/library.d.ts +21 -0
- package/build/modules/library.d.ts.map +1 -0
- package/build/modules/library.js +38 -0
- package/build/modules/library.js.map +1 -0
- package/build/modules/player.d.ts +53 -0
- package/build/modules/player.d.ts.map +1 -0
- package/build/modules/player.js +68 -0
- package/build/modules/player.js.map +1 -0
- package/build/modules/ratings.d.ts +10 -0
- package/build/modules/ratings.d.ts.map +1 -0
- package/build/modules/ratings.js +37 -0
- package/build/modules/ratings.js.map +1 -0
- package/build/modules/recommendations.d.ts +7 -0
- package/build/modules/recommendations.d.ts.map +1 -0
- package/build/modules/recommendations.js +15 -0
- package/build/modules/recommendations.js.map +1 -0
- package/build/native-module.d.ts +5 -0
- package/build/native-module.d.ts.map +1 -0
- package/build/native-module.js +5 -0
- package/build/native-module.js.map +1 -0
- package/build/native-module.web.d.ts +11 -0
- package/build/native-module.web.d.ts.map +1 -0
- package/build/native-module.web.js +11 -0
- package/build/native-module.web.js.map +1 -0
- package/build/rest/apple-music-rest-stack.d.ts +21 -0
- package/build/rest/apple-music-rest-stack.d.ts.map +1 -0
- package/build/rest/apple-music-rest-stack.js +21 -0
- package/build/rest/apple-music-rest-stack.js.map +1 -0
- package/build/rest/apple-music-rest-transport.d.ts +8 -0
- package/build/rest/apple-music-rest-transport.d.ts.map +1 -0
- package/build/rest/apple-music-rest-transport.js +2 -0
- package/build/rest/apple-music-rest-transport.js.map +1 -0
- package/build/rest/catalog-rest-client.d.ts +38 -0
- package/build/rest/catalog-rest-client.d.ts.map +1 -0
- package/build/rest/catalog-rest-client.js +189 -0
- package/build/rest/catalog-rest-client.js.map +1 -0
- package/build/rest/history-rest-client.d.ts +37 -0
- package/build/rest/history-rest-client.d.ts.map +1 -0
- package/build/rest/history-rest-client.js +30 -0
- package/build/rest/history-rest-client.js.map +1 -0
- package/build/rest/library-ids.d.ts +2 -0
- package/build/rest/library-ids.d.ts.map +1 -0
- package/build/rest/library-ids.js +2 -0
- package/build/rest/library-ids.js.map +1 -0
- package/build/rest/library-mutations-rest-client.d.ts +22 -0
- package/build/rest/library-mutations-rest-client.d.ts.map +1 -0
- package/build/rest/library-mutations-rest-client.js +37 -0
- package/build/rest/library-mutations-rest-client.js.map +1 -0
- package/build/rest/library-rest-client.d.ts +59 -0
- package/build/rest/library-rest-client.d.ts.map +1 -0
- package/build/rest/library-rest-client.js +141 -0
- package/build/rest/library-rest-client.js.map +1 -0
- package/build/rest/ratings-rest-client.d.ts +18 -0
- package/build/rest/ratings-rest-client.d.ts.map +1 -0
- package/build/rest/ratings-rest-client.js +37 -0
- package/build/rest/ratings-rest-client.js.map +1 -0
- package/build/rest/recommendations-rest-client.d.ts +32 -0
- package/build/rest/recommendations-rest-client.d.ts.map +1 -0
- package/build/rest/recommendations-rest-client.js +26 -0
- package/build/rest/recommendations-rest-client.js.map +1 -0
- package/build/rest/resource-ids-query.d.ts +2 -0
- package/build/rest/resource-ids-query.d.ts.map +1 -0
- package/build/rest/resource-ids-query.js +10 -0
- package/build/rest/resource-ids-query.js.map +1 -0
- package/build/rest/rest-json.d.ts +11 -0
- package/build/rest/rest-json.d.ts.map +1 -0
- package/build/rest/rest-json.js +29 -0
- package/build/rest/rest-json.js.map +1 -0
- package/build/rest/storefront-rest-client.d.ts +14 -0
- package/build/rest/storefront-rest-client.d.ts.map +1 -0
- package/build/rest/storefront-rest-client.js +36 -0
- package/build/rest/storefront-rest-client.js.map +1 -0
- package/build/types/album.d.ts +8 -0
- package/build/types/album.d.ts.map +1 -0
- package/build/types/album.js +2 -0
- package/build/types/album.js.map +1 -0
- package/build/types/albums-response.d.ts +5 -0
- package/build/types/albums-response.d.ts.map +1 -0
- package/build/types/albums-response.js +2 -0
- package/build/types/albums-response.js.map +1 -0
- package/build/types/android-authorize-options.d.ts +18 -0
- package/build/types/android-authorize-options.d.ts.map +1 -0
- package/build/types/android-authorize-options.js +2 -0
- package/build/types/android-authorize-options.js.map +1 -0
- package/build/types/artist.d.ts +9 -0
- package/build/types/artist.d.ts.map +1 -0
- package/build/types/artist.js +2 -0
- package/build/types/artist.js.map +1 -0
- package/build/types/auth-status.d.ts +19 -0
- package/build/types/auth-status.d.ts.map +1 -0
- package/build/types/auth-status.js +18 -0
- package/build/types/auth-status.js.map +1 -0
- package/build/types/authorize-result.d.ts +8 -0
- package/build/types/authorize-result.d.ts.map +1 -0
- package/build/types/authorize-result.js +2 -0
- package/build/types/authorize-result.js.map +1 -0
- package/build/types/catalog-album-tracks.d.ts +5 -0
- package/build/types/catalog-album-tracks.d.ts.map +1 -0
- package/build/types/catalog-album-tracks.js +2 -0
- package/build/types/catalog-album-tracks.js.map +1 -0
- package/build/types/catalog-charts.d.ts +25 -0
- package/build/types/catalog-charts.d.ts.map +1 -0
- package/build/types/catalog-charts.js +7 -0
- package/build/types/catalog-charts.js.map +1 -0
- package/build/types/catalog-resource-type.d.ts +11 -0
- package/build/types/catalog-resource-type.d.ts.map +1 -0
- package/build/types/catalog-resource-type.js +10 -0
- package/build/types/catalog-resource-type.js.map +1 -0
- package/build/types/catalog-search.d.ts +24 -0
- package/build/types/catalog-search.d.ts.map +1 -0
- package/build/types/catalog-search.js +9 -0
- package/build/types/catalog-search.js.map +1 -0
- package/build/types/check-subscription.d.ts +31 -0
- package/build/types/check-subscription.d.ts.map +1 -0
- package/build/types/check-subscription.js +5 -0
- package/build/types/check-subscription.js.map +1 -0
- package/build/types/library-music-videos.d.ts +5 -0
- package/build/types/library-music-videos.d.ts.map +1 -0
- package/build/types/library-music-videos.js +2 -0
- package/build/types/library-music-videos.js.map +1 -0
- package/build/types/library-mutations.d.ts +21 -0
- package/build/types/library-mutations.d.ts.map +1 -0
- package/build/types/library-mutations.js +8 -0
- package/build/types/library-mutations.js.map +1 -0
- package/build/types/library-search.d.ts +22 -0
- package/build/types/library-search.d.ts.map +1 -0
- package/build/types/library-search.js +9 -0
- package/build/types/library-search.js.map +1 -0
- package/build/types/music-item.d.ts +8 -0
- package/build/types/music-item.d.ts.map +1 -0
- package/build/types/music-item.js +7 -0
- package/build/types/music-item.js.map +1 -0
- package/build/types/music-video.d.ts +8 -0
- package/build/types/music-video.d.ts.map +1 -0
- package/build/types/music-video.js +2 -0
- package/build/types/music-video.js.map +1 -0
- package/build/types/pagination.d.ts +11 -0
- package/build/types/pagination.d.ts.map +1 -0
- package/build/types/pagination.js +2 -0
- package/build/types/pagination.js.map +1 -0
- package/build/types/playback-state.d.ts +9 -0
- package/build/types/playback-state.d.ts.map +1 -0
- package/build/types/playback-state.js +2 -0
- package/build/types/playback-state.js.map +1 -0
- package/build/types/playback-status.d.ts +10 -0
- package/build/types/playback-status.d.ts.map +1 -0
- package/build/types/playback-status.js +9 -0
- package/build/types/playback-status.js.map +1 -0
- package/build/types/playlist.d.ts +15 -0
- package/build/types/playlist.d.ts.map +1 -0
- package/build/types/playlist.js +2 -0
- package/build/types/playlist.js.map +1 -0
- package/build/types/rating.d.ts +34 -0
- package/build/types/rating.d.ts.map +1 -0
- package/build/types/rating.js +26 -0
- package/build/types/rating.js.map +1 -0
- package/build/types/recent-resource.d.ts +11 -0
- package/build/types/recent-resource.d.ts.map +1 -0
- package/build/types/recent-resource.js +2 -0
- package/build/types/recent-resource.js.map +1 -0
- package/build/types/recommendation.d.ts +37 -0
- package/build/types/recommendation.d.ts.map +1 -0
- package/build/types/recommendation.js +2 -0
- package/build/types/recommendation.js.map +1 -0
- package/build/types/song.d.ts +8 -0
- package/build/types/song.d.ts.map +1 -0
- package/build/types/song.js +2 -0
- package/build/types/song.js.map +1 -0
- package/build/types/station.d.ts +9 -0
- package/build/types/station.d.ts.map +1 -0
- package/build/types/station.js +2 -0
- package/build/types/station.js.map +1 -0
- package/build/types/storefront.d.ts +4 -0
- package/build/types/storefront.d.ts.map +1 -0
- package/build/types/storefront.js +2 -0
- package/build/types/storefront.js.map +1 -0
- package/build/types/tracks-from-library.d.ts +11 -0
- package/build/types/tracks-from-library.d.ts.map +1 -0
- package/build/types/tracks-from-library.js +2 -0
- package/build/types/tracks-from-library.js.map +1 -0
- package/build/utils/apple-music-error.d.ts +10 -0
- package/build/utils/apple-music-error.d.ts.map +1 -0
- package/build/utils/apple-music-error.js +13 -0
- package/build/utils/apple-music-error.js.map +1 -0
- package/build/utils/get-error-message.d.ts +2 -0
- package/build/utils/get-error-message.d.ts.map +1 -0
- package/build/utils/get-error-message.js +21 -0
- package/build/utils/get-error-message.js.map +1 -0
- package/build/utils/is-library-item.d.ts +2 -0
- package/build/utils/is-library-item.d.ts.map +1 -0
- package/build/utils/is-library-item.js +4 -0
- package/build/utils/is-library-item.js.map +1 -0
- package/build/utils/normalize-resource-ids.d.ts +4 -0
- package/build/utils/normalize-resource-ids.d.ts.map +1 -0
- package/build/utils/normalize-resource-ids.js +12 -0
- package/build/utils/normalize-resource-ids.js.map +1 -0
- package/build/web/MusicKitLoader.d.ts +11 -0
- package/build/web/MusicKitLoader.d.ts.map +1 -0
- package/build/web/MusicKitLoader.js +135 -0
- package/build/web/MusicKitLoader.js.map +1 -0
- package/build/web/WebAppleMusicApiClient.d.ts +151 -0
- package/build/web/WebAppleMusicApiClient.d.ts.map +1 -0
- package/build/web/WebAppleMusicApiClient.js +139 -0
- package/build/web/WebAppleMusicApiClient.js.map +1 -0
- package/build/web/WebAppleMusicRestTransport.d.ts +9 -0
- package/build/web/WebAppleMusicRestTransport.d.ts.map +1 -0
- package/build/web/WebAppleMusicRestTransport.js +31 -0
- package/build/web/WebAppleMusicRestTransport.js.map +1 -0
- package/build/web/WebPlaybackController.d.ts +12 -0
- package/build/web/WebPlaybackController.d.ts.map +1 -0
- package/build/web/WebPlaybackController.js +90 -0
- package/build/web/WebPlaybackController.js.map +1 -0
- package/build/web/WebPlaybackObserver.d.ts +22 -0
- package/build/web/WebPlaybackObserver.d.ts.map +1 -0
- package/build/web/WebPlaybackObserver.js +106 -0
- package/build/web/WebPlaybackObserver.js.map +1 -0
- package/build/web/WebQueueService.d.ts +10 -0
- package/build/web/WebQueueService.d.ts.map +1 -0
- package/build/web/WebQueueService.js +53 -0
- package/build/web/WebQueueService.js.map +1 -0
- package/build/web/WebSubscriptionService.d.ts +7 -0
- package/build/web/WebSubscriptionService.d.ts.map +1 -0
- package/build/web/WebSubscriptionService.js +24 -0
- package/build/web/WebSubscriptionService.js.map +1 -0
- package/build/web/apple-music-errors.d.ts +11 -0
- package/build/web/apple-music-errors.d.ts.map +1 -0
- package/build/web/apple-music-errors.js +31 -0
- package/build/web/apple-music-errors.js.map +1 -0
- package/build/web/extract-music-user-token.d.ts +4 -0
- package/build/web/extract-music-user-token.d.ts.map +1 -0
- package/build/web/extract-music-user-token.js +15 -0
- package/build/web/extract-music-user-token.js.map +1 -0
- package/build/web/map-auth-status.d.ts +17 -0
- package/build/web/map-auth-status.d.ts.map +1 -0
- package/build/web/map-auth-status.js +85 -0
- package/build/web/map-auth-status.js.map +1 -0
- package/build/web/music-kit-api.d.ts +18 -0
- package/build/web/music-kit-api.d.ts.map +1 -0
- package/build/web/music-kit-api.js +120 -0
- package/build/web/music-kit-api.js.map +1 -0
- package/build/web/musickit-types.d.ts +70 -0
- package/build/web/musickit-types.d.ts.map +1 -0
- package/build/web/musickit-types.js +3 -0
- package/build/web/musickit-types.js.map +1 -0
- package/build/web/pagination.d.ts +2 -0
- package/build/web/pagination.d.ts.map +1 -0
- package/build/web/pagination.js +2 -0
- package/build/web/pagination.js.map +1 -0
- package/expo-module.config.json +19 -0
- package/ios/AppleMusicBridgeError.swift +60 -0
- package/ios/AppleMusicErrorCodes.swift +11 -0
- package/ios/AppleMusicRestClient.swift +213 -0
- package/ios/AuthenticatedSession.swift +64 -0
- package/ios/BridgePagination.swift +17 -0
- package/ios/BridgeResponses.swift +82 -0
- package/ios/CatalogSearchStore.swift +13 -0
- package/ios/CatalogSearchStoreFactory.swift +31 -0
- package/ios/CatalogService.swift +307 -0
- package/ios/ExpoAppleMusic.podspec +29 -0
- package/ios/ExpoAppleMusicModule.swift +505 -0
- package/ios/HistoryService.swift +53 -0
- package/ios/LibraryMutationsService.swift +63 -0
- package/ios/LibraryService.swift +313 -0
- package/ios/MusicItemMapper.swift +171 -0
- package/ios/MusicKitAuthStorage.swift +38 -0
- package/ios/MusicKitCatalogSearchStore.swift +62 -0
- package/ios/PlaybackController.swift +201 -0
- package/ios/PlaybackObserver.swift +225 -0
- package/ios/QueueService.swift +166 -0
- package/ios/RatingsService.swift +66 -0
- package/ios/RecommendationsService.swift +34 -0
- package/ios/RestCatalogSearchStore.swift +62 -0
- package/ios/RestJsonMapper.swift +268 -0
- package/ios/StorefrontService.swift +55 -0
- package/ios/SubscriptionService.swift +119 -0
- package/ios/bridge/ExpoBridgeCatalog.swift +98 -0
- package/ios/bridge/ExpoBridgeHistory.swift +71 -0
- package/ios/bridge/ExpoBridgeLibrary.swift +93 -0
- package/ios/bridge/ExpoBridgeRecommendations.swift +28 -0
- package/package.json +89 -0
- package/plugin/build/index.d.ts +5 -0
- package/plugin/build/index.js +10 -0
- package/plugin/build/with-expo-apple-music.d.ts +10 -0
- package/plugin/build/with-expo-apple-music.js +50 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Android-only options for {@link Auth.authorize}. Ignored on iOS.
|
|
3
|
+
*
|
|
4
|
+
* @see {@link https://github.com/wwdrew/expo-apple-music/blob/main/docs/AUTH.md#android-only-options}
|
|
5
|
+
*/
|
|
6
|
+
export type AndroidAuthorizeOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* When `false` (default), show Apple’s connect/upsell screen before opening Apple Music.
|
|
9
|
+
* When `true`, skip it and deeplink straight into Apple Music (`setHideStartScreen`).
|
|
10
|
+
*/
|
|
11
|
+
hideStartScreen?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Custom HTML message on the upsell screen (Apple `setStartScreenMessage`).
|
|
14
|
+
* Ignored when `hideStartScreen` is `true`.
|
|
15
|
+
*/
|
|
16
|
+
startScreenMessage?: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=android-authorize-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"android-authorize-options.d.ts","sourceRoot":"","sources":["../../src/types/android-authorize-options.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"android-authorize-options.js","sourceRoot":"","sources":["../../src/types/android-authorize-options.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Android-only options for {@link Auth.authorize}. Ignored on iOS.\n *\n * @see {@link https://github.com/wwdrew/expo-apple-music/blob/main/docs/AUTH.md#android-only-options}\n */\nexport type AndroidAuthorizeOptions = {\n /**\n * When `false` (default), show Apple’s connect/upsell screen before opening Apple Music.\n * When `true`, skip it and deeplink straight into Apple Music (`setHideStartScreen`).\n */\n hideStartScreen?: boolean;\n /**\n * Custom HTML message on the upsell screen (Apple `setStartScreenMessage`).\n * Ignored when `hideStartScreen` is `true`.\n */\n startScreenMessage?: string;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artist.d.ts","sourceRoot":"","sources":["../../src/types/artist.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artist.js","sourceRoot":"","sources":["../../src/types/artist.ts"],"names":[],"mappings":"","sourcesContent":["export interface Artist {\n id: string;\n name: string;\n artworkUrl: string;\n}\n\nexport interface ArtistsResponse {\n artists: Artist[];\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of {@link Auth.authorize}. Same values on iOS and Android.
|
|
3
|
+
*
|
|
4
|
+
* @see {@link https://github.com/wwdrew/expo-apple-music/blob/main/docs/AUTH.md} for platform mapping and handling guide.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AuthStatus: {
|
|
7
|
+
/** User completed authorization. Use `AuthorizeResult.musicUserToken` (app-owned, not persisted by native). */
|
|
8
|
+
readonly AUTHORIZED: "authorized";
|
|
9
|
+
/** User dismissed the flow or declined access (includes Android upsell / Apple Music cancel). */
|
|
10
|
+
readonly DENIED: "denied";
|
|
11
|
+
/** iOS: authorization has not been requested yet. */
|
|
12
|
+
readonly NOT_DETERMINED: "notDetermined";
|
|
13
|
+
/** Cannot use Apple Music for this flow (e.g. no subscription on Android, parental controls on iOS). */
|
|
14
|
+
readonly RESTRICTED: "restricted";
|
|
15
|
+
/** Error or unrecognized result (e.g. invalid developer token on Android). */
|
|
16
|
+
readonly UNKNOWN: "unknown";
|
|
17
|
+
};
|
|
18
|
+
export type AuthStatus = (typeof AuthStatus)[keyof typeof AuthStatus];
|
|
19
|
+
//# sourceMappingURL=auth-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-status.d.ts","sourceRoot":"","sources":["../../src/types/auth-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU;IACrB,+GAA+G;;IAE/G,iGAAiG;;IAEjG,qDAAqD;;IAErD,wGAAwG;;IAExG,8EAA8E;;CAEtE,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of {@link Auth.authorize}. Same values on iOS and Android.
|
|
3
|
+
*
|
|
4
|
+
* @see {@link https://github.com/wwdrew/expo-apple-music/blob/main/docs/AUTH.md} for platform mapping and handling guide.
|
|
5
|
+
*/
|
|
6
|
+
export const AuthStatus = {
|
|
7
|
+
/** User completed authorization. Use `AuthorizeResult.musicUserToken` (app-owned, not persisted by native). */
|
|
8
|
+
AUTHORIZED: 'authorized',
|
|
9
|
+
/** User dismissed the flow or declined access (includes Android upsell / Apple Music cancel). */
|
|
10
|
+
DENIED: 'denied',
|
|
11
|
+
/** iOS: authorization has not been requested yet. */
|
|
12
|
+
NOT_DETERMINED: 'notDetermined',
|
|
13
|
+
/** Cannot use Apple Music for this flow (e.g. no subscription on Android, parental controls on iOS). */
|
|
14
|
+
RESTRICTED: 'restricted',
|
|
15
|
+
/** Error or unrecognized result (e.g. invalid developer token on Android). */
|
|
16
|
+
UNKNOWN: 'unknown',
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=auth-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-status.js","sourceRoot":"","sources":["../../src/types/auth-status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,+GAA+G;IAC/G,UAAU,EAAE,YAAY;IACxB,iGAAiG;IACjG,MAAM,EAAE,QAAQ;IAChB,qDAAqD;IACrD,cAAc,EAAE,eAAe;IAC/B,wGAAwG;IACxG,UAAU,EAAE,YAAY;IACxB,8EAA8E;IAC9E,OAAO,EAAE,SAAS;CACV,CAAC","sourcesContent":["/**\n * Result of {@link Auth.authorize}. Same values on iOS and Android.\n *\n * @see {@link https://github.com/wwdrew/expo-apple-music/blob/main/docs/AUTH.md} for platform mapping and handling guide.\n */\nexport const AuthStatus = {\n /** User completed authorization. Use `AuthorizeResult.musicUserToken` (app-owned, not persisted by native). */\n AUTHORIZED: 'authorized',\n /** User dismissed the flow or declined access (includes Android upsell / Apple Music cancel). */\n DENIED: 'denied',\n /** iOS: authorization has not been requested yet. */\n NOT_DETERMINED: 'notDetermined',\n /** Cannot use Apple Music for this flow (e.g. no subscription on Android, parental controls on iOS). */\n RESTRICTED: 'restricted',\n /** Error or unrecognized result (e.g. invalid developer token on Android). */\n UNKNOWN: 'unknown',\n} as const;\n\nexport type AuthStatus = (typeof AuthStatus)[keyof typeof AuthStatus];\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthStatus } from './auth-status';
|
|
2
|
+
/** Result of {@link Auth.authorize} — app stores `musicUserToken` (e.g. Zustand). */
|
|
3
|
+
export type AuthorizeResult = {
|
|
4
|
+
status: AuthStatus;
|
|
5
|
+
/** Present when `status` is `authorized`. Not persisted by the native module. */
|
|
6
|
+
musicUserToken?: string;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=authorize-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorize-result.d.ts","sourceRoot":"","sources":["../../src/types/authorize-result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,qFAAqF;AACrF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,iFAAiF;IACjF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorize-result.js","sourceRoot":"","sources":["../../src/types/authorize-result.ts"],"names":[],"mappings":"","sourcesContent":["import type { AuthStatus } from './auth-status';\n\n/** Result of {@link Auth.authorize} — app stores `musicUserToken` (e.g. Zustand). */\nexport type AuthorizeResult = {\n status: AuthStatus;\n /** Present when `status` is `authorized`. Not persisted by the native module. */\n musicUserToken?: string;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-album-tracks.d.ts","sourceRoot":"","sources":["../../src/types/catalog-album-tracks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,IAAI,EAAE,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-album-tracks.js","sourceRoot":"","sources":["../../src/types/catalog-album-tracks.ts"],"names":[],"mappings":"","sourcesContent":["import type { Song } from './song';\n\nexport interface CatalogAlbumTracksResponse {\n songs: Song[];\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Album } from './album';
|
|
2
|
+
import type { MusicVideo } from './music-video';
|
|
3
|
+
import type { PaginationOptions } from './pagination';
|
|
4
|
+
import type { Playlist } from './playlist';
|
|
5
|
+
import type { Song } from './song';
|
|
6
|
+
export declare const CatalogChartType: {
|
|
7
|
+
readonly SONGS: "songs";
|
|
8
|
+
readonly ALBUMS: "albums";
|
|
9
|
+
readonly PLAYLISTS: "playlists";
|
|
10
|
+
readonly MUSIC_VIDEOS: "music-videos";
|
|
11
|
+
};
|
|
12
|
+
export type CatalogChartType = (typeof CatalogChartType)[keyof typeof CatalogChartType];
|
|
13
|
+
export interface CatalogChartsOptions extends PaginationOptions {
|
|
14
|
+
/** Apple genre ID filter */
|
|
15
|
+
genre?: string;
|
|
16
|
+
/** Chart kind, e.g. `most-played` */
|
|
17
|
+
chart?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CatalogCharts {
|
|
20
|
+
songs: Song[];
|
|
21
|
+
albums: Album[];
|
|
22
|
+
playlists: Playlist[];
|
|
23
|
+
musicVideos: MusicVideo[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=catalog-charts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-charts.d.ts","sourceRoot":"","sources":["../../src/types/catalog-charts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,gBAAgB;;;;;CAKnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAExF,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-charts.js","sourceRoot":"","sources":["../../src/types/catalog-charts.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;CACpB,CAAC","sourcesContent":["import type { Album } from './album';\nimport type { MusicVideo } from './music-video';\nimport type { PaginationOptions } from './pagination';\nimport type { Playlist } from './playlist';\nimport type { Song } from './song';\n\nexport const CatalogChartType = {\n SONGS: 'songs',\n ALBUMS: 'albums',\n PLAYLISTS: 'playlists',\n MUSIC_VIDEOS: 'music-videos',\n} as const;\n\nexport type CatalogChartType = (typeof CatalogChartType)[keyof typeof CatalogChartType];\n\nexport interface CatalogChartsOptions extends PaginationOptions {\n /** Apple genre ID filter */\n genre?: string;\n /** Chart kind, e.g. `most-played` */\n chart?: string;\n}\n\nexport interface CatalogCharts {\n songs: Song[];\n albums: Album[];\n playlists: Playlist[];\n musicVideos: MusicVideo[];\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Catalog resource segment for batch GET (`/v1/catalog/{storefront}/{type}?ids=`). */
|
|
2
|
+
export declare const CatalogResourceType: {
|
|
3
|
+
readonly SONGS: "songs";
|
|
4
|
+
readonly ALBUMS: "albums";
|
|
5
|
+
readonly ARTISTS: "artists";
|
|
6
|
+
readonly PLAYLISTS: "playlists";
|
|
7
|
+
readonly STATIONS: "stations";
|
|
8
|
+
readonly MUSIC_VIDEOS: "music-videos";
|
|
9
|
+
};
|
|
10
|
+
export type CatalogResourceType = (typeof CatalogResourceType)[keyof typeof CatalogResourceType];
|
|
11
|
+
//# sourceMappingURL=catalog-resource-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-resource-type.d.ts","sourceRoot":"","sources":["../../src/types/catalog-resource-type.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,eAAO,MAAM,mBAAmB;;;;;;;CAOtB,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Catalog resource segment for batch GET (`/v1/catalog/{storefront}/{type}?ids=`). */
|
|
2
|
+
export const CatalogResourceType = {
|
|
3
|
+
SONGS: 'songs',
|
|
4
|
+
ALBUMS: 'albums',
|
|
5
|
+
ARTISTS: 'artists',
|
|
6
|
+
PLAYLISTS: 'playlists',
|
|
7
|
+
STATIONS: 'stations',
|
|
8
|
+
MUSIC_VIDEOS: 'music-videos',
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=catalog-resource-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-resource-type.js","sourceRoot":"","sources":["../../src/types/catalog-resource-type.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;CACpB,CAAC","sourcesContent":["/** Catalog resource segment for batch GET (`/v1/catalog/{storefront}/{type}?ids=`). */\nexport const CatalogResourceType = {\n SONGS: 'songs',\n ALBUMS: 'albums',\n ARTISTS: 'artists',\n PLAYLISTS: 'playlists',\n STATIONS: 'stations',\n MUSIC_VIDEOS: 'music-videos',\n} as const;\n\nexport type CatalogResourceType = (typeof CatalogResourceType)[keyof typeof CatalogResourceType];\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Album } from './album';
|
|
2
|
+
import type { Artist } from './artist';
|
|
3
|
+
import type { MusicVideo } from './music-video';
|
|
4
|
+
import type { Playlist } from './playlist';
|
|
5
|
+
import type { Song } from './song';
|
|
6
|
+
import type { Station } from './station';
|
|
7
|
+
export declare const CatalogSearchType: {
|
|
8
|
+
readonly SONGS: "songs";
|
|
9
|
+
readonly ALBUMS: "albums";
|
|
10
|
+
readonly ARTISTS: "artists";
|
|
11
|
+
readonly PLAYLISTS: "playlists";
|
|
12
|
+
readonly STATIONS: "stations";
|
|
13
|
+
readonly MUSIC_VIDEOS: "music-videos";
|
|
14
|
+
};
|
|
15
|
+
export type CatalogSearchType = (typeof CatalogSearchType)[keyof typeof CatalogSearchType];
|
|
16
|
+
export interface CatalogSearch {
|
|
17
|
+
songs: Song[];
|
|
18
|
+
albums: Album[];
|
|
19
|
+
artists: Artist[];
|
|
20
|
+
playlists: Playlist[];
|
|
21
|
+
stations: Station[];
|
|
22
|
+
musicVideos: MusicVideo[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=catalog-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-search.d.ts","sourceRoot":"","sources":["../../src/types/catalog-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-search.js","sourceRoot":"","sources":["../../src/types/catalog-search.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,cAAc;CACpB,CAAC","sourcesContent":["import type { Album } from './album';\nimport type { Artist } from './artist';\nimport type { MusicVideo } from './music-video';\nimport type { Playlist } from './playlist';\nimport type { Song } from './song';\nimport type { Station } from './station';\n\nexport const CatalogSearchType = {\n SONGS: 'songs',\n ALBUMS: 'albums',\n ARTISTS: 'artists',\n PLAYLISTS: 'playlists',\n STATIONS: 'stations',\n MUSIC_VIDEOS: 'music-videos',\n} as const;\n\nexport type CatalogSearchType = (typeof CatalogSearchType)[keyof typeof CatalogSearchType];\n\nexport interface CatalogSearch {\n songs: Song[];\n albums: Album[];\n artists: Artist[];\n playlists: Playlist[];\n stations: Station[];\n musicVideos: MusicVideo[];\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Subscription capabilities from MusicKit
|
|
3
|
+
* @see https://developer.apple.com/documentation/musickit/musicsubscription
|
|
4
|
+
*/
|
|
5
|
+
export interface CheckSubscription {
|
|
6
|
+
/**
|
|
7
|
+
* A capability that allows your app to play subscription content using a music player.
|
|
8
|
+
*/
|
|
9
|
+
canPlayCatalogContent: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A capability that allows your app to present subscription offers for Apple Music.
|
|
12
|
+
*/
|
|
13
|
+
canBecomeSubscriber: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* A capability that allows your app to perform modifications to the user's iCloud Music Library.
|
|
16
|
+
*/
|
|
17
|
+
hasCloudLibraryEnabled: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Same as canBecomeSubscriber. Kept for backward compatibility.
|
|
20
|
+
*/
|
|
21
|
+
isMusicCatalogSubscriptionEligible: boolean;
|
|
22
|
+
}
|
|
23
|
+
export type MusicSubscriptionErrorCode = 'unknown' | 'permissionDenied' | 'privacyAcknowledgementRequired';
|
|
24
|
+
export interface MusicSubscriptionError extends Error {
|
|
25
|
+
code: MusicSubscriptionErrorCode | string;
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const isMusicSubscriptionError: (error: unknown) => error is MusicSubscriptionError & {
|
|
29
|
+
code: MusicSubscriptionErrorCode;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=check-subscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-subscription.d.ts","sourceRoot":"","sources":["../../src/types/check-subscription.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,kCAAkC,EAAE,OAAO,CAAC;CAC7C;AAED,MAAM,MAAM,0BAA0B,GAClC,SAAS,GACT,kBAAkB,GAClB,gCAAgC,CAAC;AAErC,MAAM,WAAW,sBAAuB,SAAQ,KAAK;IACnD,IAAI,EAAE,0BAA0B,GAAG,MAAM,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,wBAAwB,GACnC,OAAO,OAAO,KACb,KAAK,IAAI,sBAAsB,GAAG;IAAE,IAAI,EAAE,0BAA0B,CAAA;CAMpE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-subscription.js","sourceRoot":"","sources":["../../src/types/check-subscription.ts"],"names":[],"mappings":"AAiCA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,KAAc,EAC0D,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,MAAM,IAAI,KAAK;IACf,CAAC,SAAS,EAAE,kBAAkB,EAAE,gCAAgC,CAAC,CAAC,QAAQ,CACvE,KAAgC,CAAC,IAAI,CACvC,CAAC","sourcesContent":["/**\n * Subscription capabilities from MusicKit\n * @see https://developer.apple.com/documentation/musickit/musicsubscription\n */\nexport interface CheckSubscription {\n /**\n * A capability that allows your app to play subscription content using a music player.\n */\n canPlayCatalogContent: boolean;\n /**\n * A capability that allows your app to present subscription offers for Apple Music.\n */\n canBecomeSubscriber: boolean;\n /**\n * A capability that allows your app to perform modifications to the user's iCloud Music Library.\n */\n hasCloudLibraryEnabled: boolean;\n /**\n * Same as canBecomeSubscriber. Kept for backward compatibility.\n */\n isMusicCatalogSubscriptionEligible: boolean;\n}\n\nexport type MusicSubscriptionErrorCode =\n | 'unknown'\n | 'permissionDenied'\n | 'privacyAcknowledgementRequired';\n\nexport interface MusicSubscriptionError extends Error {\n code: MusicSubscriptionErrorCode | string;\n message: string;\n}\n\nexport const isMusicSubscriptionError = (\n error: unknown,\n): error is MusicSubscriptionError & { code: MusicSubscriptionErrorCode } =>\n typeof error === 'object' &&\n error !== null &&\n 'code' in error &&\n ['unknown', 'permissionDenied', 'privacyAcknowledgementRequired'].includes(\n (error as MusicSubscriptionError).code,\n );\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-music-videos.d.ts","sourceRoot":"","sources":["../../src/types/library-music-videos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-music-videos.js","sourceRoot":"","sources":["../../src/types/library-music-videos.ts"],"names":[],"mappings":"","sourcesContent":["import type { MusicVideo } from './music-video';\n\nexport interface LibraryMusicVideosResponse {\n musicVideos: MusicVideo[];\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ResourceIds } from './rating';
|
|
2
|
+
/** Track `type` for playlist create / add-tracks requests. */
|
|
3
|
+
export declare const PlaylistTrackType: {
|
|
4
|
+
readonly SONG: "songs";
|
|
5
|
+
readonly LIBRARY_SONG: "library-songs";
|
|
6
|
+
readonly MUSIC_VIDEO: "music-videos";
|
|
7
|
+
readonly LIBRARY_MUSIC_VIDEO: "library-music-videos";
|
|
8
|
+
};
|
|
9
|
+
export type PlaylistTrackType = (typeof PlaylistTrackType)[keyof typeof PlaylistTrackType];
|
|
10
|
+
export interface PlaylistTrackRef {
|
|
11
|
+
id: string;
|
|
12
|
+
type: PlaylistTrackType;
|
|
13
|
+
}
|
|
14
|
+
export interface CreatePlaylistOptions {
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
isPublic?: boolean;
|
|
18
|
+
tracks?: PlaylistTrackRef[];
|
|
19
|
+
}
|
|
20
|
+
export type { ResourceIds };
|
|
21
|
+
//# sourceMappingURL=library-mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-mutations.d.ts","sourceRoot":"","sources":["../../src/types/library-mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Track `type` for playlist create / add-tracks requests. */
|
|
2
|
+
export const PlaylistTrackType = {
|
|
3
|
+
SONG: 'songs',
|
|
4
|
+
LIBRARY_SONG: 'library-songs',
|
|
5
|
+
MUSIC_VIDEO: 'music-videos',
|
|
6
|
+
LIBRARY_MUSIC_VIDEO: 'library-music-videos',
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=library-mutations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-mutations.js","sourceRoot":"","sources":["../../src/types/library-mutations.ts"],"names":[],"mappings":"AAEA,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,eAAe;IAC7B,WAAW,EAAE,cAAc;IAC3B,mBAAmB,EAAE,sBAAsB;CACnC,CAAC","sourcesContent":["import type { ResourceIds } from './rating';\n\n/** Track `type` for playlist create / add-tracks requests. */\nexport const PlaylistTrackType = {\n SONG: 'songs',\n LIBRARY_SONG: 'library-songs',\n MUSIC_VIDEO: 'music-videos',\n LIBRARY_MUSIC_VIDEO: 'library-music-videos',\n} as const;\n\nexport type PlaylistTrackType = (typeof PlaylistTrackType)[keyof typeof PlaylistTrackType];\n\nexport interface PlaylistTrackRef {\n id: string;\n type: PlaylistTrackType;\n}\n\nexport interface CreatePlaylistOptions {\n name: string;\n description?: string;\n isPublic?: boolean;\n tracks?: PlaylistTrackRef[];\n}\n\nexport type { ResourceIds };\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Album } from './album';
|
|
2
|
+
import type { Artist } from './artist';
|
|
3
|
+
import type { MusicVideo } from './music-video';
|
|
4
|
+
import type { Playlist } from './playlist';
|
|
5
|
+
import type { Song } from './song';
|
|
6
|
+
/** Apple Music API `types` values for `GET /v1/me/library/search`. */
|
|
7
|
+
export declare const LibrarySearchType: {
|
|
8
|
+
readonly SONGS: "library-songs";
|
|
9
|
+
readonly ALBUMS: "library-albums";
|
|
10
|
+
readonly ARTISTS: "library-artists";
|
|
11
|
+
readonly PLAYLISTS: "library-playlists";
|
|
12
|
+
readonly MUSIC_VIDEOS: "library-music-videos";
|
|
13
|
+
};
|
|
14
|
+
export type LibrarySearchType = (typeof LibrarySearchType)[keyof typeof LibrarySearchType];
|
|
15
|
+
export interface LibrarySearch {
|
|
16
|
+
songs: Song[];
|
|
17
|
+
albums: Album[];
|
|
18
|
+
artists: Artist[];
|
|
19
|
+
playlists: Playlist[];
|
|
20
|
+
musicVideos: MusicVideo[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=library-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-search.d.ts","sourceRoot":"","sources":["../../src/types/library-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,sEAAsE;AACtE,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE3F,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Apple Music API `types` values for `GET /v1/me/library/search`. */
|
|
2
|
+
export const LibrarySearchType = {
|
|
3
|
+
SONGS: 'library-songs',
|
|
4
|
+
ALBUMS: 'library-albums',
|
|
5
|
+
ARTISTS: 'library-artists',
|
|
6
|
+
PLAYLISTS: 'library-playlists',
|
|
7
|
+
MUSIC_VIDEOS: 'library-music-videos',
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=library-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-search.js","sourceRoot":"","sources":["../../src/types/library-search.ts"],"names":[],"mappings":"AAMA,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,gBAAgB;IACxB,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,YAAY,EAAE,sBAAsB;CAC5B,CAAC","sourcesContent":["import type { Album } from './album';\nimport type { Artist } from './artist';\nimport type { MusicVideo } from './music-video';\nimport type { Playlist } from './playlist';\nimport type { Song } from './song';\n\n/** Apple Music API `types` values for `GET /v1/me/library/search`. */\nexport const LibrarySearchType = {\n SONGS: 'library-songs',\n ALBUMS: 'library-albums',\n ARTISTS: 'library-artists',\n PLAYLISTS: 'library-playlists',\n MUSIC_VIDEOS: 'library-music-videos',\n} as const;\n\nexport type LibrarySearchType = (typeof LibrarySearchType)[keyof typeof LibrarySearchType];\n\nexport interface LibrarySearch {\n songs: Song[];\n albums: Album[];\n artists: Artist[];\n playlists: Playlist[];\n musicVideos: MusicVideo[];\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const MusicItem: {
|
|
2
|
+
readonly SONG: "song";
|
|
3
|
+
readonly ALBUM: "album";
|
|
4
|
+
readonly PLAYLIST: "playlist";
|
|
5
|
+
readonly STATION: "station";
|
|
6
|
+
};
|
|
7
|
+
export type MusicItem = (typeof MusicItem)[keyof typeof MusicItem];
|
|
8
|
+
//# sourceMappingURL=music-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"music-item.d.ts","sourceRoot":"","sources":["../../src/types/music-item.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;CAKZ,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"music-item.js","sourceRoot":"","sources":["../../src/types/music-item.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACV,CAAC","sourcesContent":["export const MusicItem = {\n SONG: 'song',\n ALBUM: 'album',\n PLAYLIST: 'playlist',\n STATION: 'station',\n} as const;\n\nexport type MusicItem = (typeof MusicItem)[keyof typeof MusicItem];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"music-video.d.ts","sourceRoot":"","sources":["../../src/types/music-video.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"music-video.js","sourceRoot":"","sources":["../../src/types/music-video.ts"],"names":[],"mappings":"","sourcesContent":["export interface MusicVideo {\n id: string;\n title: string;\n artistName: string;\n artworkUrl: string;\n duration: number;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Optional paging for list endpoints. Defaults: `limit` 25, `offset` 0 (see `normalizePaginationOptions`). */
|
|
2
|
+
export interface PaginationOptions {
|
|
3
|
+
/** Max items per request. Default `25`. Coerced to at least `1`. */
|
|
4
|
+
limit?: number;
|
|
5
|
+
/** Zero-based index. Default `0`. Coerced to at least `0`. */
|
|
6
|
+
offset?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PaginatedResponse<T> {
|
|
9
|
+
data: T[];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/types/pagination.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAC/G,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,IAAI,EAAE,CAAC,EAAE,CAAC;CACX"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/types/pagination.ts"],"names":[],"mappings":"","sourcesContent":["/** Optional paging for list endpoints. Defaults: `limit` 25, `offset` 0 (see `normalizePaginationOptions`). */\nexport interface PaginationOptions {\n /** Max items per request. Default `25`. Coerced to at least `1`. */\n limit?: number;\n /** Zero-based index. Default `0`. Coerced to at least `0`. */\n offset?: number;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PlaybackStatus } from './playback-status';
|
|
2
|
+
import type { Song } from './song';
|
|
3
|
+
export interface PlaybackState {
|
|
4
|
+
currentSong?: Song;
|
|
5
|
+
playbackRate: number;
|
|
6
|
+
playbackStatus: PlaybackStatus;
|
|
7
|
+
playbackTime: number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=playback-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-state.d.ts","sourceRoot":"","sources":["../../src/types/playback-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-state.js","sourceRoot":"","sources":["../../src/types/playback-state.ts"],"names":[],"mappings":"","sourcesContent":["import type { PlaybackStatus } from './playback-status';\nimport type { Song } from './song';\n\nexport interface PlaybackState {\n currentSong?: Song;\n playbackRate: number;\n playbackStatus: PlaybackStatus;\n playbackTime: number;\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const PlaybackStatus: {
|
|
2
|
+
readonly PLAYING: "playing";
|
|
3
|
+
readonly PAUSED: "paused";
|
|
4
|
+
readonly STOPPED: "stopped";
|
|
5
|
+
readonly INTERRUPTED: "interrupted";
|
|
6
|
+
readonly SEEKING_FORWARD: "seekingForward";
|
|
7
|
+
readonly SEEKING_BACKWARD: "seekingBackward";
|
|
8
|
+
};
|
|
9
|
+
export type PlaybackStatus = (typeof PlaybackStatus)[keyof typeof PlaybackStatus];
|
|
10
|
+
//# sourceMappingURL=playback-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-status.d.ts","sourceRoot":"","sources":["../../src/types/playback-status.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playback-status.js","sourceRoot":"","sources":["../../src/types/playback-status.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,gBAAgB;IACjC,gBAAgB,EAAE,iBAAiB;CAC3B,CAAC","sourcesContent":["export const PlaybackStatus = {\n PLAYING: 'playing',\n PAUSED: 'paused',\n STOPPED: 'stopped',\n INTERRUPTED: 'interrupted',\n SEEKING_FORWARD: 'seekingForward',\n SEEKING_BACKWARD: 'seekingBackward',\n} as const;\n\nexport type PlaybackStatus = (typeof PlaybackStatus)[keyof typeof PlaybackStatus];\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Song } from './song';
|
|
2
|
+
export interface Playlist {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
artworkUrl: string;
|
|
7
|
+
trackCount: number;
|
|
8
|
+
}
|
|
9
|
+
export interface PlaylistsResponse {
|
|
10
|
+
playlists: Playlist[];
|
|
11
|
+
}
|
|
12
|
+
export interface PlaylistSongsResponse {
|
|
13
|
+
songs: Song[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=playlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playlist.d.ts","sourceRoot":"","sources":["../../src/types/playlist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,IAAI,EAAE,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playlist.js","sourceRoot":"","sources":["../../src/types/playlist.ts"],"names":[],"mappings":"","sourcesContent":["import type { Song } from './song';\n\nexport interface Playlist {\n id: string;\n name: string;\n description: string;\n artworkUrl: string;\n trackCount: number;\n}\n\nexport interface PlaylistsResponse {\n playlists: Playlist[];\n}\n\nexport interface PlaylistSongsResponse {\n songs: Song[];\n}\n"]}
|