@atlaskit/media-client 27.2.1 → 27.3.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/report.api.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## API Report File for "@atlaskit/media-client"
4
4
 
5
- > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using
6
+ > [API Extractor](https://api-extractor.com/).
6
7
  > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
8
 
8
9
  ### Table of contents
@@ -43,35 +44,30 @@ import { UploadingFileState } from '@atlaskit/media-state';
43
44
  export type AbortFunction = () => void;
44
45
 
45
46
  // @public (undocumented)
46
- export const addFileAttrsToUrl: (
47
- url: string,
48
- fileAttrs: MediaBlobUrlAttrs,
49
- ) => string;
47
+ export const addFileAttrsToUrl: (url: string, fileAttrs: MediaBlobUrlAttrs) => string;
50
48
 
51
49
  // @public (undocumented)
52
50
  export type AppendChunksToUploadRequestBody = {
53
- readonly chunks: string[];
54
- readonly hash?: string;
55
- readonly offset?: number;
51
+ readonly chunks: string[];
52
+ readonly hash?: string;
53
+ readonly offset?: number;
56
54
  };
57
55
 
58
56
  // @public (undocumented)
59
57
  export type Artifacts = {
60
- [name: string]: MediaArtifact;
58
+ [name: string]: MediaArtifact;
61
59
  };
62
60
 
63
61
  // @public
64
- abstract class BaseMediaClientError<
65
- Attributes extends MediaClientErrorAttributes,
66
- >
67
- extends Error
68
- implements MediaClientError<Attributes>
62
+ abstract class BaseMediaClientError<Attributes extends MediaClientErrorAttributes>
63
+ extends Error
64
+ implements MediaClientError<Attributes>
69
65
  {
70
- constructor(message: string);
71
- // (undocumented)
72
- abstract get attributes(): Attributes;
73
- // (undocumented)
74
- readonly message: string;
66
+ constructor(message: string);
67
+ // (undocumented)
68
+ abstract get attributes(): Attributes;
69
+ // (undocumented)
70
+ readonly message: string;
75
71
  }
76
72
 
77
73
  // @public (undocumented)
@@ -79,99 +75,89 @@ export const checkWebpSupport: () => Promise<boolean>;
79
75
 
80
76
  // @public (undocumented)
81
77
  export type ClientOptions = {
82
- readonly retryOptions?: Partial<RetryOptions>;
83
- readonly clientTimeout?: number;
78
+ readonly retryOptions?: Partial<RetryOptions>;
79
+ readonly clientTimeout?: number;
84
80
  };
85
81
 
86
82
  // @public (undocumented)
87
- type CompletionObserver = PartialObserver &
88
- Required<Pick<PartialObserver, 'complete'>>;
83
+ type CompletionObserver = PartialObserver & Required<Pick<PartialObserver, 'complete'>>;
89
84
 
90
85
  // @public (undocumented)
91
86
  export interface CopyDestination extends MediaStoreCopyFileWithTokenParams {
92
- // (undocumented)
93
- authProvider: AuthProvider;
94
- // (undocumented)
95
- mediaStore?: MediaStore;
87
+ // (undocumented)
88
+ authProvider: AuthProvider;
89
+ // (undocumented)
90
+ mediaStore?: MediaStore;
96
91
  }
97
92
 
98
93
  // @public (undocumented)
99
94
  export interface CopyFileOptions {
100
- // (undocumented)
101
- mimeType?: string;
102
- // (undocumented)
103
- preview?: FilePreview | Promise<FilePreview>;
95
+ // (undocumented)
96
+ mimeType?: string;
97
+ // (undocumented)
98
+ preview?: FilePreview | Promise<FilePreview>;
104
99
  }
105
100
 
106
101
  // @public (undocumented)
107
102
  export interface CopySourceFile {
108
- // (undocumented)
109
- authProvider: AuthProvider;
110
- // (undocumented)
111
- collection?: string;
112
- // (undocumented)
113
- id: string;
103
+ // (undocumented)
104
+ authProvider: AuthProvider;
105
+ // (undocumented)
106
+ collection?: string;
107
+ // (undocumented)
108
+ id: string;
114
109
  }
115
110
 
116
111
  // @public (undocumented)
117
112
  export interface CreatedTouchedFile {
118
- // (undocumented)
119
- fileId: string;
120
- // (undocumented)
121
- uploadId: string;
113
+ // (undocumented)
114
+ fileId: string;
115
+ // (undocumented)
116
+ uploadId: string;
122
117
  }
123
118
 
124
119
  // @public (undocumented)
125
- export function createMediaSubject<T extends FileState>(
126
- initialState?: Error | T,
127
- ): ReplaySubject<T>;
120
+ export function createMediaSubject<T extends FileState>(initialState?: Error | T): ReplaySubject<T>;
128
121
 
129
122
  // @public (undocumented)
130
- export function createMediaSubscribable(
131
- item?: Error | FileState,
132
- ): MediaSubscribable;
123
+ export function createMediaSubscribable(item?: Error | FileState): MediaSubscribable;
133
124
 
134
125
  // @public (undocumented)
135
- export function createRequestErrorReason(
136
- statusCode: number,
137
- ): RequestErrorReason;
126
+ export function createRequestErrorReason(statusCode: number): RequestErrorReason;
138
127
 
139
128
  // @public (undocumented)
140
- export function createUrl(
141
- url: string,
142
- { params, auth }: CreateUrlOptions,
143
- ): string;
129
+ export function createUrl(url: string, { params, auth }: CreateUrlOptions): string;
144
130
 
145
131
  // @public (undocumented)
146
132
  export type CreateUrlOptions = {
147
- readonly params?: RequestParams;
148
- readonly auth?: Auth;
133
+ readonly params?: RequestParams;
134
+ readonly auth?: Auth;
149
135
  };
150
136
 
151
137
  // @public (undocumented)
152
138
  export type Dimensions = {
153
- width: number;
154
- height: number;
139
+ width: number;
140
+ height: number;
155
141
  };
156
142
 
157
143
  // @public (undocumented)
158
144
  export interface EdgeData {
159
- // (undocumented)
160
- data: {
161
- clientId: string;
162
- token: string;
163
- baseUrl: string;
164
- expiresIn: number;
165
- iat: number;
166
- };
145
+ // (undocumented)
146
+ data: {
147
+ clientId: string;
148
+ token: string;
149
+ baseUrl: string;
150
+ expiresIn: number;
151
+ iat: number;
152
+ };
167
153
  }
168
154
 
169
155
  // @public (undocumented)
170
156
  export interface EmptyFile {
171
- // (undocumented)
172
- readonly createdAt: number;
173
- // (undocumented)
174
- readonly id: string;
157
+ // (undocumented)
158
+ readonly createdAt: number;
159
+ // (undocumented)
160
+ readonly id: string;
175
161
  }
176
162
 
177
163
  export { ErrorFileState };
@@ -180,15 +166,13 @@ export { ErrorFileState };
180
166
  type ErrorObserver = PartialObserver & Required<Pick<PartialObserver, 'error'>>;
181
167
 
182
168
  // @public (undocumented)
183
- export type EventPayloadListener<
184
- M extends EventPayloadMap<P>,
185
- E extends keyof M,
186
- P = any,
187
- > = (payload: M[E]) => void;
169
+ export type EventPayloadListener<M extends EventPayloadMap<P>, E extends keyof M, P = any> = (
170
+ payload: M[E],
171
+ ) => void;
188
172
 
189
173
  // @public (undocumented)
190
174
  type EventPayloadMap<P> = {
191
- readonly [event: string]: P;
175
+ readonly [event: string]: P;
192
176
  };
193
177
 
194
178
  // @public (undocumented)
@@ -196,216 +180,204 @@ export type Executor = () => Promise<void>;
196
180
 
197
181
  // @public (undocumented)
198
182
  export interface ExternalImageIdentifier {
199
- // (undocumented)
200
- readonly dataURI: string;
201
- // (undocumented)
202
- readonly mediaItemType: 'external-image';
203
- // (undocumented)
204
- readonly name?: string;
183
+ // (undocumented)
184
+ readonly dataURI: string;
185
+ // (undocumented)
186
+ readonly mediaItemType: 'external-image';
187
+ // (undocumented)
188
+ readonly name?: string;
205
189
  }
206
190
 
207
191
  // @public (undocumented)
208
192
  type ExternalUploadPayload = {
209
- uploadableFileUpfrontIds: UploadableFileUpfrontIds;
210
- dimensions: Dimensions;
193
+ uploadableFileUpfrontIds: UploadableFileUpfrontIds;
194
+ dimensions: Dimensions;
211
195
  };
212
196
 
213
197
  // @public (undocumented)
214
198
  export interface FileDetails {
215
- // (undocumented)
216
- artifacts?: Artifacts;
217
- // (undocumented)
218
- createdAt?: number;
219
- // (undocumented)
220
- creationDate?: number;
221
- // (undocumented)
222
- id: string;
223
- // (undocumented)
224
- mediaType?: MediaType;
225
- // (undocumented)
226
- mimeType?: string;
227
- // (undocumented)
228
- name?: string;
229
- // (undocumented)
230
- processingStatus?: FileProcessingStatus;
231
- // (undocumented)
232
- size?: number;
199
+ // (undocumented)
200
+ artifacts?: Artifacts;
201
+ // (undocumented)
202
+ createdAt?: number;
203
+ // (undocumented)
204
+ creationDate?: number;
205
+ // (undocumented)
206
+ id: string;
207
+ // (undocumented)
208
+ mediaType?: MediaType;
209
+ // (undocumented)
210
+ mimeType?: string;
211
+ // (undocumented)
212
+ name?: string;
213
+ // (undocumented)
214
+ processingStatus?: FileProcessingStatus;
215
+ // (undocumented)
216
+ size?: number;
233
217
  }
234
218
 
235
219
  // @public (undocumented)
236
220
  export interface FileFetcher {
237
- // (undocumented)
238
- copyFile(
239
- source: CopySourceFile,
240
- destination: CopyDestination,
241
- options?: CopyFileOptions,
242
- traceContext?: MediaTraceContext,
243
- ): Promise<MediaFile>;
244
- // (undocumented)
245
- downloadBinary(
246
- id: string,
247
- name?: string,
248
- collectionName?: string,
249
- ): Promise<void>;
250
- // (undocumented)
251
- getArtifactURL(
252
- artifacts: MediaFileArtifacts,
253
- artifactName: keyof MediaFileArtifacts,
254
- collectionName?: string,
255
- ): Promise<string>;
256
- // (undocumented)
257
- getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
258
- // (undocumented)
259
- getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
260
- // (undocumented)
261
- getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
262
- // (undocumented)
263
- touchFiles(
264
- descriptors: TouchFileDescriptor[],
265
- collection?: string,
266
- traceContext?: MediaTraceContext,
267
- ): Promise<TouchedFiles>;
268
- // (undocumented)
269
- upload(
270
- file: UploadableFile,
271
- controller?: UploadController,
272
- uploadableFileUpfrontIds?: UploadableFileUpfrontIds,
273
- traceContext?: MediaTraceContext,
274
- ): MediaSubscribable;
275
- // (undocumented)
276
- uploadExternal(
277
- url: string,
278
- collection?: string,
279
- traceContext?: MediaTraceContext,
280
- ): Promise<ExternalUploadPayload>;
221
+ // (undocumented)
222
+ copyFile(
223
+ source: CopySourceFile,
224
+ destination: CopyDestination,
225
+ options?: CopyFileOptions,
226
+ traceContext?: MediaTraceContext,
227
+ ): Promise<MediaFile>;
228
+ // (undocumented)
229
+ downloadBinary(id: string, name?: string, collectionName?: string): Promise<void>;
230
+ // (undocumented)
231
+ getArtifactURL(
232
+ artifacts: MediaFileArtifacts,
233
+ artifactName: keyof MediaFileArtifacts,
234
+ collectionName?: string,
235
+ ): Promise<string>;
236
+ // (undocumented)
237
+ getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
238
+ // (undocumented)
239
+ getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
240
+ // (undocumented)
241
+ getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
242
+ // (undocumented)
243
+ touchFiles(
244
+ descriptors: TouchFileDescriptor[],
245
+ collection?: string,
246
+ traceContext?: MediaTraceContext,
247
+ ): Promise<TouchedFiles>;
248
+ // (undocumented)
249
+ upload(
250
+ file: UploadableFile,
251
+ controller?: UploadController,
252
+ uploadableFileUpfrontIds?: UploadableFileUpfrontIds,
253
+ traceContext?: MediaTraceContext,
254
+ ): MediaSubscribable;
255
+ // (undocumented)
256
+ uploadExternal(
257
+ url: string,
258
+ collection?: string,
259
+ traceContext?: MediaTraceContext,
260
+ ): Promise<ExternalUploadPayload>;
281
261
  }
282
262
 
283
263
  // @public (undocumented)
284
264
  export class FileFetcherError extends BaseMediaClientError<FileFetcherErrorAttributes> {
285
- constructor(
286
- reason: FileFetcherErrorReason,
287
- id: string,
288
- metadata?:
289
- | undefined
290
- | {
291
- readonly collectionName?: string | undefined;
292
- readonly occurrenceKey?: string | undefined;
293
- },
294
- );
295
- // (undocumented)
296
- get attributes(): {
297
- reason: FileFetcherErrorReason;
298
- id: string;
299
- collectionName: string | undefined;
300
- occurrenceKey: string | undefined;
301
- };
302
- // (undocumented)
303
- readonly id: string;
304
- // (undocumented)
305
- readonly metadata?:
306
- | undefined
307
- | {
308
- readonly collectionName?: string | undefined;
309
- readonly occurrenceKey?: string | undefined;
310
- };
311
- // (undocumented)
312
- readonly reason: FileFetcherErrorReason;
265
+ constructor(
266
+ reason: FileFetcherErrorReason,
267
+ id: string,
268
+ metadata?:
269
+ | undefined
270
+ | {
271
+ readonly collectionName?: string | undefined;
272
+ readonly occurrenceKey?: string | undefined;
273
+ },
274
+ );
275
+ // (undocumented)
276
+ get attributes(): {
277
+ reason: FileFetcherErrorReason;
278
+ id: string;
279
+ collectionName: string | undefined;
280
+ occurrenceKey: string | undefined;
281
+ };
282
+ // (undocumented)
283
+ readonly id: string;
284
+ // (undocumented)
285
+ readonly metadata?:
286
+ | undefined
287
+ | {
288
+ readonly collectionName?: string | undefined;
289
+ readonly occurrenceKey?: string | undefined;
290
+ };
291
+ // (undocumented)
292
+ readonly reason: FileFetcherErrorReason;
313
293
  }
314
294
 
315
295
  // @public (undocumented)
316
296
  export type FileFetcherErrorAttributes = {
317
- readonly reason: FileFetcherErrorReason;
318
- readonly id: string;
319
- readonly metadata?: {
320
- readonly collectionName?: string;
321
- readonly occurrenceKey?: string;
322
- };
297
+ readonly reason: FileFetcherErrorReason;
298
+ readonly id: string;
299
+ readonly metadata?: {
300
+ readonly collectionName?: string;
301
+ readonly occurrenceKey?: string;
302
+ };
323
303
  };
324
304
 
325
305
  // @public (undocumented)
326
306
  export type FileFetcherErrorReason =
327
- | 'emptyFileName'
328
- | 'emptyItems'
329
- | 'invalidFileId'
330
- | 'zeroVersionFile';
307
+ | 'emptyFileName'
308
+ | 'emptyItems'
309
+ | 'invalidFileId'
310
+ | 'zeroVersionFile';
331
311
 
332
312
  // @public (undocumented)
333
313
  export class FileFetcherImpl implements FileFetcher {
334
- constructor(mediaApi: MediaStore, store?: MediaStore_2);
335
- // (undocumented)
336
- copyFile(
337
- source: CopySourceFile,
338
- destination: CopyDestination,
339
- options?: CopyFileOptions,
340
- traceContext?: MediaTraceContext,
341
- ): Promise<MediaFile>;
342
- // (undocumented)
343
- downloadBinary(
344
- id: string,
345
- name?: string,
346
- collectionName?: string,
347
- ): Promise<void>;
348
- // (undocumented)
349
- getArtifactURL(
350
- artifacts: MediaFileArtifacts,
351
- artifactName: keyof MediaFileArtifacts,
352
- collectionName?: string,
353
- ): Promise<string>;
354
- // (undocumented)
355
- getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
356
- // (undocumented)
357
- getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
358
- // (undocumented)
359
- getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
360
- // (undocumented)
361
- touchFiles(
362
- descriptors: TouchFileDescriptor[],
363
- collection?: string,
364
- traceContext?: MediaTraceContext,
365
- ): Promise<TouchedFiles>;
366
- // (undocumented)
367
- upload(
368
- file: UploadableFile,
369
- controller?: UploadController,
370
- uploadableFileUpfrontIds?: UploadableFileUpfrontIds,
371
- traceContext?: MediaTraceContext,
372
- ): MediaSubscribable;
373
- // (undocumented)
374
- uploadExternal(
375
- url: string,
376
- collection?: string,
377
- traceContext?: MediaTraceContext,
378
- ): Promise<ExternalUploadPayload>;
314
+ constructor(mediaApi: MediaStore, store?: MediaStore_2);
315
+ // (undocumented)
316
+ copyFile(
317
+ source: CopySourceFile,
318
+ destination: CopyDestination,
319
+ options?: CopyFileOptions,
320
+ traceContext?: MediaTraceContext,
321
+ ): Promise<MediaFile>;
322
+ // (undocumented)
323
+ downloadBinary(id: string, name?: string, collectionName?: string): Promise<void>;
324
+ // (undocumented)
325
+ getArtifactURL(
326
+ artifacts: MediaFileArtifacts,
327
+ artifactName: keyof MediaFileArtifacts,
328
+ collectionName?: string,
329
+ ): Promise<string>;
330
+ // (undocumented)
331
+ getCurrentState(id: string, options?: GetFileOptions): Promise<FileState>;
332
+ // (undocumented)
333
+ getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
334
+ // (undocumented)
335
+ getFileState(id: string, options?: GetFileOptions): MediaSubscribable;
336
+ // (undocumented)
337
+ touchFiles(
338
+ descriptors: TouchFileDescriptor[],
339
+ collection?: string,
340
+ traceContext?: MediaTraceContext,
341
+ ): Promise<TouchedFiles>;
342
+ // (undocumented)
343
+ upload(
344
+ file: UploadableFile,
345
+ controller?: UploadController,
346
+ uploadableFileUpfrontIds?: UploadableFileUpfrontIds,
347
+ traceContext?: MediaTraceContext,
348
+ ): MediaSubscribable;
349
+ // (undocumented)
350
+ uploadExternal(
351
+ url: string,
352
+ collection?: string,
353
+ traceContext?: MediaTraceContext,
354
+ ): Promise<ExternalUploadPayload>;
379
355
  }
380
356
 
381
357
  // @public (undocumented)
382
358
  export interface FileIdentifier {
383
- // (undocumented)
384
- readonly collectionName?: string;
385
- // (undocumented)
386
- readonly id: string;
387
- // (undocumented)
388
- readonly mediaItemType: 'file';
389
- // (undocumented)
390
- readonly occurrenceKey?: string;
359
+ // (undocumented)
360
+ readonly collectionName?: string;
361
+ // (undocumented)
362
+ readonly id: string;
363
+ // (undocumented)
364
+ readonly mediaItemType: 'file';
365
+ // (undocumented)
366
+ readonly occurrenceKey?: string;
391
367
  }
392
368
 
393
369
  // @public (undocumented)
394
370
  export interface FileItem {
395
- // (undocumented)
396
- details: FileDetails;
397
- // (undocumented)
398
- type: 'file';
371
+ // (undocumented)
372
+ details: FileDetails;
373
+ // (undocumented)
374
+ type: 'file';
399
375
  }
400
376
 
401
377
  export { FilePreview };
402
378
 
403
379
  // @public (undocumented)
404
- export type FileProcessingStatus =
405
- | 'failed'
406
- | 'pending'
407
- | 'running'
408
- | 'succeeded';
380
+ export type FileProcessingStatus = 'failed' | 'pending' | 'running' | 'succeeded';
409
381
 
410
382
  export { FileState };
411
383
 
@@ -413,44 +385,35 @@ export { FileState };
413
385
  export type FileStatus = FileStatus_2;
414
386
 
415
387
  // @public (undocumented)
416
- export function fromObservable(
417
- observable: ReplaySubject<FileState>,
418
- ): MediaSubscribable;
388
+ export function fromObservable(observable: ReplaySubject<FileState>): MediaSubscribable;
419
389
 
420
390
  // @public (undocumented)
421
391
  export const getArtifactUrl: (
422
- artifacts: MediaFileArtifacts,
423
- prop: keyof MediaFileArtifacts,
392
+ artifacts: MediaFileArtifacts,
393
+ prop: keyof MediaFileArtifacts,
424
394
  ) => string | undefined;
425
395
 
426
396
  // @public (undocumented)
427
- export const getAttrsFromUrl: (
428
- blobUrl: string,
429
- ) => MediaBlobUrlAttrs | undefined;
397
+ export const getAttrsFromUrl: (blobUrl: string) => MediaBlobUrlAttrs | undefined;
430
398
 
431
399
  // @public (undocumented)
432
- export const getDimensionsFromBlob: (
433
- mediaType: MediaType,
434
- blob: Blob,
435
- ) => Promise<Dimensions>;
400
+ export const getDimensionsFromBlob: (mediaType: MediaType, blob: Blob) => Promise<Dimensions>;
436
401
 
437
402
  // @public (undocumented)
438
403
  export interface GetFileOptions {
439
- // (undocumented)
440
- collectionName?: string;
441
- // (undocumented)
442
- occurrenceKey?: string;
443
- // (undocumented)
444
- preview?: PreviewOptions;
404
+ // (undocumented)
405
+ collectionName?: string;
406
+ // (undocumented)
407
+ occurrenceKey?: string;
408
+ // (undocumented)
409
+ preview?: PreviewOptions;
445
410
  }
446
411
 
447
412
  // @public (undocumented)
448
413
  export const getFileStreamsCache: () => StreamsCache<FileState>;
449
414
 
450
415
  // @public (undocumented)
451
- export function getMediaClientErrorReason(
452
- err: Error,
453
- ): 'unknown' | MediaClientErrorReason;
416
+ export function getMediaClientErrorReason(err: Error): 'unknown' | MediaClientErrorReason;
454
417
 
455
418
  // @public (undocumented)
456
419
  export const getMediaEnvironment: () => string | undefined;
@@ -460,18 +423,18 @@ export const getMediaRegion: () => string | undefined;
460
423
 
461
424
  // @public (undocumented)
462
425
  export const globalMediaEventEmitter: {
463
- on<E extends keyof UploadEventPayloadMap>(
464
- event: E,
465
- listener: EventPayloadListener<UploadEventPayloadMap, E, any>,
466
- ): void;
467
- off<E_1 extends keyof UploadEventPayloadMap>(
468
- event: E_1,
469
- listener: EventPayloadListener<UploadEventPayloadMap, E_1, any>,
470
- ): void;
471
- emit<E_2 extends keyof UploadEventPayloadMap>(
472
- event: E_2,
473
- payload: UploadEventPayloadMap[E_2],
474
- ): boolean | undefined;
426
+ on<E extends keyof UploadEventPayloadMap>(
427
+ event: E,
428
+ listener: EventPayloadListener<UploadEventPayloadMap, E, any>,
429
+ ): void;
430
+ off<E_1 extends keyof UploadEventPayloadMap>(
431
+ event: E_1,
432
+ listener: EventPayloadListener<UploadEventPayloadMap, E_1, any>,
433
+ ): void;
434
+ emit<E_2 extends keyof UploadEventPayloadMap>(
435
+ event: E_2,
436
+ payload: UploadEventPayloadMap[E_2],
437
+ ): boolean | undefined;
475
438
  };
476
439
 
477
440
  // @public (undocumented)
@@ -479,20 +442,20 @@ export type Identifier = ExternalImageIdentifier | FileIdentifier;
479
442
 
480
443
  // @public (undocumented)
481
444
  export interface ImageMetadata {
482
- // (undocumented)
483
- original?: ImageMetadataArtifact;
484
- // (undocumented)
485
- pending: boolean;
486
- // (undocumented)
487
- preview?: ImageMetadataArtifact;
445
+ // (undocumented)
446
+ original?: ImageMetadataArtifact;
447
+ // (undocumented)
448
+ pending: boolean;
449
+ // (undocumented)
450
+ preview?: ImageMetadataArtifact;
488
451
  }
489
452
 
490
453
  // @public (undocumented)
491
454
  export type ImageMetadataArtifact = {
492
- url?: string;
493
- width?: number;
494
- height?: number;
495
- size?: number;
455
+ url?: string;
456
+ width?: number;
457
+ height?: number;
458
+ size?: number;
496
459
  };
497
460
 
498
461
  // @public (undocumented)
@@ -500,7 +463,7 @@ export type ImageResizeMode = 'crop' | 'fit' | 'full-fit' | 'stretchy-fit';
500
463
 
501
464
  // @public (undocumented)
502
465
  export const imageResizeModeToFileImageMode: (
503
- resizeMode?: ImageResizeMode,
466
+ resizeMode?: ImageResizeMode,
504
467
  ) => MediaStoreGetFileImageParams['mode'];
505
468
 
506
469
  // @public (undocumented)
@@ -510,26 +473,22 @@ export function isAbortedRequestError(err: any): boolean;
510
473
  export const isDifferentIdentifier: (a: Identifier, b: Identifier) => boolean;
511
474
 
512
475
  // @public (undocumented)
513
- export const isErrorFileState: (
514
- fileState: FileState,
515
- ) => fileState is ErrorFileState;
476
+ export const isErrorFileState: (fileState: FileState) => fileState is ErrorFileState;
516
477
 
517
478
  // @public (undocumented)
518
479
  export const isExternalImageIdentifier: (
519
- identifier: Identifier,
480
+ identifier: Identifier,
520
481
  ) => identifier is ExternalImageIdentifier;
521
482
 
522
483
  // @public (undocumented)
523
484
  export function isFileFetcherError(err: Error): err is FileFetcherError;
524
485
 
525
486
  // @public (undocumented)
526
- export const isFileIdentifier: (
527
- identifier: Identifier,
528
- ) => identifier is FileIdentifier;
487
+ export const isFileIdentifier: (identifier: Identifier) => identifier is FileIdentifier;
529
488
 
530
489
  // @public (undocumented)
531
490
  export const isFinalFileState: (
532
- fileState: FileState,
491
+ fileState: FileState,
533
492
  ) => fileState is ErrorFileState | ProcessedFileState | ProcessingFailedState;
534
493
 
535
494
  // @public (undocumented)
@@ -540,7 +499,7 @@ export const isMediaBlobUrl: (url: string) => boolean;
540
499
 
541
500
  // @public (undocumented)
542
501
  export function isMediaClientError(error: any): error is MediaClientError<{
543
- reason: MediaClientErrorReason;
502
+ reason: MediaClientErrorReason;
544
503
  }>;
545
504
 
546
505
  // @public (undocumented)
@@ -551,27 +510,23 @@ export function isPollingError(err?: Error): err is PollingError;
551
510
 
552
511
  // @public (undocumented)
553
512
  export const isPreviewableFileState: (
554
- fileState: FileState,
513
+ fileState: FileState,
555
514
  ) => fileState is (
556
- | ProcessedFileState
557
- | ProcessingFailedState
558
- | ProcessingFileState
559
- | UploadingFileState
515
+ | ProcessedFileState
516
+ | ProcessingFailedState
517
+ | ProcessingFileState
518
+ | UploadingFileState
560
519
  ) &
561
- PreviewableFileState;
520
+ PreviewableFileState;
562
521
 
563
522
  // @public (undocumented)
564
523
  export const isPreviewableType: (type: MediaType) => boolean;
565
524
 
566
525
  // @public (undocumented)
567
- export const isProcessedFileState: (
568
- fileState: FileState,
569
- ) => fileState is ProcessedFileState;
526
+ export const isProcessedFileState: (fileState: FileState) => fileState is ProcessedFileState;
570
527
 
571
528
  // @public (undocumented)
572
- export const isProcessingFileState: (
573
- fileState: FileState,
574
- ) => fileState is ProcessingFileState;
529
+ export const isProcessingFileState: (fileState: FileState) => fileState is ProcessingFileState;
575
530
 
576
531
  // @public (undocumented)
577
532
  export function isRateLimitedError(error: Error | undefined): boolean;
@@ -580,307 +535,280 @@ export function isRateLimitedError(error: Error | undefined): boolean;
580
535
  export function isRequestError(err: Error): err is RequestError;
581
536
 
582
537
  // @public (undocumented)
583
- export const isUploadingFileState: (
584
- fileState: FileState,
585
- ) => fileState is UploadingFileState;
538
+ export const isUploadingFileState: (fileState: FileState) => fileState is UploadingFileState;
586
539
 
587
540
  // @public (undocumented)
588
541
  export interface ItemsPayload {
589
- // (undocumented)
590
- items: ResponseFileItem[];
542
+ // (undocumented)
543
+ items: ResponseFileItem[];
591
544
  }
592
545
 
593
546
  // @public (undocumented)
594
- export const mapMediaFileToFileState: (
595
- mediaFile: MediaStoreResponse<MediaFile>,
596
- ) => FileState;
547
+ export const mapMediaFileToFileState: (mediaFile: MediaStoreResponse<MediaFile>) => FileState;
597
548
 
598
549
  // @public (undocumented)
599
- export const mapMediaItemToFileState: (
600
- id: string,
601
- item: MediaItemDetails,
602
- ) => FileState;
550
+ export const mapMediaItemToFileState: (id: string, item: MediaItemDetails) => FileState;
603
551
 
604
552
  // @public (undocumented)
605
553
  export const MAX_RESOLUTION = 4096;
606
554
 
607
555
  // @public (undocumented)
608
556
  interface MediaApi {
609
- // (undocumented)
610
- appendChunksToUpload: (
611
- uploadId: string,
612
- body: AppendChunksToUploadRequestBody,
613
- collectionName?: string,
614
- traceContext?: MediaTraceContext,
615
- ) => Promise<void>;
616
- // (undocumented)
617
- copyFileWithToken: (
618
- body: MediaStoreCopyFileWithTokenBody,
619
- params: MediaStoreCopyFileWithTokenParams,
620
- traceContext?: MediaTraceContext,
621
- ) => Promise<MediaStoreResponse<MediaFile>>;
622
- // (undocumented)
623
- createFileFromUpload: (
624
- body: MediaStoreCreateFileFromUploadBody,
625
- params: MediaStoreCreateFileFromUploadParams,
626
- traceContext?: MediaTraceContext,
627
- ) => Promise<MediaStoreResponse<MediaFile>>;
628
- // (undocumented)
629
- createUpload: (
630
- createUpTo: number,
631
- collectionName?: string,
632
- traceContext?: MediaTraceContext,
633
- ) => Promise<MediaStoreResponse<MediaUpload[]>>;
634
- // (undocumented)
635
- getArtifactURL: (
636
- artifacts: MediaFileArtifacts,
637
- artifactName: keyof MediaFileArtifacts,
638
- collectionName?: string,
639
- ) => Promise<string>;
640
- // (undocumented)
641
- getFile: (
642
- fileId: string,
643
- params: MediaStoreGetFileParams,
644
- traceContext?: MediaTraceContext,
645
- ) => Promise<MediaStoreResponse<MediaFile>>;
646
- // (undocumented)
647
- getFileBinaryURL: (id: string, collectionName?: string) => Promise<string>;
648
- // (undocumented)
649
- getFileImageURL: (
650
- id: string,
651
- params?: MediaStoreGetFileImageParams,
652
- ) => Promise<string>;
653
- // (undocumented)
654
- getFileImageURLSync: (
655
- id: string,
656
- params?: MediaStoreGetFileImageParams,
657
- ) => string;
658
- // (undocumented)
659
- getImage: (
660
- id: string,
661
- params?: MediaStoreGetFileImageParams,
662
- controller?: AbortController,
663
- fetchMaxRes?: boolean,
664
- traceContext?: MediaTraceContext,
665
- ) => Promise<Blob>;
666
- // (undocumented)
667
- getImageMetadata: (
668
- id: string,
669
- params?: MediaStoreGetFileImageParams,
670
- traceContext?: MediaTraceContext,
671
- ) => Promise<{
672
- metadata: ImageMetadata;
673
- }>;
674
- // (undocumented)
675
- getItems: (
676
- ids: string[],
677
- collectionName?: string,
678
- traceContext?: MediaTraceContext,
679
- ) => Promise<MediaStoreResponse<ItemsPayload>>;
680
- // (undocumented)
681
- getRejectedResponseFromDescriptor: (
682
- descriptor: TouchFileDescriptor,
683
- limit: number,
684
- ) => RejectedTouchFile;
685
- // (undocumented)
686
- probeChunks: (
687
- chunks: string[],
688
- uploadId: string,
689
- collectionName?: string,
690
- traceContext?: MediaTraceContext,
691
- ) => Promise<MediaStoreResponse<MediaChunksProbe>>;
692
- // (undocumented)
693
- removeCollectionFile: (
694
- id: string,
695
- collectionName: string,
696
- occurrenceKey?: string,
697
- traceContext?: MediaTraceContext,
698
- ) => Promise<void>;
699
- // (undocumented)
700
- request: (
701
- path: string,
702
- options: MediaStoreRequestOptions,
703
- controller?: AbortController,
704
- ) => Promise<Response>;
705
- // (undocumented)
706
- resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
707
- // (undocumented)
708
- resolveInitialAuth: () => Auth;
709
- // (undocumented)
710
- touchFiles: (
711
- body: MediaStoreTouchFileBody,
712
- params: MediaStoreTouchFileParams,
713
- traceContext?: MediaTraceContext,
714
- ) => Promise<MediaStoreResponse<TouchedFiles>>;
715
- // (undocumented)
716
- uploadChunk: (
717
- etag: string,
718
- blob: Blob,
719
- uploadId: string,
720
- partNumber: number,
721
- collectionName?: string,
722
- traceContext?: MediaTraceContext,
723
- ) => Promise<void>;
557
+ // (undocumented)
558
+ appendChunksToUpload: (
559
+ uploadId: string,
560
+ body: AppendChunksToUploadRequestBody,
561
+ collectionName?: string,
562
+ traceContext?: MediaTraceContext,
563
+ ) => Promise<void>;
564
+ // (undocumented)
565
+ copyFileWithToken: (
566
+ body: MediaStoreCopyFileWithTokenBody,
567
+ params: MediaStoreCopyFileWithTokenParams,
568
+ traceContext?: MediaTraceContext,
569
+ ) => Promise<MediaStoreResponse<MediaFile>>;
570
+ // (undocumented)
571
+ createFileFromUpload: (
572
+ body: MediaStoreCreateFileFromUploadBody,
573
+ params: MediaStoreCreateFileFromUploadParams,
574
+ traceContext?: MediaTraceContext,
575
+ ) => Promise<MediaStoreResponse<MediaFile>>;
576
+ // (undocumented)
577
+ createUpload: (
578
+ createUpTo: number,
579
+ collectionName?: string,
580
+ traceContext?: MediaTraceContext,
581
+ ) => Promise<MediaStoreResponse<MediaUpload[]>>;
582
+ // (undocumented)
583
+ getArtifactURL: (
584
+ artifacts: MediaFileArtifacts,
585
+ artifactName: keyof MediaFileArtifacts,
586
+ collectionName?: string,
587
+ ) => Promise<string>;
588
+ // (undocumented)
589
+ getFile: (
590
+ fileId: string,
591
+ params: MediaStoreGetFileParams,
592
+ traceContext?: MediaTraceContext,
593
+ ) => Promise<MediaStoreResponse<MediaFile>>;
594
+ // (undocumented)
595
+ getFileBinaryURL: (id: string, collectionName?: string) => Promise<string>;
596
+ // (undocumented)
597
+ getFileImageURL: (id: string, params?: MediaStoreGetFileImageParams) => Promise<string>;
598
+ // (undocumented)
599
+ getFileImageURLSync: (id: string, params?: MediaStoreGetFileImageParams) => string;
600
+ // (undocumented)
601
+ getImage: (
602
+ id: string,
603
+ params?: MediaStoreGetFileImageParams,
604
+ controller?: AbortController,
605
+ fetchMaxRes?: boolean,
606
+ traceContext?: MediaTraceContext,
607
+ ) => Promise<Blob>;
608
+ // (undocumented)
609
+ getImageMetadata: (
610
+ id: string,
611
+ params?: MediaStoreGetFileImageParams,
612
+ traceContext?: MediaTraceContext,
613
+ ) => Promise<{
614
+ metadata: ImageMetadata;
615
+ }>;
616
+ // (undocumented)
617
+ getItems: (
618
+ ids: string[],
619
+ collectionName?: string,
620
+ traceContext?: MediaTraceContext,
621
+ ) => Promise<MediaStoreResponse<ItemsPayload>>;
622
+ // (undocumented)
623
+ getRejectedResponseFromDescriptor: (
624
+ descriptor: TouchFileDescriptor,
625
+ limit: number,
626
+ ) => RejectedTouchFile;
627
+ // (undocumented)
628
+ probeChunks: (
629
+ chunks: string[],
630
+ uploadId: string,
631
+ collectionName?: string,
632
+ traceContext?: MediaTraceContext,
633
+ ) => Promise<MediaStoreResponse<MediaChunksProbe>>;
634
+ // (undocumented)
635
+ removeCollectionFile: (
636
+ id: string,
637
+ collectionName: string,
638
+ occurrenceKey?: string,
639
+ traceContext?: MediaTraceContext,
640
+ ) => Promise<void>;
641
+ // (undocumented)
642
+ request: (
643
+ path: string,
644
+ options: MediaStoreRequestOptions,
645
+ controller?: AbortController,
646
+ ) => Promise<Response>;
647
+ // (undocumented)
648
+ resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
649
+ // (undocumented)
650
+ resolveInitialAuth: () => Auth;
651
+ // (undocumented)
652
+ touchFiles: (
653
+ body: MediaStoreTouchFileBody,
654
+ params: MediaStoreTouchFileParams,
655
+ traceContext?: MediaTraceContext,
656
+ ) => Promise<MediaStoreResponse<TouchedFiles>>;
657
+ // (undocumented)
658
+ uploadChunk: (
659
+ etag: string,
660
+ blob: Blob,
661
+ uploadId: string,
662
+ partNumber: number,
663
+ collectionName?: string,
664
+ traceContext?: MediaTraceContext,
665
+ ) => Promise<void>;
724
666
  }
725
667
 
726
668
  // @public (undocumented)
727
669
  export interface MediaArtifact {
728
- // (undocumented)
729
- processingStatus?: FileProcessingStatus;
730
- // (undocumented)
731
- url?: string;
670
+ // (undocumented)
671
+ processingStatus?: FileProcessingStatus;
672
+ // (undocumented)
673
+ url?: string;
732
674
  }
733
675
 
734
676
  // @public (undocumented)
735
677
  export interface MediaBlobUrlAttrs {
736
- // (undocumented)
737
- alt?: string;
738
- // (undocumented)
739
- collection?: string;
740
- // (undocumented)
741
- contextId: string;
742
- // (undocumented)
743
- height?: number;
744
- // (undocumented)
745
- id: string;
746
- // (undocumented)
747
- mimeType?: string;
748
- // (undocumented)
749
- name?: string;
750
- // (undocumented)
751
- size?: number;
752
- // (undocumented)
753
- width?: number;
678
+ // (undocumented)
679
+ alt?: string;
680
+ // (undocumented)
681
+ collection?: string;
682
+ // (undocumented)
683
+ contextId: string;
684
+ // (undocumented)
685
+ height?: number;
686
+ // (undocumented)
687
+ id: string;
688
+ // (undocumented)
689
+ mimeType?: string;
690
+ // (undocumented)
691
+ name?: string;
692
+ // (undocumented)
693
+ size?: number;
694
+ // (undocumented)
695
+ width?: number;
754
696
  }
755
697
 
756
698
  // @public (undocumented)
757
699
  export type MediaChunksProbe = {
758
- readonly results: {
759
- readonly [etag: string]: {
760
- readonly exists: boolean;
761
- };
762
- };
700
+ readonly results: {
701
+ readonly [etag: string]: {
702
+ readonly exists: boolean;
703
+ };
704
+ };
763
705
  };
764
706
 
765
707
  // @public (undocumented)
766
708
  export class MediaClient {
767
- constructor(
768
- mediaClientConfig: MediaClientConfig,
769
- store?: MediaStore_2,
770
- mediaApi?: MediaStore,
771
- );
772
- // @internal (undocumented)
773
- __DO_NOT_USE__getMediaStore(): MediaStore_2;
774
- // (undocumented)
775
- readonly config: MediaClientConfig;
776
- // (undocumented)
777
- emit<E extends keyof UploadEventPayloadMap>(
778
- event: E,
779
- payload: UploadEventPayloadMap[E],
780
- ): boolean;
781
- // (undocumented)
782
- readonly file: FileFetcher;
783
- // (undocumented)
784
- getImage(
785
- id: string,
786
- params?: MediaStoreGetFileImageParams,
787
- controller?: AbortController,
788
- fetchMaxRes?: boolean,
789
- traceContext?: MediaTraceContext,
790
- ): Promise<Blob>;
791
- // (undocumented)
792
- getImageMetadata(
793
- id: string,
794
- params?: MediaStoreGetFileImageParams,
795
- ): Promise<ImageMetadata>;
796
- // (undocumented)
797
- getImageUrl(
798
- id: string,
799
- params?: MediaStoreGetFileImageParams,
800
- ): Promise<string>;
801
- // (undocumented)
802
- getImageUrlSync(id: string, params?: MediaStoreGetFileImageParams): string;
803
- // (undocumented)
804
- readonly mediaClientConfig: MediaClientConfig;
805
- // (undocumented)
806
- readonly mediaStore: MediaStore;
807
- // (undocumented)
808
- mobileUploadPromise(): Promise<MobileUpload>;
809
- // (undocumented)
810
- off<E extends keyof UploadEventPayloadMap>(
811
- event: E,
812
- listener: EventPayloadListener<UploadEventPayloadMap, E>,
813
- ): void;
814
- // (undocumented)
815
- on<E extends keyof UploadEventPayloadMap>(
816
- event: E,
817
- listener: EventPayloadListener<UploadEventPayloadMap, E>,
818
- ): void;
819
- // (undocumented)
820
- removeFileFromCollection(
821
- id: string,
822
- collectionName: string,
823
- occurrenceKey?: string,
824
- traceContext?: MediaTraceContext,
825
- ): Promise<void>;
826
- // (undocumented)
827
- readonly stargate: StargateClient;
709
+ constructor(mediaClientConfig: MediaClientConfig, store?: MediaStore_2, mediaApi?: MediaStore);
710
+ // @internal (undocumented)
711
+ __DO_NOT_USE__getMediaStore(): MediaStore_2;
712
+ // (undocumented)
713
+ readonly config: MediaClientConfig;
714
+ // (undocumented)
715
+ emit<E extends keyof UploadEventPayloadMap>(event: E, payload: UploadEventPayloadMap[E]): boolean;
716
+ // (undocumented)
717
+ readonly file: FileFetcher;
718
+ // (undocumented)
719
+ getImage(
720
+ id: string,
721
+ params?: MediaStoreGetFileImageParams,
722
+ controller?: AbortController,
723
+ fetchMaxRes?: boolean,
724
+ traceContext?: MediaTraceContext,
725
+ ): Promise<Blob>;
726
+ // (undocumented)
727
+ getImageMetadata(id: string, params?: MediaStoreGetFileImageParams): Promise<ImageMetadata>;
728
+ // (undocumented)
729
+ getImageUrl(id: string, params?: MediaStoreGetFileImageParams): Promise<string>;
730
+ // (undocumented)
731
+ getImageUrlSync(id: string, params?: MediaStoreGetFileImageParams): string;
732
+ // (undocumented)
733
+ readonly mediaClientConfig: MediaClientConfig;
734
+ // (undocumented)
735
+ readonly mediaStore: MediaStore;
736
+ // (undocumented)
737
+ mobileUploadPromise(): Promise<MobileUpload>;
738
+ // (undocumented)
739
+ off<E extends keyof UploadEventPayloadMap>(
740
+ event: E,
741
+ listener: EventPayloadListener<UploadEventPayloadMap, E>,
742
+ ): void;
743
+ // (undocumented)
744
+ on<E extends keyof UploadEventPayloadMap>(
745
+ event: E,
746
+ listener: EventPayloadListener<UploadEventPayloadMap, E>,
747
+ ): void;
748
+ // (undocumented)
749
+ removeFileFromCollection(
750
+ id: string,
751
+ collectionName: string,
752
+ occurrenceKey?: string,
753
+ traceContext?: MediaTraceContext,
754
+ ): Promise<void>;
755
+ // (undocumented)
756
+ readonly stargate: StargateClient;
828
757
  }
829
758
 
830
759
  export { MediaClientConfig };
831
760
 
832
761
  // @public
833
- export interface MediaClientError<Attributes extends MediaClientErrorAttributes>
834
- extends Error {
835
- // (undocumented)
836
- readonly attributes: Attributes;
762
+ export interface MediaClientError<Attributes extends MediaClientErrorAttributes> extends Error {
763
+ // (undocumented)
764
+ readonly attributes: Attributes;
837
765
  }
838
766
 
839
767
  // @public (undocumented)
840
768
  export interface MediaClientErrorAttributes {
841
- // (undocumented)
842
- reason: MediaClientErrorReason;
769
+ // (undocumented)
770
+ reason: MediaClientErrorReason;
843
771
  }
844
772
 
845
773
  // @public (undocumented)
846
774
  export type MediaClientErrorReason =
847
- | 'authProviderTimedOut'
848
- | 'clientAbortedRequest'
849
- | 'clientOffline'
850
- | 'clientTimeoutRequest'
851
- | 'deprecatedEndpoint'
852
- | 'emptyAuth'
853
- | 'emptyFileName'
854
- | 'emptyItems'
855
- | 'failedAuthProvider'
856
- | 'fileSizeExceedsLimit'
857
- | 'invalidFileId'
858
- | 'missingInitialAuth'
859
- | 'pollingMaxAttemptsExceeded'
860
- | 'serverBadGateway'
861
- | 'serverBadRequest'
862
- | 'serverForbidden'
863
- | 'serverInternalError'
864
- | 'serverInvalidBody'
865
- | 'serverNotFound'
866
- | 'serverRateLimited'
867
- | 'serverUnauthorized'
868
- | 'serverUnexpectedError'
869
- | 'tokenExpired'
870
- | 'zeroVersionFile';
775
+ | 'authProviderTimedOut'
776
+ | 'clientAbortedRequest'
777
+ | 'clientOffline'
778
+ | 'clientTimeoutRequest'
779
+ | 'deprecatedEndpoint'
780
+ | 'emptyAuth'
781
+ | 'emptyFileName'
782
+ | 'emptyItems'
783
+ | 'failedAuthProvider'
784
+ | 'fileSizeExceedsLimit'
785
+ | 'invalidFileId'
786
+ | 'missingInitialAuth'
787
+ | 'pollingMaxAttemptsExceeded'
788
+ | 'serverBadGateway'
789
+ | 'serverBadRequest'
790
+ | 'serverForbidden'
791
+ | 'serverInternalError'
792
+ | 'serverInvalidBody'
793
+ | 'serverNotFound'
794
+ | 'serverRateLimited'
795
+ | 'serverUnauthorized'
796
+ | 'serverUnexpectedError'
797
+ | 'tokenExpired'
798
+ | 'zeroVersionFile';
871
799
 
872
800
  // @public (undocumented)
873
801
  export type MediaFile = {
874
- readonly id: string;
875
- readonly mediaType: MediaType;
876
- readonly mimeType: string;
877
- readonly name: string;
878
- readonly processingStatus?: MediaFileProcessingStatus;
879
- readonly size: number;
880
- readonly artifacts: MediaFileArtifacts;
881
- readonly representations: MediaRepresentations;
882
- readonly createdAt?: number;
883
- readonly metadataTraceContext?: MediaTraceContext;
802
+ readonly id: string;
803
+ readonly mediaType: MediaType;
804
+ readonly mimeType: string;
805
+ readonly name: string;
806
+ readonly processingStatus?: MediaFileProcessingStatus;
807
+ readonly size: number;
808
+ readonly artifacts: MediaFileArtifacts;
809
+ readonly representations: MediaRepresentations;
810
+ readonly createdAt?: number;
811
+ readonly metadataTraceContext?: MediaTraceContext;
884
812
  };
885
813
 
886
814
  export { MediaFileArtifact };
@@ -892,15 +820,15 @@ export type MediaFileProcessingStatus = 'failed' | 'pending' | 'succeeded';
892
820
 
893
821
  // @public (undocumented)
894
822
  export type MediaItemDetails = {
895
- readonly mediaType: MediaType;
896
- readonly mimeType: string;
897
- readonly name: string;
898
- readonly processingStatus: MediaFileProcessingStatus;
899
- readonly size: number;
900
- readonly artifacts: MediaFileArtifacts;
901
- readonly representations: MediaRepresentations;
902
- readonly createdAt?: number;
903
- readonly metadataTraceContext?: MediaTraceContext;
823
+ readonly mediaType: MediaType;
824
+ readonly mimeType: string;
825
+ readonly name: string;
826
+ readonly processingStatus: MediaFileProcessingStatus;
827
+ readonly size: number;
828
+ readonly artifacts: MediaFileArtifacts;
829
+ readonly representations: MediaRepresentations;
830
+ readonly createdAt?: number;
831
+ readonly metadataTraceContext?: MediaTraceContext;
904
832
  };
905
833
 
906
834
  // @public (undocumented)
@@ -908,330 +836,324 @@ export type MediaItemType = 'external-image' | 'file';
908
836
 
909
837
  // @public (undocumented)
910
838
  export type MediaObserver =
911
- | ((value: FileState) => void)
912
- | CompletionObserver
913
- | ErrorObserver
914
- | NextObserver;
839
+ | ((value: FileState) => void)
840
+ | CompletionObserver
841
+ | ErrorObserver
842
+ | NextObserver;
915
843
 
916
844
  // @public (undocumented)
917
845
  export type MediaRepresentations = {
918
- image?: Object;
846
+ image?: Object;
919
847
  };
920
848
 
921
849
  // @public (undocumented)
922
850
  export class MediaStore implements MediaApi {
923
- constructor(config: MediaApiConfig);
924
- // (undocumented)
925
- appendChunksToUpload(
926
- uploadId: string,
927
- body: AppendChunksToUploadRequestBody,
928
- collectionName?: string,
929
- traceContext?: MediaTraceContext,
930
- ): Promise<void>;
931
- // (undocumented)
932
- copyFileWithToken(
933
- body: MediaStoreCopyFileWithTokenBody,
934
- params: MediaStoreCopyFileWithTokenParams,
935
- traceContext?: MediaTraceContext,
936
- ): Promise<MediaStoreResponse<MediaFile>>;
937
- // (undocumented)
938
- createFileFromUpload(
939
- body: MediaStoreCreateFileFromUploadBody,
940
- params?: MediaStoreCreateFileFromUploadParams,
941
- traceContext?: MediaTraceContext,
942
- ): Promise<MediaStoreResponse<MediaFile>>;
943
- // (undocumented)
944
- createUpload(
945
- createUpTo?: number,
946
- collectionName?: string,
947
- traceContext?: MediaTraceContext,
948
- ): Promise<MediaStoreResponse<MediaUpload[]>>;
949
- // (undocumented)
950
- getArtifactURL(
951
- artifacts: MediaFileArtifacts,
952
- artifactName: keyof MediaFileArtifacts,
953
- collectionName?: string,
954
- ): Promise<string>;
955
- // (undocumented)
956
- getFile(
957
- fileId: string,
958
- params?: MediaStoreGetFileParams,
959
- traceContext?: MediaTraceContext,
960
- ): Promise<MediaStoreResponse<MediaFile>>;
961
- // (undocumented)
962
- getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
963
- // (undocumented)
964
- getFileImageURL(
965
- id: string,
966
- params?: MediaStoreGetFileImageParams,
967
- ): Promise<string>;
968
- // (undocumented)
969
- getFileImageURLSync(
970
- id: string,
971
- params?: MediaStoreGetFileImageParams,
972
- ): string;
973
- // (undocumented)
974
- getImage(
975
- id: string,
976
- params?: MediaStoreGetFileImageParams,
977
- controller?: AbortController,
978
- fetchMaxRes?: boolean,
979
- traceContext?: MediaTraceContext,
980
- ): Promise<Blob>;
981
- // (undocumented)
982
- getImageMetadata(
983
- id: string,
984
- params?: MediaStoreGetFileImageParams,
985
- traceContext?: MediaTraceContext,
986
- ): Promise<{
987
- metadata: ImageMetadata;
988
- }>;
989
- // (undocumented)
990
- getItems(
991
- ids: string[],
992
- collectionName?: string,
993
- traceContext?: MediaTraceContext,
994
- ): Promise<MediaStoreResponse<ItemsPayload>>;
995
- // (undocumented)
996
- getRejectedResponseFromDescriptor(
997
- descriptor: TouchFileDescriptor,
998
- limit: number,
999
- ): RejectedTouchFile;
1000
- // (undocumented)
1001
- probeChunks(
1002
- chunks: string[],
1003
- uploadId: string,
1004
- collectionName?: string,
1005
- traceContext?: MediaTraceContext,
1006
- ): Promise<MediaStoreResponse<MediaChunksProbe>>;
1007
- // (undocumented)
1008
- removeCollectionFile(
1009
- id: string,
1010
- collectionName: string,
1011
- occurrenceKey?: string,
1012
- traceContext?: MediaTraceContext,
1013
- ): Promise<void>;
1014
- // (undocumented)
1015
- request(
1016
- path: string,
1017
- options?: MediaStoreRequestOptions,
1018
- controller?: AbortController,
1019
- ): Promise<Response>;
1020
- // (undocumented)
1021
- resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
1022
- // (undocumented)
1023
- resolveInitialAuth: () => Auth;
1024
- // (undocumented)
1025
- touchFiles(
1026
- body: MediaStoreTouchFileBody,
1027
- params?: MediaStoreTouchFileParams,
1028
- traceContext?: MediaTraceContext,
1029
- ): Promise<MediaStoreResponse<TouchedFiles>>;
1030
- // (undocumented)
1031
- uploadChunk(
1032
- etag: string,
1033
- blob: Blob,
1034
- uploadId: string,
1035
- partNumber: number,
1036
- collectionName?: string,
1037
- traceContext?: MediaTraceContext,
1038
- ): Promise<void>;
851
+ constructor(config: MediaApiConfig);
852
+ // (undocumented)
853
+ appendChunksToUpload(
854
+ uploadId: string,
855
+ body: AppendChunksToUploadRequestBody,
856
+ collectionName?: string,
857
+ traceContext?: MediaTraceContext,
858
+ ): Promise<void>;
859
+ // (undocumented)
860
+ copyFileWithToken(
861
+ body: MediaStoreCopyFileWithTokenBody,
862
+ params: MediaStoreCopyFileWithTokenParams,
863
+ traceContext?: MediaTraceContext,
864
+ ): Promise<MediaStoreResponse<MediaFile>>;
865
+ // (undocumented)
866
+ createFileFromUpload(
867
+ body: MediaStoreCreateFileFromUploadBody,
868
+ params?: MediaStoreCreateFileFromUploadParams,
869
+ traceContext?: MediaTraceContext,
870
+ ): Promise<MediaStoreResponse<MediaFile>>;
871
+ // (undocumented)
872
+ createUpload(
873
+ createUpTo?: number,
874
+ collectionName?: string,
875
+ traceContext?: MediaTraceContext,
876
+ ): Promise<MediaStoreResponse<MediaUpload[]>>;
877
+ // (undocumented)
878
+ getArtifactURL(
879
+ artifacts: MediaFileArtifacts,
880
+ artifactName: keyof MediaFileArtifacts,
881
+ collectionName?: string,
882
+ ): Promise<string>;
883
+ // (undocumented)
884
+ getFile(
885
+ fileId: string,
886
+ params?: MediaStoreGetFileParams,
887
+ traceContext?: MediaTraceContext,
888
+ ): Promise<MediaStoreResponse<MediaFile>>;
889
+ // (undocumented)
890
+ getFileBinaryURL(id: string, collectionName?: string): Promise<string>;
891
+ // (undocumented)
892
+ getFileImageURL(id: string, params?: MediaStoreGetFileImageParams): Promise<string>;
893
+ // (undocumented)
894
+ getFileImageURLSync(id: string, params?: MediaStoreGetFileImageParams): string;
895
+ // (undocumented)
896
+ getImage(
897
+ id: string,
898
+ params?: MediaStoreGetFileImageParams,
899
+ controller?: AbortController,
900
+ fetchMaxRes?: boolean,
901
+ traceContext?: MediaTraceContext,
902
+ ): Promise<Blob>;
903
+ // (undocumented)
904
+ getImageMetadata(
905
+ id: string,
906
+ params?: MediaStoreGetFileImageParams,
907
+ traceContext?: MediaTraceContext,
908
+ ): Promise<{
909
+ metadata: ImageMetadata;
910
+ }>;
911
+ // (undocumented)
912
+ getItems(
913
+ ids: string[],
914
+ collectionName?: string,
915
+ traceContext?: MediaTraceContext,
916
+ ): Promise<MediaStoreResponse<ItemsPayload>>;
917
+ // (undocumented)
918
+ getRejectedResponseFromDescriptor(
919
+ descriptor: TouchFileDescriptor,
920
+ limit: number,
921
+ ): RejectedTouchFile;
922
+ // (undocumented)
923
+ probeChunks(
924
+ chunks: string[],
925
+ uploadId: string,
926
+ collectionName?: string,
927
+ traceContext?: MediaTraceContext,
928
+ ): Promise<MediaStoreResponse<MediaChunksProbe>>;
929
+ // (undocumented)
930
+ removeCollectionFile(
931
+ id: string,
932
+ collectionName: string,
933
+ occurrenceKey?: string,
934
+ traceContext?: MediaTraceContext,
935
+ ): Promise<void>;
936
+ // (undocumented)
937
+ request(
938
+ path: string,
939
+ options?: MediaStoreRequestOptions,
940
+ controller?: AbortController,
941
+ ): Promise<Response>;
942
+ // (undocumented)
943
+ resolveAuth: (authContext?: AuthContext) => Promise<Auth>;
944
+ // (undocumented)
945
+ resolveInitialAuth: () => Auth;
946
+ // (undocumented)
947
+ touchFiles(
948
+ body: MediaStoreTouchFileBody,
949
+ params?: MediaStoreTouchFileParams,
950
+ traceContext?: MediaTraceContext,
951
+ ): Promise<MediaStoreResponse<TouchedFiles>>;
952
+ // (undocumented)
953
+ uploadChunk(
954
+ etag: string,
955
+ blob: Blob,
956
+ uploadId: string,
957
+ partNumber: number,
958
+ collectionName?: string,
959
+ traceContext?: MediaTraceContext,
960
+ ): Promise<void>;
1039
961
  }
1040
962
 
1041
963
  // @public (undocumented)
1042
964
  export type MediaStoreCopyFileWithTokenBody = {
1043
- sourceFile: SourceFile;
965
+ sourceFile: SourceFile;
1044
966
  };
1045
967
 
1046
968
  // @public (undocumented)
1047
969
  export type MediaStoreCopyFileWithTokenParams = {
1048
- readonly collection?: string;
1049
- readonly replaceFileId?: string;
1050
- readonly occurrenceKey?: string;
970
+ readonly collection?: string;
971
+ readonly replaceFileId?: string;
972
+ readonly occurrenceKey?: string;
1051
973
  };
1052
974
 
1053
975
  // @public (undocumented)
1054
976
  export type MediaStoreCreateFileFromBinaryParams = {
1055
- readonly replaceFileId?: string;
1056
- readonly collection?: string;
1057
- readonly occurrenceKey?: string;
1058
- readonly expireAfter?: number;
1059
- readonly skipConversions?: boolean;
1060
- readonly name?: string;
977
+ readonly replaceFileId?: string;
978
+ readonly collection?: string;
979
+ readonly occurrenceKey?: string;
980
+ readonly expireAfter?: number;
981
+ readonly skipConversions?: boolean;
982
+ readonly name?: string;
1061
983
  };
1062
984
 
1063
985
  // @public (undocumented)
1064
986
  export type MediaStoreCreateFileFromUploadBody = {
1065
- readonly uploadId: string;
1066
- readonly name?: string;
1067
- readonly mimeType?: string;
1068
- readonly conditions?: MediaStoreCreateFileFromUploadConditions;
987
+ readonly uploadId: string;
988
+ readonly name?: string;
989
+ readonly mimeType?: string;
990
+ readonly conditions?: MediaStoreCreateFileFromUploadConditions;
1069
991
  };
1070
992
 
1071
993
  // @public (undocumented)
1072
994
  export type MediaStoreCreateFileFromUploadConditions = {
1073
- readonly hash?: string;
1074
- readonly size?: number;
995
+ readonly hash?: string;
996
+ readonly size?: number;
1075
997
  };
1076
998
 
1077
999
  // @public (undocumented)
1078
1000
  export type MediaStoreCreateFileFromUploadParams = {
1079
- readonly collection?: string;
1080
- readonly occurrenceKey?: string;
1081
- readonly expireAfter?: number;
1082
- readonly replaceFileId?: string;
1083
- readonly skipConversions?: boolean;
1001
+ readonly collection?: string;
1002
+ readonly occurrenceKey?: string;
1003
+ readonly expireAfter?: number;
1004
+ readonly replaceFileId?: string;
1005
+ readonly skipConversions?: boolean;
1084
1006
  };
1085
1007
 
1086
1008
  // @public (undocumented)
1087
1009
  export type MediaStoreCreateFileParams = {
1088
- readonly occurrenceKey?: string;
1089
- readonly collection?: string;
1010
+ readonly occurrenceKey?: string;
1011
+ readonly collection?: string;
1090
1012
  };
1091
1013
 
1092
1014
  // @public (undocumented)
1093
1015
  export class MediaStoreError extends BaseMediaClientError<MediaStoreErrorAttributes> {
1094
- constructor(reason: MediaStoreErrorReason, innerError?: Error | undefined);
1095
- // (undocumented)
1096
- get attributes(): {
1097
- reason: MediaStoreErrorReason;
1098
- innerError: Error | undefined;
1099
- };
1100
- // (undocumented)
1101
- readonly innerError?: Error | undefined;
1102
- // (undocumented)
1103
- readonly reason: MediaStoreErrorReason;
1016
+ constructor(reason: MediaStoreErrorReason, innerError?: Error | undefined);
1017
+ // (undocumented)
1018
+ get attributes(): {
1019
+ reason: MediaStoreErrorReason;
1020
+ innerError: Error | undefined;
1021
+ };
1022
+ // (undocumented)
1023
+ readonly innerError?: Error | undefined;
1024
+ // (undocumented)
1025
+ readonly reason: MediaStoreErrorReason;
1104
1026
  }
1105
1027
 
1106
1028
  // @public (undocumented)
1107
1029
  export type MediaStoreErrorAttributes = {
1108
- readonly reason: MediaStoreErrorReason;
1109
- readonly innerError?: Error;
1030
+ readonly reason: MediaStoreErrorReason;
1031
+ readonly innerError?: Error;
1110
1032
  };
1111
1033
 
1112
1034
  // @public (undocumented)
1113
1035
  export type MediaStoreErrorReason =
1114
- | 'authProviderTimedOut'
1115
- | 'emptyAuth'
1116
- | 'failedAuthProvider'
1117
- | 'missingInitialAuth'
1118
- | 'tokenExpired';
1036
+ | 'authProviderTimedOut'
1037
+ | 'emptyAuth'
1038
+ | 'failedAuthProvider'
1039
+ | 'missingInitialAuth'
1040
+ | 'tokenExpired';
1119
1041
 
1120
1042
  // @public (undocumented)
1121
1043
  export type MediaStoreGetFileImageParams = {
1122
- readonly allowAnimated?: boolean;
1123
- readonly version?: number;
1124
- readonly collection?: string;
1125
- readonly width?: number;
1126
- readonly height?: number;
1127
- readonly mode?: 'crop' | 'fit' | 'full-fit';
1128
- readonly upscale?: boolean;
1129
- readonly 'max-age'?: number;
1044
+ readonly allowAnimated?: boolean;
1045
+ readonly version?: number;
1046
+ readonly collection?: string;
1047
+ readonly width?: number;
1048
+ readonly height?: number;
1049
+ readonly mode?: 'crop' | 'fit' | 'full-fit';
1050
+ readonly upscale?: boolean;
1051
+ readonly 'max-age'?: number;
1130
1052
  };
1131
1053
 
1132
1054
  // @public (undocumented)
1133
1055
  export type MediaStoreGetFileParams = {
1134
- readonly version?: number;
1135
- readonly collection?: string;
1056
+ readonly version?: number;
1057
+ readonly collection?: string;
1136
1058
  };
1137
1059
 
1138
1060
  // @public (undocumented)
1139
1061
  export type MediaStoreRequestOptions = RequestMetadata & {
1140
- readonly method?: RequestMethod;
1141
- readonly authContext?: AuthContext;
1142
- readonly params?: RequestParams;
1143
- readonly headers?: RequestHeaders;
1144
- readonly body?: any;
1145
- readonly clientOptions?: ClientOptions;
1146
- readonly traceContext?: MediaTraceContext;
1062
+ readonly method?: RequestMethod;
1063
+ readonly authContext?: AuthContext;
1064
+ readonly params?: RequestParams;
1065
+ readonly headers?: RequestHeaders;
1066
+ readonly body?: any;
1067
+ readonly clientOptions?: ClientOptions;
1068
+ readonly traceContext?: MediaTraceContext;
1147
1069
  };
1148
1070
 
1149
1071
  // @public (undocumented)
1150
1072
  export interface MediaStoreResponse<Data> {
1151
- // (undocumented)
1152
- readonly data: Data;
1073
+ // (undocumented)
1074
+ readonly data: Data;
1153
1075
  }
1154
1076
 
1155
1077
  // @public (undocumented)
1156
1078
  export interface MediaStoreTouchFileBody {
1157
- // (undocumented)
1158
- descriptors: TouchFileDescriptor[];
1079
+ // (undocumented)
1080
+ descriptors: TouchFileDescriptor[];
1159
1081
  }
1160
1082
 
1161
1083
  // @public (undocumented)
1162
1084
  export interface MediaStoreTouchFileParams {
1163
- // (undocumented)
1164
- readonly collection?: string;
1085
+ // (undocumented)
1086
+ readonly collection?: string;
1165
1087
  }
1166
1088
 
1167
1089
  // @public (undocumented)
1168
1090
  export type MediaSubscribable = {
1169
- subscribe(observer?: MediaObserver): MediaSubscription;
1091
+ subscribe(observer?: MediaObserver): MediaSubscription;
1170
1092
  };
1171
1093
 
1172
1094
  // @public (undocumented)
1173
1095
  export type MediaSubscription = {
1174
- unsubscribe: () => void;
1096
+ unsubscribe: () => void;
1175
1097
  };
1176
1098
 
1177
1099
  export { MediaType };
1178
1100
 
1179
1101
  // @public (undocumented)
1180
1102
  export type MediaUpload = {
1181
- readonly id: string;
1182
- readonly created: number;
1183
- readonly expires: number;
1103
+ readonly id: string;
1104
+ readonly created: number;
1105
+ readonly expires: number;
1184
1106
  };
1185
1107
 
1186
1108
  // @public (undocumented)
1187
1109
  export interface MediaViewedEventPayload {
1188
- // (undocumented)
1189
- fileId: string;
1190
- // (undocumented)
1191
- isUserCollection?: boolean;
1192
- // (undocumented)
1193
- viewingLevel: 'download' | 'full' | 'minimal';
1110
+ // (undocumented)
1111
+ fileId: string;
1112
+ // (undocumented)
1113
+ isUserCollection?: boolean;
1114
+ // (undocumented)
1115
+ viewingLevel: 'download' | 'full' | 'minimal';
1194
1116
  }
1195
1117
 
1196
1118
  // @public (undocumented)
1197
1119
  export interface MobileUpload {
1198
- // (undocumented)
1199
- notifyUploadEnd(event: MobileUploadEndEvent): void;
1200
- // (undocumented)
1201
- notifyUploadError(event: MobileUploadErrorEvent): void;
1202
- // (undocumented)
1203
- notifyUploadProgress(event: MobileUploadProgressEvent): void;
1204
- // (undocumented)
1205
- notifyUploadStart(event: MobileUploadStartEvent): void;
1120
+ // (undocumented)
1121
+ notifyUploadEnd(event: MobileUploadEndEvent): void;
1122
+ // (undocumented)
1123
+ notifyUploadError(event: MobileUploadErrorEvent): void;
1124
+ // (undocumented)
1125
+ notifyUploadProgress(event: MobileUploadProgressEvent): void;
1126
+ // (undocumented)
1127
+ notifyUploadStart(event: MobileUploadStartEvent): void;
1206
1128
  }
1207
1129
 
1208
1130
  // @public (undocumented)
1209
1131
  export type MobileUploadEndEvent = {
1210
- fileId: string;
1132
+ fileId: string;
1211
1133
  };
1212
1134
 
1213
1135
  // @public (undocumented)
1214
1136
  export type MobileUploadErrorEvent = {
1215
- fileId: string;
1216
- message: string;
1137
+ fileId: string;
1138
+ message: string;
1217
1139
  };
1218
1140
 
1219
1141
  // @public (undocumented)
1220
1142
  export type MobileUploadProgressEvent = {
1221
- fileId: string;
1222
- progress: number;
1143
+ fileId: string;
1144
+ progress: number;
1223
1145
  };
1224
1146
 
1225
1147
  // @public (undocumented)
1226
1148
  export type MobileUploadStartEvent = {
1227
- fileId: string;
1228
- collectionName?: string;
1229
- occurrenceKey?: string;
1230
- fileName: string;
1231
- fileSize: number;
1232
- fileMimetype: string;
1233
- preview?: FilePreview;
1234
- createdAt?: number;
1149
+ fileId: string;
1150
+ collectionName?: string;
1151
+ occurrenceKey?: string;
1152
+ fileName: string;
1153
+ fileSize: number;
1154
+ fileMimetype: string;
1155
+ preview?: FilePreview;
1156
+ createdAt?: number;
1235
1157
  };
1236
1158
 
1237
1159
  // @public (undocumented)
@@ -1242,35 +1164,35 @@ export type NonErrorFileState = Exclude<FileState, ErrorFileState>;
1242
1164
 
1243
1165
  // @public (undocumented)
1244
1166
  export const objectToQueryString: (json: {
1245
- [key: string]: boolean | null | number | string | undefined;
1167
+ [key: string]: boolean | null | number | string | undefined;
1246
1168
  }) => string;
1247
1169
 
1248
1170
  // @public (undocumented)
1249
1171
  type PartialObserver = {
1250
- next?: (value: FileState) => void;
1251
- error?: (err: any) => void;
1252
- complete?: () => void;
1172
+ next?: (value: FileState) => void;
1173
+ error?: (err: any) => void;
1174
+ complete?: () => void;
1253
1175
  };
1254
1176
 
1255
1177
  // @public (undocumented)
1256
1178
  export class PollingError extends BaseMediaClientError<PollingErrorAttributes> {
1257
- constructor(reason: PollingErrorReason, attempts: number);
1258
- // (undocumented)
1259
- readonly attempts: number;
1260
- // (undocumented)
1261
- get attributes(): {
1262
- reason: 'pollingMaxAttemptsExceeded';
1263
- attempts: number;
1264
- };
1265
- // (undocumented)
1266
- readonly reason: PollingErrorReason;
1179
+ constructor(reason: PollingErrorReason, attempts: number);
1180
+ // (undocumented)
1181
+ readonly attempts: number;
1182
+ // (undocumented)
1183
+ get attributes(): {
1184
+ reason: 'pollingMaxAttemptsExceeded';
1185
+ attempts: number;
1186
+ };
1187
+ // (undocumented)
1188
+ readonly reason: PollingErrorReason;
1267
1189
  }
1268
1190
 
1269
1191
  // @public (undocumented)
1270
1192
  export type PollingErrorAttributes = {
1271
- readonly reason: PollingErrorReason;
1272
- readonly attempts: number;
1273
- readonly innerError?: Error;
1193
+ readonly reason: PollingErrorReason;
1194
+ readonly attempts: number;
1195
+ readonly innerError?: Error;
1274
1196
  };
1275
1197
 
1276
1198
  // @public (undocumented)
@@ -1278,45 +1200,45 @@ export type PollingErrorReason = 'pollingMaxAttemptsExceeded';
1278
1200
 
1279
1201
  // @public
1280
1202
  export class PollingFunction {
1281
- constructor(options?: Partial<PollingOptions>);
1282
- // (undocumented)
1283
- attempt: number;
1284
- // (undocumented)
1285
- cancel(): void;
1286
- // (undocumented)
1287
- execute(executor: Executor): Promise<void>;
1288
- // (undocumented)
1289
- getIntervalMsForIteration(iteration: number): number;
1290
- // (undocumented)
1291
- next(): void;
1292
- // (undocumented)
1293
- onError?: (error: Error) => void;
1294
- // (undocumented)
1295
- options: PollingOptions;
1296
- // (undocumented)
1297
- poll_intervalMs: number;
1298
- // (undocumented)
1299
- shouldIterate: boolean;
1300
- // (undocumented)
1301
- timeoutId: number;
1203
+ constructor(options?: Partial<PollingOptions>);
1204
+ // (undocumented)
1205
+ attempt: number;
1206
+ // (undocumented)
1207
+ cancel(): void;
1208
+ // (undocumented)
1209
+ execute(executor: Executor): Promise<void>;
1210
+ // (undocumented)
1211
+ getIntervalMsForIteration(iteration: number): number;
1212
+ // (undocumented)
1213
+ next(): void;
1214
+ // (undocumented)
1215
+ onError?: (error: Error) => void;
1216
+ // (undocumented)
1217
+ options: PollingOptions;
1218
+ // (undocumented)
1219
+ poll_intervalMs: number;
1220
+ // (undocumented)
1221
+ shouldIterate: boolean;
1222
+ // (undocumented)
1223
+ timeoutId: number;
1302
1224
  }
1303
1225
 
1304
1226
  // @public (undocumented)
1305
1227
  interface PollingOptions {
1306
- // (undocumented)
1307
- poll_backoffFactor: number;
1308
- // (undocumented)
1309
- poll_intervalMs: number;
1310
- // (undocumented)
1311
- poll_maxAttempts: number;
1312
- // (undocumented)
1313
- poll_maxIntervalMs: number;
1228
+ // (undocumented)
1229
+ poll_backoffFactor: number;
1230
+ // (undocumented)
1231
+ poll_intervalMs: number;
1232
+ // (undocumented)
1233
+ poll_maxAttempts: number;
1234
+ // (undocumented)
1235
+ poll_maxIntervalMs: number;
1314
1236
  }
1315
1237
 
1316
1238
  // @public (undocumented)
1317
1239
  export interface PreviewableFileState {
1318
- // (undocumented)
1319
- preview: FilePreview | Promise<FilePreview>;
1240
+ // (undocumented)
1241
+ preview: FilePreview | Promise<FilePreview>;
1320
1242
  }
1321
1243
 
1322
1244
  // @public (undocumented)
@@ -1333,94 +1255,94 @@ export const RECENTS_COLLECTION = 'recents';
1333
1255
 
1334
1256
  // @public (undocumented)
1335
1257
  interface RejectedTouchFile {
1336
- // (undocumented)
1337
- error: RejectionError;
1338
- // (undocumented)
1339
- fileId: string;
1258
+ // (undocumented)
1259
+ error: RejectionError;
1260
+ // (undocumented)
1261
+ fileId: string;
1340
1262
  }
1341
1263
 
1342
1264
  // @public (undocumented)
1343
1265
  type RejectionError = {
1344
- code: 'ExceedMaxFileSizeLimit';
1345
- title: string;
1346
- href: string;
1347
- limit: number;
1348
- size: number;
1266
+ code: 'ExceedMaxFileSizeLimit';
1267
+ title: string;
1268
+ href: string;
1269
+ limit: number;
1270
+ size: number;
1349
1271
  };
1350
1272
 
1351
1273
  // @public (undocumented)
1352
1274
  export function request(
1353
- url: string,
1354
- options?: RequestOptions,
1355
- controller?: AbortController,
1275
+ url: string,
1276
+ options?: RequestOptions,
1277
+ controller?: AbortController,
1356
1278
  ): Promise<Response>;
1357
1279
 
1358
1280
  // @public (undocumented)
1359
1281
  export class RequestError extends BaseMediaClientError<RequestErrorAttributes> {
1360
- constructor(
1361
- reason: RequestErrorReason,
1362
- metadata?: RequestErrorMetadata | undefined,
1363
- innerError?: Error | undefined,
1364
- );
1365
- // (undocumented)
1366
- get attributes(): {
1367
- reason: RequestErrorReason;
1368
- method: RequestMethod | undefined;
1369
- endpoint: string | undefined;
1370
- mediaRegion: string | undefined;
1371
- mediaEnv: string | undefined;
1372
- attempts: number | undefined;
1373
- clientExhaustedRetries: boolean | undefined;
1374
- statusCode: number | undefined;
1375
- innerError: Error | undefined;
1376
- };
1377
- // (undocumented)
1378
- readonly innerError?: Error | undefined;
1379
- // (undocumented)
1380
- readonly metadata?: RequestErrorMetadata | undefined;
1381
- // (undocumented)
1382
- readonly reason: RequestErrorReason;
1282
+ constructor(
1283
+ reason: RequestErrorReason,
1284
+ metadata?: RequestErrorMetadata | undefined,
1285
+ innerError?: Error | undefined,
1286
+ );
1287
+ // (undocumented)
1288
+ get attributes(): {
1289
+ reason: RequestErrorReason;
1290
+ method: RequestMethod | undefined;
1291
+ endpoint: string | undefined;
1292
+ mediaRegion: string | undefined;
1293
+ mediaEnv: string | undefined;
1294
+ attempts: number | undefined;
1295
+ clientExhaustedRetries: boolean | undefined;
1296
+ statusCode: number | undefined;
1297
+ innerError: Error | undefined;
1298
+ };
1299
+ // (undocumented)
1300
+ readonly innerError?: Error | undefined;
1301
+ // (undocumented)
1302
+ readonly metadata?: RequestErrorMetadata | undefined;
1303
+ // (undocumented)
1304
+ readonly reason: RequestErrorReason;
1383
1305
  }
1384
1306
 
1385
1307
  // @public (undocumented)
1386
1308
  export type RequestErrorAttributes = RequestErrorMetadata & {
1387
- readonly reason: RequestErrorReason;
1309
+ readonly reason: RequestErrorReason;
1388
1310
  };
1389
1311
 
1390
1312
  // @public (undocumented)
1391
1313
  export type RequestErrorMetadata = RequestMetadata & {
1392
- readonly attempts?: number;
1393
- readonly clientExhaustedRetries?: boolean;
1394
- readonly statusCode?: number;
1314
+ readonly attempts?: number;
1315
+ readonly clientExhaustedRetries?: boolean;
1316
+ readonly statusCode?: number;
1395
1317
  };
1396
1318
 
1397
1319
  // @public (undocumented)
1398
1320
  export type RequestErrorReason =
1399
- | 'clientAbortedRequest'
1400
- | 'clientOffline'
1401
- | 'clientTimeoutRequest'
1402
- | 'serverBadGateway'
1403
- | 'serverBadRequest'
1404
- | 'serverForbidden'
1405
- | 'serverInternalError'
1406
- | 'serverInvalidBody'
1407
- | 'serverNotFound'
1408
- | 'serverRateLimited'
1409
- | 'serverUnauthorized'
1410
- | 'serverUnexpectedError';
1321
+ | 'clientAbortedRequest'
1322
+ | 'clientOffline'
1323
+ | 'clientTimeoutRequest'
1324
+ | 'serverBadGateway'
1325
+ | 'serverBadRequest'
1326
+ | 'serverForbidden'
1327
+ | 'serverInternalError'
1328
+ | 'serverInvalidBody'
1329
+ | 'serverNotFound'
1330
+ | 'serverRateLimited'
1331
+ | 'serverUnauthorized'
1332
+ | 'serverUnexpectedError';
1411
1333
 
1412
1334
  // @public (undocumented)
1413
1335
  export type RequestHeaders = {
1414
- [key: string]: string;
1336
+ [key: string]: string;
1415
1337
  };
1416
1338
 
1417
1339
  // @public (undocumented)
1418
1340
  export type RequestMetadata = {
1419
- readonly method?: RequestMethod;
1420
- readonly endpoint?: string;
1421
- readonly mediaRegion?: string;
1422
- readonly mediaEnv?: string;
1423
- readonly traceContext?: MediaTraceContext;
1341
+ readonly method?: RequestMethod;
1342
+ readonly endpoint?: string;
1343
+ readonly mediaRegion?: string;
1344
+ readonly mediaEnv?: string;
1345
+ readonly traceContext?: MediaTraceContext;
1424
1346
  };
1425
1347
 
1426
1348
  // @public (undocumented)
@@ -1428,154 +1350,154 @@ export type RequestMethod = 'DELETE' | 'GET' | 'POST' | 'PUT';
1428
1350
 
1429
1351
  // @public (undocumented)
1430
1352
  export type RequestOptions = RequestMetadata & {
1431
- readonly auth?: Auth;
1432
- readonly traceContext?: Required<MediaTraceContext>;
1433
- readonly params?: RequestParams;
1434
- readonly headers?: RequestHeaders;
1435
- readonly body?: any;
1436
- readonly clientOptions?: ClientOptions;
1353
+ readonly auth?: Auth;
1354
+ readonly traceContext?: Required<MediaTraceContext>;
1355
+ readonly params?: RequestParams;
1356
+ readonly headers?: RequestHeaders;
1357
+ readonly body?: any;
1358
+ readonly clientOptions?: ClientOptions;
1437
1359
  };
1438
1360
 
1439
1361
  // @public (undocumented)
1440
1362
  export type RequestParams = {
1441
- [key: string]: any;
1363
+ [key: string]: any;
1442
1364
  };
1443
1365
 
1444
1366
  // @public (undocumented)
1445
1367
  export interface ResponseFileItem {
1446
- // (undocumented)
1447
- collection?: string;
1448
- // (undocumented)
1449
- details: MediaItemDetails;
1450
- // (undocumented)
1451
- id: string;
1452
- // (undocumented)
1453
- metadataTraceContext?: MediaTraceContext;
1454
- // (undocumented)
1455
- type: 'file';
1368
+ // (undocumented)
1369
+ collection?: string;
1370
+ // (undocumented)
1371
+ details: MediaItemDetails;
1372
+ // (undocumented)
1373
+ id: string;
1374
+ // (undocumented)
1375
+ metadataTraceContext?: MediaTraceContext;
1376
+ // (undocumented)
1377
+ type: 'file';
1456
1378
  }
1457
1379
 
1458
1380
  // @public (undocumented)
1459
1381
  export type RetryOptions = {
1460
- readonly startTimeoutInMs: number;
1461
- readonly maxAttempts: number;
1462
- readonly factor: number;
1382
+ readonly startTimeoutInMs: number;
1383
+ readonly maxAttempts: number;
1384
+ readonly factor: number;
1463
1385
  };
1464
1386
 
1465
1387
  // @public (undocumented)
1466
1388
  export interface SourceFile {
1467
- // (undocumented)
1468
- collection?: string;
1469
- // (undocumented)
1470
- id: string;
1471
- // (undocumented)
1472
- owner: AsapBasedAuth | ClientAltBasedAuth;
1473
- // (undocumented)
1474
- version?: number;
1389
+ // (undocumented)
1390
+ collection?: string;
1391
+ // (undocumented)
1392
+ id: string;
1393
+ // (undocumented)
1394
+ owner: AsapBasedAuth | ClientAltBasedAuth;
1395
+ // (undocumented)
1396
+ version?: number;
1475
1397
  }
1476
1398
 
1477
1399
  // @public (undocumented)
1478
1400
  export class StargateClient {
1479
- constructor(baseUrl: string | undefined);
1480
- // (undocumented)
1481
- fetchToken(clientId: string): Promise<EdgeData>;
1482
- // (undocumented)
1483
- isTokenExpired(token: EdgeData): boolean;
1401
+ constructor(baseUrl: string | undefined);
1402
+ // (undocumented)
1403
+ fetchToken(clientId: string): Promise<EdgeData>;
1404
+ // (undocumented)
1405
+ isTokenExpired(token: EdgeData): boolean;
1484
1406
  }
1485
1407
 
1486
1408
  // @public (undocumented)
1487
1409
  class StreamsCache<T> {
1488
- constructor(streams: LRUMap<string, ReplaySubject<T>>);
1489
- // (undocumented)
1490
- get(id: string): ReplaySubject<T> | undefined;
1491
- // (undocumented)
1492
- getOrInsert(id: string, callback: () => ReplaySubject<T>): ReplaySubject<T>;
1493
- // (undocumented)
1494
- has(id: string): boolean;
1495
- // (undocumented)
1496
- remove(id: string): void;
1497
- // (undocumented)
1498
- removeAll(): void;
1499
- // (undocumented)
1500
- set(id: string, stream: ReplaySubject<T>): void;
1501
- // (undocumented)
1502
- get size(): number;
1410
+ constructor(streams: LRUMap<string, ReplaySubject<T>>);
1411
+ // (undocumented)
1412
+ get(id: string): ReplaySubject<T> | undefined;
1413
+ // (undocumented)
1414
+ getOrInsert(id: string, callback: () => ReplaySubject<T>): ReplaySubject<T>;
1415
+ // (undocumented)
1416
+ has(id: string): boolean;
1417
+ // (undocumented)
1418
+ remove(id: string): void;
1419
+ // (undocumented)
1420
+ removeAll(): void;
1421
+ // (undocumented)
1422
+ set(id: string, stream: ReplaySubject<T>): void;
1423
+ // (undocumented)
1424
+ get size(): number;
1503
1425
  }
1504
1426
 
1505
1427
  // @public (undocumented)
1506
1428
  export type TouchedFiles = {
1507
- created: CreatedTouchedFile[];
1508
- rejected?: RejectedTouchFile[];
1429
+ created: CreatedTouchedFile[];
1430
+ rejected?: RejectedTouchFile[];
1509
1431
  };
1510
1432
 
1511
1433
  // @public (undocumented)
1512
1434
  export interface TouchFileDescriptor {
1513
- // (undocumented)
1514
- collection?: string;
1515
- // (undocumented)
1516
- deletable?: boolean;
1517
- // (undocumented)
1518
- expireAfter?: number;
1519
- // (undocumented)
1520
- fileId: string;
1521
- // (undocumented)
1522
- occurrenceKey?: string;
1523
- // (undocumented)
1524
- size?: number;
1435
+ // (undocumented)
1436
+ collection?: string;
1437
+ // (undocumented)
1438
+ deletable?: boolean;
1439
+ // (undocumented)
1440
+ expireAfter?: number;
1441
+ // (undocumented)
1442
+ fileId: string;
1443
+ // (undocumented)
1444
+ occurrenceKey?: string;
1445
+ // (undocumented)
1446
+ size?: number;
1525
1447
  }
1526
1448
 
1527
1449
  // @public (undocumented)
1528
1450
  export type UploadableFile = {
1529
- content: ChunkinatorFile;
1530
- name?: string;
1531
- mimeType?: string;
1532
- collection?: string;
1533
- size?: number;
1451
+ content: ChunkinatorFile;
1452
+ name?: string;
1453
+ mimeType?: string;
1454
+ collection?: string;
1455
+ size?: number;
1534
1456
  };
1535
1457
 
1536
1458
  // @public (undocumented)
1537
1459
  export type UploadableFileUpfrontIds = {
1538
- id: string;
1539
- deferredUploadId: Promise<string>;
1540
- occurrenceKey?: string;
1460
+ id: string;
1461
+ deferredUploadId: Promise<string>;
1462
+ occurrenceKey?: string;
1541
1463
  };
1542
1464
 
1543
1465
  // @public (undocumented)
1544
1466
  export class UploadController {
1545
- constructor();
1546
- // (undocumented)
1547
- abort(): void;
1548
- // (undocumented)
1549
- abortFunction?: AbortFunction;
1550
- // (undocumented)
1551
- setAbort(abortFunction: AbortFunction): void;
1467
+ constructor();
1468
+ // (undocumented)
1469
+ abort(): void;
1470
+ // (undocumented)
1471
+ abortFunction?: AbortFunction;
1472
+ // (undocumented)
1473
+ setAbort(abortFunction: AbortFunction): void;
1552
1474
  }
1553
1475
 
1554
1476
  // @public (undocumented)
1555
1477
  export type UploadEventPayloadMap = {
1556
- 'file-added': FileState;
1557
- 'media-viewed': MediaViewedEventPayload;
1478
+ 'file-added': FileState;
1479
+ 'media-viewed': MediaViewedEventPayload;
1558
1480
  };
1559
1481
 
1560
1482
  // @public (undocumented)
1561
1483
  export const uploadFile: (
1562
- file: UploadableFile,
1563
- store: MediaStore,
1564
- uploadableFileUpfrontIds: UploadableFileUpfrontIds,
1565
- callbacks?: UploadFileCallbacks,
1566
- traceContext?: MediaTraceContext,
1484
+ file: UploadableFile,
1485
+ store: MediaStore,
1486
+ uploadableFileUpfrontIds: UploadableFileUpfrontIds,
1487
+ callbacks?: UploadFileCallbacks,
1488
+ traceContext?: MediaTraceContext,
1567
1489
  ) => UploadFileResult;
1568
1490
 
1569
1491
  // @public (undocumented)
1570
1492
  export type UploadFileCallbacks = {
1571
- onProgress: (progress: number) => void;
1572
- onUploadFinish: (error?: any) => void;
1493
+ onProgress: (progress: number) => void;
1494
+ onUploadFinish: (error?: any) => void;
1573
1495
  };
1574
1496
 
1575
1497
  // @public (undocumented)
1576
1498
  export interface UploadFileResult {
1577
- // (undocumented)
1578
- cancel: () => void;
1499
+ // (undocumented)
1500
+ cancel: () => void;
1579
1501
  }
1580
1502
 
1581
1503
  export { UploadingFileState };
@@ -1591,8 +1513,8 @@ export { UploadingFileState };
1591
1513
 
1592
1514
  ```json
1593
1515
  {
1594
- "@atlaskit/media-core": "^34.1.2",
1595
- "@atlaskit/media-state": "^1.0.0"
1516
+ "@atlaskit/media-core": "^34.1.2",
1517
+ "@atlaskit/media-state": "^1.0.0"
1596
1518
  }
1597
1519
  ```
1598
1520