@atlaskit/media-client 35.0.0 → 35.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 35.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#185135](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185135)
8
+ [`3d2527a53b492`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d2527a53b492) -
9
+ Add media metadata fields to relevant types/mappings
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 35.0.0
4
16
 
5
17
  ### Major Changes
@@ -55,7 +55,8 @@ var mapMediaFileToFileState = exports.mapMediaFileToFileState = function mapMedi
55
55
  createdAt = _mediaFile$data.createdAt,
56
56
  metadataTraceContext = _mediaFile$data.metadataTraceContext,
57
57
  hash = _mediaFile$data.hash,
58
- abuseClassification = _mediaFile$data.abuseClassification;
58
+ abuseClassification = _mediaFile$data.abuseClassification,
59
+ mediaMetadata = _mediaFile$data.mediaMetadata;
59
60
  var baseState = {
60
61
  id: id,
61
62
  name: name,
@@ -67,7 +68,8 @@ var mapMediaFileToFileState = exports.mapMediaFileToFileState = function mapMedi
67
68
  createdAt: createdAt,
68
69
  hash: hash,
69
70
  metadataTraceContext: metadataTraceContext,
70
- abuseClassification: abuseClassification
71
+ abuseClassification: abuseClassification,
72
+ mediaMetadata: mediaMetadata
71
73
  };
72
74
  switch (processingStatus) {
73
75
  case 'pending':
@@ -29,7 +29,8 @@ export const mapMediaFileToFileState = mediaFile => {
29
29
  createdAt,
30
30
  metadataTraceContext,
31
31
  hash,
32
- abuseClassification
32
+ abuseClassification,
33
+ mediaMetadata
33
34
  } = mediaFile.data;
34
35
  const baseState = {
35
36
  id,
@@ -42,7 +43,8 @@ export const mapMediaFileToFileState = mediaFile => {
42
43
  createdAt,
43
44
  hash,
44
45
  metadataTraceContext,
45
- abuseClassification
46
+ abuseClassification,
47
+ mediaMetadata
46
48
  };
47
49
  switch (processingStatus) {
48
50
  case 'pending':
@@ -48,7 +48,8 @@ export var mapMediaFileToFileState = function mapMediaFileToFileState(mediaFile)
48
48
  createdAt = _mediaFile$data.createdAt,
49
49
  metadataTraceContext = _mediaFile$data.metadataTraceContext,
50
50
  hash = _mediaFile$data.hash,
51
- abuseClassification = _mediaFile$data.abuseClassification;
51
+ abuseClassification = _mediaFile$data.abuseClassification,
52
+ mediaMetadata = _mediaFile$data.mediaMetadata;
52
53
  var baseState = {
53
54
  id: id,
54
55
  name: name,
@@ -60,7 +61,8 @@ export var mapMediaFileToFileState = function mapMediaFileToFileState(mediaFile)
60
61
  createdAt: createdAt,
61
62
  hash: hash,
62
63
  metadataTraceContext: metadataTraceContext,
63
- abuseClassification: abuseClassification
64
+ abuseClassification: abuseClassification,
65
+ mediaMetadata: mediaMetadata
64
66
  };
65
67
  switch (processingStatus) {
66
68
  case 'pending':
@@ -7,6 +7,9 @@ export type AbuseClassification = {
7
7
  classification: 'ABHORRENT' | 'MALICIOUS' | 'ILLICIT' | 'COPYRIGHT';
8
8
  confidence: 'HIGH' | 'MEDIUM' | 'LOW' | 'SYNTHETIC';
9
9
  };
10
+ export type FileMediaMetadata = {
11
+ duration?: number;
12
+ };
10
13
  export type MediaFile = {
11
14
  readonly id: string;
12
15
  readonly mediaType: MediaType;
@@ -20,6 +23,7 @@ export type MediaFile = {
20
23
  readonly hash?: string;
21
24
  readonly metadataTraceContext?: MediaTraceContext;
22
25
  readonly abuseClassification?: AbuseClassification;
26
+ readonly mediaMetadata?: FileMediaMetadata;
23
27
  };
24
28
  export type MediaItemDetails = {
25
29
  readonly mediaType: MediaType;
@@ -33,6 +37,7 @@ export type MediaItemDetails = {
33
37
  readonly hash?: string;
34
38
  readonly metadataTraceContext?: MediaTraceContext;
35
39
  readonly abuseClassification?: AbuseClassification;
40
+ readonly mediaMetadata?: FileMediaMetadata;
36
41
  };
37
42
  export type NotFoundMediaItemDetails = {
38
43
  readonly id: string;
@@ -7,6 +7,9 @@ export type AbuseClassification = {
7
7
  classification: 'ABHORRENT' | 'MALICIOUS' | 'ILLICIT' | 'COPYRIGHT';
8
8
  confidence: 'HIGH' | 'MEDIUM' | 'LOW' | 'SYNTHETIC';
9
9
  };
10
+ export type FileMediaMetadata = {
11
+ duration?: number;
12
+ };
10
13
  export type MediaFile = {
11
14
  readonly id: string;
12
15
  readonly mediaType: MediaType;
@@ -20,6 +23,7 @@ export type MediaFile = {
20
23
  readonly hash?: string;
21
24
  readonly metadataTraceContext?: MediaTraceContext;
22
25
  readonly abuseClassification?: AbuseClassification;
26
+ readonly mediaMetadata?: FileMediaMetadata;
23
27
  };
24
28
  export type MediaItemDetails = {
25
29
  readonly mediaType: MediaType;
@@ -33,6 +37,7 @@ export type MediaItemDetails = {
33
37
  readonly hash?: string;
34
38
  readonly metadataTraceContext?: MediaTraceContext;
35
39
  readonly abuseClassification?: AbuseClassification;
40
+ readonly mediaMetadata?: FileMediaMetadata;
36
41
  };
37
42
  export type NotFoundMediaItemDetails = {
38
43
  readonly id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "35.0.0",
3
+ "version": "35.1.0",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,13 +51,13 @@
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@atlaskit/media-core": "^37.0.0",
54
- "@atlaskit/media-state": "^1.7.0"
54
+ "@atlaskit/media-state": "^1.8.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@atlaskit/media-core": "^37.0.0",
58
- "@atlaskit/media-state": "^1.7.0",
58
+ "@atlaskit/media-state": "^1.8.0",
59
59
  "@atlaskit/ssr": "workspace:^",
60
- "@atlaskit/tokens": "^5.4.0",
60
+ "@atlaskit/tokens": "^5.5.0",
61
61
  "@atlassian/feature-flags-test-utils": "^0.3.0",
62
62
  "@emotion/react": "^11.7.1",
63
63
  "@types/deep-equal": "^1.0.1",