@atlaskit/media-client 36.3.3 → 36.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/AGENTS.md +18 -15
  2. package/CHANGELOG.md +15 -0
  3. package/artifacts/package.json +1 -8
  4. package/check-webp-support/package.json +1 -8
  5. package/constants/package.json +1 -8
  6. package/create-media-subject/package.json +1 -8
  7. package/dist/cjs/client/file-fetcher/index.js +7 -5
  8. package/dist/cjs/client/media-store/MediaStore.js +19 -7
  9. package/dist/cjs/uploader/index.js +3 -1
  10. package/dist/es2019/client/file-fetcher/index.js +7 -5
  11. package/dist/es2019/client/media-store/MediaStore.js +20 -8
  12. package/dist/es2019/uploader/index.js +3 -1
  13. package/dist/esm/client/file-fetcher/index.js +7 -5
  14. package/dist/esm/client/media-store/MediaStore.js +19 -7
  15. package/dist/esm/uploader/index.js +3 -1
  16. package/dist/types/client/file-fetcher/index.d.ts +2 -2
  17. package/dist/types/client/media-store/MediaStore.d.ts +6 -2
  18. package/dist/types/client/media-store/types.d.ts +6 -2
  19. package/error/package.json +1 -8
  20. package/errors/helpers/package.json +1 -8
  21. package/errors/package.json +1 -8
  22. package/errors/types/package.json +1 -8
  23. package/events/package.json +1 -8
  24. package/file-fetcher/error/package.json +1 -8
  25. package/file-fetcher/package.json +1 -8
  26. package/file-state/package.json +1 -8
  27. package/file-streams-cache/package.json +1 -8
  28. package/from-observable/package.json +1 -8
  29. package/get-dimensions-from-blob/package.json +1 -8
  30. package/global-media-event-emitter/package.json +1 -8
  31. package/identifier/package.json +1 -8
  32. package/image-resize-mode-to-file-image-mode/package.json +1 -8
  33. package/item/package.json +1 -8
  34. package/media/package.json +1 -8
  35. package/media-client/package.json +1 -8
  36. package/media-store/package.json +1 -8
  37. package/media-store/types/package.json +1 -8
  38. package/media-subscribable/types/package.json +1 -8
  39. package/mobile-upload/package.json +1 -8
  40. package/package.json +4 -4
  41. package/polling/errors/package.json +1 -8
  42. package/polling/package.json +1 -8
  43. package/polling/types/package.json +1 -8
  44. package/request/errors/package.json +1 -8
  45. package/request/helpers/package.json +1 -8
  46. package/request/package.json +1 -8
  47. package/request/types/package.json +1 -8
  48. package/stargate-client/package.json +1 -8
  49. package/upload-controller/package.json +1 -8
  50. package/uploader/package.json +1 -8
  51. package/url/package.json +1 -8
  52. package/dist/types-ts4.5/client/__mocks__/collection-fetcher.d.ts +0 -7
  53. package/dist/types-ts4.5/client/__mocks__/file-fetcher.d.ts +0 -9
  54. package/dist/types-ts4.5/client/__mocks__/media-client.d.ts +0 -10
  55. package/dist/types-ts4.5/client/events.d.ts +0 -29
  56. package/dist/types-ts4.5/client/file-fetcher/error.d.ts +0 -33
  57. package/dist/types-ts4.5/client/file-fetcher/index.d.ts +0 -86
  58. package/dist/types-ts4.5/client/media-client.d.ts +0 -34
  59. package/dist/types-ts4.5/client/media-store/MediaStore.d.ts +0 -56
  60. package/dist/types-ts4.5/client/media-store/error.d.ts +0 -15
  61. package/dist/types-ts4.5/client/media-store/index.d.ts +0 -4
  62. package/dist/types-ts4.5/client/media-store/resolveAuth.d.ts +0 -4
  63. package/dist/types-ts4.5/client/media-store/types.d.ts +0 -207
  64. package/dist/types-ts4.5/client/mobile-upload.d.ts +0 -15
  65. package/dist/types-ts4.5/client/stargate-client.d.ts +0 -15
  66. package/dist/types-ts4.5/constants.d.ts +0 -6
  67. package/dist/types-ts4.5/file-streams-cache.d.ts +0 -15
  68. package/dist/types-ts4.5/globalMediaEventEmitter.d.ts +0 -6
  69. package/dist/types-ts4.5/identifier.d.ts +0 -15
  70. package/dist/types-ts4.5/index.d.ts +0 -45
  71. package/dist/types-ts4.5/models/artifacts.d.ts +0 -2
  72. package/dist/types-ts4.5/models/auth-headers.d.ts +0 -11
  73. package/dist/types-ts4.5/models/auth-query-parameters.d.ts +0 -11
  74. package/dist/types-ts4.5/models/document.d.ts +0 -95
  75. package/dist/types-ts4.5/models/errors/helpers.d.ts +0 -6
  76. package/dist/types-ts4.5/models/errors/index.d.ts +0 -24
  77. package/dist/types-ts4.5/models/errors/types.d.ts +0 -22
  78. package/dist/types-ts4.5/models/file-state.d.ts +0 -32
  79. package/dist/types-ts4.5/models/item.d.ts +0 -27
  80. package/dist/types-ts4.5/models/media.d.ts +0 -65
  81. package/dist/types-ts4.5/models/mobile-upload.d.ts +0 -28
  82. package/dist/types-ts4.5/upload-controller.d.ts +0 -7
  83. package/dist/types-ts4.5/uploader/calculateChunkSize.d.ts +0 -11
  84. package/dist/types-ts4.5/uploader/error.d.ts +0 -27
  85. package/dist/types-ts4.5/uploader/index.d.ts +0 -23
  86. package/dist/types-ts4.5/utils/checkWebpSupport.d.ts +0 -1
  87. package/dist/types-ts4.5/utils/convertBase64ToBlob.d.ts +0 -1
  88. package/dist/types-ts4.5/utils/createCopyIntentRegisterationBatcher.d.ts +0 -20
  89. package/dist/types-ts4.5/utils/createFileDataLoader.d.ts +0 -30
  90. package/dist/types-ts4.5/utils/createMediaSubject.d.ts +0 -3
  91. package/dist/types-ts4.5/utils/detectEmptyFile.d.ts +0 -16
  92. package/dist/types-ts4.5/utils/getDimensionsFromBlob.d.ts +0 -6
  93. package/dist/types-ts4.5/utils/getDocument.d.ts +0 -2
  94. package/dist/types-ts4.5/utils/getImageDimensionsFromBlob.d.ts +0 -5
  95. package/dist/types-ts4.5/utils/getMediaTypeFromUploadableFile.d.ts +0 -3
  96. package/dist/types-ts4.5/utils/getNavigator.d.ts +0 -2
  97. package/dist/types-ts4.5/utils/getVideoDimensionsFromBlob.d.ts +0 -5
  98. package/dist/types-ts4.5/utils/hashing/hasher.d.ts +0 -3
  99. package/dist/types-ts4.5/utils/hashing/hasherCreator.d.ts +0 -4
  100. package/dist/types-ts4.5/utils/hashing/sha256SimpleHasher.d.ts +0 -4
  101. package/dist/types-ts4.5/utils/hashing/simpleHasher.d.ts +0 -4
  102. package/dist/types-ts4.5/utils/imageResizeModeToFileImageMode.d.ts +0 -3
  103. package/dist/types-ts4.5/utils/isCommercial.d.ts +0 -1
  104. package/dist/types-ts4.5/utils/mediaCdn.d.ts +0 -5
  105. package/dist/types-ts4.5/utils/mediaSubscribable/fromObservable.d.ts +0 -5
  106. package/dist/types-ts4.5/utils/mediaSubscribable/index.d.ts +0 -3
  107. package/dist/types-ts4.5/utils/mediaSubscribable/toPromise.d.ts +0 -10
  108. package/dist/types-ts4.5/utils/mediaSubscribable/types.d.ts +0 -17
  109. package/dist/types-ts4.5/utils/mobileUpload/error.d.ts +0 -33
  110. package/dist/types-ts4.5/utils/mobileUpload/helpers.d.ts +0 -8
  111. package/dist/types-ts4.5/utils/mobileUpload/index.d.ts +0 -5
  112. package/dist/types-ts4.5/utils/mobileUpload/servicesCache.d.ts +0 -4
  113. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/index.d.ts +0 -7
  114. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/error.d.ts +0 -3
  115. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processed.d.ts +0 -3
  116. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processing.d.ts +0 -3
  117. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processingFailed.d.ts +0 -3
  118. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/uploading.d.ts +0 -3
  119. package/dist/types-ts4.5/utils/mobileUpload/stateMachine/types.d.ts +0 -69
  120. package/dist/types-ts4.5/utils/overrideMediaTypeIfUnknown.d.ts +0 -5
  121. package/dist/types-ts4.5/utils/pathBasedUrl.d.ts +0 -3
  122. package/dist/types-ts4.5/utils/polling/errors.d.ts +0 -11
  123. package/dist/types-ts4.5/utils/polling/index.d.ts +0 -34
  124. package/dist/types-ts4.5/utils/polling/types.d.ts +0 -10
  125. package/dist/types-ts4.5/utils/request/errors.d.ts +0 -22
  126. package/dist/types-ts4.5/utils/request/helpers.d.ts +0 -32
  127. package/dist/types-ts4.5/utils/request/index.d.ts +0 -5
  128. package/dist/types-ts4.5/utils/request/types.d.ts +0 -47
  129. package/dist/types-ts4.5/utils/setTimeoutPromise.d.ts +0 -2
  130. package/dist/types-ts4.5/utils/shouldFetchRemoteFileStates.d.ts +0 -14
  131. package/dist/types-ts4.5/utils/url.d.ts +0 -18
  132. package/dist/types-ts4.5/utils/watermarkVersion.d.ts +0 -10
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/client/file-fetcher/error.js",
5
5
  "module:es2019": "../../dist/es2019/client/file-fetcher/error.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/client/file-fetcher/error.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/client/file-fetcher/error.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/client/file-fetcher/error.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/client/file-fetcher/index.js",
5
5
  "module:es2019": "../dist/es2019/client/file-fetcher/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/client/file-fetcher/index.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/client/file-fetcher/index.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/client/file-fetcher/index.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/models/file-state.js",
5
5
  "module:es2019": "../dist/es2019/models/file-state.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/models/file-state.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/models/file-state.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/models/file-state.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/file-streams-cache.js",
5
5
  "module:es2019": "../dist/es2019/file-streams-cache.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/file-streams-cache.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/file-streams-cache.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/file-streams-cache.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/mediaSubscribable/fromObservable.js",
5
5
  "module:es2019": "../dist/es2019/utils/mediaSubscribable/fromObservable.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/mediaSubscribable/fromObservable.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/mediaSubscribable/fromObservable.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/mediaSubscribable/fromObservable.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/getDimensionsFromBlob.js",
5
5
  "module:es2019": "../dist/es2019/utils/getDimensionsFromBlob.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/getDimensionsFromBlob.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/getDimensionsFromBlob.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/getDimensionsFromBlob.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/globalMediaEventEmitter.js",
5
5
  "module:es2019": "../dist/es2019/globalMediaEventEmitter.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/globalMediaEventEmitter.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/globalMediaEventEmitter.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/globalMediaEventEmitter.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/identifier.js",
5
5
  "module:es2019": "../dist/es2019/identifier.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/identifier.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/identifier.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/identifier.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/imageResizeModeToFileImageMode.js",
5
5
  "module:es2019": "../dist/es2019/utils/imageResizeModeToFileImageMode.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/imageResizeModeToFileImageMode.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/imageResizeModeToFileImageMode.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/imageResizeModeToFileImageMode.d.ts"
15
8
  }
package/item/package.json CHANGED
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/models/item.js",
5
5
  "module:es2019": "../dist/es2019/models/item.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/models/item.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/models/item.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/models/item.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/models/media.js",
5
5
  "module:es2019": "../dist/es2019/models/media.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/models/media.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/models/media.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/models/media.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/client/media-client.js",
5
5
  "module:es2019": "../dist/es2019/client/media-client.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/client/media-client.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/client/media-client.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/client/media-client.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/client/media-store/MediaStore.js",
5
5
  "module:es2019": "../dist/es2019/client/media-store/MediaStore.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/client/media-store/MediaStore.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/client/media-store/MediaStore.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/client/media-store/MediaStore.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/client/media-store/types.js",
5
5
  "module:es2019": "../../dist/es2019/client/media-store/types.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/client/media-store/types.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/client/media-store/types.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/client/media-store/types.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/mediaSubscribable/types.js",
5
5
  "module:es2019": "../../dist/es2019/utils/mediaSubscribable/types.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/mediaSubscribable/types.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/mediaSubscribable/types.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/mediaSubscribable/types.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/models/mobile-upload.js",
5
5
  "module:es2019": "../dist/es2019/models/mobile-upload.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/models/mobile-upload.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/models/mobile-upload.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/models/mobile-upload.d.ts"
15
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "36.3.3",
3
+ "version": "36.4.0",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@atlaskit/atlassian-context": "^0.10.0",
32
+ "@atlaskit/atlassian-context": "^0.11.0",
33
33
  "@atlaskit/chunkinator": "^7.1.0",
34
34
  "@atlaskit/media-common": "^13.3.0",
35
35
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -52,8 +52,8 @@
52
52
  "@atlaskit/media-core": "^37.1.0",
53
53
  "@atlaskit/media-state": "^2.2.0",
54
54
  "@atlaskit/ssr": "workspace:^",
55
- "@atlaskit/tokens": "^13.1.0",
56
- "@atlassian/a11y-jest-testing": "^0.11.0",
55
+ "@atlaskit/tokens": "^13.4.0",
56
+ "@atlassian/a11y-jest-testing": "^0.12.0",
57
57
  "@atlassian/feature-flags-test-utils": "^1.1.0",
58
58
  "@emotion/react": "^11.7.1",
59
59
  "@types/deep-equal": "^1.0.1",
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/polling/errors.js",
5
5
  "module:es2019": "../../dist/es2019/utils/polling/errors.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/polling/errors.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/polling/errors.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/polling/errors.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/polling/index.js",
5
5
  "module:es2019": "../dist/es2019/utils/polling/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/polling/index.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/polling/index.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/polling/index.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/polling/types.js",
5
5
  "module:es2019": "../../dist/es2019/utils/polling/types.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/polling/types.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/polling/types.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/polling/types.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/request/errors.js",
5
5
  "module:es2019": "../../dist/es2019/utils/request/errors.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/request/errors.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/request/errors.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/request/errors.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/request/helpers.js",
5
5
  "module:es2019": "../../dist/es2019/utils/request/helpers.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/request/helpers.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/request/helpers.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/request/helpers.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/request/index.js",
5
5
  "module:es2019": "../dist/es2019/utils/request/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/request/index.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/request/index.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/request/index.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../../dist/esm/utils/request/types.js",
5
5
  "module:es2019": "../../dist/es2019/utils/request/types.js",
6
6
  "sideEffects": false,
7
- "types": "../../dist/types/utils/request/types.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../../dist/types-ts4.5/utils/request/types.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../../dist/types/utils/request/types.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/client/stargate-client.js",
5
5
  "module:es2019": "../dist/es2019/client/stargate-client.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/client/stargate-client.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/client/stargate-client.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/client/stargate-client.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/upload-controller.js",
5
5
  "module:es2019": "../dist/es2019/upload-controller.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/upload-controller.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/upload-controller.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/upload-controller.d.ts"
15
8
  }
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/uploader/index.js",
5
5
  "module:es2019": "../dist/es2019/uploader/index.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/uploader/index.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/uploader/index.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/uploader/index.d.ts"
15
8
  }
package/url/package.json CHANGED
@@ -4,12 +4,5 @@
4
4
  "module": "../dist/esm/utils/url.js",
5
5
  "module:es2019": "../dist/es2019/utils/url.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/utils/url.d.ts",
8
- "typesVersions": {
9
- ">=4.5 <5.9": {
10
- "*": [
11
- "../dist/types-ts4.5/utils/url.d.ts"
12
- ]
13
- }
14
- }
7
+ "types": "../dist/types/utils/url.d.ts"
15
8
  }
@@ -1,7 +0,0 @@
1
- export declare const collectionCache: {};
2
- export declare class CollectionFetcher {
3
- constructor();
4
- getItems: jest.Mock<any, any, any>;
5
- removeFile: jest.Mock<any, any, any>;
6
- loadNextPage: jest.Mock<any, any, any>;
7
- }
@@ -1,9 +0,0 @@
1
- export declare class FileFetcher {
2
- constructor();
3
- getFileState: jest.Mock<any, any, any>;
4
- getCurrentState: jest.Mock<any, any, any>;
5
- getArtifactURL: jest.Mock<any, any, any>;
6
- touchFiles: jest.Mock<any, any, any>;
7
- upload: jest.Mock<any, any, any>;
8
- downloadBinary: jest.Mock<any, any, any>;
9
- }
@@ -1,10 +0,0 @@
1
- import { type MediaClientConfig } from '@atlaskit/media-core';
2
- import { type FileFetcher } from '../file-fetcher';
3
- export declare class MediaClient {
4
- readonly config: MediaClientConfig;
5
- readonly file: FileFetcher;
6
- constructor(config: MediaClientConfig);
7
- getImage: jest.Mock<any, any, any>;
8
- getImageUrl: jest.Mock<any, any, any>;
9
- getImageMetadata: jest.Mock<any, any, any>;
10
- }
@@ -1,29 +0,0 @@
1
- import { type FileState } from '@atlaskit/media-state';
2
- import { type AuthContext } from '@atlaskit/media-core';
3
- export type EventPayloadMap<P> = {
4
- readonly [event: string]: P;
5
- };
6
- export type EventPayloadListener<M extends EventPayloadMap<P>, E extends keyof M, P = any> = (payload: M[E]) => void;
7
- export interface MediaViewedEventPayload {
8
- fileId: string;
9
- viewingLevel: 'minimal' | 'full' | 'download';
10
- isUserCollection?: boolean;
11
- childFileName?: string;
12
- }
13
- export interface AuthProviderSucceededEventPayload {
14
- durationMs: number;
15
- timeoutMs: number;
16
- authContext?: AuthContext;
17
- }
18
- export interface AuthProviderFailedEventPayload {
19
- durationMs: number;
20
- timeoutMs: number;
21
- authContext?: AuthContext;
22
- error: Error;
23
- }
24
- export type UploadEventPayloadMap = {
25
- 'file-added': FileState;
26
- 'media-viewed': MediaViewedEventPayload;
27
- 'auth-provider-succeeded': AuthProviderSucceededEventPayload;
28
- 'auth-provider-failed': AuthProviderFailedEventPayload;
29
- };
@@ -1,33 +0,0 @@
1
- import { BaseMediaClientError } from '../../models/errors';
2
- import { type MediaTraceContext } from '@atlaskit/media-common';
3
- export type FileFetcherErrorReason = 'invalidFileId' | 'emptyItems' | 'zeroVersionFile' | 'emptyFileName';
4
- export type FileFetcherErrorAttributes = {
5
- readonly reason: FileFetcherErrorReason;
6
- readonly id: string;
7
- readonly metadata?: {
8
- readonly collectionName?: string;
9
- readonly occurrenceKey?: string;
10
- readonly traceContext?: MediaTraceContext;
11
- };
12
- };
13
- export type FileFetcherErrorMetadata = {
14
- readonly id: string;
15
- readonly collectionName?: string;
16
- readonly occurrenceKey?: string;
17
- readonly traceContext?: MediaTraceContext;
18
- };
19
- export declare class FileFetcherError extends BaseMediaClientError<FileFetcherErrorReason, FileFetcherErrorMetadata, undefined, FileFetcherErrorAttributes> {
20
- readonly id: string;
21
- constructor(reason: FileFetcherErrorReason, metadata: FileFetcherErrorMetadata);
22
- /** Will be deprecated. Use the properties `reason` and `metadata` instead */
23
- get attributes(): {
24
- metadata?: {
25
- traceContext: MediaTraceContext;
26
- } | undefined;
27
- reason: FileFetcherErrorReason;
28
- id: string;
29
- collectionName: string | undefined;
30
- occurrenceKey: string | undefined;
31
- };
32
- }
33
- export declare function isFileFetcherError(err: Error): err is FileFetcherError;
@@ -1,86 +0,0 @@
1
- import { type AuthProvider } from '@atlaskit/media-core';
2
- import { type MediaTraceContext } from '@atlaskit/media-common';
3
- import { type MediaFileArtifacts } from '@atlaskit/media-state';
4
- import { MediaStore as MediaApi, type MediaStoreCopyFileWithTokenParams, type TouchedFiles, type TouchFileDescriptor } from '../media-store';
5
- import { type GetFileOptions } from '../../models/file-state';
6
- import { type MediaItemDetails, type MediaFile } from '../../models/media';
7
- import { type UploadableFile, type UploadableFileUpfrontIds } from '../../uploader';
8
- import { type UploadController } from '../../upload-controller';
9
- import { type MediaSubscribable } from '../../utils/mediaSubscribable';
10
- import { type Dimensions } from '../../utils/getDimensionsFromBlob';
11
- import { type FilePreview, type FileState, type MediaStore } from '@atlaskit/media-state';
12
- import { type UploadArtifactParams } from '../media-store/types';
13
- export type { FileFetcherErrorAttributes, FileFetcherErrorReason } from './error';
14
- export { isFileFetcherError, FileFetcherError } from './error';
15
- export interface CopySourceFile {
16
- id: string;
17
- collection?: string;
18
- authProvider?: AuthProvider;
19
- clientId?: string;
20
- }
21
- export interface CopyDestination extends MediaStoreCopyFileWithTokenParams {
22
- authProvider?: AuthProvider;
23
- mediaStore?: MediaApi;
24
- }
25
- export interface CopyFileOptions {
26
- preview?: FilePreview | Promise<FilePreview>;
27
- mimeType?: string;
28
- }
29
- export type ExternalUploadPayload = {
30
- uploadableFileUpfrontIds: UploadableFileUpfrontIds;
31
- mimeType: string;
32
- dimensions: Dimensions;
33
- };
34
- export interface FileFetcher {
35
- getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
36
- getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string): Promise<string>;
37
- touchFiles(descriptors: TouchFileDescriptor[], collection?: string, traceContext?: MediaTraceContext): Promise<TouchedFiles>;
38
- upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext): MediaSubscribable;
39
- uploadExternal(url: string, collection?: string, traceContext?: MediaTraceContext, anonymizeFilename?: boolean): Promise<ExternalUploadPayload>;
40
- downloadBinary(id: string, name?: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
41
- getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
42
- copyFile(source: CopySourceFile, destination: CopyDestination, options?: CopyFileOptions, traceContext?: MediaTraceContext): Promise<MediaFile>;
43
- getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
44
- registerCopyIntent(id: string, collectionName?: string): Promise<void>;
45
- uploadArtifact(id: string, file: File, params: UploadArtifactParams, collectionName?: string, traceContext?: MediaTraceContext): Promise<MediaItemDetails>;
46
- deleteArtifact(id: string, artifactName: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
47
- /** @exprimental This is exprimental for the purposes of COMMIT-18082 and is prone to breaking changes */
48
- getVideoDurations(files: Array<{
49
- id: string;
50
- collectionName?: string;
51
- }>): Promise<{
52
- [key: string]: number;
53
- }>;
54
- }
55
- export declare class FileFetcherImpl implements FileFetcher {
56
- private readonly mediaApi;
57
- private readonly store;
58
- private readonly dataloader;
59
- private readonly copyIntentRegisterationBatcher;
60
- constructor(mediaApi: MediaApi, store?: MediaStore);
61
- private getErrorFileState;
62
- private setFileState;
63
- getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
64
- getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
65
- getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string): Promise<string>;
66
- getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
67
- private createDownloadFileStream;
68
- touchFiles(descriptors: TouchFileDescriptor[], collection?: string, traceContext?: MediaTraceContext): Promise<TouchedFiles>;
69
- private generateUploadableFileUpfrontIds;
70
- uploadExternal(url: string, collection?: string, traceContext?: MediaTraceContext, anonymizeFilename?: boolean): Promise<ExternalUploadPayload>;
71
- private getUploadingFileStateBase;
72
- upload(file: UploadableFile, controller?: UploadController, uploadableFileUpfrontIds?: UploadableFileUpfrontIds, traceContext?: MediaTraceContext): MediaSubscribable;
73
- downloadBinary(id: string, name?: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
74
- registerCopyIntent(id: string, collectionName?: string): Promise<void>;
75
- private copyFileWithToken;
76
- private copyFileWithIntent;
77
- copyFile(source: CopySourceFile, destination: CopyDestination, options?: CopyFileOptions, traceContext?: MediaTraceContext): Promise<MediaFile>;
78
- uploadArtifact: FileFetcher['uploadArtifact'];
79
- deleteArtifact: FileFetcher['deleteArtifact'];
80
- private getOrFetchFileState;
81
- private getDurationOfVideo;
82
- getVideoDurations: (files: Array<{
83
- id: string;
84
- collectionName?: string;
85
- }>) => Promise<Record<string, number>>;
86
- }