@atlaskit/media-client 37.1.2 → 37.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -5
- package/CHANGELOG.md +19 -0
- package/compass.yml +34 -14
- package/dist/cjs/client/file-fetcher/index.js +3 -3
- package/dist/cjs/client/media-store/MediaStore.js +7 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/media-core.js +12 -0
- package/dist/cjs/media-state.js +1 -0
- package/dist/es2019/client/file-fetcher/index.js +3 -3
- package/dist/es2019/client/media-store/MediaStore.js +6 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/media-core.js +1 -0
- package/dist/es2019/media-state.js +0 -0
- package/dist/esm/client/file-fetcher/index.js +3 -3
- package/dist/esm/client/media-store/MediaStore.js +7 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/media-core.js +1 -0
- package/dist/esm/media-state.js +0 -0
- package/dist/types/client/file-fetcher/index.d.ts +2 -2
- package/dist/types/client/media-store/MediaStore.d.ts +1 -1
- package/dist/types/client/media-store/types.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/media-core.d.ts +2 -0
- package/dist/types/media-state.d.ts +1 -0
- package/media-core/package.json +8 -0
- package/media-state/package.json +8 -0
- package/package.json +4 -3
package/AGENTS.md
CHANGED
|
@@ -26,11 +26,13 @@
|
|
|
26
26
|
> codebase and the docs after any code change. Use the `generate` subcommand to bootstrap the index
|
|
27
27
|
> in a new repository.
|
|
28
28
|
|
|
29
|
-
**Entry point:** `.agents/knowledge-index/INDEX.md`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
**CLI:**
|
|
33
|
-
|
|
29
|
+
**Entry point:** `.agents/knowledge-index/INDEX.md` **Unit doc:**
|
|
30
|
+
`.agents/knowledge-index/domains/media/units/atlaskit-media-client.md` **Standards page:**
|
|
31
|
+
`.agents/knowledge-index/domains/media/units/atlaskit-media-client/standards-and-patterns.md`
|
|
32
|
+
**CLI:**
|
|
33
|
+
`python3 .agents/skills/knowledge-index/scripts/kg.py {find,read,edit,investigate,validate,init,explore,generate} …`
|
|
34
|
+
**Refresh protocol:** never silently bump `Last verified` — always re-read the listed `Sources`
|
|
35
|
+
first, edit, then `kg.py edit <path> --message "<reason>"`.
|
|
34
36
|
|
|
35
37
|
## Key source files
|
|
36
38
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 37.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`bea4da79c297d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bea4da79c297d) -
|
|
8
|
+
[ux] EDITOR-7679 use fallback media name for filename in download
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 37.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`c2d43ab375005`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2d43ab375005) -
|
|
16
|
+
Autofix: add explicit package exports (barrel removal)
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 37.1.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/compass.yml
CHANGED
|
@@ -1,39 +1,59 @@
|
|
|
1
1
|
name: Media Client
|
|
2
|
-
id:
|
|
2
|
+
id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/652381b6-c323-4b50-bf31-c94941a0b6ef
|
|
3
3
|
description: Media API Web Client Library
|
|
4
4
|
configVersion: 1
|
|
5
5
|
typeId: UI_ELEMENT
|
|
6
|
-
ownerId:
|
|
6
|
+
ownerId: ari:cloud:teams::team/3bee892f-cb1b-496c-b866-0f08d9e0296c # Media EXIF
|
|
7
7
|
fields:
|
|
8
|
-
lifecycle: Active
|
|
9
8
|
tier: 4
|
|
9
|
+
lifecycle: Active
|
|
10
|
+
isMonorepoProject: true
|
|
10
11
|
labels:
|
|
11
12
|
- atlassian-platform
|
|
13
|
+
- platform-code
|
|
14
|
+
- platform-afm
|
|
12
15
|
links:
|
|
13
16
|
- name: Root Repository
|
|
14
17
|
type: REPOSITORY
|
|
15
18
|
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
|
|
16
19
|
- name: ''
|
|
17
20
|
type: REPOSITORY
|
|
18
|
-
url:
|
|
21
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/media/media-client/
|
|
19
22
|
- name: ''
|
|
20
23
|
type: DOCUMENT
|
|
21
|
-
url:
|
|
22
|
-
#- name: '' # Tome Capability
|
|
23
|
-
# type: OTHER_LINK
|
|
24
|
-
# url: ''
|
|
24
|
+
url: https://atlaskit.atlassian.com/packages/media/media-client
|
|
25
25
|
- name: Media By Product
|
|
26
26
|
type: DASHBOARD
|
|
27
|
-
url:
|
|
27
|
+
url: https://atlassian.signalfx.com/#/dashboard/E-vk3wqAwAA?groupId=E-vkzo1AwAA&configId=E-vk5fsAwAA&startTime=-7d&endTime=Now
|
|
28
28
|
- name: ''
|
|
29
29
|
type: CHAT_CHANNEL
|
|
30
|
-
url:
|
|
30
|
+
url: https://atlassian.slack.com/archives/C05J5GNHPLN
|
|
31
31
|
- name: ''
|
|
32
32
|
type: ON_CALL
|
|
33
|
-
url:
|
|
33
|
+
url: https://atlassian.app.opsgenie.com/settings/schedule/detail/b62291ff-4029-4f26-b7fc-d75d46d7aebc
|
|
34
34
|
- name: ''
|
|
35
35
|
type: PROJECT
|
|
36
|
-
url:
|
|
36
|
+
url: https://product-fabric.atlassian.net/jira/software/c/projects/BMPT/boards/5090
|
|
37
|
+
- name: Slack Channel
|
|
38
|
+
type: CHAT_CHANNEL
|
|
39
|
+
url: https://atlassian.enterprise.slack.com/archives/C05J5GNHPLN # #help-media-platform
|
|
40
|
+
- name: Media Client
|
|
41
|
+
type: REPOSITORY
|
|
42
|
+
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/media/media-client
|
|
37
43
|
relationships: {}
|
|
38
|
-
|
|
39
|
-
|
|
44
|
+
customFields:
|
|
45
|
+
- name: Department
|
|
46
|
+
type: text
|
|
47
|
+
value: Eng - Automation
|
|
48
|
+
- name: Technical Owner
|
|
49
|
+
type: user
|
|
50
|
+
value: ari:cloud:identity::user/712020:678ede01-221b-4b2f-9fce-adcc0b0d095e # Anupama Majety
|
|
51
|
+
- name: Required Reviewers Opt In
|
|
52
|
+
type: boolean
|
|
53
|
+
value: true
|
|
54
|
+
- name: Reviewer Selection Mechanism
|
|
55
|
+
type: text
|
|
56
|
+
value: random(2)
|
|
57
|
+
- name: Required Reviewer Approvals
|
|
58
|
+
type: number
|
|
59
|
+
value: 1
|
|
@@ -516,8 +516,8 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
516
516
|
}
|
|
517
517
|
}, {
|
|
518
518
|
key: "getFileBinaryURL",
|
|
519
|
-
value: function getFileBinaryURL(id, collectionName, maxAge) {
|
|
520
|
-
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge);
|
|
519
|
+
value: function getFileBinaryURL(id, collectionName, maxAge, name) {
|
|
520
|
+
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge, name);
|
|
521
521
|
}
|
|
522
522
|
}, {
|
|
523
523
|
key: "touchFiles",
|
|
@@ -764,7 +764,7 @@ var FileFetcherImpl = exports.FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
764
764
|
collectionName = _args1.length > 2 ? _args1[2] : undefined;
|
|
765
765
|
traceContext = _args1.length > 3 ? _args1[3] : undefined;
|
|
766
766
|
_context1.next = 1;
|
|
767
|
-
return this.mediaApi.getFileBinaryURL(id, collectionName);
|
|
767
|
+
return this.mediaApi.getFileBinaryURL(id, collectionName, undefined, name);
|
|
768
768
|
case 1:
|
|
769
769
|
url = _context1.sent;
|
|
770
770
|
(0, _downloadUrl.downloadUrl)(url, {
|
|
@@ -10,6 +10,7 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
14
|
var _mediaCore = require("@atlaskit/media-core");
|
|
14
15
|
var _constants = require("../../constants");
|
|
15
16
|
var _artifacts = require("../../models/artifacts");
|
|
@@ -519,6 +520,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
519
520
|
value: function () {
|
|
520
521
|
var _getFileBinaryURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee0(id, collectionName) {
|
|
521
522
|
var maxAge,
|
|
523
|
+
name,
|
|
522
524
|
auth,
|
|
523
525
|
options,
|
|
524
526
|
binaryEndpoint,
|
|
@@ -527,6 +529,7 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
527
529
|
while (1) switch (_context0.prev = _context0.next) {
|
|
528
530
|
case 0:
|
|
529
531
|
maxAge = _args0.length > 2 && _args0[2] !== undefined ? _args0[2] : _constants.FILE_CACHE_MAX_AGE;
|
|
532
|
+
name = _args0.length > 3 ? _args0[3] : undefined;
|
|
530
533
|
_context0.next = 1;
|
|
531
534
|
return this.resolveAuth({
|
|
532
535
|
collectionName: collectionName
|
|
@@ -534,11 +537,13 @@ var MediaStore = exports.MediaStore = /*#__PURE__*/function () {
|
|
|
534
537
|
case 1:
|
|
535
538
|
auth = _context0.sent;
|
|
536
539
|
options = {
|
|
537
|
-
params: {
|
|
540
|
+
params: _objectSpread({
|
|
538
541
|
dl: true,
|
|
539
542
|
collection: collectionName,
|
|
540
543
|
'max-age': maxAge
|
|
541
|
-
},
|
|
544
|
+
}, name && (0, _expValEquals.expValEquals)('platform_editor_media_download_fallback_name', 'isEnabled', true) ? {
|
|
545
|
+
name: name
|
|
546
|
+
} : {}),
|
|
542
547
|
auth: auth
|
|
543
548
|
};
|
|
544
549
|
binaryEndpoint = cdnFeatureFlag('binary');
|
package/dist/cjs/index.js
CHANGED
|
@@ -368,4 +368,4 @@ var _url = require("./utils/url");
|
|
|
368
368
|
var _mediaSubscribable = require("./utils/mediaSubscribable");
|
|
369
369
|
var _constants = require("./constants");
|
|
370
370
|
var _fileStreamsCache = require("./file-streams-cache");
|
|
371
|
-
var _mediaCore = require("
|
|
371
|
+
var _mediaCore = require("./media-core");
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ChunkHashAlgorithm", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _mediaCore.ChunkHashAlgorithm;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _mediaCore = require("@atlaskit/media-core");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -319,8 +319,8 @@ export class FileFetcherImpl {
|
|
|
319
319
|
getArtifactURL(artifacts, artifactName, collectionName) {
|
|
320
320
|
return this.mediaApi.getArtifactURL(artifacts, artifactName, collectionName);
|
|
321
321
|
}
|
|
322
|
-
getFileBinaryURL(id, collectionName, maxAge) {
|
|
323
|
-
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge);
|
|
322
|
+
getFileBinaryURL(id, collectionName, maxAge, name) {
|
|
323
|
+
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge, name);
|
|
324
324
|
}
|
|
325
325
|
touchFiles(descriptors, collection, traceContext, expectedFileSize) {
|
|
326
326
|
return this.mediaApi.touchFiles({
|
|
@@ -494,7 +494,7 @@ export class FileFetcherImpl {
|
|
|
494
494
|
return fromObservable(subject);
|
|
495
495
|
}
|
|
496
496
|
async downloadBinary(id, name = 'download', collectionName, traceContext) {
|
|
497
|
-
const url = await this.mediaApi.getFileBinaryURL(id, collectionName);
|
|
497
|
+
const url = await this.mediaApi.getFileBinaryURL(id, collectionName, undefined, name);
|
|
498
498
|
downloadUrl(url, {
|
|
499
499
|
name
|
|
500
500
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
2
3
|
import { isClientBasedAuth } from '@atlaskit/media-core';
|
|
3
4
|
import { FILE_CACHE_MAX_AGE, MAX_RESOLUTION } from '../../constants';
|
|
4
5
|
import { getArtifactUrl } from '../../models/artifacts';
|
|
@@ -343,7 +344,7 @@ export class MediaStore {
|
|
|
343
344
|
};
|
|
344
345
|
return this.request(`/file/${id}/${binaryEndpoint}`, options, abortController, true).then(createMapResponseToBlob(metadata));
|
|
345
346
|
}
|
|
346
|
-
async getFileBinaryURL(id, collectionName, maxAge = FILE_CACHE_MAX_AGE) {
|
|
347
|
+
async getFileBinaryURL(id, collectionName, maxAge = FILE_CACHE_MAX_AGE, name) {
|
|
347
348
|
const auth = await this.resolveAuth({
|
|
348
349
|
collectionName
|
|
349
350
|
});
|
|
@@ -351,7 +352,10 @@ export class MediaStore {
|
|
|
351
352
|
params: {
|
|
352
353
|
dl: true,
|
|
353
354
|
collection: collectionName,
|
|
354
|
-
'max-age': maxAge
|
|
355
|
+
'max-age': maxAge,
|
|
356
|
+
...(name && expValEquals('platform_editor_media_download_fallback_name', 'isEnabled', true) ? {
|
|
357
|
+
name
|
|
358
|
+
} : {})
|
|
355
359
|
},
|
|
356
360
|
auth
|
|
357
361
|
};
|
package/dist/es2019/index.js
CHANGED
|
@@ -21,4 +21,4 @@ export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString
|
|
|
21
21
|
export { createMediaSubscribable, fromObservable } from './utils/mediaSubscribable';
|
|
22
22
|
export { RECENTS_COLLECTION, MAX_RESOLUTION } from './constants';
|
|
23
23
|
export { getFileStreamsCache } from './file-streams-cache';
|
|
24
|
-
export { ChunkHashAlgorithm } from '
|
|
24
|
+
export { ChunkHashAlgorithm } from './media-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
File without changes
|
|
@@ -499,8 +499,8 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
499
499
|
}
|
|
500
500
|
}, {
|
|
501
501
|
key: "getFileBinaryURL",
|
|
502
|
-
value: function getFileBinaryURL(id, collectionName, maxAge) {
|
|
503
|
-
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge);
|
|
502
|
+
value: function getFileBinaryURL(id, collectionName, maxAge, name) {
|
|
503
|
+
return this.mediaApi.getFileBinaryURL(id, collectionName, maxAge, name);
|
|
504
504
|
}
|
|
505
505
|
}, {
|
|
506
506
|
key: "touchFiles",
|
|
@@ -747,7 +747,7 @@ export var FileFetcherImpl = /*#__PURE__*/function () {
|
|
|
747
747
|
collectionName = _args1.length > 2 ? _args1[2] : undefined;
|
|
748
748
|
traceContext = _args1.length > 3 ? _args1[3] : undefined;
|
|
749
749
|
_context1.next = 1;
|
|
750
|
-
return this.mediaApi.getFileBinaryURL(id, collectionName);
|
|
750
|
+
return this.mediaApi.getFileBinaryURL(id, collectionName, undefined, name);
|
|
751
751
|
case 1:
|
|
752
752
|
url = _context1.sent;
|
|
753
753
|
downloadUrl(url, {
|
|
@@ -5,6 +5,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { isClientBasedAuth } from '@atlaskit/media-core';
|
|
9
10
|
import { FILE_CACHE_MAX_AGE, MAX_RESOLUTION } from '../../constants';
|
|
10
11
|
import { getArtifactUrl } from '../../models/artifacts';
|
|
@@ -513,6 +514,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
513
514
|
value: function () {
|
|
514
515
|
var _getFileBinaryURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee0(id, collectionName) {
|
|
515
516
|
var maxAge,
|
|
517
|
+
name,
|
|
516
518
|
auth,
|
|
517
519
|
options,
|
|
518
520
|
binaryEndpoint,
|
|
@@ -521,6 +523,7 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
521
523
|
while (1) switch (_context0.prev = _context0.next) {
|
|
522
524
|
case 0:
|
|
523
525
|
maxAge = _args0.length > 2 && _args0[2] !== undefined ? _args0[2] : FILE_CACHE_MAX_AGE;
|
|
526
|
+
name = _args0.length > 3 ? _args0[3] : undefined;
|
|
524
527
|
_context0.next = 1;
|
|
525
528
|
return this.resolveAuth({
|
|
526
529
|
collectionName: collectionName
|
|
@@ -528,11 +531,13 @@ export var MediaStore = /*#__PURE__*/function () {
|
|
|
528
531
|
case 1:
|
|
529
532
|
auth = _context0.sent;
|
|
530
533
|
options = {
|
|
531
|
-
params: {
|
|
534
|
+
params: _objectSpread({
|
|
532
535
|
dl: true,
|
|
533
536
|
collection: collectionName,
|
|
534
537
|
'max-age': maxAge
|
|
535
|
-
},
|
|
538
|
+
}, name && expValEquals('platform_editor_media_download_fallback_name', 'isEnabled', true) ? {
|
|
539
|
+
name: name
|
|
540
|
+
} : {}),
|
|
536
541
|
auth: auth
|
|
537
542
|
};
|
|
538
543
|
binaryEndpoint = cdnFeatureFlag('binary');
|
package/dist/esm/index.js
CHANGED
|
@@ -21,4 +21,4 @@ export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString
|
|
|
21
21
|
export { createMediaSubscribable, fromObservable } from './utils/mediaSubscribable';
|
|
22
22
|
export { RECENTS_COLLECTION, MAX_RESOLUTION } from './constants';
|
|
23
23
|
export { getFileStreamsCache } from './file-streams-cache';
|
|
24
|
-
export { ChunkHashAlgorithm } from '
|
|
24
|
+
export { ChunkHashAlgorithm } from './media-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
File without changes
|
|
@@ -40,7 +40,7 @@ export interface FileFetcher {
|
|
|
40
40
|
downloadBinary(id: string, name?: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
41
41
|
getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
|
|
42
42
|
copyFile(source: CopySourceFile, destination: CopyDestination, options?: CopyFileOptions, traceContext?: MediaTraceContext): Promise<MediaFile>;
|
|
43
|
-
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
|
|
43
|
+
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number, name?: string): Promise<string>;
|
|
44
44
|
registerCopyIntent(id: string, collectionName?: string): Promise<void>;
|
|
45
45
|
uploadArtifact(id: string, file: File, params: UploadArtifactParams, collectionName?: string, traceContext?: MediaTraceContext): Promise<MediaItemDetails>;
|
|
46
46
|
deleteArtifact(id: string, artifactName: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
@@ -63,7 +63,7 @@ export declare class FileFetcherImpl implements FileFetcher {
|
|
|
63
63
|
getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
|
|
64
64
|
getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
|
|
65
65
|
getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string): Promise<string>;
|
|
66
|
-
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
|
|
66
|
+
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number, name?: string): Promise<string>;
|
|
67
67
|
private createDownloadFileStream;
|
|
68
68
|
touchFiles(descriptors: TouchFileDescriptor[], collection?: string, traceContext?: MediaTraceContext, expectedFileSize?: number): Promise<TouchedFiles>;
|
|
69
69
|
private generateUploadableFileUpfrontIds;
|
|
@@ -27,7 +27,7 @@ export declare class MediaStore implements MediaApi {
|
|
|
27
27
|
getFileImageURLSync(id: string, params?: MediaStoreGetFileImageParams): string;
|
|
28
28
|
private createFileImageURL;
|
|
29
29
|
getFileBinary(id: string, collectionName?: string, abortController?: AbortController, maxAge?: number): Promise<Blob>;
|
|
30
|
-
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
|
|
30
|
+
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number, name?: string): Promise<string>;
|
|
31
31
|
getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string, maxAge?: number): Promise<string>;
|
|
32
32
|
getArtifactBinary: MediaApi['getArtifactBinary'];
|
|
33
33
|
uploadArtifact: MediaApi['uploadArtifact'];
|
|
@@ -179,7 +179,7 @@ export interface MediaApi {
|
|
|
179
179
|
getFileImageURL: (id: string, params?: MediaStoreGetFileImageParams) => Promise<string>;
|
|
180
180
|
getFileImageURLSync: (id: string, params?: MediaStoreGetFileImageParams) => string;
|
|
181
181
|
getFileBinary: (id: string, collectionName?: string, abortController?: AbortController) => Promise<Blob>;
|
|
182
|
-
getFileBinaryURL: (id: string, collectionName?: string) => Promise<string>;
|
|
182
|
+
getFileBinaryURL: (id: string, collectionName?: string, maxAge?: number, name?: string) => Promise<string>;
|
|
183
183
|
getArtifactURL: (artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string) => Promise<string>;
|
|
184
184
|
getArtifactBinary(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, options: GetArtifactBinaryOptions): Promise<Blob>;
|
|
185
185
|
uploadArtifact(id: string, file: File, params: UploadArtifactParams, collectionName?: string, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaItemDetails>>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { isMediaClientError, getMediaClientErrorReason, isCommonMediaClientError
|
|
|
10
10
|
export type { MediaClientError, MediaClientErrorReason, MediaClientErrorAttributes, } from './models/errors';
|
|
11
11
|
export { isUploadingFileState, isProcessingFileState, isProcessedFileState, isErrorFileState, isPreviewableFileState, isFinalFileState, isImageRepresentationReady, isNonErrorFinalFileState, mapMediaFileToFileState, mapMediaItemToFileState, hasArtifacts, } from './models/file-state';
|
|
12
12
|
export type { FileStatus, PreviewOptions, GetFileOptions, NonErrorFileState, PreviewableFileState, } from './models/file-state';
|
|
13
|
-
export type { FileState, FilePreview, ErrorFileState, UploadingFileState, ProcessingFileState, ProcessedFileState, ProcessingFailedState, MediaFileArtifact, MediaFileArtifacts, } from '
|
|
13
|
+
export type { FileState, FilePreview, ErrorFileState, UploadingFileState, ProcessingFileState, ProcessedFileState, ProcessingFailedState, MediaFileArtifact, MediaFileArtifacts, } from './media-state';
|
|
14
14
|
export type { MobileUpload, MobileUploadStartEvent, MobileUploadProgressEvent, MobileUploadEndEvent, MobileUploadErrorEvent, } from './models/mobile-upload';
|
|
15
15
|
export { uploadFile } from './uploader';
|
|
16
16
|
export type { UploadableFile, UploadableFileUpfrontIds, UploadFileCallbacks, UploadFileResult, } from './uploader';
|
|
@@ -34,7 +34,7 @@ export { createMediaSubject } from './utils/createMediaSubject';
|
|
|
34
34
|
export { isFileIdentifier, isExternalImageIdentifier, isDifferentIdentifier } from './identifier';
|
|
35
35
|
export type { Identifier, FileIdentifier, ExternalImageIdentifier } from './identifier';
|
|
36
36
|
export type { EventPayloadListener, UploadEventPayloadMap, MediaViewedEventPayload, AuthProviderSucceededEventPayload, AuthProviderFailedEventPayload, } from './client/events';
|
|
37
|
-
export type { MediaClientConfig } from '
|
|
37
|
+
export type { MediaClientConfig } from './media-core';
|
|
38
38
|
export { globalMediaEventEmitter } from './globalMediaEventEmitter';
|
|
39
39
|
export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString, } from './utils/url';
|
|
40
40
|
export type { MediaBlobUrlAttrs } from './utils/url';
|
|
@@ -42,4 +42,4 @@ export { createMediaSubscribable, fromObservable } from './utils/mediaSubscribab
|
|
|
42
42
|
export type { MediaSubscribable, MediaSubscription, MediaObserver, } from './utils/mediaSubscribable';
|
|
43
43
|
export { RECENTS_COLLECTION, MAX_RESOLUTION } from './constants';
|
|
44
44
|
export { getFileStreamsCache } from './file-streams-cache';
|
|
45
|
-
export { ChunkHashAlgorithm } from '
|
|
45
|
+
export { ChunkHashAlgorithm } from './media-core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { FileState, FilePreview, ErrorFileState, UploadingFileState, ProcessingFileState, ProcessedFileState, ProcessingFailedState, MediaFileArtifact, MediaFileArtifacts, } from '@atlaskit/media-state';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "37.1
|
|
3
|
+
"version": "37.2.1",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/atlassian-context": "^1.0.0",
|
|
25
25
|
"@atlaskit/chunkinator": "^8.0.0",
|
|
26
|
-
"@atlaskit/media-common": "^14.
|
|
26
|
+
"@atlaskit/media-common": "^14.2.0",
|
|
27
27
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
28
|
+
"@atlaskit/tmp-editor-statsig": "^121.1.0",
|
|
28
29
|
"@babel/runtime": "^7.0.0",
|
|
29
30
|
"dataloader": "^2.1.0",
|
|
30
31
|
"deep-equal": "^1.0.1",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"@atlaskit/media-core": "^38.0.0",
|
|
45
46
|
"@atlaskit/media-state": "^3.0.0",
|
|
46
47
|
"@atlaskit/ssr": "workspace:^",
|
|
47
|
-
"@atlaskit/tokens": "^15.
|
|
48
|
+
"@atlaskit/tokens": "^15.4.0",
|
|
48
49
|
"@atlassian/a11y-jest-testing": "^0.13.0",
|
|
49
50
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
50
51
|
"@emotion/react": "^11.7.1",
|