@atlaskit/media-client 36.3.4 → 37.0.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/AGENTS.md +18 -15
- package/CHANGELOG.md +35 -0
- package/artifacts/package.json +1 -8
- package/check-webp-support/package.json +1 -8
- package/constants/package.json +1 -8
- package/create-media-subject/package.json +1 -8
- package/dist/cjs/client/file-fetcher/index.js +7 -5
- package/dist/cjs/client/media-store/MediaStore.js +19 -7
- package/dist/cjs/uploader/index.js +3 -1
- package/dist/es2019/client/file-fetcher/index.js +7 -5
- package/dist/es2019/client/media-store/MediaStore.js +20 -8
- package/dist/es2019/uploader/index.js +3 -1
- package/dist/esm/client/file-fetcher/index.js +7 -5
- package/dist/esm/client/media-store/MediaStore.js +19 -7
- package/dist/esm/uploader/index.js +3 -1
- package/dist/types/client/file-fetcher/index.d.ts +2 -2
- package/dist/types/client/media-store/MediaStore.d.ts +6 -2
- package/dist/types/client/media-store/types.d.ts +6 -2
- package/error/package.json +1 -8
- package/errors/helpers/package.json +1 -8
- package/errors/package.json +1 -8
- package/errors/types/package.json +1 -8
- package/events/package.json +1 -8
- package/file-fetcher/error/package.json +1 -8
- package/file-fetcher/package.json +1 -8
- package/file-state/package.json +1 -8
- package/file-streams-cache/package.json +1 -8
- package/from-observable/package.json +1 -8
- package/get-dimensions-from-blob/package.json +1 -8
- package/global-media-event-emitter/package.json +1 -8
- package/identifier/package.json +1 -8
- package/image-resize-mode-to-file-image-mode/package.json +1 -8
- package/item/package.json +1 -8
- package/media/package.json +1 -8
- package/media-client/package.json +1 -8
- package/media-store/package.json +1 -8
- package/media-store/types/package.json +1 -8
- package/media-subscribable/types/package.json +1 -8
- package/mobile-upload/package.json +1 -8
- package/package.json +10 -18
- package/polling/errors/package.json +1 -8
- package/polling/package.json +1 -8
- package/polling/types/package.json +1 -8
- package/request/errors/package.json +1 -8
- package/request/helpers/package.json +1 -8
- package/request/package.json +1 -8
- package/request/types/package.json +1 -8
- package/stargate-client/package.json +1 -8
- package/upload-controller/package.json +1 -8
- package/uploader/package.json +1 -8
- package/url/package.json +1 -8
- package/dist/types-ts4.5/client/__mocks__/collection-fetcher.d.ts +0 -7
- package/dist/types-ts4.5/client/__mocks__/file-fetcher.d.ts +0 -9
- package/dist/types-ts4.5/client/__mocks__/media-client.d.ts +0 -10
- package/dist/types-ts4.5/client/events.d.ts +0 -29
- package/dist/types-ts4.5/client/file-fetcher/error.d.ts +0 -33
- package/dist/types-ts4.5/client/file-fetcher/index.d.ts +0 -86
- package/dist/types-ts4.5/client/media-client.d.ts +0 -34
- package/dist/types-ts4.5/client/media-store/MediaStore.d.ts +0 -56
- package/dist/types-ts4.5/client/media-store/error.d.ts +0 -15
- package/dist/types-ts4.5/client/media-store/index.d.ts +0 -4
- package/dist/types-ts4.5/client/media-store/resolveAuth.d.ts +0 -4
- package/dist/types-ts4.5/client/media-store/types.d.ts +0 -207
- package/dist/types-ts4.5/client/mobile-upload.d.ts +0 -15
- package/dist/types-ts4.5/client/stargate-client.d.ts +0 -15
- package/dist/types-ts4.5/constants.d.ts +0 -6
- package/dist/types-ts4.5/file-streams-cache.d.ts +0 -15
- package/dist/types-ts4.5/globalMediaEventEmitter.d.ts +0 -6
- package/dist/types-ts4.5/identifier.d.ts +0 -15
- package/dist/types-ts4.5/index.d.ts +0 -45
- package/dist/types-ts4.5/models/artifacts.d.ts +0 -2
- package/dist/types-ts4.5/models/auth-headers.d.ts +0 -11
- package/dist/types-ts4.5/models/auth-query-parameters.d.ts +0 -11
- package/dist/types-ts4.5/models/document.d.ts +0 -95
- package/dist/types-ts4.5/models/errors/helpers.d.ts +0 -6
- package/dist/types-ts4.5/models/errors/index.d.ts +0 -24
- package/dist/types-ts4.5/models/errors/types.d.ts +0 -22
- package/dist/types-ts4.5/models/file-state.d.ts +0 -32
- package/dist/types-ts4.5/models/item.d.ts +0 -27
- package/dist/types-ts4.5/models/media.d.ts +0 -65
- package/dist/types-ts4.5/models/mobile-upload.d.ts +0 -28
- package/dist/types-ts4.5/upload-controller.d.ts +0 -7
- package/dist/types-ts4.5/uploader/calculateChunkSize.d.ts +0 -11
- package/dist/types-ts4.5/uploader/error.d.ts +0 -27
- package/dist/types-ts4.5/uploader/index.d.ts +0 -23
- package/dist/types-ts4.5/utils/checkWebpSupport.d.ts +0 -1
- package/dist/types-ts4.5/utils/convertBase64ToBlob.d.ts +0 -1
- package/dist/types-ts4.5/utils/createCopyIntentRegisterationBatcher.d.ts +0 -20
- package/dist/types-ts4.5/utils/createFileDataLoader.d.ts +0 -30
- package/dist/types-ts4.5/utils/createMediaSubject.d.ts +0 -3
- package/dist/types-ts4.5/utils/detectEmptyFile.d.ts +0 -16
- package/dist/types-ts4.5/utils/getDimensionsFromBlob.d.ts +0 -6
- package/dist/types-ts4.5/utils/getDocument.d.ts +0 -2
- package/dist/types-ts4.5/utils/getImageDimensionsFromBlob.d.ts +0 -5
- package/dist/types-ts4.5/utils/getMediaTypeFromUploadableFile.d.ts +0 -3
- package/dist/types-ts4.5/utils/getNavigator.d.ts +0 -2
- package/dist/types-ts4.5/utils/getVideoDimensionsFromBlob.d.ts +0 -5
- package/dist/types-ts4.5/utils/hashing/hasher.d.ts +0 -3
- package/dist/types-ts4.5/utils/hashing/hasherCreator.d.ts +0 -4
- package/dist/types-ts4.5/utils/hashing/sha256SimpleHasher.d.ts +0 -4
- package/dist/types-ts4.5/utils/hashing/simpleHasher.d.ts +0 -4
- package/dist/types-ts4.5/utils/imageResizeModeToFileImageMode.d.ts +0 -3
- package/dist/types-ts4.5/utils/isCommercial.d.ts +0 -1
- package/dist/types-ts4.5/utils/mediaCdn.d.ts +0 -5
- package/dist/types-ts4.5/utils/mediaSubscribable/fromObservable.d.ts +0 -5
- package/dist/types-ts4.5/utils/mediaSubscribable/index.d.ts +0 -3
- package/dist/types-ts4.5/utils/mediaSubscribable/toPromise.d.ts +0 -10
- package/dist/types-ts4.5/utils/mediaSubscribable/types.d.ts +0 -17
- package/dist/types-ts4.5/utils/mobileUpload/error.d.ts +0 -33
- package/dist/types-ts4.5/utils/mobileUpload/helpers.d.ts +0 -8
- package/dist/types-ts4.5/utils/mobileUpload/index.d.ts +0 -5
- package/dist/types-ts4.5/utils/mobileUpload/servicesCache.d.ts +0 -4
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/index.d.ts +0 -7
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/error.d.ts +0 -3
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processed.d.ts +0 -3
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processing.d.ts +0 -3
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processingFailed.d.ts +0 -3
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/uploading.d.ts +0 -3
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/types.d.ts +0 -69
- package/dist/types-ts4.5/utils/overrideMediaTypeIfUnknown.d.ts +0 -5
- package/dist/types-ts4.5/utils/pathBasedUrl.d.ts +0 -3
- package/dist/types-ts4.5/utils/polling/errors.d.ts +0 -11
- package/dist/types-ts4.5/utils/polling/index.d.ts +0 -34
- package/dist/types-ts4.5/utils/polling/types.d.ts +0 -10
- package/dist/types-ts4.5/utils/request/errors.d.ts +0 -22
- package/dist/types-ts4.5/utils/request/helpers.d.ts +0 -32
- package/dist/types-ts4.5/utils/request/index.d.ts +0 -5
- package/dist/types-ts4.5/utils/request/types.d.ts +0 -47
- package/dist/types-ts4.5/utils/setTimeoutPromise.d.ts +0 -2
- package/dist/types-ts4.5/utils/shouldFetchRemoteFileStates.d.ts +0 -14
- package/dist/types-ts4.5/utils/url.d.ts +0 -18
- package/dist/types-ts4.5/utils/watermarkVersion.d.ts +0 -10
|
@@ -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
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type MediaClientConfig } from '@atlaskit/media-core';
|
|
2
|
-
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
3
|
-
import { MediaStore as MediaApi, type MediaStoreGetFileImageParams, type ImageMetadata } from './media-store';
|
|
4
|
-
import { type FileFetcher } from './file-fetcher';
|
|
5
|
-
import { type UploadEventPayloadMap, type EventPayloadListener } from './events';
|
|
6
|
-
import { StargateClient } from './stargate-client';
|
|
7
|
-
import { type MobileUpload } from '../models/mobile-upload';
|
|
8
|
-
import { type MediaStore } from '@atlaskit/media-state';
|
|
9
|
-
export declare class MediaClient {
|
|
10
|
-
readonly mediaClientConfig: MediaClientConfig;
|
|
11
|
-
private readonly store;
|
|
12
|
-
readonly mediaStore: MediaApi;
|
|
13
|
-
readonly file: FileFetcher;
|
|
14
|
-
readonly stargate: StargateClient;
|
|
15
|
-
private readonly eventEmitter;
|
|
16
|
-
private mobileUpload?;
|
|
17
|
-
readonly config: MediaClientConfig;
|
|
18
|
-
constructor(mediaClientConfig: MediaClientConfig, store?: MediaStore, mediaApi?: MediaApi);
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
__DO_NOT_USE__getMediaStore(): MediaStore;
|
|
23
|
-
getImage(id: string, params?: MediaStoreGetFileImageParams, controller?: AbortController, fetchMaxRes?: boolean, traceContext?: MediaTraceContext): Promise<Blob>;
|
|
24
|
-
getImageUrl(id: string, params?: MediaStoreGetFileImageParams): Promise<string>;
|
|
25
|
-
getImageUrlSync(id: string, params?: MediaStoreGetFileImageParams): string;
|
|
26
|
-
getClientId(collectionName?: string): Promise<string | undefined>;
|
|
27
|
-
getClientIdSync(): string | undefined;
|
|
28
|
-
getImageMetadata(id: string, params?: MediaStoreGetFileImageParams): Promise<ImageMetadata>;
|
|
29
|
-
mobileUploadPromise(): Promise<MobileUpload>;
|
|
30
|
-
removeFileFromCollection(id: string, collectionName: string, occurrenceKey?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
31
|
-
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
32
|
-
off<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
33
|
-
emit<E extends keyof UploadEventPayloadMap>(event: E, payload: UploadEventPayloadMap[E]): boolean;
|
|
34
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { type AuthContext, type MediaApiConfig, type Auth } from '@atlaskit/media-core';
|
|
2
|
-
import { type MediaTraceContext } from '@atlaskit/media-common';
|
|
3
|
-
import { type MediaFileArtifacts } from '@atlaskit/media-state';
|
|
4
|
-
import type { ItemsPayload, ImageMetadata, MediaStoreResponse, MediaStoreTouchFileParams, TouchFileDescriptor, MediaStoreTouchFileBody, RejectedTouchFile, MediaStoreRequestOptions, MediaStoreCreateFileFromUploadParams, MediaStoreCreateFileFromUploadBody, MediaStoreGetFileParams, MediaStoreGetFileImageParams, MediaStoreCopyFileWithTokenBody, MediaStoreCopyFileWithTokenParams, AppendChunksToUploadRequestBody, TouchedFiles, MediaApi, CopyFileParams } from './types';
|
|
5
|
-
import { type MediaFile, type MediaUpload } from '../../models/media';
|
|
6
|
-
import { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
7
|
-
import { type GetDocumentPageImage, type DocumentPageRangeContent, type GetDocumentContentOptions } from '../../models/document';
|
|
8
|
-
export declare class MediaStore implements MediaApi {
|
|
9
|
-
private readonly config;
|
|
10
|
-
private readonly _chunkHashAlgorithm;
|
|
11
|
-
constructor(config: MediaApiConfig);
|
|
12
|
-
getClientId(collectionName?: string): Promise<string | undefined>;
|
|
13
|
-
getClientIdSync(): string | undefined;
|
|
14
|
-
private static extractClientIdFromAuth;
|
|
15
|
-
removeCollectionFile(id: string, collectionName: string, occurrenceKey?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
16
|
-
createUpload(createUpTo?: number, collectionName?: string, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaUpload[]>>;
|
|
17
|
-
uploadChunk(etag: string, blob: Blob, uploadId: string, partNumber: number, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
18
|
-
createFileFromUpload(body: MediaStoreCreateFileFromUploadBody, params?: MediaStoreCreateFileFromUploadParams, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaFile>>;
|
|
19
|
-
getRejectedResponseFromDescriptor(descriptor: TouchFileDescriptor, limit: number): RejectedTouchFile;
|
|
20
|
-
touchFiles(body: MediaStoreTouchFileBody, params?: MediaStoreTouchFileParams, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<TouchedFiles>>;
|
|
21
|
-
getFile(fileId: string, params?: MediaStoreGetFileParams, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaFile>>;
|
|
22
|
-
getFileImageURL(id: string, params?: MediaStoreGetFileImageParams): Promise<string>;
|
|
23
|
-
getFileImageURLSync(id: string, params?: MediaStoreGetFileImageParams): string;
|
|
24
|
-
private createFileImageURL;
|
|
25
|
-
getFileBinary(id: string, collectionName?: string, abortController?: AbortController, maxAge?: number): Promise<Blob>;
|
|
26
|
-
getFileBinaryURL(id: string, collectionName?: string, maxAge?: number): Promise<string>;
|
|
27
|
-
getArtifactURL(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string, maxAge?: number): Promise<string>;
|
|
28
|
-
getArtifactBinary: MediaApi['getArtifactBinary'];
|
|
29
|
-
uploadArtifact: MediaApi['uploadArtifact'];
|
|
30
|
-
deleteArtifact: MediaApi['deleteArtifact'];
|
|
31
|
-
getImage(id: string, params?: MediaStoreGetFileImageParams, controller?: AbortController, fetchMaxRes?: boolean, traceContext?: MediaTraceContext): Promise<Blob>;
|
|
32
|
-
getItems(ids: string[], collectionName?: string, traceContext?: MediaTraceContext, includeHashForDuplicateFiles?: boolean): Promise<MediaStoreResponse<ItemsPayload>>;
|
|
33
|
-
getImageMetadata(id: string, params?: MediaStoreGetFileImageParams, traceContext?: MediaTraceContext): Promise<{
|
|
34
|
-
metadata: ImageMetadata;
|
|
35
|
-
}>;
|
|
36
|
-
getDocumentContent(id: string, options: GetDocumentContentOptions, traceContext?: MediaTraceContext): Promise<DocumentPageRangeContent>;
|
|
37
|
-
getDocumentPageImage(id: string, options: GetDocumentPageImage, traceContext?: MediaTraceContext): Promise<Blob>;
|
|
38
|
-
appendChunksToUpload(uploadId: string, body: AppendChunksToUploadRequestBody, collectionName?: string, traceContext?: MediaTraceContext, options?: {
|
|
39
|
-
expectedFileSize?: number;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
copyFileWithToken(body: MediaStoreCopyFileWithTokenBody, params: MediaStoreCopyFileWithTokenParams, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaFile>>;
|
|
42
|
-
copyFile(id: string, params: CopyFileParams, traceContext?: MediaTraceContext, clientId?: string): Promise<MediaStoreResponse<MediaFile>>;
|
|
43
|
-
registerCopyIntents(files: Array<{
|
|
44
|
-
id: string;
|
|
45
|
-
collection?: string;
|
|
46
|
-
}>, traceContext?: MediaTraceContext, resolvedAuth?: Auth): Promise<void>;
|
|
47
|
-
request(path: string, options?: MediaStoreRequestOptions, controller?: AbortController, useMediaCdn?: boolean): Promise<Response>;
|
|
48
|
-
testUrl(url: string, options?: {
|
|
49
|
-
traceContext?: MediaTraceContext;
|
|
50
|
-
}): Promise<void>;
|
|
51
|
-
resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
|
|
52
|
-
resolveInitialAuth: () => Auth;
|
|
53
|
-
get chunkHashAlgorithm(): ChunkHashAlgorithm;
|
|
54
|
-
}
|
|
55
|
-
export declare const getMediaEnvironment: () => string | undefined;
|
|
56
|
-
export declare const getMediaRegion: () => string | undefined;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { BaseMediaClientError } from '../../models/errors';
|
|
2
|
-
export type MediaStoreErrorReason = 'failedAuthProvider' | 'tokenExpired' | 'missingInitialAuth' | 'emptyAuth' | 'authProviderTimedOut';
|
|
3
|
-
export type MediaStoreErrorAttributes = {
|
|
4
|
-
readonly reason: MediaStoreErrorReason;
|
|
5
|
-
readonly innerError?: Error;
|
|
6
|
-
};
|
|
7
|
-
export declare class MediaStoreError extends BaseMediaClientError<MediaStoreErrorReason, undefined, Error | undefined, MediaStoreErrorAttributes> {
|
|
8
|
-
constructor(reason: MediaStoreErrorReason, innerError?: Error);
|
|
9
|
-
/** Will be deprecated. Use the properties `reason` and `metadata` instead */
|
|
10
|
-
get attributes(): {
|
|
11
|
-
reason: MediaStoreErrorReason;
|
|
12
|
-
innerError: Error | undefined;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export declare function isMediaStoreError(err: Error): err is MediaStoreError;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export type { MediaStoreErrorReason, MediaStoreErrorAttributes } from './error';
|
|
2
|
-
export { MediaStoreError, isMediaStoreError } from './error';
|
|
3
|
-
export { MediaStore, getMediaEnvironment, getMediaRegion } from './MediaStore';
|
|
4
|
-
export type { ResponseFileItem, EmptyResponseFileItem, ItemsPayload, ImageMetadataArtifact, ImageMetadata, MediaStoreResponse, MediaStoreRequestOptions, MediaStoreCreateFileFromUploadParams, MediaStoreCreateFileParams, MediaStoreTouchFileParams, TouchFileDescriptor, MediaStoreTouchFileBody, MediaStoreCreateFileFromBinaryParams, MediaStoreCreateFileFromUploadConditions, MediaStoreCreateFileFromUploadBody, MediaStoreGetFileParams, MediaStoreGetFileImageParams, SourceFile, MediaStoreCopyFileWithTokenBody, MediaStoreCopyFileWithTokenParams, AppendChunksToUploadRequestBody, CreatedTouchedFile, RejectedTouchFile, RejectionError, TouchedFiles, EmptyFile, MediaApi, } from './types';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type Auth, type AuthContext, type AuthProvider } from '@atlaskit/media-core';
|
|
2
|
-
export declare const DEFAULT_AUTH_PROVIDER_TIMEOUT = 10000;
|
|
3
|
-
export declare const resolveAuth: (authProvider: AuthProvider, authContext?: AuthContext, authProviderTimeout?: number) => Promise<Auth>;
|
|
4
|
-
export declare const resolveInitialAuth: (auth?: Auth) => Auth;
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { type Auth, type AsapBasedAuth, type AuthContext, type ClientAltBasedAuth } from '@atlaskit/media-core';
|
|
2
|
-
import { type SSR, type MediaTraceContext } from '@atlaskit/media-common';
|
|
3
|
-
import { type MediaFileArtifacts } from '@atlaskit/media-state';
|
|
4
|
-
import { type MediaItemDetails, type MediaFile, type MediaUpload } from '../../models/media';
|
|
5
|
-
import { type ClientOptions, type RequestHeaders, type RequestMethod, type RequestParams, type RequestMetadata } from '../../utils/request/types';
|
|
6
|
-
import { type ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
7
|
-
import { type DocumentPageRangeContent, type GetDocumentPageImage, type GetDocumentContentOptions } from '../../models/document';
|
|
8
|
-
export interface ResponseFileItem {
|
|
9
|
-
id: string;
|
|
10
|
-
type: 'file';
|
|
11
|
-
details: MediaItemDetails;
|
|
12
|
-
collection?: string;
|
|
13
|
-
metadataTraceContext?: MediaTraceContext;
|
|
14
|
-
}
|
|
15
|
-
export interface EmptyResponseFileItem {
|
|
16
|
-
id: string;
|
|
17
|
-
type: 'not-found';
|
|
18
|
-
collection?: string;
|
|
19
|
-
metadataTraceContext?: MediaTraceContext;
|
|
20
|
-
}
|
|
21
|
-
export interface ItemsPayload {
|
|
22
|
-
items: ResponseFileItem[];
|
|
23
|
-
}
|
|
24
|
-
export type ImageMetadataArtifact = {
|
|
25
|
-
url?: string;
|
|
26
|
-
width?: number;
|
|
27
|
-
height?: number;
|
|
28
|
-
size?: number;
|
|
29
|
-
};
|
|
30
|
-
export interface ImageMetadata {
|
|
31
|
-
pending: boolean;
|
|
32
|
-
preview?: ImageMetadataArtifact;
|
|
33
|
-
original?: ImageMetadataArtifact;
|
|
34
|
-
}
|
|
35
|
-
export interface MediaStoreResponse<Data> {
|
|
36
|
-
readonly data: Data;
|
|
37
|
-
}
|
|
38
|
-
export type MediaStoreRequestOptions = RequestMetadata & {
|
|
39
|
-
readonly method?: RequestMethod;
|
|
40
|
-
readonly authContext?: AuthContext;
|
|
41
|
-
readonly resolvedAuth?: Auth;
|
|
42
|
-
readonly params?: RequestParams;
|
|
43
|
-
readonly headers?: RequestHeaders;
|
|
44
|
-
readonly body?: any;
|
|
45
|
-
readonly clientOptions?: ClientOptions;
|
|
46
|
-
readonly traceContext?: MediaTraceContext;
|
|
47
|
-
readonly ChunkhashAlgorithm?: ChunkHashAlgorithm;
|
|
48
|
-
readonly addMediaClientParam?: boolean;
|
|
49
|
-
};
|
|
50
|
-
export type MediaStoreCreateFileFromUploadParams = {
|
|
51
|
-
readonly collection?: string;
|
|
52
|
-
readonly occurrenceKey?: string;
|
|
53
|
-
readonly expireAfter?: number;
|
|
54
|
-
readonly replaceFileId?: string;
|
|
55
|
-
readonly skipConversions?: boolean;
|
|
56
|
-
};
|
|
57
|
-
export type MediaStoreCreateFileParams = {
|
|
58
|
-
readonly occurrenceKey?: string;
|
|
59
|
-
readonly collection?: string;
|
|
60
|
-
};
|
|
61
|
-
export interface MediaStoreTouchFileParams {
|
|
62
|
-
readonly collection?: string;
|
|
63
|
-
}
|
|
64
|
-
export interface TouchFileDescriptor {
|
|
65
|
-
fileId: string;
|
|
66
|
-
collection?: string;
|
|
67
|
-
occurrenceKey?: string;
|
|
68
|
-
expireAfter?: number;
|
|
69
|
-
deletable?: boolean;
|
|
70
|
-
size?: number;
|
|
71
|
-
}
|
|
72
|
-
export interface MediaStoreTouchFileBody {
|
|
73
|
-
descriptors: TouchFileDescriptor[];
|
|
74
|
-
}
|
|
75
|
-
export type MediaStoreCreateFileFromBinaryParams = {
|
|
76
|
-
readonly replaceFileId?: string;
|
|
77
|
-
readonly collection?: string;
|
|
78
|
-
readonly occurrenceKey?: string;
|
|
79
|
-
readonly expireAfter?: number;
|
|
80
|
-
readonly skipConversions?: boolean;
|
|
81
|
-
readonly name?: string;
|
|
82
|
-
};
|
|
83
|
-
export type MediaStoreCreateFileFromUploadConditions = {
|
|
84
|
-
readonly hash?: string;
|
|
85
|
-
readonly size?: number;
|
|
86
|
-
};
|
|
87
|
-
export type MediaStoreCreateFileFromUploadBody = {
|
|
88
|
-
readonly uploadId: string;
|
|
89
|
-
readonly name?: string;
|
|
90
|
-
readonly mimeType?: string;
|
|
91
|
-
readonly conditions?: MediaStoreCreateFileFromUploadConditions;
|
|
92
|
-
};
|
|
93
|
-
export type MediaStoreGetFileParams = {
|
|
94
|
-
readonly version?: number;
|
|
95
|
-
readonly collection?: string;
|
|
96
|
-
};
|
|
97
|
-
export type MediaStoreGetFileImageParams = {
|
|
98
|
-
readonly allowAnimated?: boolean;
|
|
99
|
-
readonly version?: number;
|
|
100
|
-
readonly collection?: string;
|
|
101
|
-
readonly width?: number;
|
|
102
|
-
readonly height?: number;
|
|
103
|
-
readonly mode?: 'fit' | 'full-fit' | 'crop';
|
|
104
|
-
readonly upscale?: boolean;
|
|
105
|
-
readonly 'max-age'?: number;
|
|
106
|
-
readonly source?: string;
|
|
107
|
-
readonly ssr?: SSR;
|
|
108
|
-
};
|
|
109
|
-
export interface SourceFile {
|
|
110
|
-
id: string;
|
|
111
|
-
owner: ClientAltBasedAuth | AsapBasedAuth;
|
|
112
|
-
collection?: string;
|
|
113
|
-
version?: number;
|
|
114
|
-
}
|
|
115
|
-
export type MediaStoreCopyFileWithTokenBody = {
|
|
116
|
-
sourceFile: SourceFile;
|
|
117
|
-
};
|
|
118
|
-
export type CopyFileParams = {
|
|
119
|
-
sourceCollection?: string;
|
|
120
|
-
collection?: string;
|
|
121
|
-
replaceFileId?: string;
|
|
122
|
-
};
|
|
123
|
-
export type MediaStoreCopyFileWithTokenParams = {
|
|
124
|
-
readonly collection?: string;
|
|
125
|
-
readonly replaceFileId?: string;
|
|
126
|
-
readonly occurrenceKey?: string;
|
|
127
|
-
};
|
|
128
|
-
export type AppendChunksToUploadRequestBody = {
|
|
129
|
-
readonly chunks: string[];
|
|
130
|
-
readonly hash?: string;
|
|
131
|
-
readonly offset?: number;
|
|
132
|
-
};
|
|
133
|
-
export interface CreatedTouchedFile {
|
|
134
|
-
fileId: string;
|
|
135
|
-
uploadId: string;
|
|
136
|
-
}
|
|
137
|
-
export interface RejectedTouchFile {
|
|
138
|
-
fileId: string;
|
|
139
|
-
error: RejectionError;
|
|
140
|
-
}
|
|
141
|
-
export type RejectionError = {
|
|
142
|
-
code: 'ExceedMaxFileSizeLimit';
|
|
143
|
-
title: string;
|
|
144
|
-
href: string;
|
|
145
|
-
limit: number;
|
|
146
|
-
size: number;
|
|
147
|
-
};
|
|
148
|
-
export type TouchedFiles = {
|
|
149
|
-
created: CreatedTouchedFile[];
|
|
150
|
-
rejected?: RejectedTouchFile[];
|
|
151
|
-
};
|
|
152
|
-
export interface EmptyFile {
|
|
153
|
-
readonly id: string;
|
|
154
|
-
readonly createdAt: number;
|
|
155
|
-
}
|
|
156
|
-
export type GetArtifactBinaryOptions = {
|
|
157
|
-
collectionName?: string;
|
|
158
|
-
abortController?: AbortController;
|
|
159
|
-
maxAge?: number;
|
|
160
|
-
traceContext?: MediaTraceContext;
|
|
161
|
-
};
|
|
162
|
-
export type UploadArtifactCaptionsParams = {
|
|
163
|
-
type: 'caption';
|
|
164
|
-
language: string;
|
|
165
|
-
};
|
|
166
|
-
export type UploadArtifactParams = UploadArtifactCaptionsParams;
|
|
167
|
-
export interface MediaApi {
|
|
168
|
-
removeCollectionFile: (id: string, collectionName: string, occurrenceKey?: string, traceContext?: MediaTraceContext) => Promise<void>;
|
|
169
|
-
createUpload: (createUpTo: number, collectionName?: string, traceContext?: MediaTraceContext, chunkChunkHashAlgorithm?: ChunkHashAlgorithm) => Promise<MediaStoreResponse<MediaUpload[]>>;
|
|
170
|
-
uploadChunk: (etag: string, blob: Blob, uploadId: string, partNumber: number, collectionName?: string, traceContext?: MediaTraceContext) => Promise<void>;
|
|
171
|
-
createFileFromUpload: (body: MediaStoreCreateFileFromUploadBody, params: MediaStoreCreateFileFromUploadParams, traceContext?: MediaTraceContext) => Promise<MediaStoreResponse<MediaFile>>;
|
|
172
|
-
getRejectedResponseFromDescriptor: (descriptor: TouchFileDescriptor, limit: number) => RejectedTouchFile;
|
|
173
|
-
touchFiles: (body: MediaStoreTouchFileBody, params: MediaStoreTouchFileParams, traceContext?: MediaTraceContext) => Promise<MediaStoreResponse<TouchedFiles>>;
|
|
174
|
-
getFile: (fileId: string, params: MediaStoreGetFileParams, traceContext?: MediaTraceContext) => Promise<MediaStoreResponse<MediaFile>>;
|
|
175
|
-
getFileImageURL: (id: string, params?: MediaStoreGetFileImageParams) => Promise<string>;
|
|
176
|
-
getFileImageURLSync: (id: string, params?: MediaStoreGetFileImageParams) => string;
|
|
177
|
-
getFileBinary: (id: string, collectionName?: string, abortController?: AbortController) => Promise<Blob>;
|
|
178
|
-
getFileBinaryURL: (id: string, collectionName?: string) => Promise<string>;
|
|
179
|
-
getArtifactURL: (artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, collectionName?: string) => Promise<string>;
|
|
180
|
-
getArtifactBinary(artifacts: MediaFileArtifacts, artifactName: keyof MediaFileArtifacts, options: GetArtifactBinaryOptions): Promise<Blob>;
|
|
181
|
-
uploadArtifact(id: string, file: File, params: UploadArtifactParams, collectionName?: string, traceContext?: MediaTraceContext): Promise<MediaStoreResponse<MediaItemDetails>>;
|
|
182
|
-
deleteArtifact(id: string, artifactName: string, collectionName?: string, traceContext?: MediaTraceContext): Promise<void>;
|
|
183
|
-
getImage: (id: string, params?: MediaStoreGetFileImageParams, controller?: AbortController, fetchMaxRes?: boolean, traceContext?: MediaTraceContext) => Promise<Blob>;
|
|
184
|
-
getItems: (ids: string[], collectionName?: string, traceContext?: MediaTraceContext, includeHashForDuplicateFiles?: boolean) => Promise<MediaStoreResponse<ItemsPayload>>;
|
|
185
|
-
getImageMetadata: (id: string, params?: MediaStoreGetFileImageParams, traceContext?: MediaTraceContext) => Promise<{
|
|
186
|
-
metadata: ImageMetadata;
|
|
187
|
-
}>;
|
|
188
|
-
appendChunksToUpload: (uploadId: string, body: AppendChunksToUploadRequestBody, collectionName?: string, traceContext?: MediaTraceContext, options?: {
|
|
189
|
-
expectedFileSize?: number;
|
|
190
|
-
}) => Promise<void>;
|
|
191
|
-
copyFileWithToken: (body: MediaStoreCopyFileWithTokenBody, params: MediaStoreCopyFileWithTokenParams, traceContext?: MediaTraceContext) => Promise<MediaStoreResponse<MediaFile>>;
|
|
192
|
-
copyFile: (id: string, params: CopyFileParams) => Promise<MediaStoreResponse<MediaFile>>;
|
|
193
|
-
registerCopyIntents: (files: Array<{
|
|
194
|
-
id: string;
|
|
195
|
-
collection: string;
|
|
196
|
-
}>, traceContext?: MediaTraceContext, resolvedAuth?: Auth) => Promise<void>;
|
|
197
|
-
request: (path: string, options: MediaStoreRequestOptions, controller?: AbortController) => Promise<Response>;
|
|
198
|
-
testUrl: (url: string, options?: {
|
|
199
|
-
traceContext?: MediaTraceContext;
|
|
200
|
-
}) => Promise<void>;
|
|
201
|
-
resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
|
|
202
|
-
resolveInitialAuth: () => Auth;
|
|
203
|
-
/** @exprimental This is exprimental for the purposes of enabling the document viewer and not ready for external use, it is prone to breaking changes */
|
|
204
|
-
getDocumentContent(id: string, options: GetDocumentContentOptions, traceContext?: MediaTraceContext): Promise<DocumentPageRangeContent>;
|
|
205
|
-
/** @exprimental This is exprimental for the purposes of enabling the document viewer and not ready for external use, it is prone to breaking changes */
|
|
206
|
-
getDocumentPageImage(id: string, options: GetDocumentPageImage, traceContext?: MediaTraceContext): Promise<Blob>;
|
|
207
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type MediaStore } from '@atlaskit/media-state';
|
|
2
|
-
import { type MobileUpload, type MobileUploadStartEvent, type MobileUploadProgressEvent, type MobileUploadEndEvent, type MobileUploadErrorEvent } from '../models/mobile-upload';
|
|
3
|
-
import { type MediaStore as MediaApi } from './media-store';
|
|
4
|
-
export declare class MobileUploadImpl implements MobileUpload {
|
|
5
|
-
private readonly store;
|
|
6
|
-
private readonly dataloader;
|
|
7
|
-
private readonly servicesCache;
|
|
8
|
-
constructor(mediaApi: MediaApi, store?: MediaStore);
|
|
9
|
-
notifyUploadStart(event: MobileUploadStartEvent): void;
|
|
10
|
-
notifyUploadProgress(event: MobileUploadProgressEvent): void;
|
|
11
|
-
notifyUploadEnd(event: MobileUploadEndEvent): void;
|
|
12
|
-
notifyUploadError(event: MobileUploadErrorEvent): void;
|
|
13
|
-
private getErrorFileState;
|
|
14
|
-
private setFileState;
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface EdgeData {
|
|
2
|
-
data: {
|
|
3
|
-
clientId: string;
|
|
4
|
-
token: string;
|
|
5
|
-
baseUrl: string;
|
|
6
|
-
expiresIn: number;
|
|
7
|
-
iat: number;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export declare class StargateClient {
|
|
11
|
-
private baseUrl;
|
|
12
|
-
constructor(baseUrl: string | undefined);
|
|
13
|
-
fetchToken(clientId: string): Promise<EdgeData>;
|
|
14
|
-
isTokenExpired(token: EdgeData): boolean;
|
|
15
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const RECENTS_COLLECTION = "recents";
|
|
2
|
-
export declare const FILE_CACHE_MAX_AGE: number;
|
|
3
|
-
export declare const MAX_RESOLUTION = 4096;
|
|
4
|
-
export declare const CHUNK_SIZE: number;
|
|
5
|
-
export declare const PROCESSING_BATCH_SIZE = 1000;
|
|
6
|
-
export declare const MAX_UPLOAD_FILE_SIZE: number;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type LRUMap } from 'lru_map';
|
|
2
|
-
import { type ReplaySubject } from 'rxjs/ReplaySubject';
|
|
3
|
-
import { type FileState } from '@atlaskit/media-state';
|
|
4
|
-
export declare class StreamsCache<T> {
|
|
5
|
-
private readonly streams;
|
|
6
|
-
constructor(streams: LRUMap<string, ReplaySubject<T>>);
|
|
7
|
-
has(id: string): boolean;
|
|
8
|
-
set(id: string, stream: ReplaySubject<T>): void;
|
|
9
|
-
get(id: string): ReplaySubject<T> | undefined;
|
|
10
|
-
getOrInsert(id: string, callback: () => ReplaySubject<T>): ReplaySubject<T>;
|
|
11
|
-
removeAll(): void;
|
|
12
|
-
remove(id: string): void;
|
|
13
|
-
get size(): number;
|
|
14
|
-
}
|
|
15
|
-
export declare const getFileStreamsCache: () => StreamsCache<FileState>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type UploadEventPayloadMap, type EventPayloadListener } from './client/events';
|
|
2
|
-
export declare const globalMediaEventEmitter: {
|
|
3
|
-
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
4
|
-
off<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
5
|
-
emit<E extends keyof UploadEventPayloadMap>(event: E, payload: UploadEventPayloadMap[E]): boolean | undefined;
|
|
6
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type Identifier = FileIdentifier | ExternalImageIdentifier;
|
|
2
|
-
export interface FileIdentifier {
|
|
3
|
-
readonly mediaItemType: 'file';
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly occurrenceKey?: string;
|
|
6
|
-
readonly collectionName?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ExternalImageIdentifier {
|
|
9
|
-
readonly mediaItemType: 'external-image';
|
|
10
|
-
readonly dataURI: string;
|
|
11
|
-
readonly name?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const isFileIdentifier: (identifier: Identifier) => identifier is FileIdentifier;
|
|
14
|
-
export declare const isExternalImageIdentifier: (identifier: Identifier) => identifier is ExternalImageIdentifier;
|
|
15
|
-
export declare const isDifferentIdentifier: (a: Identifier, b: Identifier) => boolean;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export { MediaStore, MediaStoreError, isMediaStoreError, getMediaEnvironment, getMediaRegion, } from './client/media-store';
|
|
2
|
-
export type { ResponseFileItem, EmptyResponseFileItem, ItemsPayload, ImageMetadataArtifact, ImageMetadata, MediaStoreResponse, MediaStoreRequestOptions, MediaStoreCreateFileFromUploadParams, MediaStoreCreateFileParams, MediaStoreTouchFileParams, TouchFileDescriptor, MediaStoreTouchFileBody, MediaStoreCreateFileFromBinaryParams, MediaStoreCreateFileFromUploadConditions, MediaStoreCreateFileFromUploadBody, MediaStoreGetFileParams, MediaStoreGetFileImageParams, SourceFile, MediaStoreCopyFileWithTokenBody, MediaStoreCopyFileWithTokenParams, AppendChunksToUploadRequestBody, CreatedTouchedFile, TouchedFiles, EmptyFile, MediaStoreErrorReason, MediaStoreErrorAttributes, MediaApi, } from './client/media-store';
|
|
3
|
-
export { UploadController } from './upload-controller';
|
|
4
|
-
export type { AbortFunction } from './upload-controller';
|
|
5
|
-
export type { MediaItemType, FileItem, FileProcessingStatus, MediaArtifact, Artifacts, FileDetails, } from './models/item';
|
|
6
|
-
export { isPreviewableType } from './models/media';
|
|
7
|
-
export type { MediaFileProcessingStatus, MediaType, MediaFile, MediaRepresentations, MediaItemDetails, MediaUpload, } from './models/media';
|
|
8
|
-
export { getArtifactUrl } from './models/artifacts';
|
|
9
|
-
export { isMediaClientError, getMediaClientErrorReason, isCommonMediaClientError, toCommonMediaClientError, } from './models/errors';
|
|
10
|
-
export type { MediaClientError, MediaClientErrorReason, MediaClientErrorAttributes, } from './models/errors';
|
|
11
|
-
export { isUploadingFileState, isProcessingFileState, isProcessedFileState, isErrorFileState, isPreviewableFileState, isFinalFileState, isImageRepresentationReady, isNonErrorFinalFileState, mapMediaFileToFileState, mapMediaItemToFileState, hasArtifacts, } from './models/file-state';
|
|
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 '@atlaskit/media-state';
|
|
14
|
-
export type { MobileUpload, MobileUploadStartEvent, MobileUploadProgressEvent, MobileUploadEndEvent, MobileUploadErrorEvent, } from './models/mobile-upload';
|
|
15
|
-
export { uploadFile } from './uploader';
|
|
16
|
-
export type { UploadableFile, UploadableFileUpfrontIds, UploadFileCallbacks, UploadFileResult, } from './uploader';
|
|
17
|
-
export { request, RequestError, isRequestError, isRateLimitedError, createRequestErrorReason, } from './utils/request';
|
|
18
|
-
export type { RequestErrorReason, RequestErrorMetadata, RequestErrorAttributes, } from './utils/request';
|
|
19
|
-
export { isAbortedRequestError, createUrl } from './utils/request/helpers';
|
|
20
|
-
export { PollingFunction, isPollingError, PollingError } from './utils/polling';
|
|
21
|
-
export type { Executor, PollingErrorAttributes, PollingErrorReason } from './utils/polling/types';
|
|
22
|
-
export type { RequestMethod, RequestParams, RequestHeaders, RetryOptions, ClientOptions, RequestMetadata, RequestOptions, CreateUrlOptions, } from './utils/request/types';
|
|
23
|
-
export type { ImageResizeMode } from './utils/imageResizeModeToFileImageMode';
|
|
24
|
-
export { imageResizeModeToFileImageMode } from './utils/imageResizeModeToFileImageMode';
|
|
25
|
-
export { FileFetcherImpl, FileFetcherError, isFileFetcherError } from './client/file-fetcher';
|
|
26
|
-
export type { CopySourceFile, CopyDestination, CopyFileOptions, FileFetcher, FileFetcherErrorAttributes, FileFetcherErrorReason, } from './client/file-fetcher';
|
|
27
|
-
export { MediaClient } from './client/media-client';
|
|
28
|
-
export { StargateClient } from './client/stargate-client';
|
|
29
|
-
export type { EdgeData } from './client/stargate-client';
|
|
30
|
-
export { checkWebpSupport } from './utils/checkWebpSupport';
|
|
31
|
-
export { getDimensionsFromBlob } from './utils/getDimensionsFromBlob';
|
|
32
|
-
export type { Dimensions } from './utils/getDimensionsFromBlob';
|
|
33
|
-
export { createMediaSubject } from './utils/createMediaSubject';
|
|
34
|
-
export { isFileIdentifier, isExternalImageIdentifier, isDifferentIdentifier } from './identifier';
|
|
35
|
-
export type { Identifier, FileIdentifier, ExternalImageIdentifier } from './identifier';
|
|
36
|
-
export type { EventPayloadListener, UploadEventPayloadMap, MediaViewedEventPayload, AuthProviderSucceededEventPayload, AuthProviderFailedEventPayload, } from './client/events';
|
|
37
|
-
export type { MediaClientConfig } from '@atlaskit/media-core';
|
|
38
|
-
export { globalMediaEventEmitter } from './globalMediaEventEmitter';
|
|
39
|
-
export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString, } from './utils/url';
|
|
40
|
-
export type { MediaBlobUrlAttrs } from './utils/url';
|
|
41
|
-
export { createMediaSubscribable, fromObservable } from './utils/mediaSubscribable';
|
|
42
|
-
export type { MediaSubscribable, MediaSubscription, MediaObserver, } from './utils/mediaSubscribable';
|
|
43
|
-
export { RECENTS_COLLECTION, MAX_RESOLUTION } from './constants';
|
|
44
|
-
export { getFileStreamsCache } from './file-streams-cache';
|
|
45
|
-
export { ChunkHashAlgorithm } from '@atlaskit/media-core';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Auth } from '@atlaskit/media-core';
|
|
2
|
-
export interface ClientBasedAuthHeaders {
|
|
3
|
-
readonly 'X-Client-Id': string;
|
|
4
|
-
readonly Authorization: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AsapBasedAuthHeaders {
|
|
7
|
-
readonly 'X-Issuer': string;
|
|
8
|
-
readonly Authorization: string;
|
|
9
|
-
}
|
|
10
|
-
export type AuthHeaders = ClientBasedAuthHeaders | AsapBasedAuthHeaders;
|
|
11
|
-
export declare function mapAuthToAuthHeaders(auth: Auth): AuthHeaders;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Auth } from '@atlaskit/media-core';
|
|
2
|
-
export interface ClientBasedQueryParameters {
|
|
3
|
-
readonly client: string;
|
|
4
|
-
readonly token: string;
|
|
5
|
-
}
|
|
6
|
-
export interface AsapBasedQueryParameters {
|
|
7
|
-
readonly issuer: string;
|
|
8
|
-
readonly token: string;
|
|
9
|
-
}
|
|
10
|
-
export type AuthQueryParameters = ClientBasedQueryParameters | AsapBasedQueryParameters;
|
|
11
|
-
export declare function mapAuthToQueryParameters(auth: Auth): AuthQueryParameters;
|