expo-media-library 56.0.2 → 56.0.4

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 (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/android/build.gradle +2 -2
  3. package/build/ExpoMediaLibrary.web.d.ts +1 -1
  4. package/build/ExpoMediaLibrary.web.d.ts.map +1 -1
  5. package/build/ExpoMediaLibrary.web.js +1 -1
  6. package/build/ExpoMediaLibrary.web.js.map +1 -1
  7. package/build/MediaLibrary.d.ts +4 -2
  8. package/build/MediaLibrary.d.ts.map +1 -1
  9. package/build/MediaLibrary.js +4 -2
  10. package/build/MediaLibrary.js.map +1 -1
  11. package/build/next/ExpoMediaLibraryNext.d.ts +1 -1
  12. package/build/next/ExpoMediaLibraryNext.d.ts.map +1 -1
  13. package/build/next/ExpoMediaLibraryNext.js.map +1 -1
  14. package/build/next/index.d.ts +2 -1
  15. package/build/next/index.d.ts.map +1 -1
  16. package/build/next/index.js +2 -1
  17. package/build/next/index.js.map +1 -1
  18. package/expo-module.config.json +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.module → 56.0.4/expo.modules.medialibrary-56.0.4.module} +7 -7
  20. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.module.md5 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.module.sha1 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.module.sha256 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.module.sha512 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.pom → 56.0.4/expo.modules.medialibrary-56.0.4.pom} +1 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.pom.md5 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.pom.sha1 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.pom.sha256 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.4/expo.modules.medialibrary-56.0.4.pom.sha512 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/maven-metadata.xml +4 -4
  30. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/maven-metadata.xml.md5 +1 -1
  31. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/maven-metadata.xml.sha1 +1 -1
  32. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/maven-metadata.xml.sha256 +1 -1
  33. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/maven-metadata.xml.sha512 +1 -1
  34. package/package.json +4 -4
  35. package/prebuilds/output/debug/xcframeworks/ExpoMediaLibrary.tar.gz +0 -0
  36. package/prebuilds/output/release/xcframeworks/ExpoMediaLibrary.tar.gz +0 -0
  37. package/src/ExpoMediaLibrary.web.ts +1 -2
  38. package/src/MediaLibrary.ts +4 -8
  39. package/src/next/ExpoMediaLibraryNext.ts +1 -1
  40. package/src/next/index.ts +2 -6
  41. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.module.md5 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.module.sha1 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.module.sha256 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.module.sha512 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.pom.md5 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.pom.sha1 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.pom.sha256 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/56.0.2/expo.modules.medialibrary-56.0.2.pom.sha512 +0 -1
  49. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2-sources.jar → 56.0.4/expo.modules.medialibrary-56.0.4-sources.jar} +0 -0
  50. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2-sources.jar.md5 → 56.0.4/expo.modules.medialibrary-56.0.4-sources.jar.md5} +0 -0
  51. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2-sources.jar.sha1 → 56.0.4/expo.modules.medialibrary-56.0.4-sources.jar.sha1} +0 -0
  52. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2-sources.jar.sha256 → 56.0.4/expo.modules.medialibrary-56.0.4-sources.jar.sha256} +0 -0
  53. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2-sources.jar.sha512 → 56.0.4/expo.modules.medialibrary-56.0.4-sources.jar.sha512} +0 -0
  54. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.aar → 56.0.4/expo.modules.medialibrary-56.0.4.aar} +0 -0
  55. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.aar.md5 → 56.0.4/expo.modules.medialibrary-56.0.4.aar.md5} +0 -0
  56. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.aar.sha1 → 56.0.4/expo.modules.medialibrary-56.0.4.aar.sha1} +0 -0
  57. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.aar.sha256 → 56.0.4/expo.modules.medialibrary-56.0.4.aar.sha256} +0 -0
  58. /package/local-maven-repo/host/exp/exponent/expo.modules.medialibrary/{56.0.2/expo.modules.medialibrary-56.0.2.aar.sha512 → 56.0.4/expo.modules.medialibrary-56.0.4.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 56.0.4 — 2026-05-13
14
+
15
+ ### 💡 Others
16
+
17
+ - Updated permission hooks and permission type imports to be imported from `expo` instead of `expo-modules-core` ([#45565](https://github.com/expo/expo/pull/45565) by [@Wenszel](https://github.com/Wenszel))
18
+
19
+ ## 56.0.3 — 2026-05-06
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 56.0.2 — 2026-05-06
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '56.0.2'
7
+ version = '56.0.4'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.medialibrary"
11
11
  defaultConfig {
12
12
  versionCode 37
13
- versionName "56.0.2"
13
+ versionName "56.0.4"
14
14
  }
15
15
  }
16
16
 
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import { type PermissionResponse } from 'expo';
2
2
  import type { MediaTypeObject, SortByObject } from './MediaLibrary';
3
3
  declare const _default: {
4
4
  readonly CHANGE_LISTENER_NAME: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMediaLibrary.web.d.ts","sourceRoot":"","sources":["../src/ExpoMediaLibrary.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;;mCAUtC,MAAM;wBAGjB,eAAe;qBAQlB,YAAY;oCAYY,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;wCAGjC,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;;AA3BjF,wBA8BE"}
1
+ {"version":3,"file":"ExpoMediaLibrary.web.d.ts","sourceRoot":"","sources":["../src/ExpoMediaLibrary.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAoB,MAAM,MAAM,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;;mCAUtC,MAAM;wBAGjB,eAAe;qBAQlB,YAAY;oCAYY,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;wCAGjC,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;;AA3BjF,wBA8BE"}
@@ -1,4 +1,4 @@
1
- import { PermissionStatus } from 'expo-modules-core';
1
+ import { PermissionStatus } from 'expo';
2
2
  const noPermissionResponse = {
3
3
  status: PermissionStatus.UNDETERMINED,
4
4
  canAskAgain: true,
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMediaLibrary.web.js","sourceRoot":"","sources":["../src/ExpoMediaLibrary.web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,MAAM,oBAAoB,GAAuB;IAC/C,MAAM,EAAE,gBAAgB,CAAC,YAAY;IACrC,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,eAAe;IACb,IAAI,oBAAoB;QACtB,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,IAAI,SAAS;QACX,OAAO;YACL,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM;QACR,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,cAAc;YAC5B,gBAAgB,EAAE,kBAAkB;YACpC,QAAQ,EAAE,UAAU;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,UAAmB;QAC3C,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,KAAK,CAAC,uBAAuB,CAAC,UAAmB;QAC/C,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\nimport { PermissionStatus } from 'expo-modules-core';\n\nimport type { MediaTypeObject, SortByObject } from './MediaLibrary';\n\nconst noPermissionResponse: PermissionResponse = {\n status: PermissionStatus.UNDETERMINED,\n canAskAgain: true,\n granted: false,\n expires: 'never',\n};\n\nexport default {\n get CHANGE_LISTENER_NAME(): string {\n return 'mediaLibraryDidChange';\n },\n get MediaType(): MediaTypeObject {\n return {\n audio: 'audio',\n photo: 'photo',\n video: 'video',\n unknown: 'unknown',\n };\n },\n get SortBy(): SortByObject {\n return {\n default: 'default',\n mediaType: 'mediaType',\n width: 'width',\n height: 'height',\n creationTime: 'creationTime',\n modificationTime: 'modificationTime',\n duration: 'duration',\n };\n },\n\n async getPermissionsAsync(_writeOnly: boolean): Promise<PermissionResponse> {\n return noPermissionResponse;\n },\n async requestPermissionsAsync(_writeOnly: boolean): Promise<PermissionResponse> {\n return noPermissionResponse;\n },\n};\n"]}
1
+ {"version":3,"file":"ExpoMediaLibrary.web.js","sourceRoot":"","sources":["../src/ExpoMediaLibrary.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAIjE,MAAM,oBAAoB,GAAuB;IAC/C,MAAM,EAAE,gBAAgB,CAAC,YAAY;IACrC,WAAW,EAAE,IAAI;IACjB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,OAAO;CACjB,CAAC;AAEF,eAAe;IACb,IAAI,oBAAoB;QACtB,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,IAAI,SAAS;QACX,OAAO;YACL,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,OAAO;YACd,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,SAAS;SACnB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM;QACR,OAAO;YACL,OAAO,EAAE,SAAS;YAClB,SAAS,EAAE,WAAW;YACtB,KAAK,EAAE,OAAO;YACd,MAAM,EAAE,QAAQ;YAChB,YAAY,EAAE,cAAc;YAC5B,gBAAgB,EAAE,kBAAkB;YACpC,QAAQ,EAAE,UAAU;SACrB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAC,UAAmB;QAC3C,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IACD,KAAK,CAAC,uBAAuB,CAAC,UAAmB;QAC/C,OAAO,oBAAoB,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["import { type PermissionResponse, PermissionStatus } from 'expo';\n\nimport type { MediaTypeObject, SortByObject } from './MediaLibrary';\n\nconst noPermissionResponse: PermissionResponse = {\n status: PermissionStatus.UNDETERMINED,\n canAskAgain: true,\n granted: false,\n expires: 'never',\n};\n\nexport default {\n get CHANGE_LISTENER_NAME(): string {\n return 'mediaLibraryDidChange';\n },\n get MediaType(): MediaTypeObject {\n return {\n audio: 'audio',\n photo: 'photo',\n video: 'video',\n unknown: 'unknown',\n };\n },\n get SortBy(): SortByObject {\n return {\n default: 'default',\n mediaType: 'mediaType',\n width: 'width',\n height: 'height',\n creationTime: 'creationTime',\n modificationTime: 'modificationTime',\n duration: 'duration',\n };\n },\n\n async getPermissionsAsync(_writeOnly: boolean): Promise<PermissionResponse> {\n return noPermissionResponse;\n },\n async requestPermissionsAsync(_writeOnly: boolean): Promise<PermissionResponse> {\n return noPermissionResponse;\n },\n};\n"]}
@@ -1,4 +1,5 @@
1
- import { type PermissionResponse as EXPermissionResponse, type EventSubscription } from 'expo-modules-core';
1
+ import { type PermissionResponse as EXPermissionResponse } from 'expo';
2
+ import { type EventSubscription } from 'expo-modules-core';
2
3
  export type PermissionResponse = EXPermissionResponse & {
3
4
  /**
4
5
  * Indicates if your app has access to the whole or only part of the photo library. Possible values are:
@@ -287,7 +288,8 @@ export type PagedInfo<T> = {
287
288
  };
288
289
  export type AssetRef = Asset | string;
289
290
  export type AlbumRef = Album | string;
290
- export { PermissionStatus, type PermissionExpiration, type PermissionResponse as EXPermissionResponse, type PermissionHookOptions, type EventSubscription as Subscription, } from 'expo-modules-core';
291
+ export { PermissionStatus, type PermissionExpiration, type PermissionResponse as EXPermissionResponse, type PermissionHookOptions, } from 'expo';
292
+ export { type EventSubscription as Subscription } from 'expo-modules-core';
291
293
  /**
292
294
  * Possible media types.
293
295
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MediaLibrary.d.ts","sourceRoot":"","sources":["../src/MediaLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,IAAI,oBAAoB,EAG/C,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAiB3B,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,CAAC;AAErF;;;KAGK;AACL,MAAM,MAAM,e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IAAI,GACvD,iBAAiB,CAEnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAExE;AAGD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAGD;;;;;;GAMG;AACH,wBAAsB,eAAe,iBAMpC;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,yBAAyB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9E;AAGD;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAMhF;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,OAAO,CAAC,CAclB"}
@@ -1,4 +1,5 @@
1
- import { createPermissionHook, UnavailabilityError, } from 'expo-modules-core';
1
+ import { createPermissionHook } from 'expo';
2
+ import { UnavailabilityError } from 'expo-modules-core';
2
3
  import { Platform } from 'react-native';
3
4
  import MediaLibrary from './ExpoMediaLibrary';
4
5
  const isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;
@@ -8,7 +9,8 @@ if (isExpoGo && !loggedExpoGoWarning) {
8
9
  loggedExpoGoWarning = true;
9
10
  }
10
11
  // TODO(@kitten): Remove re-exports from EMC
11
- export { PermissionStatus, } from 'expo-modules-core';
12
+ export { PermissionStatus, } from 'expo';
13
+ export {} from 'expo-modules-core';
12
14
  function arrayize(item) {
13
15
  if (Array.isArray(item)) {
14
16
  return item;
@@ -1 +1 @@
1
- {"version":3,"file":"MediaLibrary.js","sourceRoot":"","sources":["../src/MediaLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EACpB,mBAAmB,GAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,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IAEnB,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,CAAC;QACxC,MAAM,IAAI,mBAAmB,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,MAAM,IAAI,mBAAmB,CAAC,cAAc,EAAE,gDAAgD,CAAC,CAAC;IAClG,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAE7B,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,MAAM,YAAY,CAAC,qBAAqB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import {\n type PermissionResponse as EXPermissionResponse,\n createPermissionHook,\n UnavailabilityError,\n type EventSubscription,\n} from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport MediaLibrary from './ExpoMediaLibrary';\n\nconst isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\nlet loggedExpoGoWarning = false;\n\nif (isExpoGo && !loggedExpoGoWarning) {\n console.warn(\n 'Due to changes in Androids permission requirements, Expo Go can no longer provide full access to the media library. To test the full functionality of this module, you can create a development build. https://docs.expo.dev/develop/development-builds/create-a-build'\n );\n loggedExpoGoWarning = true;\n}\n\n// @needsAudit\nexport type PermissionResponse = EXPermissionResponse & {\n /**\n * Indicates if your app has access to the whole or only part of the photo library. Possible values are:\n * - `'all'` if the user granted your app access to the whole photo library\n * - `'limited'` if the user granted your app access only to selected photos (only available on Android API 14+ and iOS 14.0+)\n * - `'none'` if user denied or hasn't yet granted the permission\n */\n accessPrivileges?: 'all' | 'limited' | 'none';\n};\n\n/**\n * Determines the type of media that the app will ask the OS to get access to.\n * @platform android 13+\n */\nexport type GranularPermission = 'audio' | 'photo' | 'video';\n\nexport type MediaTypeValue = 'audio' | 'photo' | 'video' | 'unknown' | 'pairedVideo';\n\n/**\n * Represents the possible types of media that the app will ask the OS to get access to when calling [`presentPermissionsPickerAsync()`](#medialibrarypresentpermissionspickerasyncmediatypes).\n * @platform android 14+\n * */\nexport type MediaTypeFilter = 'photo' | 'video';\n\nexport type SortByKey =\n | 'default'\n | 'mediaType'\n | 'width'\n | 'height'\n | 'creationTime'\n | 'modificationTime'\n | 'duration';\nexport type SortByValue = [SortByKey, boolean] | SortByKey;\n\ntype InternalSortByValue = `${SortByKey} ${'ASC' | 'DESC'}`;\n\nexport type MediaTypeObject = {\n audio: 'audio';\n photo: 'photo';\n video: 'video';\n unknown: 'unknown';\n};\n\nexport type SortByObject = {\n default: 'default';\n mediaType: 'mediaType';\n width: 'width';\n height: 'height';\n creationTime: 'creationTime';\n modificationTime: 'modificationTime';\n duration: 'duration';\n};\n\n// @needsAudit\nexport type Asset = {\n /**\n * Internal ID that represents an asset.\n */\n id: string;\n /**\n * Filename of the asset.\n */\n filename: string;\n /**\n * URI that points to the asset. `ph://*` (iOS), `file://*` (Android)\n */\n uri: string;\n /**\n * Media type.\n */\n mediaType: MediaTypeValue;\n /**\n * An array of media subtypes.\n * @platform ios\n */\n mediaSubtypes?: MediaSubtype[];\n /**\n * Width of the image or video.\n */\n width: number;\n /**\n * Height of the image or video.\n */\n height: number;\n /**\n * File creation timestamp.\n */\n creationTime: number;\n /**\n * Last modification timestamp.\n */\n modificationTime: number;\n /**\n * Duration of the video or audio asset in seconds.\n */\n duration: number;\n /**\n * Album ID that the asset belongs to.\n * @platform android\n */\n albumId?: string;\n};\n\n// @needsAudit\nexport type AssetInfo = Asset & {\n /**\n * Local URI for the asset.\n */\n localUri?: string;\n /**\n * GPS location if available.\n */\n location?: Location;\n /**\n * EXIF metadata associated with the image.\n */\n exif?: object;\n /**\n * Whether the asset is marked as favorite.\n * @platform ios\n */\n isFavorite?: boolean;\n /**\n * This field is available only if flag `shouldDownloadFromNetwork` is set to `false`.\n * Whether the asset is stored on the network (iCloud on iOS).\n * @platform ios\n */\n isNetworkAsset?: boolean; //iOS only\n /**\n * Display orientation of the image. Orientation is available only for assets whose\n * `mediaType` is `MediaType.photo`. Value will range from 1 to 8, see [EXIF orientation specification](http://sylvana.net/jpegcrop/exif_orientation.html)\n * for more details.\n * @platform ios\n */\n orientation?: number;\n /**\n * Contains information about the video paired with the image file.\n * This field is available if the `mediaType` is `\"photo\"`, and the `mediaSubtypes` includes `\"livePhoto\"`.\n * @platform ios\n */\n pairedVideoAsset?: Asset | null;\n};\n\n/**\n * Constants identifying specific variations of asset media, such as panorama or screenshot photos,\n * and time-lapse or high-frame-rate video. Maps to [`PHAssetMediaSubtype`](https://developer.apple.com/documentation/photokit/phassetmediasubtype#1603888).\n * @platform ios\n * */\nexport type MediaSubtype =\n | 'depthEffect'\n | 'hdr'\n | 'highFrameRate'\n | 'livePhoto'\n | 'panorama'\n | 'screenshot'\n | 'stream'\n | 'timelapse'\n | 'spatialMedia'\n | 'videoCinematic';\n\n// @needsAudit\nexport type MediaLibraryAssetInfoQueryOptions = {\n /**\n * Whether allow the asset to be downloaded from network. Only available in iOS with iCloud assets.\n * @default true\n */\n shouldDownloadFromNetwork?: boolean;\n};\n\n// @needsAudit\nexport type MediaLibraryAssetsChangeEvent = {\n /**\n * Whether the media library's changes could be described as \"incremental changes\".\n * `true` indicates the changes are described by the `insertedAssets`, `deletedAssets` and\n * `updatedAssets` values. `false` indicates that the scope of changes is too large and you\n * should perform a full assets reload (eg. a user has changed access to individual assets in the\n * media library).\n */\n hasIncrementalChanges: boolean;\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been inserted to the library.\n */\n insertedAssets?: Asset[];\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been deleted from the library.\n */\n deletedAssets?: Asset[];\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been updated or completed downloading from network\n * storage (iCloud on iOS).\n */\n updatedAssets?: Asset[];\n};\n\n// @docsMissing\nexport type Location = {\n latitude: number;\n longitude: number;\n};\n\n// @needsAudit\nexport type Album = {\n /**\n * Album ID.\n */\n id: string;\n /**\n * Album title.\n */\n title: string;\n /**\n * Estimated number of assets in the album.\n */\n assetCount: number;\n /**\n * The type of the assets album.\n * @platform ios\n */\n type?: AlbumType;\n /**\n * Apply only to albums whose type is `'moment'`. Earliest creation timestamp of all\n * assets in the moment.\n * @platform ios\n */\n startTime: number;\n /**\n * Apply only to albums whose type is `'moment'`. Latest creation timestamp of all\n * assets in the moment.\n * @platform ios\n */\n endTime: number;\n /**\n * Apply only to albums whose type is `'moment'`. Approximated location of all\n * assets in the moment.\n * @platform ios\n */\n approximateLocation?: Location;\n /**\n * Apply only to albums whose type is `'moment'`. Names of locations grouped\n * in the moment.\n * @platform ios\n */\n locationNames?: string[];\n};\n\n// @docsMissing\nexport type AlbumType = 'album' | 'moment' | 'smartAlbum';\n\n// @docsMissing\nexport type AlbumsOptions = {\n includeSmartAlbums?: boolean;\n};\n\n// @needsAudit\nexport type AssetsOptions = {\n /**\n * The maximum number of items on a single page.\n * @default 20\n */\n first?: number;\n /**\n * Asset ID of the last item returned on the previous page. To get the ID of the next page,\n * pass [`endCursor`](#pagedinfo) as its value.\n */\n after?: AssetRef;\n /**\n * [Album](#album) or its ID to get assets from specific album.\n */\n album?: AlbumRef;\n /**\n * An array of [`SortByValue`](#sortbyvalue)s or a single `SortByValue` value. By default, all\n * keys are sorted in descending order, however you can also pass a pair `[key, ascending]` where\n * the second item is a `boolean` value that means whether to use ascending order. Note that if\n * the `SortBy.default` key is used, then `ascending` argument will not matter. Earlier items have\n * higher priority when sorting out the results.\n * If empty, this method uses the default sorting that is provided by the platform.\n */\n sortBy?: SortByValue[] | SortByValue;\n /**\n * An array of [MediaTypeValue](#mediatypevalue)s or a single `MediaTypeValue`.\n * @default MediaType.photo\n */\n mediaType?: MediaTypeValue[] | MediaTypeValue;\n /**\n * An array of [MediaSubtype](#mediasubtype)s or a single `MediaSubtype`.\n * @platform ios\n */\n mediaSubtypes?: MediaSubtype[] | MediaSubtype;\n /**\n * `Date` object or Unix timestamp in milliseconds limiting returned assets only to those that\n * were created after this date.\n */\n createdAfter?: Date | number;\n /**\n * Similarly as `createdAfter`, but limits assets only to those that were created before specified\n * date.\n */\n createdBefore?: Date | number;\n /**\n * Whether to resolve full info for the assets during the query.\n * This is useful to get the full EXIF data for images. It can fix the orientation of the image.\n * @default false\n * @platform android\n */\n resolveWithFullInfo?: boolean;\n};\n\n// @needsAudit\nexport type PagedInfo<T> = {\n /**\n * A page of [`Asset`](#asset)s fetched by the query.\n */\n assets: T[];\n /**\n * A marker that indicates where the next page of results should start.\n * On iOS, it is the ID of the last fetched asset.\n * On Android, it is the index of the last fetched asset in the query results.\n * This value should be passed as the `after` option to load the next page.\n */\n endCursor: string;\n /**\n * Whether there are more assets to fetch.\n */\n hasNextPage: boolean;\n /**\n * Estimated total number of assets that match the query.\n */\n totalCount: number;\n};\n\n// @docsMissing\nexport type AssetRef = Asset | string;\n\n// @docsMissing\nexport type AlbumRef = Album | string;\n\n// TODO(@kitten): Remove re-exports from EMC\nexport {\n PermissionStatus,\n type PermissionExpiration,\n type PermissionResponse as EXPermissionResponse,\n type PermissionHookOptions,\n type EventSubscription as Subscription,\n} from 'expo-modules-core';\n\nfunction arrayize<T>(item: T | T[]): T[] {\n if (Array.isArray(item)) {\n return item;\n }\n return item ? [item] : [];\n}\n\nfunction getId(ref: string | undefined | { id?: string }): string | undefined {\n if (typeof ref === 'string') {\n return ref;\n }\n return ref ? ref.id : undefined;\n}\n\nfunction checkAssetIds(assetIds: unknown[]): asserts assetIds is string[] {\n if (assetIds.some((id) => !id || typeof id !== 'string')) {\n throw new Error('Asset ID must be a string!');\n }\n}\n\nfunction checkAlbumIds(albumIds: unknown[]): asserts albumIds is string[] {\n if (albumIds.some((id) => !id || typeof id !== 'string')) {\n throw new Error('Album ID must be a string!');\n }\n}\n\nfunction checkMediaType(mediaType: unknown): asserts mediaType is keyof MediaTypeObject {\n if (Object.values(MediaType).indexOf(mediaType as any) === -1) {\n throw new Error(`Invalid mediaType: ${mediaType}`);\n }\n}\n\nfunction checkSortBy(sortBy: unknown): asserts sortBy is SortByValue {\n if (Array.isArray(sortBy)) {\n checkSortByKey(sortBy[0]);\n\n if (typeof sortBy[1] !== 'boolean') {\n throw new Error('Invalid sortBy array argument. Second item must be a boolean!');\n }\n } else {\n checkSortByKey(sortBy);\n }\n}\n\nfunction checkSortByKey(sortBy: any): void {\n if (Object.values(SortBy).indexOf(sortBy) === -1) {\n throw new Error(`Invalid sortBy key: ${sortBy}`);\n }\n}\n\nfunction sortByOptionToString(sortBy: SortByValue | undefined): InternalSortByValue {\n checkSortBy(sortBy);\n if (Array.isArray(sortBy)) {\n return `${sortBy[0]} ${sortBy[1] ? 'ASC' : 'DESC'}`;\n }\n return `${sortBy} DESC`;\n}\n\nfunction dateToNumber(value?: Date | number): number | undefined {\n return value instanceof Date ? value.getTime() : value;\n}\n\n// @needsAudit\n/**\n * Possible media types.\n */\nexport const MediaType: MediaTypeObject = MediaLibrary.MediaType;\n\n// @needsAudit\n/**\n * Supported keys that can be used to sort `getAssetsAsync` results.\n */\nexport const SortBy: SortByObject = MediaLibrary.SortBy;\n\n// @needsAudit\n/**\n * Returns whether the Media Library API is enabled on the current device.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @return A promise which fulfils with a `boolean`, indicating whether the Media Library API is\n * available on the current device.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n return !!MediaLibrary && 'getAssetsAsync' in MediaLibrary;\n}\n\n// @needsAudit @docsMissing\n/**\n * Asks the user to grant permissions for accessing media in user's media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `requestPermissionsAsync()` from `expo-media-library/next` instead.\n * @param writeOnly\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has an\n * effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n *\n * > When using granular permissions with a custom config plugin configuration, make sure that all the requested permissions are included in the plugin.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function requestPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!MediaLibrary.requestPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'requestPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await MediaLibrary.requestPermissionsAsync(writeOnly, granularPermissions);\n }\n return await MediaLibrary.requestPermissionsAsync(writeOnly);\n}\n\n// @needsAudit @docsMissing\n/**\n * Checks user's permissions for accessing media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `getPermissionsAsync()` from `expo-media-library/next` instead.\n * @param writeOnly\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has\n * an effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function getPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!MediaLibrary.getPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await MediaLibrary.getPermissionsAsync(writeOnly, granularPermissions);\n }\n return await MediaLibrary.getPermissionsAsync(writeOnly);\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `usePermissions` from `expo-media-library/next` instead.\n *\n * @example\n * ```ts\n * const [permissionResponse, requestPermission] = MediaLibrary.usePermissions();\n * ```\n */\nexport const usePermissions = createPermissionHook<\n PermissionResponse,\n { writeOnly?: boolean; granularPermissions?: GranularPermission[] }\n>({\n // TODO(cedric): permission requesters should have an options param or a different requester\n getMethod: (options) => getPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n requestMethod: (options) =>\n requestPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n});\n\n// @needsAudit\n/**\n * Allows the user to update the assets that your app has access to.\n * The system modal is only displayed if the user originally allowed only `limited` access to their\n * media library, otherwise this method is a no-op.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `presentPermissionsPicker()` from `expo-media-library/next` instead.\n * @param mediaTypes Limits the type(s) of media that the user will be granting access to. By default, a list that shows both photos and videos is presented.\n *\n * @return A promise that either rejects if the method is unavailable, or resolves to `void`.\n * > __Note:__ This method doesn't inform you if the user changes which assets your app has access to.\n * That information is only exposed by iOS, and to obtain it, you need to subscribe for updates to the user's media library using [`addListener()`](#medialibraryaddlistenerlistener).\n * If `hasIncrementalChanges` is `false`, the user changed their permissions.\n *\n * @platform android 14+\n * @platform ios\n */\nexport async function presentPermissionsPickerAsync(\n mediaTypes: MediaTypeFilter[] = ['photo', 'video']\n): Promise<void> {\n if (Platform.OS === 'android' && isExpoGo) {\n throw new UnavailabilityError(\n 'MediaLibrary',\n 'presentPermissionsPickerAsync is unavailable in Expo Go'\n );\n }\n if (Platform.OS === 'android' && Platform.Version >= 34) {\n await MediaLibrary.requestPermissionsAsync(false, mediaTypes);\n return;\n }\n if (!MediaLibrary.presentPermissionsPickerAsync) {\n throw new UnavailabilityError('MediaLibrary', 'presentPermissionsPickerAsync');\n }\n return await MediaLibrary.presentPermissionsPickerAsync();\n}\n\n// @needsAudit\n/**\n * Creates an asset from existing file. The most common use case is to save a picture taken by [Camera](./camera).\n * This method requires `CAMERA_ROLL` permission.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Asset.create()` from `expo-media-library/next` instead.\n *\n * @example\n * ```js\n * const { uri } = await Camera.takePictureAsync();\n * const asset = await MediaLibrary.createAssetAsync(uri);\n * ```\n * @param localUri A URI to the image or video file. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`\n *\n * @param album An [Album](#album) or its ID. If provided, the asset will be added to this album upon creation, otherwise it will be added to the default album for the media type.\n * The album has exist.\n * @return A promise which fulfils with an object representing an [`Asset`](#asset).\n */\nexport async function createAssetAsync(localUri: string, album?: AlbumRef): Promise<Asset> {\n if (!MediaLibrary.createAssetAsync) {\n throw new UnavailabilityError('MediaLibrary', 'createAssetAsync');\n }\n\n const albumId = getId(album);\n\n if (!localUri || typeof localUri !== 'string') {\n throw new Error('Invalid argument \"localUri\". It must be a string!');\n }\n const asset = await MediaLibrary.createAssetAsync(localUri, albumId);\n\n if (Array.isArray(asset)) {\n // Android returns an array with asset, we need to pick the first item\n return asset[0];\n }\n return asset;\n}\n\n// @needsAudit\n/**\n * Saves the file at given `localUri` to the user's media library. Unlike [`createAssetAsync()`](#medialibrarycreateassetasynclocaluri),\n * This method doesn't return created asset.\n * On __iOS 11+__, it's possible to use this method without asking for `CAMERA_ROLL` permission,\n * however then yours `Info.plist` should have `NSPhotoLibraryAddUsageDescription` key.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Asset.create()` from `expo-media-library/next` instead.\n * @param localUri A URI to the image or video file. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`.\n */\nexport async function saveToLibraryAsync(localUri: string): Promise<void> {\n if (!MediaLibrary.saveToLibraryAsync) {\n throw new UnavailabilityError('MediaLibrary', 'saveToLibraryAsync');\n }\n return await MediaLibrary.saveToLibraryAsync(localUri);\n}\n\n// @needsAudit\n/**\n * Adds array of assets to the album.\n *\n * On Android, by default it copies assets from the current album to provided one, however it's also\n * possible to move them by passing `false` as `copyAssets` argument. In case they're copied you\n * should keep in mind that `getAssetsAsync` will return duplicated assets.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.add()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @param album An [Album](#album) or its ID.\n * @param copy __Android only.__ Whether to copy assets to the new album instead of move them.\n * Defaults to `true`.\n * @return Returns promise which fulfils with `true` if the assets were successfully added to\n * the album.\n */\nexport async function addAssetsToAlbumAsync(\n assets: AssetRef[] | AssetRef,\n album: AlbumRef,\n copy: boolean = true\n): Promise<boolean> {\n if (!MediaLibrary.addAssetsToAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'addAssetsToAlbumAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n const albumId = getId(album);\n\n checkAssetIds(assetIds);\n\n if (!albumId || typeof albumId !== 'string') {\n throw new Error('Invalid album ID. It must be a string!');\n }\n\n if (Platform.OS === 'ios') {\n return await MediaLibrary.addAssetsToAlbumAsync(assetIds, albumId);\n }\n return await MediaLibrary.addAssetsToAlbumAsync(assetIds, albumId, !!copy);\n}\n\n// @needsAudit\n/**\n * Removes given assets from album.\n *\n * On Android, album will be automatically deleted if there are no more assets inside.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.removeAssets()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @param album An [Album](#album) or its ID.\n * @return Returns promise which fulfils with `true` if the assets were successfully removed from\n * the album.\n */\nexport async function removeAssetsFromAlbumAsync(\n assets: AssetRef[] | AssetRef,\n album: AlbumRef\n): Promise<boolean> {\n if (!MediaLibrary.removeAssetsFromAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'removeAssetsFromAlbumAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n const albumId = getId(album);\n\n checkAssetIds(assetIds);\n return await MediaLibrary.removeAssetsFromAlbumAsync(assetIds, albumId);\n}\n\n// @needsAudit\n/**\n * Deletes assets from the library. On iOS it deletes assets from all albums they belong to, while\n * on Android it keeps all copies of them (album is strictly connected to the asset). Also, there is\n * additional dialog on iOS that requires user to confirm this action.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.delete()` or `Asset.delete()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @return Returns promise which fulfils with `true` if the assets were successfully deleted.\n */\nexport async function deleteAssetsAsync(assets: AssetRef[] | AssetRef): Promise<boolean> {\n if (!MediaLibrary.deleteAssetsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'deleteAssetsAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n\n checkAssetIds(assetIds);\n return await MediaLibrary.deleteAssetsAsync(assetIds);\n}\n\n// @needsAudit\n/**\n * Provides more information about an asset, including GPS location, local URI and EXIF metadata.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.getInfo()` from `expo-media-library/next` instead.\n * For better performance, prefer using individual getters such as `asset.getLocation()` or `asset.getExif()` to fetch only the data you need.\n * @param asset An [Asset](#asset) or its ID.\n * @param options\n * @return An [AssetInfo](#assetinfo) object, which is an `Asset` extended by an additional fields.\n */\nexport async function getAssetInfoAsync(\n asset: AssetRef,\n options: MediaLibraryAssetInfoQueryOptions = { shouldDownloadFromNetwork: true }\n): Promise<AssetInfo> {\n if (!MediaLibrary.getAssetInfoAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAssetInfoAsync');\n }\n\n const assetId = getId(asset);\n\n checkAssetIds([assetId]);\n\n const assetInfo = await MediaLibrary.getAssetInfoAsync(assetId, options);\n\n if (Array.isArray(assetInfo)) {\n // Android returns an array with asset info, we need to pick the first item\n return assetInfo[0];\n }\n return assetInfo;\n}\n\n// @needsAudit\n/**\n * Queries for user-created albums in media gallery.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.getAll()` from `expo-media-library/next` instead.\n * @return A promise which fulfils with an array of [`Album`](#asset)s. Depending on Android version,\n * root directory of your storage may be listed as album titled `\"0\"` or unlisted at all.\n */\nexport async function getAlbumsAsync({ includeSmartAlbums = false }: AlbumsOptions = {}): Promise<\n Album[]\n> {\n if (!MediaLibrary.getAlbumsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAlbumsAsync');\n }\n return await MediaLibrary.getAlbumsAsync({ includeSmartAlbums });\n}\n\n// @needsAudit\n/**\n * Queries for an album with a specific name.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.get(title)` from `expo-media-library/next` instead.\n * @param title Name of the album to look for.\n * @return An object representing an [`Album`](#album), if album with given name exists, otherwise\n * returns `null`.\n */\nexport async function getAlbumAsync(title: string): Promise<Album> {\n if (!MediaLibrary.getAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAlbumAsync');\n }\n if (typeof title !== 'string') {\n throw new Error('Album title must be a string!');\n }\n return await MediaLibrary.getAlbumAsync(title);\n}\n\n// @needsAudit\n/**\n * Creates an album with given name and initial asset. The asset parameter is required on Android,\n * since it's not possible to create empty album on this platform. On Android, by default it copies\n * given asset from the current album to the new one, however it's also possible to move it by\n * passing `false` as `copyAsset` argument.\n * In case it's copied you should keep in mind that `getAssetsAsync` will return duplicated asset.\n * > On Android, it's not possible to create an empty album. You must provide an existing asset to copy or move into the album or an uri of a local file, which will be used to create an initial asset for the album.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.create()` from `expo-media-library/next` instead.\n * @param albumName Name of the album to create.\n * @param asset An [Asset](#asset) or its ID. On Android you either need to provide an asset or a localUri.\n * @param initialAssetLocalUri A URI to the local media file, which will be used to create the initial asset inside the album. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`. If the `asset` was provided, this parameter will be ignored.\n * @param copyAsset __Android Only.__ Whether to copy asset to the new album instead of move it. This parameter is ignored if `asset` was not provided.\n * Defaults to `true`.\n * @return Newly created [`Album`](#album).\n */\nexport async function createAlbumAsync(\n albumName: string,\n asset?: AssetRef,\n copyAsset: boolean = true,\n initialAssetLocalUri?: string\n): Promise<Album> {\n if (!MediaLibrary.createAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'createAlbumAsync');\n }\n\n const assetId = getId(asset);\n\n if (\n Platform.OS === 'android' &&\n (typeof assetId !== 'string' || assetId.length === 0) &&\n !initialAssetLocalUri\n ) {\n // it's not possible to create empty album on Android, so initial asset must be provided\n throw new Error(\n 'MediaLibrary.createAlbumAsync must be called with an asset or a localUri on Android.'\n );\n }\n if (!albumName || typeof albumName !== 'string') {\n throw new Error('Invalid argument \"albumName\". It must be a string!');\n }\n if (assetId != null && typeof assetId !== 'string') {\n throw new Error('Asset ID must be a string!');\n }\n\n if (Platform.OS === 'ios') {\n return await MediaLibrary.createAlbumAsync(albumName, assetId, initialAssetLocalUri);\n }\n return await MediaLibrary.createAlbumAsync(albumName, assetId, !!copyAsset, initialAssetLocalUri);\n}\n\n// @needsAudit\n/**\n * Deletes given albums from the library. On Android by default it deletes assets belonging to given\n * albums from the library. On iOS it doesn't delete these assets, however it's possible to do by\n * passing `true` as `deleteAssets`.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.delete()` or `Album.delete()` from `expo-media-library/next` instead.\n * @param albums An array of [`Album`](#asset)s or their IDs.\n * @param assetRemove __iOS Only.__ Whether to also delete assets belonging to given albums.\n * Defaults to `false`.\n * @return Returns a promise which fulfils with `true` if the albums were successfully deleted from\n * the library.\n */\nexport async function deleteAlbumsAsync(\n albums: AlbumRef[] | AlbumRef,\n assetRemove: boolean = false\n): Promise<boolean> {\n if (!MediaLibrary.deleteAlbumsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'deleteAlbumsAsync');\n }\n\n const albumIds = arrayize(albums).map(getId);\n\n checkAlbumIds(albumIds);\n if (Platform.OS === 'android') {\n return await MediaLibrary.deleteAlbumsAsync(albumIds);\n }\n return await MediaLibrary.deleteAlbumsAsync(albumIds, !!assetRemove);\n}\n\n// @needsAudit\n/**\n * Fetches a page of assets matching the provided criteria.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use the `Query` class from `expo-media-library/next` instead.\n * @param assetsOptions\n * @return A promise that fulfils with to [`PagedInfo`](#pagedinfo) object with array of [`Asset`](#asset)s.\n */\nexport async function getAssetsAsync(assetsOptions: AssetsOptions = {}): Promise<PagedInfo<Asset>> {\n if (!MediaLibrary.getAssetsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAssetsAsync');\n }\n\n const {\n first,\n after,\n album,\n sortBy,\n mediaType,\n createdAfter,\n createdBefore,\n mediaSubtypes,\n resolveWithFullInfo,\n } = assetsOptions;\n\n const options = {\n first: first == null ? 20 : first,\n after: getId(after),\n album: getId(album),\n sortBy: arrayize(sortBy),\n mediaType: arrayize(mediaType || [MediaType.photo]),\n mediaSubtypes: arrayize(mediaSubtypes),\n createdAfter: dateToNumber(createdAfter),\n createdBefore: dateToNumber(createdBefore),\n resolveWithFullInfo: resolveWithFullInfo ?? false,\n };\n\n if (first != null && typeof options.first !== 'number') {\n throw new Error('Option \"first\" must be a number!');\n }\n if (after != null && typeof options.after !== 'string') {\n throw new Error('Option \"after\" must be a string!');\n }\n if (album != null && typeof options.album !== 'string') {\n throw new Error('Option \"album\" must be a string!');\n }\n if (after != null && Platform.OS === 'android' && isNaN(parseInt(getId(after) as string, 10))) {\n throw new Error('Option \"after\" must be a valid ID!');\n }\n if (first != null && first < 0) {\n throw new Error('Option \"first\" must be a positive integer!');\n }\n\n options.mediaType.forEach(checkMediaType);\n // TODO(@kitten): Add expected native types for `MediaLibrary`\n return await MediaLibrary.getAssetsAsync({\n ...options,\n sortBy: options.sortBy.map(sortByOptionToString),\n });\n}\n\n// @needsAudit\n/**\n * Subscribes for updates in user's media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `addListener()` from `expo-media-library/next` instead.\n * @param listener A callback that is fired when any assets have been inserted or deleted from the\n * library. On Android it's invoked with an empty object. On iOS, it's invoked with [`MediaLibraryAssetsChangeEvent`](#medialibraryassetschangeevent)\n * object.\n *\n * Additionally, only on iOS, the listener is also invoked when the user changes access to individual assets in the media library\n * using `presentPermissionsPickerAsync()`.\n * @return An [`Subscription`](#subscription) object that you can call `remove()` on when you would\n * like to unsubscribe the listener.\n */\nexport function addListener(\n listener: (event: MediaLibraryAssetsChangeEvent) => void\n): EventSubscription {\n return MediaLibrary.addListener(MediaLibrary.CHANGE_LISTENER_NAME, listener);\n}\n\n/**\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `subscription.remove()` instead.\n */\nexport function removeSubscription(subscription: EventSubscription): void {\n subscription.remove();\n}\n\n// @needsAudit\n/**\n * Removes all listeners.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `removeAllListeners()` from `expo-media-library/next` instead.\n */\nexport function removeAllListeners(): void {\n MediaLibrary.removeAllListeners(MediaLibrary.CHANGE_LISTENER_NAME);\n}\n\n// @needsAudit\n/**\n * Fetches a list of moments, which is a group of assets taken around the same place\n * and time.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @return An array of [albums](#album) whose type is `moment`.\n * @platform ios\n */\nexport async function getMomentsAsync() {\n if (!MediaLibrary.getMomentsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getMomentsAsync');\n }\n\n return await MediaLibrary.getMomentsAsync();\n}\n\n// @needsAudit\n/**\n * Moves album content to the special media directories on **Android R** or **above** if needed.\n * Those new locations are in line with the Android `scoped storage` - so your application won't\n * lose write permission to those directories in the future.\n *\n * This method does nothing if:\n * - app is running on **iOS**, **web** or **Android below R**\n * - app has **write permission** to the album folder\n *\n * The migration is possible when the album contains only compatible files types.\n * For instance, movies and pictures are compatible with each other, but music and pictures are not.\n * If automatic migration isn't possible, the function rejects.\n * In that case, you can use methods from the `expo-file-system` to migrate all your files manually.\n *\n * # Why do you need to migrate files?\n * __Android R__ introduced a lot of changes in the storage system. Now applications can't save\n * anything to the root directory. The only available locations are from the `MediaStore` API.\n * Unfortunately, the media library stored albums in folders for which, because of those changes,\n * the application doesn't have permissions anymore. However, it doesn't mean you need to migrate\n * all your albums. If your application doesn't add assets to albums, you don't have to migrate.\n * Everything will work as it used to. You can read more about scoped storage in [the Android documentation](https://developer.android.com/about/versions/11/privacy/storage).\n *\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @param album An [Album](#album) or its ID.\n * @return A promise which fulfils to `void`.\n */\nexport async function migrateAlbumIfNeededAsync(album: AlbumRef): Promise<void> {\n if (!MediaLibrary.migrateAlbumIfNeededAsync) {\n return;\n }\n\n return await MediaLibrary.migrateAlbumIfNeededAsync(getId(album));\n}\n\n// @needsAudit\n/**\n * Checks if the album should be migrated to a different location. In other words, it checks if the\n * application has the write permission to the album folder. If not, it returns `true`, otherwise `false`.\n * > Note: For **Android below R**, **web** or **iOS**, this function always returns `false`.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @param album An [Album](#album) or its ID.\n * @return Returns a promise which fulfils with `true` if the album should be migrated.\n */\nexport async function albumNeedsMigrationAsync(album: AlbumRef): Promise<boolean> {\n if (!MediaLibrary.albumNeedsMigrationAsync) {\n return false;\n }\n\n return await MediaLibrary.albumNeedsMigrationAsync(getId(album));\n}\n\n/**\n * On iOS, this adds or removes the asset from the system \"Favorites\" smart album.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.setFavorite()` from `expo-media-library/next` instead.\n * @param asset An [Asset](#asset) or its ID.\n * @param isFavorite Whether the asset should be marked as favorite.\n * @platform ios\n * @return Returns a promise which fulfils with `true` if the operation was successful.\n */\nexport async function setAssetFavoriteAsync(\n asset: AssetRef,\n isFavorite: boolean\n): Promise<boolean> {\n if (!MediaLibrary.setAssetFavoriteAsync) {\n throw new UnavailabilityError('MediaLibrary', 'setAssetFavoriteAsync');\n }\n\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'setAssetFavoriteAsync is only available on iOS');\n }\n\n const assetId = getId(asset);\n\n checkAssetIds([assetId]);\n\n return await MediaLibrary.setAssetFavoriteAsync(assetId, isFavorite);\n}\n"]}
1
+ {"version":3,"file":"MediaLibrary.js","sourceRoot":"","sources":["../src/MediaLibrary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,oBAAoB,EAAE,MAAM,MAAM,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAA0B,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C,MAAM,QAAQ,GAAG,OAAO,IAAI,KAAK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IAAI,mBAAmB,CAAC,cAAc,EAAE,uBAAuB,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,MAAM,IAAI,mBAAmB,CAAC,cAAc,EAAE,gDAAgD,CAAC,CAAC;IAClG,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAE7B,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAEzB,OAAO,MAAM,YAAY,CAAC,qBAAqB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { type PermissionResponse as EXPermissionResponse, createPermissionHook } from 'expo';\nimport { UnavailabilityError, type EventSubscription } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport MediaLibrary from './ExpoMediaLibrary';\n\nconst isExpoGo = typeof expo !== 'undefined' && globalThis.expo?.modules?.ExpoGo;\n\nlet loggedExpoGoWarning = false;\n\nif (isExpoGo && !loggedExpoGoWarning) {\n console.warn(\n 'Due to changes in Androids permission requirements, Expo Go can no longer provide full access to the media library. To test the full functionality of this module, you can create a development build. https://docs.expo.dev/develop/development-builds/create-a-build'\n );\n loggedExpoGoWarning = true;\n}\n\n// @needsAudit\nexport type PermissionResponse = EXPermissionResponse & {\n /**\n * Indicates if your app has access to the whole or only part of the photo library. Possible values are:\n * - `'all'` if the user granted your app access to the whole photo library\n * - `'limited'` if the user granted your app access only to selected photos (only available on Android API 14+ and iOS 14.0+)\n * - `'none'` if user denied or hasn't yet granted the permission\n */\n accessPrivileges?: 'all' | 'limited' | 'none';\n};\n\n/**\n * Determines the type of media that the app will ask the OS to get access to.\n * @platform android 13+\n */\nexport type GranularPermission = 'audio' | 'photo' | 'video';\n\nexport type MediaTypeValue = 'audio' | 'photo' | 'video' | 'unknown' | 'pairedVideo';\n\n/**\n * Represents the possible types of media that the app will ask the OS to get access to when calling [`presentPermissionsPickerAsync()`](#medialibrarypresentpermissionspickerasyncmediatypes).\n * @platform android 14+\n * */\nexport type MediaTypeFilter = 'photo' | 'video';\n\nexport type SortByKey =\n | 'default'\n | 'mediaType'\n | 'width'\n | 'height'\n | 'creationTime'\n | 'modificationTime'\n | 'duration';\nexport type SortByValue = [SortByKey, boolean] | SortByKey;\n\ntype InternalSortByValue = `${SortByKey} ${'ASC' | 'DESC'}`;\n\nexport type MediaTypeObject = {\n audio: 'audio';\n photo: 'photo';\n video: 'video';\n unknown: 'unknown';\n};\n\nexport type SortByObject = {\n default: 'default';\n mediaType: 'mediaType';\n width: 'width';\n height: 'height';\n creationTime: 'creationTime';\n modificationTime: 'modificationTime';\n duration: 'duration';\n};\n\n// @needsAudit\nexport type Asset = {\n /**\n * Internal ID that represents an asset.\n */\n id: string;\n /**\n * Filename of the asset.\n */\n filename: string;\n /**\n * URI that points to the asset. `ph://*` (iOS), `file://*` (Android)\n */\n uri: string;\n /**\n * Media type.\n */\n mediaType: MediaTypeValue;\n /**\n * An array of media subtypes.\n * @platform ios\n */\n mediaSubtypes?: MediaSubtype[];\n /**\n * Width of the image or video.\n */\n width: number;\n /**\n * Height of the image or video.\n */\n height: number;\n /**\n * File creation timestamp.\n */\n creationTime: number;\n /**\n * Last modification timestamp.\n */\n modificationTime: number;\n /**\n * Duration of the video or audio asset in seconds.\n */\n duration: number;\n /**\n * Album ID that the asset belongs to.\n * @platform android\n */\n albumId?: string;\n};\n\n// @needsAudit\nexport type AssetInfo = Asset & {\n /**\n * Local URI for the asset.\n */\n localUri?: string;\n /**\n * GPS location if available.\n */\n location?: Location;\n /**\n * EXIF metadata associated with the image.\n */\n exif?: object;\n /**\n * Whether the asset is marked as favorite.\n * @platform ios\n */\n isFavorite?: boolean;\n /**\n * This field is available only if flag `shouldDownloadFromNetwork` is set to `false`.\n * Whether the asset is stored on the network (iCloud on iOS).\n * @platform ios\n */\n isNetworkAsset?: boolean; //iOS only\n /**\n * Display orientation of the image. Orientation is available only for assets whose\n * `mediaType` is `MediaType.photo`. Value will range from 1 to 8, see [EXIF orientation specification](http://sylvana.net/jpegcrop/exif_orientation.html)\n * for more details.\n * @platform ios\n */\n orientation?: number;\n /**\n * Contains information about the video paired with the image file.\n * This field is available if the `mediaType` is `\"photo\"`, and the `mediaSubtypes` includes `\"livePhoto\"`.\n * @platform ios\n */\n pairedVideoAsset?: Asset | null;\n};\n\n/**\n * Constants identifying specific variations of asset media, such as panorama or screenshot photos,\n * and time-lapse or high-frame-rate video. Maps to [`PHAssetMediaSubtype`](https://developer.apple.com/documentation/photokit/phassetmediasubtype#1603888).\n * @platform ios\n * */\nexport type MediaSubtype =\n | 'depthEffect'\n | 'hdr'\n | 'highFrameRate'\n | 'livePhoto'\n | 'panorama'\n | 'screenshot'\n | 'stream'\n | 'timelapse'\n | 'spatialMedia'\n | 'videoCinematic';\n\n// @needsAudit\nexport type MediaLibraryAssetInfoQueryOptions = {\n /**\n * Whether allow the asset to be downloaded from network. Only available in iOS with iCloud assets.\n * @default true\n */\n shouldDownloadFromNetwork?: boolean;\n};\n\n// @needsAudit\nexport type MediaLibraryAssetsChangeEvent = {\n /**\n * Whether the media library's changes could be described as \"incremental changes\".\n * `true` indicates the changes are described by the `insertedAssets`, `deletedAssets` and\n * `updatedAssets` values. `false` indicates that the scope of changes is too large and you\n * should perform a full assets reload (eg. a user has changed access to individual assets in the\n * media library).\n */\n hasIncrementalChanges: boolean;\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been inserted to the library.\n */\n insertedAssets?: Asset[];\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been deleted from the library.\n */\n deletedAssets?: Asset[];\n /**\n * Available only if `hasIncrementalChanges` is `true`.\n * Array of [`Asset`](#asset)s that have been updated or completed downloading from network\n * storage (iCloud on iOS).\n */\n updatedAssets?: Asset[];\n};\n\n// @docsMissing\nexport type Location = {\n latitude: number;\n longitude: number;\n};\n\n// @needsAudit\nexport type Album = {\n /**\n * Album ID.\n */\n id: string;\n /**\n * Album title.\n */\n title: string;\n /**\n * Estimated number of assets in the album.\n */\n assetCount: number;\n /**\n * The type of the assets album.\n * @platform ios\n */\n type?: AlbumType;\n /**\n * Apply only to albums whose type is `'moment'`. Earliest creation timestamp of all\n * assets in the moment.\n * @platform ios\n */\n startTime: number;\n /**\n * Apply only to albums whose type is `'moment'`. Latest creation timestamp of all\n * assets in the moment.\n * @platform ios\n */\n endTime: number;\n /**\n * Apply only to albums whose type is `'moment'`. Approximated location of all\n * assets in the moment.\n * @platform ios\n */\n approximateLocation?: Location;\n /**\n * Apply only to albums whose type is `'moment'`. Names of locations grouped\n * in the moment.\n * @platform ios\n */\n locationNames?: string[];\n};\n\n// @docsMissing\nexport type AlbumType = 'album' | 'moment' | 'smartAlbum';\n\n// @docsMissing\nexport type AlbumsOptions = {\n includeSmartAlbums?: boolean;\n};\n\n// @needsAudit\nexport type AssetsOptions = {\n /**\n * The maximum number of items on a single page.\n * @default 20\n */\n first?: number;\n /**\n * Asset ID of the last item returned on the previous page. To get the ID of the next page,\n * pass [`endCursor`](#pagedinfo) as its value.\n */\n after?: AssetRef;\n /**\n * [Album](#album) or its ID to get assets from specific album.\n */\n album?: AlbumRef;\n /**\n * An array of [`SortByValue`](#sortbyvalue)s or a single `SortByValue` value. By default, all\n * keys are sorted in descending order, however you can also pass a pair `[key, ascending]` where\n * the second item is a `boolean` value that means whether to use ascending order. Note that if\n * the `SortBy.default` key is used, then `ascending` argument will not matter. Earlier items have\n * higher priority when sorting out the results.\n * If empty, this method uses the default sorting that is provided by the platform.\n */\n sortBy?: SortByValue[] | SortByValue;\n /**\n * An array of [MediaTypeValue](#mediatypevalue)s or a single `MediaTypeValue`.\n * @default MediaType.photo\n */\n mediaType?: MediaTypeValue[] | MediaTypeValue;\n /**\n * An array of [MediaSubtype](#mediasubtype)s or a single `MediaSubtype`.\n * @platform ios\n */\n mediaSubtypes?: MediaSubtype[] | MediaSubtype;\n /**\n * `Date` object or Unix timestamp in milliseconds limiting returned assets only to those that\n * were created after this date.\n */\n createdAfter?: Date | number;\n /**\n * Similarly as `createdAfter`, but limits assets only to those that were created before specified\n * date.\n */\n createdBefore?: Date | number;\n /**\n * Whether to resolve full info for the assets during the query.\n * This is useful to get the full EXIF data for images. It can fix the orientation of the image.\n * @default false\n * @platform android\n */\n resolveWithFullInfo?: boolean;\n};\n\n// @needsAudit\nexport type PagedInfo<T> = {\n /**\n * A page of [`Asset`](#asset)s fetched by the query.\n */\n assets: T[];\n /**\n * A marker that indicates where the next page of results should start.\n * On iOS, it is the ID of the last fetched asset.\n * On Android, it is the index of the last fetched asset in the query results.\n * This value should be passed as the `after` option to load the next page.\n */\n endCursor: string;\n /**\n * Whether there are more assets to fetch.\n */\n hasNextPage: boolean;\n /**\n * Estimated total number of assets that match the query.\n */\n totalCount: number;\n};\n\n// @docsMissing\nexport type AssetRef = Asset | string;\n\n// @docsMissing\nexport type AlbumRef = Album | string;\n\n// TODO(@kitten): Remove re-exports from EMC\nexport {\n PermissionStatus,\n type PermissionExpiration,\n type PermissionResponse as EXPermissionResponse,\n type PermissionHookOptions,\n} from 'expo';\nexport { type EventSubscription as Subscription } from 'expo-modules-core';\n\nfunction arrayize<T>(item: T | T[]): T[] {\n if (Array.isArray(item)) {\n return item;\n }\n return item ? [item] : [];\n}\n\nfunction getId(ref: string | undefined | { id?: string }): string | undefined {\n if (typeof ref === 'string') {\n return ref;\n }\n return ref ? ref.id : undefined;\n}\n\nfunction checkAssetIds(assetIds: unknown[]): asserts assetIds is string[] {\n if (assetIds.some((id) => !id || typeof id !== 'string')) {\n throw new Error('Asset ID must be a string!');\n }\n}\n\nfunction checkAlbumIds(albumIds: unknown[]): asserts albumIds is string[] {\n if (albumIds.some((id) => !id || typeof id !== 'string')) {\n throw new Error('Album ID must be a string!');\n }\n}\n\nfunction checkMediaType(mediaType: unknown): asserts mediaType is keyof MediaTypeObject {\n if (Object.values(MediaType).indexOf(mediaType as any) === -1) {\n throw new Error(`Invalid mediaType: ${mediaType}`);\n }\n}\n\nfunction checkSortBy(sortBy: unknown): asserts sortBy is SortByValue {\n if (Array.isArray(sortBy)) {\n checkSortByKey(sortBy[0]);\n\n if (typeof sortBy[1] !== 'boolean') {\n throw new Error('Invalid sortBy array argument. Second item must be a boolean!');\n }\n } else {\n checkSortByKey(sortBy);\n }\n}\n\nfunction checkSortByKey(sortBy: any): void {\n if (Object.values(SortBy).indexOf(sortBy) === -1) {\n throw new Error(`Invalid sortBy key: ${sortBy}`);\n }\n}\n\nfunction sortByOptionToString(sortBy: SortByValue | undefined): InternalSortByValue {\n checkSortBy(sortBy);\n if (Array.isArray(sortBy)) {\n return `${sortBy[0]} ${sortBy[1] ? 'ASC' : 'DESC'}`;\n }\n return `${sortBy} DESC`;\n}\n\nfunction dateToNumber(value?: Date | number): number | undefined {\n return value instanceof Date ? value.getTime() : value;\n}\n\n// @needsAudit\n/**\n * Possible media types.\n */\nexport const MediaType: MediaTypeObject = MediaLibrary.MediaType;\n\n// @needsAudit\n/**\n * Supported keys that can be used to sort `getAssetsAsync` results.\n */\nexport const SortBy: SortByObject = MediaLibrary.SortBy;\n\n// @needsAudit\n/**\n * Returns whether the Media Library API is enabled on the current device.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @return A promise which fulfils with a `boolean`, indicating whether the Media Library API is\n * available on the current device.\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n return !!MediaLibrary && 'getAssetsAsync' in MediaLibrary;\n}\n\n// @needsAudit @docsMissing\n/**\n * Asks the user to grant permissions for accessing media in user's media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `requestPermissionsAsync()` from `expo-media-library/next` instead.\n * @param writeOnly\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has an\n * effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n *\n * > When using granular permissions with a custom config plugin configuration, make sure that all the requested permissions are included in the plugin.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function requestPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!MediaLibrary.requestPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'requestPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await MediaLibrary.requestPermissionsAsync(writeOnly, granularPermissions);\n }\n return await MediaLibrary.requestPermissionsAsync(writeOnly);\n}\n\n// @needsAudit @docsMissing\n/**\n * Checks user's permissions for accessing media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `getPermissionsAsync()` from `expo-media-library/next` instead.\n * @param writeOnly\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has\n * an effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function getPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!MediaLibrary.getPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await MediaLibrary.getPermissionsAsync(writeOnly, granularPermissions);\n }\n return await MediaLibrary.getPermissionsAsync(writeOnly);\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `usePermissions` from `expo-media-library/next` instead.\n *\n * @example\n * ```ts\n * const [permissionResponse, requestPermission] = MediaLibrary.usePermissions();\n * ```\n */\nexport const usePermissions = createPermissionHook<\n PermissionResponse,\n { writeOnly?: boolean; granularPermissions?: GranularPermission[] }\n>({\n // TODO(cedric): permission requesters should have an options param or a different requester\n getMethod: (options) => getPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n requestMethod: (options) =>\n requestPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n});\n\n// @needsAudit\n/**\n * Allows the user to update the assets that your app has access to.\n * The system modal is only displayed if the user originally allowed only `limited` access to their\n * media library, otherwise this method is a no-op.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `presentPermissionsPicker()` from `expo-media-library/next` instead.\n * @param mediaTypes Limits the type(s) of media that the user will be granting access to. By default, a list that shows both photos and videos is presented.\n *\n * @return A promise that either rejects if the method is unavailable, or resolves to `void`.\n * > __Note:__ This method doesn't inform you if the user changes which assets your app has access to.\n * That information is only exposed by iOS, and to obtain it, you need to subscribe for updates to the user's media library using [`addListener()`](#medialibraryaddlistenerlistener).\n * If `hasIncrementalChanges` is `false`, the user changed their permissions.\n *\n * @platform android 14+\n * @platform ios\n */\nexport async function presentPermissionsPickerAsync(\n mediaTypes: MediaTypeFilter[] = ['photo', 'video']\n): Promise<void> {\n if (Platform.OS === 'android' && isExpoGo) {\n throw new UnavailabilityError(\n 'MediaLibrary',\n 'presentPermissionsPickerAsync is unavailable in Expo Go'\n );\n }\n if (Platform.OS === 'android' && Platform.Version >= 34) {\n await MediaLibrary.requestPermissionsAsync(false, mediaTypes);\n return;\n }\n if (!MediaLibrary.presentPermissionsPickerAsync) {\n throw new UnavailabilityError('MediaLibrary', 'presentPermissionsPickerAsync');\n }\n return await MediaLibrary.presentPermissionsPickerAsync();\n}\n\n// @needsAudit\n/**\n * Creates an asset from existing file. The most common use case is to save a picture taken by [Camera](./camera).\n * This method requires `CAMERA_ROLL` permission.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Asset.create()` from `expo-media-library/next` instead.\n *\n * @example\n * ```js\n * const { uri } = await Camera.takePictureAsync();\n * const asset = await MediaLibrary.createAssetAsync(uri);\n * ```\n * @param localUri A URI to the image or video file. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`\n *\n * @param album An [Album](#album) or its ID. If provided, the asset will be added to this album upon creation, otherwise it will be added to the default album for the media type.\n * The album has exist.\n * @return A promise which fulfils with an object representing an [`Asset`](#asset).\n */\nexport async function createAssetAsync(localUri: string, album?: AlbumRef): Promise<Asset> {\n if (!MediaLibrary.createAssetAsync) {\n throw new UnavailabilityError('MediaLibrary', 'createAssetAsync');\n }\n\n const albumId = getId(album);\n\n if (!localUri || typeof localUri !== 'string') {\n throw new Error('Invalid argument \"localUri\". It must be a string!');\n }\n const asset = await MediaLibrary.createAssetAsync(localUri, albumId);\n\n if (Array.isArray(asset)) {\n // Android returns an array with asset, we need to pick the first item\n return asset[0];\n }\n return asset;\n}\n\n// @needsAudit\n/**\n * Saves the file at given `localUri` to the user's media library. Unlike [`createAssetAsync()`](#medialibrarycreateassetasynclocaluri),\n * This method doesn't return created asset.\n * On __iOS 11+__, it's possible to use this method without asking for `CAMERA_ROLL` permission,\n * however then yours `Info.plist` should have `NSPhotoLibraryAddUsageDescription` key.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Asset.create()` from `expo-media-library/next` instead.\n * @param localUri A URI to the image or video file. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`.\n */\nexport async function saveToLibraryAsync(localUri: string): Promise<void> {\n if (!MediaLibrary.saveToLibraryAsync) {\n throw new UnavailabilityError('MediaLibrary', 'saveToLibraryAsync');\n }\n return await MediaLibrary.saveToLibraryAsync(localUri);\n}\n\n// @needsAudit\n/**\n * Adds array of assets to the album.\n *\n * On Android, by default it copies assets from the current album to provided one, however it's also\n * possible to move them by passing `false` as `copyAssets` argument. In case they're copied you\n * should keep in mind that `getAssetsAsync` will return duplicated assets.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.add()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @param album An [Album](#album) or its ID.\n * @param copy __Android only.__ Whether to copy assets to the new album instead of move them.\n * Defaults to `true`.\n * @return Returns promise which fulfils with `true` if the assets were successfully added to\n * the album.\n */\nexport async function addAssetsToAlbumAsync(\n assets: AssetRef[] | AssetRef,\n album: AlbumRef,\n copy: boolean = true\n): Promise<boolean> {\n if (!MediaLibrary.addAssetsToAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'addAssetsToAlbumAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n const albumId = getId(album);\n\n checkAssetIds(assetIds);\n\n if (!albumId || typeof albumId !== 'string') {\n throw new Error('Invalid album ID. It must be a string!');\n }\n\n if (Platform.OS === 'ios') {\n return await MediaLibrary.addAssetsToAlbumAsync(assetIds, albumId);\n }\n return await MediaLibrary.addAssetsToAlbumAsync(assetIds, albumId, !!copy);\n}\n\n// @needsAudit\n/**\n * Removes given assets from album.\n *\n * On Android, album will be automatically deleted if there are no more assets inside.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.removeAssets()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @param album An [Album](#album) or its ID.\n * @return Returns promise which fulfils with `true` if the assets were successfully removed from\n * the album.\n */\nexport async function removeAssetsFromAlbumAsync(\n assets: AssetRef[] | AssetRef,\n album: AlbumRef\n): Promise<boolean> {\n if (!MediaLibrary.removeAssetsFromAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'removeAssetsFromAlbumAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n const albumId = getId(album);\n\n checkAssetIds(assetIds);\n return await MediaLibrary.removeAssetsFromAlbumAsync(assetIds, albumId);\n}\n\n// @needsAudit\n/**\n * Deletes assets from the library. On iOS it deletes assets from all albums they belong to, while\n * on Android it keeps all copies of them (album is strictly connected to the asset). Also, there is\n * additional dialog on iOS that requires user to confirm this action.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.delete()` or `Asset.delete()` from `expo-media-library/next` instead.\n * @param assets An array of [Asset](#asset) or their IDs.\n * @return Returns promise which fulfils with `true` if the assets were successfully deleted.\n */\nexport async function deleteAssetsAsync(assets: AssetRef[] | AssetRef): Promise<boolean> {\n if (!MediaLibrary.deleteAssetsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'deleteAssetsAsync');\n }\n\n const assetIds = arrayize(assets).map(getId);\n\n checkAssetIds(assetIds);\n return await MediaLibrary.deleteAssetsAsync(assetIds);\n}\n\n// @needsAudit\n/**\n * Provides more information about an asset, including GPS location, local URI and EXIF metadata.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.getInfo()` from `expo-media-library/next` instead.\n * For better performance, prefer using individual getters such as `asset.getLocation()` or `asset.getExif()` to fetch only the data you need.\n * @param asset An [Asset](#asset) or its ID.\n * @param options\n * @return An [AssetInfo](#assetinfo) object, which is an `Asset` extended by an additional fields.\n */\nexport async function getAssetInfoAsync(\n asset: AssetRef,\n options: MediaLibraryAssetInfoQueryOptions = { shouldDownloadFromNetwork: true }\n): Promise<AssetInfo> {\n if (!MediaLibrary.getAssetInfoAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAssetInfoAsync');\n }\n\n const assetId = getId(asset);\n\n checkAssetIds([assetId]);\n\n const assetInfo = await MediaLibrary.getAssetInfoAsync(assetId, options);\n\n if (Array.isArray(assetInfo)) {\n // Android returns an array with asset info, we need to pick the first item\n return assetInfo[0];\n }\n return assetInfo;\n}\n\n// @needsAudit\n/**\n * Queries for user-created albums in media gallery.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.getAll()` from `expo-media-library/next` instead.\n * @return A promise which fulfils with an array of [`Album`](#asset)s. Depending on Android version,\n * root directory of your storage may be listed as album titled `\"0\"` or unlisted at all.\n */\nexport async function getAlbumsAsync({ includeSmartAlbums = false }: AlbumsOptions = {}): Promise<\n Album[]\n> {\n if (!MediaLibrary.getAlbumsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAlbumsAsync');\n }\n return await MediaLibrary.getAlbumsAsync({ includeSmartAlbums });\n}\n\n// @needsAudit\n/**\n * Queries for an album with a specific name.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.get(title)` from `expo-media-library/next` instead.\n * @param title Name of the album to look for.\n * @return An object representing an [`Album`](#album), if album with given name exists, otherwise\n * returns `null`.\n */\nexport async function getAlbumAsync(title: string): Promise<Album> {\n if (!MediaLibrary.getAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAlbumAsync');\n }\n if (typeof title !== 'string') {\n throw new Error('Album title must be a string!');\n }\n return await MediaLibrary.getAlbumAsync(title);\n}\n\n// @needsAudit\n/**\n * Creates an album with given name and initial asset. The asset parameter is required on Android,\n * since it's not possible to create empty album on this platform. On Android, by default it copies\n * given asset from the current album to the new one, however it's also possible to move it by\n * passing `false` as `copyAsset` argument.\n * In case it's copied you should keep in mind that `getAssetsAsync` will return duplicated asset.\n * > On Android, it's not possible to create an empty album. You must provide an existing asset to copy or move into the album or an uri of a local file, which will be used to create an initial asset for the album.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `Album.create()` from `expo-media-library/next` instead.\n * @param albumName Name of the album to create.\n * @param asset An [Asset](#asset) or its ID. On Android you either need to provide an asset or a localUri.\n * @param initialAssetLocalUri A URI to the local media file, which will be used to create the initial asset inside the album. It must contain an extension. On Android it\n * must be a local path, so it must start with `file:///`. If the `asset` was provided, this parameter will be ignored.\n * @param copyAsset __Android Only.__ Whether to copy asset to the new album instead of move it. This parameter is ignored if `asset` was not provided.\n * Defaults to `true`.\n * @return Newly created [`Album`](#album).\n */\nexport async function createAlbumAsync(\n albumName: string,\n asset?: AssetRef,\n copyAsset: boolean = true,\n initialAssetLocalUri?: string\n): Promise<Album> {\n if (!MediaLibrary.createAlbumAsync) {\n throw new UnavailabilityError('MediaLibrary', 'createAlbumAsync');\n }\n\n const assetId = getId(asset);\n\n if (\n Platform.OS === 'android' &&\n (typeof assetId !== 'string' || assetId.length === 0) &&\n !initialAssetLocalUri\n ) {\n // it's not possible to create empty album on Android, so initial asset must be provided\n throw new Error(\n 'MediaLibrary.createAlbumAsync must be called with an asset or a localUri on Android.'\n );\n }\n if (!albumName || typeof albumName !== 'string') {\n throw new Error('Invalid argument \"albumName\". It must be a string!');\n }\n if (assetId != null && typeof assetId !== 'string') {\n throw new Error('Asset ID must be a string!');\n }\n\n if (Platform.OS === 'ios') {\n return await MediaLibrary.createAlbumAsync(albumName, assetId, initialAssetLocalUri);\n }\n return await MediaLibrary.createAlbumAsync(albumName, assetId, !!copyAsset, initialAssetLocalUri);\n}\n\n// @needsAudit\n/**\n * Deletes given albums from the library. On Android by default it deletes assets belonging to given\n * albums from the library. On iOS it doesn't delete these assets, however it's possible to do by\n * passing `true` as `deleteAssets`.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `album.delete()` or `Album.delete()` from `expo-media-library/next` instead.\n * @param albums An array of [`Album`](#asset)s or their IDs.\n * @param assetRemove __iOS Only.__ Whether to also delete assets belonging to given albums.\n * Defaults to `false`.\n * @return Returns a promise which fulfils with `true` if the albums were successfully deleted from\n * the library.\n */\nexport async function deleteAlbumsAsync(\n albums: AlbumRef[] | AlbumRef,\n assetRemove: boolean = false\n): Promise<boolean> {\n if (!MediaLibrary.deleteAlbumsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'deleteAlbumsAsync');\n }\n\n const albumIds = arrayize(albums).map(getId);\n\n checkAlbumIds(albumIds);\n if (Platform.OS === 'android') {\n return await MediaLibrary.deleteAlbumsAsync(albumIds);\n }\n return await MediaLibrary.deleteAlbumsAsync(albumIds, !!assetRemove);\n}\n\n// @needsAudit\n/**\n * Fetches a page of assets matching the provided criteria.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use the `Query` class from `expo-media-library/next` instead.\n * @param assetsOptions\n * @return A promise that fulfils with to [`PagedInfo`](#pagedinfo) object with array of [`Asset`](#asset)s.\n */\nexport async function getAssetsAsync(assetsOptions: AssetsOptions = {}): Promise<PagedInfo<Asset>> {\n if (!MediaLibrary.getAssetsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getAssetsAsync');\n }\n\n const {\n first,\n after,\n album,\n sortBy,\n mediaType,\n createdAfter,\n createdBefore,\n mediaSubtypes,\n resolveWithFullInfo,\n } = assetsOptions;\n\n const options = {\n first: first == null ? 20 : first,\n after: getId(after),\n album: getId(album),\n sortBy: arrayize(sortBy),\n mediaType: arrayize(mediaType || [MediaType.photo]),\n mediaSubtypes: arrayize(mediaSubtypes),\n createdAfter: dateToNumber(createdAfter),\n createdBefore: dateToNumber(createdBefore),\n resolveWithFullInfo: resolveWithFullInfo ?? false,\n };\n\n if (first != null && typeof options.first !== 'number') {\n throw new Error('Option \"first\" must be a number!');\n }\n if (after != null && typeof options.after !== 'string') {\n throw new Error('Option \"after\" must be a string!');\n }\n if (album != null && typeof options.album !== 'string') {\n throw new Error('Option \"album\" must be a string!');\n }\n if (after != null && Platform.OS === 'android' && isNaN(parseInt(getId(after) as string, 10))) {\n throw new Error('Option \"after\" must be a valid ID!');\n }\n if (first != null && first < 0) {\n throw new Error('Option \"first\" must be a positive integer!');\n }\n\n options.mediaType.forEach(checkMediaType);\n // TODO(@kitten): Add expected native types for `MediaLibrary`\n return await MediaLibrary.getAssetsAsync({\n ...options,\n sortBy: options.sortBy.map(sortByOptionToString),\n });\n}\n\n// @needsAudit\n/**\n * Subscribes for updates in user's media library.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `addListener()` from `expo-media-library/next` instead.\n * @param listener A callback that is fired when any assets have been inserted or deleted from the\n * library. On Android it's invoked with an empty object. On iOS, it's invoked with [`MediaLibraryAssetsChangeEvent`](#medialibraryassetschangeevent)\n * object.\n *\n * Additionally, only on iOS, the listener is also invoked when the user changes access to individual assets in the media library\n * using `presentPermissionsPickerAsync()`.\n * @return An [`Subscription`](#subscription) object that you can call `remove()` on when you would\n * like to unsubscribe the listener.\n */\nexport function addListener(\n listener: (event: MediaLibraryAssetsChangeEvent) => void\n): EventSubscription {\n return MediaLibrary.addListener(MediaLibrary.CHANGE_LISTENER_NAME, listener);\n}\n\n/**\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `subscription.remove()` instead.\n */\nexport function removeSubscription(subscription: EventSubscription): void {\n subscription.remove();\n}\n\n// @needsAudit\n/**\n * Removes all listeners.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `removeAllListeners()` from `expo-media-library/next` instead.\n */\nexport function removeAllListeners(): void {\n MediaLibrary.removeAllListeners(MediaLibrary.CHANGE_LISTENER_NAME);\n}\n\n// @needsAudit\n/**\n * Fetches a list of moments, which is a group of assets taken around the same place\n * and time.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @return An array of [albums](#album) whose type is `moment`.\n * @platform ios\n */\nexport async function getMomentsAsync() {\n if (!MediaLibrary.getMomentsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getMomentsAsync');\n }\n\n return await MediaLibrary.getMomentsAsync();\n}\n\n// @needsAudit\n/**\n * Moves album content to the special media directories on **Android R** or **above** if needed.\n * Those new locations are in line with the Android `scoped storage` - so your application won't\n * lose write permission to those directories in the future.\n *\n * This method does nothing if:\n * - app is running on **iOS**, **web** or **Android below R**\n * - app has **write permission** to the album folder\n *\n * The migration is possible when the album contains only compatible files types.\n * For instance, movies and pictures are compatible with each other, but music and pictures are not.\n * If automatic migration isn't possible, the function rejects.\n * In that case, you can use methods from the `expo-file-system` to migrate all your files manually.\n *\n * # Why do you need to migrate files?\n * __Android R__ introduced a lot of changes in the storage system. Now applications can't save\n * anything to the root directory. The only available locations are from the `MediaStore` API.\n * Unfortunately, the media library stored albums in folders for which, because of those changes,\n * the application doesn't have permissions anymore. However, it doesn't mean you need to migrate\n * all your albums. If your application doesn't add assets to albums, you don't have to migrate.\n * Everything will work as it used to. You can read more about scoped storage in [the Android documentation](https://developer.android.com/about/versions/11/privacy/storage).\n *\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @param album An [Album](#album) or its ID.\n * @return A promise which fulfils to `void`.\n */\nexport async function migrateAlbumIfNeededAsync(album: AlbumRef): Promise<void> {\n if (!MediaLibrary.migrateAlbumIfNeededAsync) {\n return;\n }\n\n return await MediaLibrary.migrateAlbumIfNeededAsync(getId(album));\n}\n\n// @needsAudit\n/**\n * Checks if the album should be migrated to a different location. In other words, it checks if the\n * application has the write permission to the album folder. If not, it returns `true`, otherwise `false`.\n * > Note: For **Android below R**, **web** or **iOS**, this function always returns `false`.\n * @deprecated This legacy `expo-media-library` API is deprecated. This feature will be removed in the `expo-media-library/next`.\n * @param album An [Album](#album) or its ID.\n * @return Returns a promise which fulfils with `true` if the album should be migrated.\n */\nexport async function albumNeedsMigrationAsync(album: AlbumRef): Promise<boolean> {\n if (!MediaLibrary.albumNeedsMigrationAsync) {\n return false;\n }\n\n return await MediaLibrary.albumNeedsMigrationAsync(getId(album));\n}\n\n/**\n * On iOS, this adds or removes the asset from the system \"Favorites\" smart album.\n * @deprecated This legacy `expo-media-library` API is deprecated. Use `asset.setFavorite()` from `expo-media-library/next` instead.\n * @param asset An [Asset](#asset) or its ID.\n * @param isFavorite Whether the asset should be marked as favorite.\n * @platform ios\n * @return Returns a promise which fulfils with `true` if the operation was successful.\n */\nexport async function setAssetFavoriteAsync(\n asset: AssetRef,\n isFavorite: boolean\n): Promise<boolean> {\n if (!MediaLibrary.setAssetFavoriteAsync) {\n throw new UnavailabilityError('MediaLibrary', 'setAssetFavoriteAsync');\n }\n\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'setAssetFavoriteAsync is only available on iOS');\n }\n\n const assetId = getId(asset);\n\n checkAssetIds([assetId]);\n\n return await MediaLibrary.setAssetFavoriteAsync(assetId, isFavorite);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import type { PermissionResponse } from 'expo';
2
2
  import { NativeModule } from 'expo-modules-core';
3
3
  import type { GranularPermission, MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';
4
4
  import { Album } from './types/Album';
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMediaLibraryNext.d.ts","sourceRoot":"","sources":["../../src/next/ExpoMediaLibraryNext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAA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AO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,OAAO,0BAA2B,SAAQ,YAAY,CAAC;IAC5D,qBAAqB,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI,CAAC;CACvE,CAAC;IACA,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC;IAEpB,mBAAmB,CACjB,SAAS,CAAC,EAAE,OAAO,EACnB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,GACzC,OAAO,CAAC,kBAAkB,CAAC;IAC9B,uBAAuB,CACrB,SAAS,CAAC,EAAE,OAAO,EACnB,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,GACzC,OAAO,CAAC,kBAAkB,CAAC;IAC9B,wBAAwB,CAAC,UAAU,CAAC,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CACxE;;AAED,wBAAuF"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoMediaLibraryNext.js","sourceRoot":"","sources":["../../src/next/ExpoMediaLibraryNext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAoBtC,eAAe,mBAAmB,CAA6B,sBAAsB,CAAC,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo-modules-core';\nimport { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nimport type { GranularPermission, MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';\nimport { Album } from './types/Album';\nimport { Asset } from './types/Asset';\nimport type { MediaTypeFilter } from './types/MediaTypeFilter';\nimport { Query } from './types/Query';\n\ndeclare class ExpoMediaLibraryNextModule extends NativeModule<{\n mediaLibraryDidChange: (event: MediaLibraryAssetsChangeEvent) => void;\n}> {\n Asset: typeof Asset;\n Album: typeof Album;\n Query: typeof Query;\n\n getPermissionsAsync(\n writeOnly?: boolean,\n granularPermissions?: GranularPermission[]\n ): Promise<PermissionResponse>;\n requestPermissionsAsync(\n writeOnly?: boolean,\n granularPermissions?: GranularPermission[]\n ): Promise<PermissionResponse>;\n presentPermissionsPicker(mediaTypes?: MediaTypeFilter[]): Promise<void>;\n}\n\nexport default requireNativeModule<ExpoMediaLibraryNextModule>('ExpoMediaLibraryNext');\n"]}
1
+ {"version":3,"file":"ExpoMediaLibraryNext.js","sourceRoot":"","sources":["../../src/next/ExpoMediaLibraryNext.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAoBtC,eAAe,mBAAmB,CAA6B,sBAAsB,CAAC,CAAC","sourcesContent":["import type { PermissionResponse } from 'expo';\nimport { NativeModule, requireNativeModule } from 'expo-modules-core';\n\nimport type { GranularPermission, MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';\nimport { Album } from './types/Album';\nimport { Asset } from './types/Asset';\nimport type { MediaTypeFilter } from './types/MediaTypeFilter';\nimport { Query } from './types/Query';\n\ndeclare class ExpoMediaLibraryNextModule extends NativeModule<{\n mediaLibraryDidChange: (event: MediaLibraryAssetsChangeEvent) => void;\n}> {\n Asset: typeof Asset;\n Album: typeof Album;\n Query: typeof Query;\n\n getPermissionsAsync(\n writeOnly?: boolean,\n granularPermissions?: GranularPermission[]\n ): Promise<PermissionResponse>;\n requestPermissionsAsync(\n writeOnly?: boolean,\n granularPermissions?: GranularPermission[]\n ): Promise<PermissionResponse>;\n presentPermissionsPicker(mediaTypes?: MediaTypeFilter[]): Promise<void>;\n}\n\nexport default requireNativeModule<ExpoMediaLibraryNextModule>('ExpoMediaLibraryNext');\n"]}
@@ -1,4 +1,5 @@
1
- import type { EventSubscription, PermissionHookOptions, PermissionResponse } from 'expo-modules-core';
1
+ import { type PermissionHookOptions, type PermissionResponse } from 'expo';
2
+ import { type EventSubscription } from 'expo-modules-core';
2
3
  import ExpoMediaLibraryNext from './ExpoMediaLibraryNext';
3
4
  import type { MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';
4
5
  import type { GranularPermission } from './types/GranularPermission';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,cAAc,0BAA0B,CAAC;AAEzC,qBAAa,KAAM,SAAQ,oBAAoB,CAAC,KAAK;CAAG;AAExD,qBAAa,KAAM,SAAQ,oBAAoB,CAAC,KAAK;IAEnD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAQ/B,WAAW,CAAC,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/C,gBAAgB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAQ3C,oBAAoB,IAAI,OA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;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,6BAA6B,KAAK,IAAI,GACvD,iBAAiB,CAEnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
@@ -1,4 +1,5 @@
1
- import { createPermissionHook, UnavailabilityError } from 'expo-modules-core';
1
+ import { createPermissionHook } from 'expo';
2
+ import { UnavailabilityError } from 'expo-modules-core';
2
3
  import { Platform } from 'react-native';
3
4
  import ExpoMediaLibraryNext from './ExpoMediaLibraryNext';
4
5
  import { MediaSubtype } from './types/MediaSubtype';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD,cAAc,0BAA0B,CAAC;AAEzC,MAAM,OAAO,KAAM,SAAQ,oBAAoB,CAAC,KAAK;CAAG;AAExD,MAAM,OAAO,KAAM,SAAQ,oBAAoB,CAAC,KAAK;IACnD,UAAU;IACV,WAAW;QACT,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;YAC1B,MAAM,IAAI,mBAAmB,CAAC,cAAc,EAAE,sCAAsC,CAAC,CAAC;QACxF,CAAC;QACD,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;IAED,UAAU;IACV,WAAW,CAAC,UAAmB;QAC7B,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;YAC1B,MAAM,IAAI,mBAAmB,CAAC,cAAc,EAAE,sCAAsC,CAAC,CAAC;QACxF,CAAC;QACD,OAAO,KAAK,CAAC,WAAW,CAAC,UAAU,CA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BAAkB;IAChC,oBAAoB,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import type {\n EventSubscription,\n PermissionHookOptions,\n PermissionResponse,\n} from 'expo-modules-core';\nimport { createPermissionHook, UnavailabilityError } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport ExpoMediaLibraryNext from './ExpoMediaLibraryNext';\nimport type { MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';\nimport type { GranularPermission } from './types/GranularPermission';\nimport { MediaSubtype } from './types/MediaSubtype';\nimport type { MediaTypeFilter } from './types/MediaTypeFilter';\n\nexport * from './MediaLibraryNext.types';\n\nexport class Query extends ExpoMediaLibraryNext.Query {}\n\nexport class Asset extends ExpoMediaLibraryNext.Asset {\n // @hidden\n getFavorite(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getFavorite is only available on iOS');\n }\n return super.getFavorite();\n }\n\n // @hidden\n setFavorite(isFavorite: boolean): Promise<void> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'setFavorite is only available on iOS');\n }\n return super.setFavorite(isFavorite);\n }\n\n // @hidden\n getMediaSubtypes(): Promise<MediaSubtype[]> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getMediaSubtypes is only available on iOS');\n }\n return super.getMediaSubtypes();\n }\n\n // @hidden\n getLivePhotoVideoUri(): Promise<string | null> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError(\n 'MediaLibrary',\n 'getLivePhotoVideoUri is only available on iOS'\n );\n }\n return super.getLivePhotoVideoUri();\n }\n\n // @hidden\n getIsInCloud(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getIsInCloud is only available on iOS');\n }\n return super.getIsInCloud();\n }\n\n // @hidden\n getOrientation(): Promise<number | null> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getOrientation is only available on iOS');\n }\n return super.getOrientation();\n }\n}\n\nexport class Album extends ExpoMediaLibraryNext.Album {}\n\n/**\n * Asks the user to grant permissions for accessing media in user's media library.\n * @param writeOnly - Whether to request write-only access without read permissions. Defaults to `false`.\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has an\n * effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n *\n * > When using granular permissions with a custom config plugin configuration, make sure that all the requested permissions are included in the plugin.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function requestPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!ExpoMediaLibraryNext.requestPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'requestPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await ExpoMediaLibraryNext.requestPermissionsAsync(writeOnly, granularPermissions);\n }\n return await ExpoMediaLibraryNext.requestPermissionsAsync(writeOnly);\n}\n\n/**\n * Checks user's permissions for accessing media library.\n * @param writeOnly - Whether to check write-only access without read permissions. Defaults to `false`.\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has\n * an effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function getPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!ExpoMediaLibraryNext.getPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await ExpoMediaLibraryNext.getPermissionsAsync(writeOnly, granularPermissions);\n }\n return await ExpoMediaLibraryNext.getPermissionsAsync(writeOnly);\n}\n\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [permissionResponse, requestPermission] = MediaLibrary.usePermissions({\n * writeOnly: true,\n * granularPermissions: ['photo'],\n * });\n * ```\n */\nexport const usePermissions = createPermissionHook<\n PermissionResponse,\n { writeOnly?: boolean; granularPermissions?: GranularPermission[] }\n>({\n getMethod: (options) => getPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n requestMethod: (options) =>\n requestPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n});\n\nexport type { PermissionHookOptions };\n\n/**\n * Allows the user to update the assets that your app has access to.\n * The system modal is only displayed if the user originally allowed only `limited` access to their\n * media library, otherwise this method is a no-op.\n * @param mediaTypes Limits the type(s) of media that the user will be granting access to. By default, a list that shows both photos and videos is presented.\n *\n * @return A promise that either rejects if the method is unavailable, or resolves to `void`.\n * > __Note:__ This method doesn't inform you if the user changes which assets your app has access to.\n * That information is only exposed by iOS, and to obtain it, you need to subscribe for updates to the user's media library using [`addListener()`](#medialibraryaddlistenerlistener).\n * If `hasIncrementalChanges` is `false`, the user changed their permissions.\n *\n * @platform android 14+\n * @platform ios\n */\nexport async function presentPermissionsPicker(mediaTypes?: MediaTypeFilter[]): Promise<void> {\n return await ExpoMediaLibraryNext.presentPermissionsPicker(mediaTypes);\n}\n\n/**\n * Subscribes for updates in user's media library.\n * @param listener A callback that is fired when any assets have been inserted or deleted from the\n * library. On Android it's invoked with an empty object. On iOS it's invoked with\n * [`MediaLibraryAssetsChangeEvent`](#medialibraryassetschangeevent) object.\n * @return An [`EventSubscription`](#eventsubscription) object that you can call `remove()` on when\n * you would like to unsubscribe the listener.\n */\nexport function addListener(\n listener: (event: MediaLibraryAssetsChangeEvent) => void\n): EventSubscription {\n return ExpoMediaLibraryNext.addListener('mediaLibraryDidChange', listener);\n}\n\n/**\n * Removes all listeners.\n */\nexport function removeAllListeners(): void {\n ExpoMediaLibraryNext.removeAllListeners('mediaLibraryDidChange');\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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BAAoB,CAAC,mBAAmB,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,MAAM,oBAAoB,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAGhD;IACA,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,CAAC;IAC7F,aAAa,EAAE,CAAC,OAAO,EAAE,EAAE,CACzB,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,mBAAmB,CAAC;CAC5E,CAAC,CAAC;AAIH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,UAA8B;IAC3E,OAAO,MAAM,oBAAoB,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CACzB,QAAwD;IAExD,OAAO,oBAAoB,CAAC,WAAW,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;AAC7E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,oBAAoB,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { createPermissionHook, type PermissionHookOptions, type PermissionResponse } from 'expo';\nimport { UnavailabilityError, type EventSubscription } from 'expo-modules-core';\nimport { Platform } from 'react-native';\n\nimport ExpoMediaLibraryNext from './ExpoMediaLibraryNext';\nimport type { MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';\nimport type { GranularPermission } from './types/GranularPermission';\nimport { MediaSubtype } from './types/MediaSubtype';\nimport type { MediaTypeFilter } from './types/MediaTypeFilter';\n\nexport * from './MediaLibraryNext.types';\n\nexport class Query extends ExpoMediaLibraryNext.Query {}\n\nexport class Asset extends ExpoMediaLibraryNext.Asset {\n // @hidden\n getFavorite(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getFavorite is only available on iOS');\n }\n return super.getFavorite();\n }\n\n // @hidden\n setFavorite(isFavorite: boolean): Promise<void> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'setFavorite is only available on iOS');\n }\n return super.setFavorite(isFavorite);\n }\n\n // @hidden\n getMediaSubtypes(): Promise<MediaSubtype[]> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getMediaSubtypes is only available on iOS');\n }\n return super.getMediaSubtypes();\n }\n\n // @hidden\n getLivePhotoVideoUri(): Promise<string | null> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError(\n 'MediaLibrary',\n 'getLivePhotoVideoUri is only available on iOS'\n );\n }\n return super.getLivePhotoVideoUri();\n }\n\n // @hidden\n getIsInCloud(): Promise<boolean> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getIsInCloud is only available on iOS');\n }\n return super.getIsInCloud();\n }\n\n // @hidden\n getOrientation(): Promise<number | null> {\n if (Platform.OS !== 'ios') {\n throw new UnavailabilityError('MediaLibrary', 'getOrientation is only available on iOS');\n }\n return super.getOrientation();\n }\n}\n\nexport class Album extends ExpoMediaLibraryNext.Album {}\n\n/**\n * Asks the user to grant permissions for accessing media in user's media library.\n * @param writeOnly - Whether to request write-only access without read permissions. Defaults to `false`.\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has an\n * effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n *\n * > When using granular permissions with a custom config plugin configuration, make sure that all the requested permissions are included in the plugin.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function requestPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!ExpoMediaLibraryNext.requestPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'requestPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await ExpoMediaLibraryNext.requestPermissionsAsync(writeOnly, granularPermissions);\n }\n return await ExpoMediaLibraryNext.requestPermissionsAsync(writeOnly);\n}\n\n/**\n * Checks user's permissions for accessing media library.\n * @param writeOnly - Whether to check write-only access without read permissions. Defaults to `false`.\n * @param granularPermissions - A list of [`GranularPermission`](#granularpermission) values. This parameter has\n * an effect only on Android 13 and newer. By default, `expo-media-library` will ask for all possible permissions.\n * @return A promise that fulfils with [`PermissionResponse`](#permissionresponse) object.\n */\nexport async function getPermissionsAsync(\n writeOnly: boolean = false,\n granularPermissions?: GranularPermission[]\n): Promise<PermissionResponse> {\n if (!ExpoMediaLibraryNext.getPermissionsAsync) {\n throw new UnavailabilityError('MediaLibrary', 'getPermissionsAsync');\n }\n if (Platform.OS === 'android') {\n return await ExpoMediaLibraryNext.getPermissionsAsync(writeOnly, granularPermissions);\n }\n return await ExpoMediaLibraryNext.getPermissionsAsync(writeOnly);\n}\n\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestPermissionsAsync` and `getPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [permissionResponse, requestPermission] = MediaLibrary.usePermissions({\n * writeOnly: true,\n * granularPermissions: ['photo'],\n * });\n * ```\n */\nexport const usePermissions = createPermissionHook<\n PermissionResponse,\n { writeOnly?: boolean; granularPermissions?: GranularPermission[] }\n>({\n getMethod: (options) => getPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n requestMethod: (options) =>\n requestPermissionsAsync(options?.writeOnly, options?.granularPermissions),\n});\n\nexport type { PermissionHookOptions };\n\n/**\n * Allows the user to update the assets that your app has access to.\n * The system modal is only displayed if the user originally allowed only `limited` access to their\n * media library, otherwise this method is a no-op.\n * @param mediaTypes Limits the type(s) of media that the user will be granting access to. By default, a list that shows both photos and videos is presented.\n *\n * @return A promise that either rejects if the method is unavailable, or resolves to `void`.\n * > __Note:__ This method doesn't inform you if the user changes which assets your app has access to.\n * That information is only exposed by iOS, and to obtain it, you need to subscribe for updates to the user's media library using [`addListener()`](#medialibraryaddlistenerlistener).\n * If `hasIncrementalChanges` is `false`, the user changed their permissions.\n *\n * @platform android 14+\n * @platform ios\n */\nexport async function presentPermissionsPicker(mediaTypes?: MediaTypeFilter[]): Promise<void> {\n return await ExpoMediaLibraryNext.presentPermissionsPicker(mediaTypes);\n}\n\n/**\n * Subscribes for updates in user's media library.\n * @param listener A callback that is fired when any assets have been inserted or deleted from the\n * library. On Android it's invoked with an empty object. On iOS it's invoked with\n * [`MediaLibraryAssetsChangeEvent`](#medialibraryassetschangeevent) object.\n * @return An [`EventSubscription`](#eventsubscription) object that you can call `remove()` on when\n * you would like to unsubscribe the listener.\n */\nexport function addListener(\n listener: (event: MediaLibraryAssetsChangeEvent) => void\n): EventSubscription {\n return ExpoMediaLibraryNext.addListener('mediaLibraryDidChange', listener);\n}\n\n/**\n * Removes all listeners.\n */\nexport function removeAllListeners(): void {\n ExpoMediaLibraryNext.removeAllListeners('mediaLibraryDidChange');\n}\n"]}
@@ -11,7 +11,7 @@
11
11
  "publication": {
12
12
  "groupId": "host.exp.exponent",
13
13
  "artifactId": "expo.modules.medialibrary",
14
- "version": "56.0.2",
14
+ "version": "56.0.4",
15
15
  "repository": "local-maven-repo"
16
16
  }
17
17
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.medialibrary",
6
- "version": "56.0.2",
6
+ "version": "56.0.4",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -33,8 +33,8 @@
33
33
  ],
34
34
  "files": [
35
35
  {
36
- "name": "expo.modules.medialibrary-56.0.2.aar",
37
- "url": "expo.modules.medialibrary-56.0.2.aar",
36
+ "name": "expo.modules.medialibrary-56.0.4.aar",
37
+ "url": "expo.modules.medialibrary-56.0.4.aar",
38
38
  "size": 665036,
39
39
  "sha512": "44490e81bd7bbbc0687ad07ed9370135edb2683726cb7a1317993103661625dec835f5be088336dd828d81b87dc02c67764c34232dd89646d2f35471ae73fd12",
40
40
  "sha256": "cac5ac5ee94b50694552b5e82b02f4809409497d137bc4986136139e7237e2f9",
@@ -97,8 +97,8 @@
97
97
  ],
98
98
  "files": [
99
99
  {
100
- "name": "expo.modules.medialibrary-56.0.2.aar",
101
- "url": "expo.modules.medialibrary-56.0.2.aar",
100
+ "name": "expo.modules.medialibrary-56.0.4.aar",
101
+ "url": "expo.modules.medialibrary-56.0.4.aar",
102
102
  "size": 665036,
103
103
  "sha512": "44490e81bd7bbbc0687ad07ed9370135edb2683726cb7a1317993103661625dec835f5be088336dd828d81b87dc02c67764c34232dd89646d2f35471ae73fd12",
104
104
  "sha256": "cac5ac5ee94b50694552b5e82b02f4809409497d137bc4986136139e7237e2f9",
@@ -117,8 +117,8 @@
117
117
  },
118
118
  "files": [
119
119
  {
120
- "name": "expo.modules.medialibrary-56.0.2-sources.jar",
121
- "url": "expo.modules.medialibrary-56.0.2-sources.jar",
120
+ "name": "expo.modules.medialibrary-56.0.4-sources.jar",
121
+ "url": "expo.modules.medialibrary-56.0.4-sources.jar",
122
122
  "size": 86645,
123
123
  "sha512": "8ae7c80aab9aaaebc836213e52553c9e3204fcc28d00208dccf0f7444a1c4e633f5e95605b7448a87fce2281589745f616679dd16ea998bec8986e97199794a8",
124
124
  "sha256": "f98b6e724623ee8e1d97e9f351db3eaa197adac34ad6ad6e08596f61dffecc84",
@@ -0,0 +1 @@
1
+ 1dbe75ac5fc5c4a9c90d268e4c349a5a9b85191f4c23824e00b53f8865cb2cb3
@@ -0,0 +1 @@
1
+ e413a9f53b1b96bfeb2f14f8847d8d1726092e530474d6313289803015f4e7c4532041639c7b3042da11ee8568ee95f1fdd006fdc85b29c35943893036f31234
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.medialibrary</artifactId>
12
- <version>56.0.2</version>
12
+ <version>56.0.4</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.medialibrary</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 1e5196da0df1bd1824befc5cd109d987af5e7d0c6f77ca09ca7e927a6c7aac65
@@ -0,0 +1 @@
1
+ 11f96747e0a16d99b30a55bf5ddec6fae0bafeb85283e8b0e2415e7c2b8ed07e76116f2675321cca47e15e6ba4772db5b63c022a72fb5240f1c97328015ae0dc
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.medialibrary</artifactId>
5
5
  <versioning>
6
- <latest>56.0.2</latest>
7
- <release>56.0.2</release>
6
+ <latest>56.0.4</latest>
7
+ <release>56.0.4</release>
8
8
  <versions>
9
- <version>56.0.2</version>
9
+ <version>56.0.4</version>
10
10
  </versions>
11
- <lastUpdated>20260506190020</lastUpdated>
11
+ <lastUpdated>20260513103323</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 4b4b7b0f606e91e851a1a169cafc0e06
1
+ 274025823a31666f755de5490fe29ee9
@@ -1 +1 @@
1
- a38f4d8f5b7293aefbe86a2506eb25eb3ac8f35e
1
+ 9a983ce0938ca53255aaf90f406a3f69dcd44c36
@@ -1 +1 @@
1
- 3b0bb7cf70b70c4c14bd7f15ad28ce1bef044753bf1af9e3d5648ecd8c3c192d
1
+ 653bdf1e8c6175c6f9d01e820d6fef7292446649759660810f5621371873f97e
@@ -1 +1 @@
1
- 1940402a6a8eaa28e8fd0a939d93a9517e202a0d611c93b6353bdf5da3a20f6ccab486a5f603a97bd31e08a004117b14b655d7d8ac8b507096057c125147cf9d
1
+ 15d96eaa492c0602a1ee90510d372cb0bddcd2614ce13cad2702c9f1dba78e324f0465c47702d162601fa5002890c8ff99d3d0994e50ec49093e7a03bf60d705
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-media-library",
3
- "version": "56.0.2",
3
+ "version": "56.0.4",
4
4
  "description": "Provides access to user's media library.",
5
5
  "main": "build/MediaLibrary.js",
6
6
  "types": "build/MediaLibrary.d.ts",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.14.0",
33
- "expo": "56.0.0-preview.4",
34
- "expo-module-scripts": "56.0.1"
33
+ "expo": "56.0.0-preview.10",
34
+ "expo-module-scripts": "56.0.2"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "expo": "*",
@@ -47,7 +47,7 @@
47
47
  }
48
48
  }
49
49
  },
50
- "gitHead": "d2109c94206280625a070242b0cb6e2500357c46",
50
+ "gitHead": "40f0a6f6711d93762e0506b37e6e077e4bd9a541",
51
51
  "scripts": {
52
52
  "build": "expo-module build",
53
53
  "clean": "expo-module clean",
@@ -1,5 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
2
- import { PermissionStatus } from 'expo-modules-core';
1
+ import { type PermissionResponse, PermissionStatus } from 'expo';
3
2
 
4
3
  import type { MediaTypeObject, SortByObject } from './MediaLibrary';
5
4
 
@@ -1,9 +1,5 @@
1
- import {
2
- type PermissionResponse as EXPermissionResponse,
3
- createPermissionHook,
4
- UnavailabilityError,
5
- type EventSubscription,
6
- } from 'expo-modules-core';
1
+ import { type PermissionResponse as EXPermissionResponse, createPermissionHook } from 'expo';
2
+ import { UnavailabilityError, type EventSubscription } from 'expo-modules-core';
7
3
  import { Platform } from 'react-native';
8
4
 
9
5
  import MediaLibrary from './ExpoMediaLibrary';
@@ -365,8 +361,8 @@ export {
365
361
  type PermissionExpiration,
366
362
  type PermissionResponse as EXPermissionResponse,
367
363
  type PermissionHookOptions,
368
- type EventSubscription as Subscription,
369
- } from 'expo-modules-core';
364
+ } from 'expo';
365
+ export { type EventSubscription as Subscription } from 'expo-modules-core';
370
366
 
371
367
  function arrayize<T>(item: T | T[]): T[] {
372
368
  if (Array.isArray(item)) {
@@ -1,4 +1,4 @@
1
- import type { PermissionResponse } from 'expo-modules-core';
1
+ import type { PermissionResponse } from 'expo';
2
2
  import { NativeModule, requireNativeModule } from 'expo-modules-core';
3
3
 
4
4
  import type { GranularPermission, MediaLibraryAssetsChangeEvent } from './MediaLibraryNext.types';
package/src/next/index.ts CHANGED
@@ -1,9 +1,5 @@
1
- import type {
2
- EventSubscription,
3
- PermissionHookOptions,
4
- PermissionResponse,
5
- } from 'expo-modules-core';
6
- import { createPermissionHook, UnavailabilityError } from 'expo-modules-core';
1
+ import { createPermissionHook, type PermissionHookOptions, type PermissionResponse } from 'expo';
2
+ import { UnavailabilityError, type EventSubscription } from 'expo-modules-core';
7
3
  import { Platform } from 'react-native';
8
4
 
9
5
  import ExpoMediaLibraryNext from './ExpoMediaLibraryNext';
@@ -1 +0,0 @@
1
- 73b67cd629fd2c79bad9153e300f3fd29711ec93aab88f05e10a44f120425ba9
@@ -1 +0,0 @@
1
- 33a606abb168bcae7ba0dda02bf4d2b7096599fb90004c2c558324af53195774a5adb3e921441e9fc8a38e8867730857c4645b1bd273e3f624d4a7c54c99da64
@@ -1 +0,0 @@
1
- f415d4d7831527baf28ddce8a278689be9f4c76cfad6b9a20879067b7280dace
@@ -1 +0,0 @@
1
- 78a174d6278f32ff9fce1994ff0cf92ee466d45d11e9acc00f2763d09b908a6fa0f1ef5ddd0c4a8688ba046641c20df4e456006e76d2222ac75f42df29d3d711