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