<!-- API Report Version: 2.3 -->

## API Report File for "@atlaskit/media-common"

> Do not edit this file. This report is auto-generated using
> [API Extractor](https://api-extractor.com/).
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)

### Table of contents

- [Main Entry Types](#main-entry-types)
- [Peer Dependencies](#peer-dependencies)

### Main Entry Types

<!--SECTION START: Main Entry Types-->

```ts
import { GasCorePayload } from '@atlaskit/analytics-gas-types';
import { default as React_2 } from 'react';

// @public (undocumented)
export const ANALYTICS_MEDIA_CHANNEL = 'media';

// @public (undocumented)
type BaseAttributes = {};

// @public (undocumented)
type BaseEventPayload<Attributes extends BaseAttributes> = Omit<GasCorePayload, 'attributes'> & {
	attributes: Attributes;
};

// @public (undocumented)
export type ContextPublicAttributes = PackageAttributes;

// @public (undocumented)
export type ContextStaticProps = WithMediaFeatureFlags;

// @public (undocumented)
export const debounce: (func: Function, wait: number) => (...args: any[]) => void;

// @public
export const defaultMediaFeatureFlags: Required<MediaFeatureFlags>;

// @public (undocumented)
export const downloadUrl: (url: string, options?: DownloadUrlOptions) => void;

// @public (undocumented)
interface DownloadUrlOptions {
	// (undocumented)
	name?: string;
}

// @public (undocumented)
export type FailureAttributes = {
	status: 'fail';
	failReason: string;
	error?: string;
	errorDetail?: string;
};

// @public (undocumented)
export type FileAttributes = {
	fileId: string;
	fileSize?: number;
	fileMediatype?: MediaType;
	fileMimetype?: string;
	fileSource?: string;
	fileStatus?: FileStatus;
};

// @public (undocumented)
export type FileStatus = 'error' | 'failed-processing' | 'processed' | 'processing' | 'uploading';

// @public (undocumented)
export const filterFeatureFlagNames: (
	flags: RequiredMediaFeatureFlags,
) => Array<keyof MediaFeatureFlags>;

// @public
export const getFeatureFlagKeysAllProducts: () => Array<string>;

// @public
export function getMediaFeatureFlag<T = boolean>(
	flagName: keyof MediaFeatureFlags,
	featureFlags?: MediaFeatureFlags,
): T;

// @public (undocumented)
export const getMediaTypeFromMimeType: (mimeType: string) => MediaType;

// @public (undocumented)
export function getRandomHex(byte: number): string;

// @public (undocumented)
export const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public (undocumented)
export const isDocumentMimeTypeSupportedByBrowser: (mimeType: string) => boolean;

// @public (undocumented)
export const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public (undocumented)
export const isImageMimeTypeSupportedByBrowser: (mimeType: string) => boolean;

// @public (undocumented)
export const isImageMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public (undocumented)
export const isMimeTypeSupportedByBrowser: (mimeType: string) => boolean;

// @public (undocumented)
export const isMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public (undocumented)
export const isUndefined: (value: any) => boolean;

// @public (undocumented)
export const isUnknownMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public
export const isVideoMimeTypeSupportedByBrowser: (mimeType: string) => boolean;

// @public (undocumented)
export const isVideoMimeTypeSupportedByServer: (mimeType: string) => boolean;

// @public (undocumented)
export const matches: (srcObj: Object) => (obj: Object) => boolean;

// @public (undocumented)
export interface MediaFeatureFlags {
	// (undocumented)
	folderUploads?: boolean;
	// (undocumented)
	mediaInline?: boolean;
}

// @public (undocumented)
export type MediaTraceContext = {
	traceId: string;
	spanId?: string;
};

// @public (undocumented)
export type MediaType = 'archive' | 'audio' | 'doc' | 'image' | 'unknown' | 'video';

// @public (undocumented)
export interface NumericalCardDimensions {
	// (undocumented)
	height: number;
	// (undocumented)
	width: number;
}

// @public (undocumented)
export const omitBy: (
	obj: Object,
	predicate: Function,
) => {
	[k: string]: any;
};

// @public (undocumented)
export type OperationalAttributes =
	| (BaseAttributes &
			WithFileAttributes &
			StatusAttributes &
			WithPerformanceAttributes &
			WithTraceContext)
	| (BaseAttributes & WithFileAttributes & StatusAttributes)
	| (BaseAttributes & WithFileAttributes)
	| BaseAttributes;

// @public (undocumented)
export type OperationalEventPayload<
	Attributes extends OperationalAttributes,
	Action extends string,
	ActionSubject extends string,
	ActionSubjectId extends string = string,
> = BaseEventPayload<Attributes> & {
	eventType: 'operational';
	action: Action;
	actionSubject: ActionSubject;
	actionSubjectId?: ActionSubjectId;
};

// @public (undocumented)
export type PackageAttributes = {
	packageName: string;
	packageVersion: string;
	componentName: string;
	component: string;
};

// @public (undocumented)
export type PerformanceAttributes = {
	overall: {
		durationSincePageStart: number;
		durationSinceCommenced?: number;
	};
};

// @public (undocumented)
export const pick: (
	obj?: Object,
	keys?: Array<String>,
) => {
	[k: string]: any;
};

// @public (undocumented)
type RequiredMediaFeatureFlags = Record<keyof Required<MediaFeatureFlags>, boolean>;

// @public (undocumented)
export type ScreenAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;

// @public (undocumented)
export type ScreenEventPayload<
	Attributes extends ScreenAttributes,
	ActionSubject extends string,
> = BaseEventPayload<Attributes> & {
	eventType: 'screen';
	actionSubject: ActionSubject;
	name: ActionSubject;
};

// @public (undocumented)
export type SSR = 'client' | 'server';

// @public (undocumented)
type StatusAttributes = FailureAttributes | SuccessAttributes;

// @public (undocumented)
export type SuccessAttributes = {
	status: 'success';
	fileMediatype?: MediaType;
};

// @public (undocumented)
export type TrackAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;

// @public (undocumented)
export type TrackEventPayload<
	Attributes extends TrackAttributes,
	Action extends string,
	ActionSubject extends string,
	ActionSubjectId extends string = string,
> = BaseEventPayload<Attributes> & {
	eventType: 'track';
	action: Action;
	actionSubject: ActionSubject;
	actionSubjectId?: ActionSubjectId;
};

// @public (undocumented)
export type UIAttributes = (BaseAttributes & WithFileAttributes) | BaseAttributes;

// @public (undocumented)
export type UIEventPayload<
	Attributes extends UIAttributes,
	Action extends string,
	ActionSubject extends string,
> = BaseEventPayload<Attributes> & {
	eventType: 'ui';
	action: Action;
	actionSubject: ActionSubject;
	actionSubjectId?: string;
};

// @public (undocumented)
export type WithFileAttributes = {
	fileAttributes: FileAttributes;
};

// @public
export const withMediaAnalyticsContext: (
	contextPublicAttributes: ContextPublicAttributes,
) => <Props extends WithMediaFeatureFlags, Component extends React_2.ComponentType<Props>>(
	WrappedComponent: React_2.JSXElementConstructor<Props> & Component,
) => React_2.ForwardRefExoticComponent<
	React_2.PropsWithoutRef<JSX.LibraryManagedAttributes<Component, Props>> &
		React_2.RefAttributes<any>
>;

// @public (undocumented)
export interface WithMediaFeatureFlags {
	// (undocumented)
	featureFlags?: MediaFeatureFlags;
}

// @public (undocumented)
export type WithPerformanceAttributes = {
	performanceAttributes?: PerformanceAttributes;
};

// @public (undocumented)
export type WithTraceContext = {
	traceContext?: MediaTraceContext;
	metadataTraceContext?: MediaTraceContext;
};

// (No @packageDocumentation comment for this package)
```

<!--SECTION END: Main Entry Types-->

### Peer Dependencies

<!--SECTION START: Peer Dependencies-->

```json
{
	"enzyme": ">=3.10.0",
	"react": "^16.8.0",
	"react-dom": "^16.8.0"
}
```

<!--SECTION END: Peer Dependencies-->
