@atlaskit/media-client 29.0.0 → 29.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 29.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#97492](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97492)
8
+ [`5195c4fd974a3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5195c4fd974a3) -
9
+ Extended internal types with AbuseClassification attribute
10
+
3
11
  ## 29.0.0
4
12
 
5
13
  ### Major Changes
@@ -48,7 +48,8 @@ var mapMediaFileToFileState = exports.mapMediaFileToFileState = function mapMedi
48
48
  representations = _mediaFile$data.representations,
49
49
  createdAt = _mediaFile$data.createdAt,
50
50
  metadataTraceContext = _mediaFile$data.metadataTraceContext,
51
- hash = _mediaFile$data.hash;
51
+ hash = _mediaFile$data.hash,
52
+ abuseClassification = _mediaFile$data.abuseClassification;
52
53
  var baseState = {
53
54
  id: id,
54
55
  name: name,
@@ -59,7 +60,8 @@ var mapMediaFileToFileState = exports.mapMediaFileToFileState = function mapMedi
59
60
  representations: representations,
60
61
  createdAt: createdAt,
61
62
  hash: hash,
62
- metadataTraceContext: metadataTraceContext
63
+ metadataTraceContext: metadataTraceContext,
64
+ abuseClassification: abuseClassification
63
65
  };
64
66
  switch (processingStatus) {
65
67
  case 'pending':
@@ -26,7 +26,8 @@ export const mapMediaFileToFileState = mediaFile => {
26
26
  representations,
27
27
  createdAt,
28
28
  metadataTraceContext,
29
- hash
29
+ hash,
30
+ abuseClassification
30
31
  } = mediaFile.data;
31
32
  const baseState = {
32
33
  id,
@@ -38,7 +39,8 @@ export const mapMediaFileToFileState = mediaFile => {
38
39
  representations,
39
40
  createdAt,
40
41
  hash,
41
- metadataTraceContext
42
+ metadataTraceContext,
43
+ abuseClassification
42
44
  };
43
45
  switch (processingStatus) {
44
46
  case 'pending':
@@ -41,7 +41,8 @@ export var mapMediaFileToFileState = function mapMediaFileToFileState(mediaFile)
41
41
  representations = _mediaFile$data.representations,
42
42
  createdAt = _mediaFile$data.createdAt,
43
43
  metadataTraceContext = _mediaFile$data.metadataTraceContext,
44
- hash = _mediaFile$data.hash;
44
+ hash = _mediaFile$data.hash,
45
+ abuseClassification = _mediaFile$data.abuseClassification;
45
46
  var baseState = {
46
47
  id: id,
47
48
  name: name,
@@ -52,7 +53,8 @@ export var mapMediaFileToFileState = function mapMediaFileToFileState(mediaFile)
52
53
  representations: representations,
53
54
  createdAt: createdAt,
54
55
  hash: hash,
55
- metadataTraceContext: metadataTraceContext
56
+ metadataTraceContext: metadataTraceContext,
57
+ abuseClassification: abuseClassification
56
58
  };
57
59
  switch (processingStatus) {
58
60
  case 'pending':
@@ -3,6 +3,10 @@ import { type MediaFileArtifacts } from '@atlaskit/media-state';
3
3
  export type MediaFileProcessingStatus = 'pending' | 'succeeded' | 'failed';
4
4
  export type { MediaType } from '@atlaskit/media-common';
5
5
  export declare const isPreviewableType: (type: MediaType) => boolean;
6
+ export type AbuseClassification = {
7
+ classification: 'ABHORRENT' | 'MALICIOUS' | 'ILLICIT' | 'COPYRIGHT';
8
+ confidence: 'HIGH' | 'MEDIUM' | 'LOW';
9
+ };
6
10
  export type MediaFile = {
7
11
  readonly id: string;
8
12
  readonly mediaType: MediaType;
@@ -15,6 +19,7 @@ export type MediaFile = {
15
19
  readonly createdAt?: number;
16
20
  readonly hash?: string;
17
21
  readonly metadataTraceContext?: MediaTraceContext;
22
+ readonly abuseClassification?: AbuseClassification;
18
23
  };
19
24
  export type MediaItemDetails = {
20
25
  readonly mediaType: MediaType;
@@ -27,6 +32,7 @@ export type MediaItemDetails = {
27
32
  readonly createdAt?: number;
28
33
  readonly hash?: string;
29
34
  readonly metadataTraceContext?: MediaTraceContext;
35
+ readonly abuseClassification?: AbuseClassification;
30
36
  };
31
37
  export type NotFoundMediaItemDetails = {
32
38
  readonly id: string;
@@ -36,7 +42,7 @@ export type NotFoundMediaItemDetails = {
36
42
  };
37
43
  export declare const isNotFoundMediaItemDetails: (itemDetails: any) => itemDetails is NotFoundMediaItemDetails;
38
44
  export type MediaRepresentations = {
39
- image?: Object;
45
+ image?: object;
40
46
  };
41
47
  export type MediaUpload = {
42
48
  readonly id: string;
@@ -3,6 +3,10 @@ import { type MediaFileArtifacts } from '@atlaskit/media-state';
3
3
  export type MediaFileProcessingStatus = 'pending' | 'succeeded' | 'failed';
4
4
  export type { MediaType } from '@atlaskit/media-common';
5
5
  export declare const isPreviewableType: (type: MediaType) => boolean;
6
+ export type AbuseClassification = {
7
+ classification: 'ABHORRENT' | 'MALICIOUS' | 'ILLICIT' | 'COPYRIGHT';
8
+ confidence: 'HIGH' | 'MEDIUM' | 'LOW';
9
+ };
6
10
  export type MediaFile = {
7
11
  readonly id: string;
8
12
  readonly mediaType: MediaType;
@@ -15,6 +19,7 @@ export type MediaFile = {
15
19
  readonly createdAt?: number;
16
20
  readonly hash?: string;
17
21
  readonly metadataTraceContext?: MediaTraceContext;
22
+ readonly abuseClassification?: AbuseClassification;
18
23
  };
19
24
  export type MediaItemDetails = {
20
25
  readonly mediaType: MediaType;
@@ -27,6 +32,7 @@ export type MediaItemDetails = {
27
32
  readonly createdAt?: number;
28
33
  readonly hash?: string;
29
34
  readonly metadataTraceContext?: MediaTraceContext;
35
+ readonly abuseClassification?: AbuseClassification;
30
36
  };
31
37
  export type NotFoundMediaItemDetails = {
32
38
  readonly id: string;
@@ -36,7 +42,7 @@ export type NotFoundMediaItemDetails = {
36
42
  };
37
43
  export declare const isNotFoundMediaItemDetails: (itemDetails: any) => itemDetails is NotFoundMediaItemDetails;
38
44
  export type MediaRepresentations = {
39
- image?: Object;
45
+ image?: object;
40
46
  };
41
47
  export type MediaUpload = {
42
48
  readonly id: string;
@@ -112,6 +112,7 @@ export const rowStyles = css({
112
112
 
113
113
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
114
114
  export const responseStyles = css({
115
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
115
116
  fontFamily: 'monospace',
116
117
  whiteSpace: 'pre',
117
118
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-client",
3
- "version": "29.0.0",
3
+ "version": "29.0.1",
4
4
  "description": "Media API Web Client Library",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@atlaskit/media-core": "^34.4.0",
58
- "@atlaskit/media-state": "^1.2.0",
58
+ "@atlaskit/media-state": "^1.3.0",
59
59
  "@atlaskit/ssr": "*",
60
60
  "@atlaskit/tokens": "^2.5.0",
61
61
  "@atlassian/feature-flags-test-utils": "0.2.3",