@wix/media 1.0.140 → 1.0.142

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.
@@ -1,4734 +0,0 @@
1
- type HostModule<T, H extends Host> = {
2
- __type: 'host';
3
- create(host: H): T;
4
- };
5
- type HostModuleAPI<T extends HostModule<any, any>> = T extends HostModule<infer U, any> ? U : never;
6
- type Host<Environment = unknown> = {
7
- channel: {
8
- observeState(callback: (props: unknown, environment: Environment) => unknown): {
9
- disconnect: () => void;
10
- } | Promise<{
11
- disconnect: () => void;
12
- }>;
13
- };
14
- environment?: Environment;
15
- /**
16
- * Optional name of the environment, use for logging
17
- */
18
- name?: string;
19
- /**
20
- * Optional bast url to use for API requests, for example `www.wixapis.com`
21
- */
22
- apiBaseUrl?: string;
23
- /**
24
- * Possible data to be provided by every host, for cross cutting concerns
25
- * like internationalization, billing, etc.
26
- */
27
- essentials?: {
28
- /**
29
- * The language of the currently viewed session
30
- */
31
- language?: string;
32
- /**
33
- * The locale of the currently viewed session
34
- */
35
- locale?: string;
36
- /**
37
- * Any headers that should be passed through to the API requests
38
- */
39
- passThroughHeaders?: Record<string, string>;
40
- };
41
- };
42
-
43
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
44
- interface HttpClient {
45
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
46
- fetchWithAuth: typeof fetch;
47
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
48
- getActiveToken?: () => string | undefined;
49
- }
50
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
51
- type HttpResponse<T = any> = {
52
- data: T;
53
- status: number;
54
- statusText: string;
55
- headers: any;
56
- request?: any;
57
- };
58
- type RequestOptions<_TResponse = any, Data = any> = {
59
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
60
- url: string;
61
- data?: Data;
62
- params?: URLSearchParams;
63
- } & APIMetadata;
64
- type APIMetadata = {
65
- methodFqn?: string;
66
- entityFqdn?: string;
67
- packageName?: string;
68
- };
69
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
70
- type EventDefinition<Payload = unknown, Type extends string = string> = {
71
- __type: 'event-definition';
72
- type: Type;
73
- isDomainEvent?: boolean;
74
- transformations?: (envelope: unknown) => Payload;
75
- __payload: Payload;
76
- };
77
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
78
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
79
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
80
-
81
- type ServicePluginMethodInput = {
82
- request: any;
83
- metadata: any;
84
- };
85
- type ServicePluginContract = Record<string, (payload: ServicePluginMethodInput) => unknown | Promise<unknown>>;
86
- type ServicePluginMethodMetadata = {
87
- name: string;
88
- primaryHttpMappingPath: string;
89
- transformations: {
90
- fromREST: (...args: unknown[]) => ServicePluginMethodInput;
91
- toREST: (...args: unknown[]) => unknown;
92
- };
93
- };
94
- type ServicePluginDefinition<Contract extends ServicePluginContract> = {
95
- __type: 'service-plugin-definition';
96
- componentType: string;
97
- methods: ServicePluginMethodMetadata[];
98
- __contract: Contract;
99
- };
100
- declare function ServicePluginDefinition<Contract extends ServicePluginContract>(componentType: string, methods: ServicePluginMethodMetadata[]): ServicePluginDefinition<Contract>;
101
- type BuildServicePluginDefinition<T extends ServicePluginDefinition<any>> = (implementation: T['__contract']) => void;
102
- declare const SERVICE_PLUGIN_ERROR_TYPE = "wix_spi_error";
103
-
104
- type RequestContext = {
105
- isSSR: boolean;
106
- host: string;
107
- protocol?: string;
108
- };
109
- type ResponseTransformer = (data: any, headers?: any) => any;
110
- /**
111
- * Ambassador request options types are copied mostly from AxiosRequestConfig.
112
- * They are copied and not imported to reduce the amount of dependencies (to reduce install time).
113
- * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/index.d.ts#L307-L315
114
- */
115
- type Method = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
116
- type AmbassadorRequestOptions<T = any> = {
117
- _?: T;
118
- url?: string;
119
- method?: Method;
120
- params?: any;
121
- data?: any;
122
- transformResponse?: ResponseTransformer | ResponseTransformer[];
123
- };
124
- type AmbassadorFactory<Request, Response> = (payload: Request) => ((context: RequestContext) => AmbassadorRequestOptions<Response>) & {
125
- __isAmbassador: boolean;
126
- };
127
- type AmbassadorFunctionDescriptor<Request = any, Response = any> = AmbassadorFactory<Request, Response>;
128
- type BuildAmbassadorFunction<T extends AmbassadorFunctionDescriptor> = T extends AmbassadorFunctionDescriptor<infer Request, infer Response> ? (req: Request) => Promise<Response> : never;
129
-
130
- declare global {
131
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
132
- interface SymbolConstructor {
133
- readonly observable: symbol;
134
- }
135
- }
136
-
137
- declare const emptyObjectSymbol: unique symbol;
138
-
139
- /**
140
- Represents a strictly empty plain object, the `{}` value.
141
-
142
- When you annotate something as the type `{}`, it can be anything except `null` and `undefined`. This means that you cannot use `{}` to represent an empty plain object ([read more](https://stackoverflow.com/questions/47339869/typescript-empty-object-and-any-difference/52193484#52193484)).
143
-
144
- @example
145
- ```
146
- import type {EmptyObject} from 'type-fest';
147
-
148
- // The following illustrates the problem with `{}`.
149
- const foo1: {} = {}; // Pass
150
- const foo2: {} = []; // Pass
151
- const foo3: {} = 42; // Pass
152
- const foo4: {} = {a: 1}; // Pass
153
-
154
- // With `EmptyObject` only the first case is valid.
155
- const bar1: EmptyObject = {}; // Pass
156
- const bar2: EmptyObject = 42; // Fail
157
- const bar3: EmptyObject = []; // Fail
158
- const bar4: EmptyObject = {a: 1}; // Fail
159
- ```
160
-
161
- Unfortunately, `Record<string, never>`, `Record<keyof any, never>` and `Record<never, never>` do not work. See {@link https://github.com/sindresorhus/type-fest/issues/395 #395}.
162
-
163
- @category Object
164
- */
165
- type EmptyObject = {[emptyObjectSymbol]?: never};
166
-
167
- /**
168
- Returns a boolean for whether the two given types are equal.
169
-
170
- @link https://github.com/microsoft/TypeScript/issues/27024#issuecomment-421529650
171
- @link https://stackoverflow.com/questions/68961864/how-does-the-equals-work-in-typescript/68963796#68963796
172
-
173
- Use-cases:
174
- - If you want to make a conditional branch based on the result of a comparison of two types.
175
-
176
- @example
177
- ```
178
- import type {IsEqual} from 'type-fest';
179
-
180
- // This type returns a boolean for whether the given array includes the given item.
181
- // `IsEqual` is used to compare the given array at position 0 and the given item and then return true if they are equal.
182
- type Includes<Value extends readonly any[], Item> =
183
- Value extends readonly [Value[0], ...infer rest]
184
- ? IsEqual<Value[0], Item> extends true
185
- ? true
186
- : Includes<rest, Item>
187
- : false;
188
- ```
189
-
190
- @category Type Guard
191
- @category Utilities
192
- */
193
- type IsEqual<A, B> =
194
- (<G>() => G extends A ? 1 : 2) extends
195
- (<G>() => G extends B ? 1 : 2)
196
- ? true
197
- : false;
198
-
199
- /**
200
- Filter out keys from an object.
201
-
202
- Returns `never` if `Exclude` is strictly equal to `Key`.
203
- Returns `never` if `Key` extends `Exclude`.
204
- Returns `Key` otherwise.
205
-
206
- @example
207
- ```
208
- type Filtered = Filter<'foo', 'foo'>;
209
- //=> never
210
- ```
211
-
212
- @example
213
- ```
214
- type Filtered = Filter<'bar', string>;
215
- //=> never
216
- ```
217
-
218
- @example
219
- ```
220
- type Filtered = Filter<'bar', 'foo'>;
221
- //=> 'bar'
222
- ```
223
-
224
- @see {Except}
225
- */
226
- type Filter<KeyType, ExcludeType> = IsEqual<KeyType, ExcludeType> extends true ? never : (KeyType extends ExcludeType ? never : KeyType);
227
-
228
- type ExceptOptions = {
229
- /**
230
- Disallow assigning non-specified properties.
231
-
232
- Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
233
-
234
- @default false
235
- */
236
- requireExactProps?: boolean;
237
- };
238
-
239
- /**
240
- Create a type from an object type without certain keys.
241
-
242
- We recommend setting the `requireExactProps` option to `true`.
243
-
244
- This type is a stricter version of [`Omit`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-5.html#the-omit-helper-type). The `Omit` type does not restrict the omitted keys to be keys present on the given type, while `Except` does. The benefits of a stricter type are avoiding typos and allowing the compiler to pick up on rename refactors automatically.
245
-
246
- This type was proposed to the TypeScript team, which declined it, saying they prefer that libraries implement stricter versions of the built-in types ([microsoft/TypeScript#30825](https://github.com/microsoft/TypeScript/issues/30825#issuecomment-523668235)).
247
-
248
- @example
249
- ```
250
- import type {Except} from 'type-fest';
251
-
252
- type Foo = {
253
- a: number;
254
- b: string;
255
- };
256
-
257
- type FooWithoutA = Except<Foo, 'a'>;
258
- //=> {b: string}
259
-
260
- const fooWithoutA: FooWithoutA = {a: 1, b: '2'};
261
- //=> errors: 'a' does not exist in type '{ b: string; }'
262
-
263
- type FooWithoutB = Except<Foo, 'b', {requireExactProps: true}>;
264
- //=> {a: number} & Partial<Record<"b", never>>
265
-
266
- const fooWithoutB: FooWithoutB = {a: 1, b: '2'};
267
- //=> errors at 'b': Type 'string' is not assignable to type 'undefined'.
268
- ```
269
-
270
- @category Object
271
- */
272
- type Except<ObjectType, KeysType extends keyof ObjectType, Options extends ExceptOptions = {requireExactProps: false}> = {
273
- [KeyType in keyof ObjectType as Filter<KeyType, KeysType>]: ObjectType[KeyType];
274
- } & (Options['requireExactProps'] extends true
275
- ? Partial<Record<KeysType, never>>
276
- : {});
277
-
278
- /**
279
- Returns a boolean for whether the given type is `never`.
280
-
281
- @link https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919
282
- @link https://stackoverflow.com/a/53984913/10292952
283
- @link https://www.zhenghao.io/posts/ts-never
284
-
285
- Useful in type utilities, such as checking if something does not occur.
286
-
287
- @example
288
- ```
289
- import type {IsNever, And} from 'type-fest';
290
-
291
- // https://github.com/andnp/SimplyTyped/blob/master/src/types/strings.ts
292
- type AreStringsEqual<A extends string, B extends string> =
293
- And<
294
- IsNever<Exclude<A, B>> extends true ? true : false,
295
- IsNever<Exclude<B, A>> extends true ? true : false
296
- >;
297
-
298
- type EndIfEqual<I extends string, O extends string> =
299
- AreStringsEqual<I, O> extends true
300
- ? never
301
- : void;
302
-
303
- function endIfEqual<I extends string, O extends string>(input: I, output: O): EndIfEqual<I, O> {
304
- if (input === output) {
305
- process.exit(0);
306
- }
307
- }
308
-
309
- endIfEqual('abc', 'abc');
310
- //=> never
311
-
312
- endIfEqual('abc', '123');
313
- //=> void
314
- ```
315
-
316
- @category Type Guard
317
- @category Utilities
318
- */
319
- type IsNever<T> = [T] extends [never] ? true : false;
320
-
321
- /**
322
- An if-else-like type that resolves depending on whether the given type is `never`.
323
-
324
- @see {@link IsNever}
325
-
326
- @example
327
- ```
328
- import type {IfNever} from 'type-fest';
329
-
330
- type ShouldBeTrue = IfNever<never>;
331
- //=> true
332
-
333
- type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
334
- //=> 'bar'
335
- ```
336
-
337
- @category Type Guard
338
- @category Utilities
339
- */
340
- type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (
341
- IsNever<T> extends true ? TypeIfNever : TypeIfNotNever
342
- );
343
-
344
- /**
345
- Extract the keys from a type where the value type of the key extends the given `Condition`.
346
-
347
- Internally this is used for the `ConditionalPick` and `ConditionalExcept` types.
348
-
349
- @example
350
- ```
351
- import type {ConditionalKeys} from 'type-fest';
352
-
353
- interface Example {
354
- a: string;
355
- b: string | number;
356
- c?: string;
357
- d: {};
358
- }
359
-
360
- type StringKeysOnly = ConditionalKeys<Example, string>;
361
- //=> 'a'
362
- ```
363
-
364
- To support partial types, make sure your `Condition` is a union of undefined (for example, `string | undefined`) as demonstrated below.
365
-
366
- @example
367
- ```
368
- import type {ConditionalKeys} from 'type-fest';
369
-
370
- type StringKeysAndUndefined = ConditionalKeys<Example, string | undefined>;
371
- //=> 'a' | 'c'
372
- ```
373
-
374
- @category Object
375
- */
376
- type ConditionalKeys<Base, Condition> =
377
- {
378
- // Map through all the keys of the given base type.
379
- [Key in keyof Base]-?:
380
- // Pick only keys with types extending the given `Condition` type.
381
- Base[Key] extends Condition
382
- // Retain this key
383
- // If the value for the key extends never, only include it if `Condition` also extends never
384
- ? IfNever<Base[Key], IfNever<Condition, Key, never>, Key>
385
- // Discard this key since the condition fails.
386
- : never;
387
- // Convert the produced object into a union type of the keys which passed the conditional test.
388
- }[keyof Base];
389
-
390
- /**
391
- Exclude keys from a shape that matches the given `Condition`.
392
-
393
- This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
394
-
395
- @example
396
- ```
397
- import type {Primitive, ConditionalExcept} from 'type-fest';
398
-
399
- class Awesome {
400
- name: string;
401
- successes: number;
402
- failures: bigint;
403
-
404
- run() {}
405
- }
406
-
407
- type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
408
- //=> {run: () => void}
409
- ```
410
-
411
- @example
412
- ```
413
- import type {ConditionalExcept} from 'type-fest';
414
-
415
- interface Example {
416
- a: string;
417
- b: string | number;
418
- c: () => void;
419
- d: {};
420
- }
421
-
422
- type NonStringKeysOnly = ConditionalExcept<Example, string>;
423
- //=> {b: string | number; c: () => void; d: {}}
424
- ```
425
-
426
- @category Object
427
- */
428
- type ConditionalExcept<Base, Condition> = Except<
429
- Base,
430
- ConditionalKeys<Base, Condition>
431
- >;
432
-
433
- /**
434
- * Descriptors are objects that describe the API of a module, and the module
435
- * can either be a REST module or a host module.
436
- * This type is recursive, so it can describe nested modules.
437
- */
438
- type Descriptors = RESTFunctionDescriptor | AmbassadorFunctionDescriptor | HostModule<any, any> | EventDefinition<any> | ServicePluginDefinition<any> | {
439
- [key: string]: Descriptors | PublicMetadata | any;
440
- };
441
- /**
442
- * This type takes in a descriptors object of a certain Host (including an `unknown` host)
443
- * and returns an object with the same structure, but with all descriptors replaced with their API.
444
- * Any non-descriptor properties are removed from the returned object, including descriptors that
445
- * do not match the given host (as they will not work with the given host).
446
- */
447
- type BuildDescriptors<T extends Descriptors, H extends Host<any> | undefined, Depth extends number = 5> = {
448
- done: T;
449
- recurse: T extends {
450
- __type: typeof SERVICE_PLUGIN_ERROR_TYPE;
451
- } ? never : T extends AmbassadorFunctionDescriptor ? BuildAmbassadorFunction<T> : T extends RESTFunctionDescriptor ? BuildRESTFunction<T> : T extends EventDefinition<any> ? BuildEventDefinition<T> : T extends ServicePluginDefinition<any> ? BuildServicePluginDefinition<T> : T extends HostModule<any, any> ? HostModuleAPI<T> : ConditionalExcept<{
452
- [Key in keyof T]: T[Key] extends Descriptors ? BuildDescriptors<T[Key], H, [
453
- -1,
454
- 0,
455
- 1,
456
- 2,
457
- 3,
458
- 4,
459
- 5
460
- ][Depth]> : never;
461
- }, EmptyObject>;
462
- }[Depth extends -1 ? 'done' : 'recurse'];
463
- type PublicMetadata = {
464
- PACKAGE_NAME?: string;
465
- };
466
-
467
- declare global {
468
- interface ContextualClient {
469
- }
470
- }
471
- /**
472
- * A type used to create concerete types from SDK descriptors in
473
- * case a contextual client is available.
474
- */
475
- type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
476
- host: Host;
477
- } ? BuildDescriptors<T, globalThis.ContextualClient['host']> : T;
478
-
479
- interface EnterpriseCategory {
480
- /**
481
- * Id of the category
482
- * @readonly
483
- */
484
- _id?: string;
485
- /** The display name that will be shown for the item */
486
- displayName?: string | null;
487
- /** Id of the parent category, will default to the account master category */
488
- parentCategoryId?: string | null;
489
- /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
490
- sortOrder?: number | null;
491
- /** Publish status of the category */
492
- publishStatus?: PublishStatus$1;
493
- /**
494
- * Date and time the category was created.
495
- * @readonly
496
- */
497
- _createdDate?: Date | null;
498
- /**
499
- * Date and time the category was updated.
500
- * @readonly
501
- */
502
- _updatedDate?: Date | null;
503
- }
504
- declare enum PublishStatus$1 {
505
- UNDEFINED = "UNDEFINED",
506
- UNPUBLISHED = "UNPUBLISHED",
507
- PUBLISHED = "PUBLISHED",
508
- WIX_ONLY = "WIX_ONLY"
509
- }
510
- declare enum MediaType$2 {
511
- MIXED = "MIXED",
512
- IMAGE = "IMAGE",
513
- VIDEO = "VIDEO",
514
- AUDIO = "AUDIO",
515
- DOCUMENT = "DOCUMENT",
516
- VECTOR = "VECTOR",
517
- ARCHIVE = "ARCHIVE",
518
- MODEL3D = "MODEL3D"
519
- }
520
- interface CreateCategoryRequest {
521
- /** The category object that will be created */
522
- category: EnterpriseCategory;
523
- }
524
- interface CreateCategoryResponse {
525
- /** A list of items matching the request */
526
- category?: EnterpriseCategory;
527
- }
528
- interface DeleteCategoryRequest {
529
- /** Category id */
530
- categoryId: string;
531
- }
532
- interface DeleteCategoryResponse {
533
- }
534
- interface UpdateCategoryRequest {
535
- /** The category object that will be created */
536
- category: EnterpriseCategory;
537
- }
538
- interface UpdateCategoryResponse {
539
- /** The updated category */
540
- category?: EnterpriseCategory;
541
- }
542
- interface GetCategoryRequest {
543
- /** Category id */
544
- categoryId: string;
545
- /** number of sub category levels */
546
- levels?: number | null;
547
- /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
548
- publishStatus?: PublishStatus$1;
549
- }
550
- interface GetCategoryResponse {
551
- /** The category details */
552
- category?: EnterpriseCategoryTree;
553
- }
554
- interface EnterpriseCategoryTree {
555
- /** Category information */
556
- category?: EnterpriseCategory;
557
- /** Information about the sub categories */
558
- subCategories?: EnterpriseCategoryTree[];
559
- }
560
- interface EnterpriseOnboardingRequest {
561
- /** The account id of the organization - will be used as the organization category id */
562
- accountId: string;
563
- /** The account name of the organization - will be used as the organization category name */
564
- accountName?: string;
565
- }
566
- interface EnterpriseOnboardingResponse {
567
- /** The enterprise category */
568
- category?: EnterpriseCategory;
569
- }
570
- interface LinkItemsToCategoryRequest {
571
- /** The category to link to */
572
- categoryId?: string;
573
- /** The item ids that will be added to the category */
574
- itemIds?: string[];
575
- }
576
- interface LinkItemsToCategoryResponse {
577
- }
578
- interface UnlinkItemsFromCategoryRequest {
579
- /** The category to link to */
580
- categoryId?: string;
581
- /** The item ids that will be added to the category */
582
- itemIds?: string[];
583
- }
584
- interface UnlinkItemsFromCategoryResponse {
585
- }
586
- interface GetMediaManagerCategoriesRequest {
587
- }
588
- interface GetMediaManagerCategoriesResponse {
589
- /** The category details */
590
- category?: EnterpriseCategoryTree;
591
- }
592
- interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
593
- createdEvent?: EntityCreatedEvent$3;
594
- updatedEvent?: EntityUpdatedEvent$3;
595
- deletedEvent?: EntityDeletedEvent$3;
596
- actionEvent?: ActionEvent$3;
597
- /**
598
- * Unique event ID.
599
- * Allows clients to ignore duplicate webhooks.
600
- */
601
- _id?: string;
602
- /**
603
- * Assumes actions are also always typed to an entity_type
604
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
605
- */
606
- entityFqdn?: string;
607
- /**
608
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
609
- * This is although the created/updated/deleted notion is duplication of the oneof types
610
- * Example: created/updated/deleted/started/completed/email_opened
611
- */
612
- slug?: string;
613
- /** ID of the entity associated with the event. */
614
- entityId?: string;
615
- /** Event timestamp. */
616
- eventTime?: Date | null;
617
- /**
618
- * Whether the event was triggered as a result of a privacy regulation application
619
- * (for example, GDPR).
620
- */
621
- triggeredByAnonymizeRequest?: boolean | null;
622
- /** If present, indicates the action that triggered the event. */
623
- originatedFrom?: string | null;
624
- /**
625
- * A sequence number defining the order of updates to the underlying entity.
626
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
627
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
628
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
629
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
630
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
631
- */
632
- entityEventSequence?: string | null;
633
- }
634
- /** @oneof */
635
- interface DomainEventBodyOneOf$3 {
636
- createdEvent?: EntityCreatedEvent$3;
637
- updatedEvent?: EntityUpdatedEvent$3;
638
- deletedEvent?: EntityDeletedEvent$3;
639
- actionEvent?: ActionEvent$3;
640
- }
641
- interface EntityCreatedEvent$3 {
642
- entity?: string;
643
- }
644
- interface EntityUpdatedEvent$3 {
645
- /**
646
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
647
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
648
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
649
- */
650
- currentEntity?: string;
651
- }
652
- interface EntityDeletedEvent$3 {
653
- /** Entity that was deleted */
654
- deletedEntity?: string | null;
655
- }
656
- interface ActionEvent$3 {
657
- body?: string;
658
- }
659
- interface MessageEnvelope$3 {
660
- /** App instance ID. */
661
- instanceId?: string | null;
662
- /** Event type. */
663
- eventType?: string;
664
- /** The identification type and identity data. */
665
- identity?: IdentificationData$3;
666
- /** Stringify payload. */
667
- data?: string;
668
- }
669
- interface IdentificationData$3 extends IdentificationDataIdOneOf$3 {
670
- /** ID of a site visitor that has not logged in to the site. */
671
- anonymousVisitorId?: string;
672
- /** ID of a site visitor that has logged in to the site. */
673
- memberId?: string;
674
- /** ID of a Wix user (site owner, contributor, etc.). */
675
- wixUserId?: string;
676
- /** ID of an app. */
677
- appId?: string;
678
- /** @readonly */
679
- identityType?: WebhookIdentityType$3;
680
- }
681
- /** @oneof */
682
- interface IdentificationDataIdOneOf$3 {
683
- /** ID of a site visitor that has not logged in to the site. */
684
- anonymousVisitorId?: string;
685
- /** ID of a site visitor that has logged in to the site. */
686
- memberId?: string;
687
- /** ID of a Wix user (site owner, contributor, etc.). */
688
- wixUserId?: string;
689
- /** ID of an app. */
690
- appId?: string;
691
- }
692
- declare enum WebhookIdentityType$3 {
693
- UNKNOWN = "UNKNOWN",
694
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
695
- MEMBER = "MEMBER",
696
- WIX_USER = "WIX_USER",
697
- APP = "APP"
698
- }
699
- interface EnterpriseCategoryNonNullableFields {
700
- _id: string;
701
- publishStatus: PublishStatus$1;
702
- mediaType: MediaType$2;
703
- }
704
- interface CreateCategoryResponseNonNullableFields {
705
- category?: EnterpriseCategoryNonNullableFields;
706
- }
707
- interface UpdateCategoryResponseNonNullableFields {
708
- category?: EnterpriseCategoryNonNullableFields;
709
- }
710
- interface EnterpriseCategoryTreeNonNullableFields {
711
- category?: EnterpriseCategoryNonNullableFields;
712
- subCategories: EnterpriseCategoryTreeNonNullableFields[];
713
- }
714
- interface GetCategoryResponseNonNullableFields {
715
- category?: EnterpriseCategoryTreeNonNullableFields;
716
- }
717
- interface EnterpriseOnboardingResponseNonNullableFields {
718
- category?: EnterpriseCategoryNonNullableFields;
719
- }
720
- interface GetMediaManagerCategoriesResponseNonNullableFields {
721
- category?: EnterpriseCategoryTreeNonNullableFields;
722
- }
723
- interface BaseEventMetadata$3 {
724
- /** App instance ID. */
725
- instanceId?: string | null;
726
- /** Event type. */
727
- eventType?: string;
728
- /** The identification type and identity data. */
729
- identity?: IdentificationData$3;
730
- }
731
- interface EventMetadata$3 extends BaseEventMetadata$3 {
732
- /**
733
- * Unique event ID.
734
- * Allows clients to ignore duplicate webhooks.
735
- */
736
- _id?: string;
737
- /**
738
- * Assumes actions are also always typed to an entity_type
739
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
740
- */
741
- entityFqdn?: string;
742
- /**
743
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
744
- * This is although the created/updated/deleted notion is duplication of the oneof types
745
- * Example: created/updated/deleted/started/completed/email_opened
746
- */
747
- slug?: string;
748
- /** ID of the entity associated with the event. */
749
- entityId?: string;
750
- /** Event timestamp. */
751
- eventTime?: Date | null;
752
- /**
753
- * Whether the event was triggered as a result of a privacy regulation application
754
- * (for example, GDPR).
755
- */
756
- triggeredByAnonymizeRequest?: boolean | null;
757
- /** If present, indicates the action that triggered the event. */
758
- originatedFrom?: string | null;
759
- /**
760
- * A sequence number defining the order of updates to the underlying entity.
761
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
762
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
763
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
764
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
765
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
766
- */
767
- entityEventSequence?: string | null;
768
- }
769
- interface EnterpriseCategoryCreatedEnvelope {
770
- entity: EnterpriseCategory;
771
- metadata: EventMetadata$3;
772
- }
773
- interface EnterpriseCategoryDeletedEnvelope {
774
- entity: EnterpriseCategory;
775
- metadata: EventMetadata$3;
776
- }
777
- interface EnterpriseCategoryUpdatedEnvelope {
778
- entity: EnterpriseCategory;
779
- metadata: EventMetadata$3;
780
- }
781
- interface UpdateCategory {
782
- /**
783
- * Id of the category
784
- * @readonly
785
- */
786
- _id?: string;
787
- /** The display name that will be shown for the item */
788
- displayName?: string | null;
789
- /** Id of the parent category, will default to the account master category */
790
- parentCategoryId?: string | null;
791
- /** Sort order number of the category, will determine the order of the category with other categories under the same parent category */
792
- sortOrder?: number | null;
793
- /** Publish status of the category */
794
- publishStatus?: PublishStatus$1;
795
- /**
796
- * Date and time the category was created.
797
- * @readonly
798
- */
799
- _createdDate?: Date | null;
800
- /**
801
- * Date and time the category was updated.
802
- * @readonly
803
- */
804
- _updatedDate?: Date | null;
805
- }
806
- interface GetCategoryOptions {
807
- /** number of sub category levels */
808
- levels?: number | null;
809
- /** filter categories by publish statuses. When empty will return PUBLISHED and UNPUBLISHED */
810
- publishStatus?: PublishStatus$1;
811
- }
812
- interface EnterpriseOnboardingOptions {
813
- /** The account name of the organization - will be used as the organization category name */
814
- accountName?: string;
815
- }
816
-
817
- declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
818
- interface CreateCategorySignature {
819
- /**
820
- * Fetch a list of random media from different providers, using site information to customize results when available
821
- * @param - The category object that will be created
822
- * @returns A list of items matching the request
823
- */
824
- (category: EnterpriseCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
825
- }
826
- declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
827
- interface DeleteCategorySignature {
828
- /**
829
- * Delete a category including all its subcategories - but not the items
830
- * @param - Category id
831
- */
832
- (categoryId: string): Promise<void>;
833
- }
834
- declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
835
- interface UpdateCategorySignature {
836
- /**
837
- * Update category details
838
- * @param - Id of the category
839
- * @returns The updated category
840
- */
841
- (_id: string, category: UpdateCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
842
- }
843
- declare function getCategory$1(httpClient: HttpClient): GetCategorySignature;
844
- interface GetCategorySignature {
845
- /**
846
- * Get information about a specific category
847
- * @param - Category id
848
- * @returns The category details
849
- */
850
- (categoryId: string, options?: GetCategoryOptions | undefined): Promise<EnterpriseCategoryTree & EnterpriseCategoryTreeNonNullableFields>;
851
- }
852
- declare function enterpriseOnboarding$1(httpClient: HttpClient): EnterpriseOnboardingSignature;
853
- interface EnterpriseOnboardingSignature {
854
- /**
855
- * Create the enterprise category under "enterprise-media" main category
856
- * the caller identity must be have the same accountId of the request
857
- * @param - The account id of the organization - will be used as the organization category id
858
- */
859
- (accountId: string, options?: EnterpriseOnboardingOptions | undefined): Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
860
- }
861
- declare function getMediaManagerCategories$1(httpClient: HttpClient): GetMediaManagerCategoriesSignature;
862
- interface GetMediaManagerCategoriesSignature {
863
- /**
864
- * Get the account category tree details
865
- */
866
- (): Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
867
- }
868
- declare const onEnterpriseCategoryCreated$1: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
869
- declare const onEnterpriseCategoryDeleted$1: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
870
- declare const onEnterpriseCategoryUpdated$1: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
871
-
872
- declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
873
-
874
- declare const createCategory: MaybeContext<BuildRESTFunction<typeof createCategory$1> & typeof createCategory$1>;
875
- declare const deleteCategory: MaybeContext<BuildRESTFunction<typeof deleteCategory$1> & typeof deleteCategory$1>;
876
- declare const updateCategory: MaybeContext<BuildRESTFunction<typeof updateCategory$1> & typeof updateCategory$1>;
877
- declare const getCategory: MaybeContext<BuildRESTFunction<typeof getCategory$1> & typeof getCategory$1>;
878
- declare const enterpriseOnboarding: MaybeContext<BuildRESTFunction<typeof enterpriseOnboarding$1> & typeof enterpriseOnboarding$1>;
879
- declare const getMediaManagerCategories: MaybeContext<BuildRESTFunction<typeof getMediaManagerCategories$1> & typeof getMediaManagerCategories$1>;
880
-
881
- type _publicOnEnterpriseCategoryCreatedType = typeof onEnterpriseCategoryCreated$1;
882
- /** */
883
- declare const onEnterpriseCategoryCreated: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryCreatedType>>;
884
-
885
- type _publicOnEnterpriseCategoryDeletedType = typeof onEnterpriseCategoryDeleted$1;
886
- /** */
887
- declare const onEnterpriseCategoryDeleted: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryDeletedType>>;
888
-
889
- type _publicOnEnterpriseCategoryUpdatedType = typeof onEnterpriseCategoryUpdated$1;
890
- /** */
891
- declare const onEnterpriseCategoryUpdated: ReturnType<typeof createEventModule$3<_publicOnEnterpriseCategoryUpdatedType>>;
892
-
893
- type index_d$3_CreateCategoryRequest = CreateCategoryRequest;
894
- type index_d$3_CreateCategoryResponse = CreateCategoryResponse;
895
- type index_d$3_CreateCategoryResponseNonNullableFields = CreateCategoryResponseNonNullableFields;
896
- type index_d$3_DeleteCategoryRequest = DeleteCategoryRequest;
897
- type index_d$3_DeleteCategoryResponse = DeleteCategoryResponse;
898
- type index_d$3_EnterpriseCategory = EnterpriseCategory;
899
- type index_d$3_EnterpriseCategoryCreatedEnvelope = EnterpriseCategoryCreatedEnvelope;
900
- type index_d$3_EnterpriseCategoryDeletedEnvelope = EnterpriseCategoryDeletedEnvelope;
901
- type index_d$3_EnterpriseCategoryNonNullableFields = EnterpriseCategoryNonNullableFields;
902
- type index_d$3_EnterpriseCategoryTree = EnterpriseCategoryTree;
903
- type index_d$3_EnterpriseCategoryTreeNonNullableFields = EnterpriseCategoryTreeNonNullableFields;
904
- type index_d$3_EnterpriseCategoryUpdatedEnvelope = EnterpriseCategoryUpdatedEnvelope;
905
- type index_d$3_EnterpriseOnboardingOptions = EnterpriseOnboardingOptions;
906
- type index_d$3_EnterpriseOnboardingRequest = EnterpriseOnboardingRequest;
907
- type index_d$3_EnterpriseOnboardingResponse = EnterpriseOnboardingResponse;
908
- type index_d$3_EnterpriseOnboardingResponseNonNullableFields = EnterpriseOnboardingResponseNonNullableFields;
909
- type index_d$3_GetCategoryOptions = GetCategoryOptions;
910
- type index_d$3_GetCategoryRequest = GetCategoryRequest;
911
- type index_d$3_GetCategoryResponse = GetCategoryResponse;
912
- type index_d$3_GetCategoryResponseNonNullableFields = GetCategoryResponseNonNullableFields;
913
- type index_d$3_GetMediaManagerCategoriesRequest = GetMediaManagerCategoriesRequest;
914
- type index_d$3_GetMediaManagerCategoriesResponse = GetMediaManagerCategoriesResponse;
915
- type index_d$3_GetMediaManagerCategoriesResponseNonNullableFields = GetMediaManagerCategoriesResponseNonNullableFields;
916
- type index_d$3_LinkItemsToCategoryRequest = LinkItemsToCategoryRequest;
917
- type index_d$3_LinkItemsToCategoryResponse = LinkItemsToCategoryResponse;
918
- type index_d$3_UnlinkItemsFromCategoryRequest = UnlinkItemsFromCategoryRequest;
919
- type index_d$3_UnlinkItemsFromCategoryResponse = UnlinkItemsFromCategoryResponse;
920
- type index_d$3_UpdateCategory = UpdateCategory;
921
- type index_d$3_UpdateCategoryRequest = UpdateCategoryRequest;
922
- type index_d$3_UpdateCategoryResponse = UpdateCategoryResponse;
923
- type index_d$3_UpdateCategoryResponseNonNullableFields = UpdateCategoryResponseNonNullableFields;
924
- type index_d$3__publicOnEnterpriseCategoryCreatedType = _publicOnEnterpriseCategoryCreatedType;
925
- type index_d$3__publicOnEnterpriseCategoryDeletedType = _publicOnEnterpriseCategoryDeletedType;
926
- type index_d$3__publicOnEnterpriseCategoryUpdatedType = _publicOnEnterpriseCategoryUpdatedType;
927
- declare const index_d$3_createCategory: typeof createCategory;
928
- declare const index_d$3_deleteCategory: typeof deleteCategory;
929
- declare const index_d$3_enterpriseOnboarding: typeof enterpriseOnboarding;
930
- declare const index_d$3_getCategory: typeof getCategory;
931
- declare const index_d$3_getMediaManagerCategories: typeof getMediaManagerCategories;
932
- declare const index_d$3_onEnterpriseCategoryCreated: typeof onEnterpriseCategoryCreated;
933
- declare const index_d$3_onEnterpriseCategoryDeleted: typeof onEnterpriseCategoryDeleted;
934
- declare const index_d$3_onEnterpriseCategoryUpdated: typeof onEnterpriseCategoryUpdated;
935
- declare const index_d$3_updateCategory: typeof updateCategory;
936
- declare namespace index_d$3 {
937
- export { type ActionEvent$3 as ActionEvent, type BaseEventMetadata$3 as BaseEventMetadata, type index_d$3_CreateCategoryRequest as CreateCategoryRequest, type index_d$3_CreateCategoryResponse as CreateCategoryResponse, type index_d$3_CreateCategoryResponseNonNullableFields as CreateCategoryResponseNonNullableFields, type index_d$3_DeleteCategoryRequest as DeleteCategoryRequest, type index_d$3_DeleteCategoryResponse as DeleteCategoryResponse, type DomainEvent$3 as DomainEvent, type DomainEventBodyOneOf$3 as DomainEventBodyOneOf, type index_d$3_EnterpriseCategory as EnterpriseCategory, type index_d$3_EnterpriseCategoryCreatedEnvelope as EnterpriseCategoryCreatedEnvelope, type index_d$3_EnterpriseCategoryDeletedEnvelope as EnterpriseCategoryDeletedEnvelope, type index_d$3_EnterpriseCategoryNonNullableFields as EnterpriseCategoryNonNullableFields, type index_d$3_EnterpriseCategoryTree as EnterpriseCategoryTree, type index_d$3_EnterpriseCategoryTreeNonNullableFields as EnterpriseCategoryTreeNonNullableFields, type index_d$3_EnterpriseCategoryUpdatedEnvelope as EnterpriseCategoryUpdatedEnvelope, type index_d$3_EnterpriseOnboardingOptions as EnterpriseOnboardingOptions, type index_d$3_EnterpriseOnboardingRequest as EnterpriseOnboardingRequest, type index_d$3_EnterpriseOnboardingResponse as EnterpriseOnboardingResponse, type index_d$3_EnterpriseOnboardingResponseNonNullableFields as EnterpriseOnboardingResponseNonNullableFields, type EntityCreatedEvent$3 as EntityCreatedEvent, type EntityDeletedEvent$3 as EntityDeletedEvent, type EntityUpdatedEvent$3 as EntityUpdatedEvent, type EventMetadata$3 as EventMetadata, type index_d$3_GetCategoryOptions as GetCategoryOptions, type index_d$3_GetCategoryRequest as GetCategoryRequest, type index_d$3_GetCategoryResponse as GetCategoryResponse, type index_d$3_GetCategoryResponseNonNullableFields as GetCategoryResponseNonNullableFields, type index_d$3_GetMediaManagerCategoriesRequest as GetMediaManagerCategoriesRequest, type index_d$3_GetMediaManagerCategoriesResponse as GetMediaManagerCategoriesResponse, type index_d$3_GetMediaManagerCategoriesResponseNonNullableFields as GetMediaManagerCategoriesResponseNonNullableFields, type IdentificationData$3 as IdentificationData, type IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, type index_d$3_LinkItemsToCategoryRequest as LinkItemsToCategoryRequest, type index_d$3_LinkItemsToCategoryResponse as LinkItemsToCategoryResponse, MediaType$2 as MediaType, type MessageEnvelope$3 as MessageEnvelope, PublishStatus$1 as PublishStatus, type index_d$3_UnlinkItemsFromCategoryRequest as UnlinkItemsFromCategoryRequest, type index_d$3_UnlinkItemsFromCategoryResponse as UnlinkItemsFromCategoryResponse, type index_d$3_UpdateCategory as UpdateCategory, type index_d$3_UpdateCategoryRequest as UpdateCategoryRequest, type index_d$3_UpdateCategoryResponse as UpdateCategoryResponse, type index_d$3_UpdateCategoryResponseNonNullableFields as UpdateCategoryResponseNonNullableFields, WebhookIdentityType$3 as WebhookIdentityType, type index_d$3__publicOnEnterpriseCategoryCreatedType as _publicOnEnterpriseCategoryCreatedType, type index_d$3__publicOnEnterpriseCategoryDeletedType as _publicOnEnterpriseCategoryDeletedType, type index_d$3__publicOnEnterpriseCategoryUpdatedType as _publicOnEnterpriseCategoryUpdatedType, index_d$3_createCategory as createCategory, index_d$3_deleteCategory as deleteCategory, index_d$3_enterpriseOnboarding as enterpriseOnboarding, index_d$3_getCategory as getCategory, index_d$3_getMediaManagerCategories as getMediaManagerCategories, index_d$3_onEnterpriseCategoryCreated as onEnterpriseCategoryCreated, index_d$3_onEnterpriseCategoryDeleted as onEnterpriseCategoryDeleted, index_d$3_onEnterpriseCategoryUpdated as onEnterpriseCategoryUpdated, onEnterpriseCategoryCreated$1 as publicOnEnterpriseCategoryCreated, onEnterpriseCategoryDeleted$1 as publicOnEnterpriseCategoryDeleted, onEnterpriseCategoryUpdated$1 as publicOnEnterpriseCategoryUpdated, index_d$3_updateCategory as updateCategory };
938
- }
939
-
940
- /**
941
- * Duration for video fits better if there will be type specific media item.. however, is it ok to implement
942
- * an additional one of field called details?
943
- */
944
- interface EnterpriseMediaItem {
945
- /**
946
- * Id of the item in public media
947
- * @readonly
948
- */
949
- _id?: string;
950
- /**
951
- * Media type of the item
952
- * @readonly
953
- */
954
- mediaType?: MediaType$1;
955
- /**
956
- * Size of the uploaded file in bytes.
957
- * @readonly
958
- */
959
- sizeInBytes?: string | null;
960
- /** The item title, part of searchable fields */
961
- title?: string | null;
962
- /**
963
- * The aspect ratio of the item
964
- * An object containing urls for different views of the item
965
- * @readonly
966
- */
967
- assets?: ItemAssets;
968
- /** Tags describing the image, part of searchable fields */
969
- displayTags?: string[] | null;
970
- /** Tags for internal client use, part of searchable fields */
971
- internalTags?: string[] | null;
972
- /**
973
- * Tags for filtering items in the search
974
- * @readonly
975
- */
976
- systemTags?: string[] | null;
977
- /**
978
- * Category ids this item belongs to
979
- * @readonly
980
- */
981
- parentCategoryIds?: string[] | null;
982
- /** Status of the item */
983
- publishStatus?: PublishStatus;
984
- /**
985
- * Date and time the item was created.
986
- * @readonly
987
- */
988
- _createdDate?: Date | null;
989
- /**
990
- * Date and time the item was updated.
991
- * @readonly
992
- */
993
- _updatedDate?: Date | null;
994
- /**
995
- * An internal id used with different wix media systems
996
- * @readonly
997
- */
998
- internalId?: string | null;
999
- }
1000
- declare enum MediaType$1 {
1001
- MIXED = "MIXED",
1002
- IMAGE = "IMAGE",
1003
- VIDEO = "VIDEO",
1004
- AUDIO = "AUDIO",
1005
- DOCUMENT = "DOCUMENT",
1006
- VECTOR = "VECTOR",
1007
- ARCHIVE = "ARCHIVE",
1008
- MODEL3D = "MODEL3D"
1009
- }
1010
- interface ItemAssets extends ItemAssetsAssetsOneOf {
1011
- /** Assets for image media type */
1012
- image?: string;
1013
- /** Assets for video media type */
1014
- video?: string;
1015
- /** Assets for vector media type */
1016
- vector?: string;
1017
- /** Assets for audio media type */
1018
- audio?: string;
1019
- /** Assets for document media type */
1020
- document?: string;
1021
- /** Information about the archive. */
1022
- archive?: Archive$1;
1023
- /** Information about the 3D Model. */
1024
- model3d?: Model3D$1;
1025
- }
1026
- /** @oneof */
1027
- interface ItemAssetsAssetsOneOf {
1028
- /** Assets for image media type */
1029
- image?: string;
1030
- /** Assets for video media type */
1031
- video?: string;
1032
- /** Assets for vector media type */
1033
- vector?: string;
1034
- /** Assets for audio media type */
1035
- audio?: string;
1036
- /** Assets for document media type */
1037
- document?: string;
1038
- /** Information about the archive. */
1039
- archive?: Archive$1;
1040
- /** Information about the 3D Model. */
1041
- model3d?: Model3D$1;
1042
- }
1043
- interface VideoResolution$1 {
1044
- /** Video URL. */
1045
- url?: string;
1046
- /** Video height. */
1047
- height?: number;
1048
- /** Video width. */
1049
- width?: number;
1050
- /**
1051
- * Video format
1052
- * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
1053
- * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm' ]
1054
- */
1055
- format?: string;
1056
- }
1057
- interface Archive$1 {
1058
- /** WixMedia ID. */
1059
- _id?: string;
1060
- /** Archive URL. */
1061
- url?: string;
1062
- /**
1063
- * Archive URL expiration date (when relevant).
1064
- * @readonly
1065
- */
1066
- urlExpirationDate?: Date | null;
1067
- /** Archive size in bytes. */
1068
- sizeInBytes?: string | null;
1069
- /** Archive filename. */
1070
- filename?: string | null;
1071
- }
1072
- interface Model3D$1 {
1073
- /** WixMedia 3D ID. */
1074
- _id?: string;
1075
- /** 3D URL. */
1076
- url?: string;
1077
- /** 3D thumbnail Image */
1078
- thumbnail?: string;
1079
- /** 3D alt text. */
1080
- altText?: string | null;
1081
- /**
1082
- * 3D URL expiration date (when relevant).
1083
- * @readonly
1084
- */
1085
- urlExpirationDate?: Date | null;
1086
- /**
1087
- * 3D filename.
1088
- * @readonly
1089
- */
1090
- filename?: string | null;
1091
- /**
1092
- * 3D size in bytes.
1093
- * @readonly
1094
- */
1095
- sizeInBytes?: string | null;
1096
- }
1097
- declare enum PublishStatus {
1098
- UNDEFINED = "UNDEFINED",
1099
- UNPUBLISHED = "UNPUBLISHED",
1100
- PUBLISHED = "PUBLISHED",
1101
- WIX_ONLY = "WIX_ONLY"
1102
- }
1103
- interface ItemCategoriesChanged {
1104
- /** A list of the current item categories */
1105
- itemCategoryIds?: string[] | null;
1106
- /** A list of the categories that where unlinked from the item */
1107
- unlinkedCategoryIds?: string[] | null;
1108
- /** A list of the categories that where linked to the item */
1109
- linkedCategoryIds?: string[] | null;
1110
- /** The full updated item information */
1111
- entity?: EnterpriseMediaItem;
1112
- }
1113
- interface ItemUploadCallbackRequest {
1114
- /** The item id of the created item */
1115
- itemId?: string;
1116
- /** The callback passed to the upload endpoint */
1117
- callbackToken?: string;
1118
- }
1119
- interface ItemUploadCallbackResponse {
1120
- /** A message describing what happened on the endpoint */
1121
- message?: string | null;
1122
- }
1123
- interface GenerateFileUploadUrlRequest$1 {
1124
- /** The uploaded original file name including the extension */
1125
- fileName?: string;
1126
- /** The file mime-type - will be used to identify the type of media */
1127
- contentType?: string;
1128
- /** The file size in bytes */
1129
- sizeInBytes?: number;
1130
- /**
1131
- * An optional list of categories to link the created item to
1132
- * The item will be linked to the account category automatically
1133
- */
1134
- categoryIds?: string[] | null;
1135
- }
1136
- interface GenerateFileUploadUrlResponse$1 {
1137
- /** The upload url to upload the file to */
1138
- uploadUrl?: string;
1139
- }
1140
- interface ImportFileRequest$1 {
1141
- /** The url to the file to be imported */
1142
- url: string;
1143
- /** The uploaded original file name including the extension - will be used as the initial display name */
1144
- fileName?: string | null;
1145
- /** The file mime-type - will be used to identify the type of media */
1146
- contentType?: string | null;
1147
- /** The file size in bytes */
1148
- sizeInBytes?: number | null;
1149
- /**
1150
- * An optional list of categories to link the created item to
1151
- * The item will be linked to the account category automatically
1152
- */
1153
- categoryIds?: string[] | null;
1154
- /** The media type of the uploaded file */
1155
- mediaType?: MediaType$1;
1156
- /**
1157
- * A unique identifier of the client that imported the file
1158
- * This information will exist in the system_tags field prefixed by '_external_uploader:{uploader_system_tag}'
1159
- */
1160
- uploaderSystemTag?: string | null;
1161
- /**
1162
- * An additional container for external information
1163
- * mostly used to pass identifying information of related entities in external services
1164
- * This information will exist in the system_tags field prefixed by '_external_uploader_info:{uploader_info_system_tag}'
1165
- */
1166
- uploaderInfoSystemTag?: string | null;
1167
- }
1168
- interface ImportFileResponse$1 {
1169
- /**
1170
- * Partial item - without the assets
1171
- * At this stage of implementation only the 'internal_id' will be filled
1172
- * all other required values will be fake values
1173
- */
1174
- item?: EnterpriseMediaItem;
1175
- }
1176
- interface BulkImportFilesRequest$1 {
1177
- /** Information about the files to import. */
1178
- importFileRequests: ImportFileRequest$1[];
1179
- /**
1180
- * Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
1181
- * Default: `true`
1182
- */
1183
- returnEntity?: boolean | null;
1184
- /**
1185
- * An optional list of categories to link all the items to
1186
- * The item will be linked to the account category automatically
1187
- */
1188
- categoryIds?: string[] | null;
1189
- }
1190
- interface BulkImportFilesResponse$1 {
1191
- /** Items created by bulk action. */
1192
- results?: BulkImportFilesResult[];
1193
- /** Bulk action metadata. */
1194
- bulkActionMetadata?: BulkActionMetadata$1;
1195
- }
1196
- interface BulkImportFilesResult {
1197
- /** Item metadata. */
1198
- itemMetadata?: ItemMetadata$1;
1199
- /** Imported file. This field is returned if the operation was successful and `returnEntity` is not set to `false`. */
1200
- item?: EnterpriseMediaItem;
1201
- }
1202
- interface ItemMetadata$1 {
1203
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
1204
- _id?: string | null;
1205
- /** Index of the item within the request array. Allows for correlation between request and response items. */
1206
- originalIndex?: number;
1207
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
1208
- success?: boolean;
1209
- /** Details about the error in case of failure. */
1210
- error?: ApplicationError$1;
1211
- }
1212
- interface ApplicationError$1 {
1213
- /** Error code. */
1214
- code?: string;
1215
- /** Description of the error. */
1216
- description?: string;
1217
- /** Data related to the error. */
1218
- data?: Record<string, any> | null;
1219
- }
1220
- interface BulkActionMetadata$1 {
1221
- /** Number of items that were successfully processed. */
1222
- totalSuccesses?: number;
1223
- /** Number of items that couldn't be processed. */
1224
- totalFailures?: number;
1225
- /** Number of failures without details because detailed failure threshold was exceeded. */
1226
- undetailedFailures?: number;
1227
- }
1228
- interface SearchItemsRequest {
1229
- /** Items search query */
1230
- query?: Search;
1231
- }
1232
- interface Search extends SearchPagingMethodOneOf {
1233
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
1234
- paging?: Paging;
1235
- /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */
1236
- filter?: Record<string, any> | null;
1237
- /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */
1238
- sort?: Sorting$2[];
1239
- /** free text to match in searchable fields */
1240
- search?: SearchDetails;
1241
- }
1242
- /** @oneof */
1243
- interface SearchPagingMethodOneOf {
1244
- /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */
1245
- paging?: Paging;
1246
- }
1247
- interface Sorting$2 {
1248
- /** Name of the field to sort by. */
1249
- fieldName?: string;
1250
- /** Sort order. */
1251
- order?: SortOrder$2;
1252
- }
1253
- declare enum SortOrder$2 {
1254
- ASC = "ASC",
1255
- DESC = "DESC"
1256
- }
1257
- interface SearchDetails {
1258
- /** search term or expression */
1259
- expression?: string | null;
1260
- }
1261
- interface Paging {
1262
- /** Number of items to load. */
1263
- limit?: number | null;
1264
- /** Number of items to skip in the current sort order. */
1265
- offset?: number | null;
1266
- }
1267
- interface SearchItemsResponse {
1268
- /** A list of items matching the request */
1269
- items?: EnterpriseMediaItem[];
1270
- /** Information about the search results. */
1271
- pagingMetadata?: PagingMetadataV2$2;
1272
- }
1273
- interface PagingMetadataV2$2 {
1274
- /** Number of items returned in the response. */
1275
- count?: number | null;
1276
- /** Offset that was requested. */
1277
- offset?: number | null;
1278
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
1279
- total?: number | null;
1280
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
1281
- cursors?: Cursors$2;
1282
- }
1283
- interface Cursors$2 {
1284
- /** Cursor pointing to next page in the list of results. */
1285
- next?: string | null;
1286
- }
1287
- interface QueryItemsRequest {
1288
- /** Items query */
1289
- query?: QueryV2;
1290
- }
1291
- interface QueryV2 extends QueryV2PagingMethodOneOf {
1292
- /** Paging options to limit and skip the number of items. */
1293
- paging?: Paging;
1294
- /**
1295
- * Filter object in the following format:
1296
- * `"filter" : {
1297
- * "fieldName1": "value1",
1298
- * "fieldName2":{"$operator":"value2"}
1299
- * }`
1300
- * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1301
- */
1302
- filter?: Record<string, any> | null;
1303
- /**
1304
- * Sort object in the following format:
1305
- * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1306
- */
1307
- sort?: Sorting$2[];
1308
- }
1309
- /** @oneof */
1310
- interface QueryV2PagingMethodOneOf {
1311
- /** Paging options to limit and skip the number of items. */
1312
- paging?: Paging;
1313
- }
1314
- interface QueryItemsResponse {
1315
- /** A list of items matching the request */
1316
- items?: EnterpriseMediaItem[];
1317
- /** Information for the next request. */
1318
- pagingMetadata?: PagingMetadataV2$2;
1319
- }
1320
- interface UpdateItemRequest {
1321
- /** The category object that will be created */
1322
- item: EnterpriseMediaItem;
1323
- }
1324
- interface UpdateItemResponse {
1325
- /** Updated item info */
1326
- item?: EnterpriseMediaItem;
1327
- }
1328
- interface PublishStatusChanged {
1329
- /** The new item status */
1330
- publishStatus?: PublishStatus;
1331
- /** The full updated item information */
1332
- entity?: EnterpriseMediaItem;
1333
- }
1334
- interface BulkUpdateItemRequest {
1335
- /** Requests to update individual item */
1336
- updateItemRequests: UpdateItemRequest[];
1337
- /** Should the response return the updated item */
1338
- returnEntity?: boolean;
1339
- }
1340
- interface BulkUpdateItemResponse {
1341
- /** Requests to update individual item */
1342
- results?: BulkItemUpdateResult[];
1343
- /** Metadata of the operation */
1344
- bulkActionMetadata?: BulkActionMetadata$1;
1345
- }
1346
- interface BulkItemUpdateResult {
1347
- /** updated item metadata */
1348
- itemMetadata?: ItemMetadata$1;
1349
- /** only returned if operation was successful and if returnEntity flag was on */
1350
- item?: EnterpriseMediaItem;
1351
- }
1352
- interface GetItemRequest {
1353
- /** Item id */
1354
- itemId: string;
1355
- }
1356
- interface GetItemResponse {
1357
- /** item info */
1358
- item?: EnterpriseMediaItem;
1359
- }
1360
- interface LinkItemToCategoriesRequest {
1361
- /** The item id */
1362
- itemId: string;
1363
- /** The category ids that the item will be linked to */
1364
- categoryIds?: string[];
1365
- }
1366
- interface LinkItemToCategoriesResponse {
1367
- /** The linked category ids */
1368
- linkedCategoryIds?: string[] | null;
1369
- }
1370
- interface UnlinkItemFromCategoriesRequest {
1371
- /** The item id */
1372
- itemId: string;
1373
- /** The category ids that the item will be unlinked from */
1374
- categoryIds?: string[];
1375
- }
1376
- interface UnlinkItemFromCategoriesResponse {
1377
- /** The unlinked category ids */
1378
- unlinkedCategoryIds?: string[] | null;
1379
- }
1380
- interface OverwriteItemCategoriesRequest {
1381
- /** The item id */
1382
- itemId: string;
1383
- /** The category ids the item will be linked to after this operation */
1384
- categoryIds?: string[];
1385
- }
1386
- interface OverwriteItemCategoriesResponse {
1387
- /** The linked category ids */
1388
- linkedCategoryIds?: string[] | null;
1389
- /** The unlinked category ids */
1390
- unlinkedCategoryIds?: string[] | null;
1391
- }
1392
- interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
1393
- createdEvent?: EntityCreatedEvent$2;
1394
- updatedEvent?: EntityUpdatedEvent$2;
1395
- deletedEvent?: EntityDeletedEvent$2;
1396
- actionEvent?: ActionEvent$2;
1397
- /**
1398
- * Unique event ID.
1399
- * Allows clients to ignore duplicate webhooks.
1400
- */
1401
- _id?: string;
1402
- /**
1403
- * Assumes actions are also always typed to an entity_type
1404
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1405
- */
1406
- entityFqdn?: string;
1407
- /**
1408
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1409
- * This is although the created/updated/deleted notion is duplication of the oneof types
1410
- * Example: created/updated/deleted/started/completed/email_opened
1411
- */
1412
- slug?: string;
1413
- /** ID of the entity associated with the event. */
1414
- entityId?: string;
1415
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1416
- eventTime?: Date | null;
1417
- /**
1418
- * Whether the event was triggered as a result of a privacy regulation application
1419
- * (for example, GDPR).
1420
- */
1421
- triggeredByAnonymizeRequest?: boolean | null;
1422
- /** If present, indicates the action that triggered the event. */
1423
- originatedFrom?: string | null;
1424
- /**
1425
- * A sequence number defining the order of updates to the underlying entity.
1426
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
1427
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1428
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1429
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
1430
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1431
- */
1432
- entityEventSequence?: string | null;
1433
- }
1434
- /** @oneof */
1435
- interface DomainEventBodyOneOf$2 {
1436
- createdEvent?: EntityCreatedEvent$2;
1437
- updatedEvent?: EntityUpdatedEvent$2;
1438
- deletedEvent?: EntityDeletedEvent$2;
1439
- actionEvent?: ActionEvent$2;
1440
- }
1441
- interface EntityCreatedEvent$2 {
1442
- entity?: string;
1443
- }
1444
- interface RestoreInfo$2 {
1445
- deletedDate?: Date | null;
1446
- }
1447
- interface EntityUpdatedEvent$2 {
1448
- /**
1449
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1450
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1451
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1452
- */
1453
- currentEntity?: string;
1454
- }
1455
- interface EntityDeletedEvent$2 {
1456
- /** Entity that was deleted */
1457
- deletedEntity?: string | null;
1458
- }
1459
- interface ActionEvent$2 {
1460
- body?: string;
1461
- }
1462
- interface MessageEnvelope$2 {
1463
- /** App instance ID. */
1464
- instanceId?: string | null;
1465
- /** Event type. */
1466
- eventType?: string;
1467
- /** The identification type and identity data. */
1468
- identity?: IdentificationData$2;
1469
- /** Stringify payload. */
1470
- data?: string;
1471
- }
1472
- interface IdentificationData$2 extends IdentificationDataIdOneOf$2 {
1473
- /** ID of a site visitor that has not logged in to the site. */
1474
- anonymousVisitorId?: string;
1475
- /** ID of a site visitor that has logged in to the site. */
1476
- memberId?: string;
1477
- /** ID of a Wix user (site owner, contributor, etc.). */
1478
- wixUserId?: string;
1479
- /** ID of an app. */
1480
- appId?: string;
1481
- /** @readonly */
1482
- identityType?: WebhookIdentityType$2;
1483
- }
1484
- /** @oneof */
1485
- interface IdentificationDataIdOneOf$2 {
1486
- /** ID of a site visitor that has not logged in to the site. */
1487
- anonymousVisitorId?: string;
1488
- /** ID of a site visitor that has logged in to the site. */
1489
- memberId?: string;
1490
- /** ID of a Wix user (site owner, contributor, etc.). */
1491
- wixUserId?: string;
1492
- /** ID of an app. */
1493
- appId?: string;
1494
- }
1495
- declare enum WebhookIdentityType$2 {
1496
- UNKNOWN = "UNKNOWN",
1497
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1498
- MEMBER = "MEMBER",
1499
- WIX_USER = "WIX_USER",
1500
- APP = "APP"
1501
- }
1502
- interface GenerateFileUploadUrlResponseNonNullableFields$1 {
1503
- uploadUrl: string;
1504
- }
1505
- interface ArchiveNonNullableFields$1 {
1506
- _id: string;
1507
- url: string;
1508
- }
1509
- interface Model3DNonNullableFields$1 {
1510
- _id: string;
1511
- url: string;
1512
- thumbnail: string;
1513
- }
1514
- interface ItemAssetsNonNullableFields {
1515
- image: string;
1516
- video: string;
1517
- vector: string;
1518
- audio: string;
1519
- document: string;
1520
- archive?: ArchiveNonNullableFields$1;
1521
- model3d?: Model3DNonNullableFields$1;
1522
- }
1523
- interface EnterpriseMediaItemNonNullableFields {
1524
- _id: string;
1525
- mediaType: MediaType$1;
1526
- assets?: ItemAssetsNonNullableFields;
1527
- publishStatus: PublishStatus;
1528
- }
1529
- interface ImportFileResponseNonNullableFields$1 {
1530
- item?: EnterpriseMediaItemNonNullableFields;
1531
- }
1532
- interface ApplicationErrorNonNullableFields$1 {
1533
- code: string;
1534
- description: string;
1535
- }
1536
- interface ItemMetadataNonNullableFields$1 {
1537
- originalIndex: number;
1538
- success: boolean;
1539
- error?: ApplicationErrorNonNullableFields$1;
1540
- }
1541
- interface BulkImportFilesResultNonNullableFields {
1542
- itemMetadata?: ItemMetadataNonNullableFields$1;
1543
- item?: EnterpriseMediaItemNonNullableFields;
1544
- }
1545
- interface BulkActionMetadataNonNullableFields$1 {
1546
- totalSuccesses: number;
1547
- totalFailures: number;
1548
- undetailedFailures: number;
1549
- }
1550
- interface BulkImportFilesResponseNonNullableFields$1 {
1551
- results: BulkImportFilesResultNonNullableFields[];
1552
- bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
1553
- }
1554
- interface SearchItemsResponseNonNullableFields {
1555
- items: EnterpriseMediaItemNonNullableFields[];
1556
- }
1557
- interface QueryItemsResponseNonNullableFields {
1558
- items: EnterpriseMediaItemNonNullableFields[];
1559
- }
1560
- interface UpdateItemResponseNonNullableFields {
1561
- item?: EnterpriseMediaItemNonNullableFields;
1562
- }
1563
- interface BulkItemUpdateResultNonNullableFields {
1564
- itemMetadata?: ItemMetadataNonNullableFields$1;
1565
- item?: EnterpriseMediaItemNonNullableFields;
1566
- }
1567
- interface BulkUpdateItemResponseNonNullableFields {
1568
- results: BulkItemUpdateResultNonNullableFields[];
1569
- bulkActionMetadata?: BulkActionMetadataNonNullableFields$1;
1570
- }
1571
- interface GetItemResponseNonNullableFields {
1572
- item?: EnterpriseMediaItemNonNullableFields;
1573
- }
1574
- interface BaseEventMetadata$2 {
1575
- /** App instance ID. */
1576
- instanceId?: string | null;
1577
- /** Event type. */
1578
- eventType?: string;
1579
- /** The identification type and identity data. */
1580
- identity?: IdentificationData$2;
1581
- }
1582
- interface EventMetadata$2 extends BaseEventMetadata$2 {
1583
- /**
1584
- * Unique event ID.
1585
- * Allows clients to ignore duplicate webhooks.
1586
- */
1587
- _id?: string;
1588
- /**
1589
- * Assumes actions are also always typed to an entity_type
1590
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1591
- */
1592
- entityFqdn?: string;
1593
- /**
1594
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1595
- * This is although the created/updated/deleted notion is duplication of the oneof types
1596
- * Example: created/updated/deleted/started/completed/email_opened
1597
- */
1598
- slug?: string;
1599
- /** ID of the entity associated with the event. */
1600
- entityId?: string;
1601
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1602
- eventTime?: Date | null;
1603
- /**
1604
- * Whether the event was triggered as a result of a privacy regulation application
1605
- * (for example, GDPR).
1606
- */
1607
- triggeredByAnonymizeRequest?: boolean | null;
1608
- /** If present, indicates the action that triggered the event. */
1609
- originatedFrom?: string | null;
1610
- /**
1611
- * A sequence number defining the order of updates to the underlying entity.
1612
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
1613
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1614
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1615
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
1616
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1617
- */
1618
- entityEventSequence?: string | null;
1619
- }
1620
- interface EnterpriseItemCreatedEnvelope {
1621
- entity: EnterpriseMediaItem;
1622
- metadata: EventMetadata$2;
1623
- }
1624
- interface EnterpriseItemUpdatedEnvelope {
1625
- entity: EnterpriseMediaItem;
1626
- metadata: EventMetadata$2;
1627
- }
1628
- interface EnterpriseItemItemCategoriesChangedEnvelope {
1629
- data: ItemCategoriesChanged;
1630
- metadata: EventMetadata$2;
1631
- }
1632
- interface EnterpriseItemPublishStatusChangedEnvelope {
1633
- data: PublishStatusChanged;
1634
- metadata: EventMetadata$2;
1635
- }
1636
- interface ItemUploadCallbackOptions {
1637
- /** The item id of the created item */
1638
- itemId?: string;
1639
- /** The callback passed to the upload endpoint */
1640
- callbackToken?: string;
1641
- }
1642
- interface GenerateFileUploadUrlOptions$1 {
1643
- /** The uploaded original file name including the extension */
1644
- fileName?: string;
1645
- /** The file mime-type - will be used to identify the type of media */
1646
- contentType?: string;
1647
- /** The file size in bytes */
1648
- sizeInBytes?: number;
1649
- /**
1650
- * An optional list of categories to link the created item to
1651
- * The item will be linked to the account category automatically
1652
- */
1653
- categoryIds?: string[] | null;
1654
- }
1655
- interface ImportFileOptions$1 {
1656
- /** The uploaded original file name including the extension - will be used as the initial display name */
1657
- fileName?: string | null;
1658
- /** The file mime-type - will be used to identify the type of media */
1659
- contentType?: string | null;
1660
- /** The file size in bytes */
1661
- sizeInBytes?: number | null;
1662
- /**
1663
- * An optional list of categories to link the created item to
1664
- * The item will be linked to the account category automatically
1665
- */
1666
- categoryIds?: string[] | null;
1667
- /** The media type of the uploaded file */
1668
- mediaType?: MediaType$1;
1669
- /**
1670
- * A unique identifier of the client that imported the file
1671
- * This information will exist in the system_tags field prefixed by '_external_uploader:{uploader_system_tag}'
1672
- */
1673
- uploaderSystemTag?: string | null;
1674
- /**
1675
- * An additional container for external information
1676
- * mostly used to pass identifying information of related entities in external services
1677
- * This information will exist in the system_tags field prefixed by '_external_uploader_info:{uploader_info_system_tag}'
1678
- */
1679
- uploaderInfoSystemTag?: string | null;
1680
- }
1681
- interface BulkImportFilesOptions {
1682
- /**
1683
- * Whether to include the imported File Descriptor in the response. Set to `false` to exclude the File Descriptor from the returned object.
1684
- * Default: `true`
1685
- */
1686
- returnEntity?: boolean | null;
1687
- /**
1688
- * An optional list of categories to link all the items to
1689
- * The item will be linked to the account category automatically
1690
- */
1691
- categoryIds?: string[] | null;
1692
- }
1693
- interface SearchItemsOptions {
1694
- /** Items search query */
1695
- query?: Search;
1696
- }
1697
- interface QueryOffsetResult {
1698
- currentPage: number | undefined;
1699
- totalPages: number | undefined;
1700
- totalCount: number | undefined;
1701
- hasNext: () => boolean;
1702
- hasPrev: () => boolean;
1703
- length: number;
1704
- pageSize: number;
1705
- }
1706
- interface ItemsQueryResult extends QueryOffsetResult {
1707
- items: EnterpriseMediaItem[];
1708
- query: ItemsQueryBuilder;
1709
- next: () => Promise<ItemsQueryResult>;
1710
- prev: () => Promise<ItemsQueryResult>;
1711
- }
1712
- interface ItemsQueryBuilder {
1713
- /** @param propertyName - Property whose value is compared with `value`.
1714
- * @param value - Value to compare against.
1715
- * @documentationMaturity preview
1716
- */
1717
- eq: (propertyName: 'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate', value: any) => ItemsQueryBuilder;
1718
- /** @param propertyName - Property whose value is compared with `values`.
1719
- * @param values - List of values to compare against.
1720
- * @documentationMaturity preview
1721
- */
1722
- hasSome: (propertyName: 'parentCategoryIds', value: any[]) => ItemsQueryBuilder;
1723
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1724
- * @documentationMaturity preview
1725
- */
1726
- ascending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
1727
- /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1728
- * @documentationMaturity preview
1729
- */
1730
- descending: (...propertyNames: Array<'sizeInBytes' | 'title' | '_createdDate' | '_updatedDate'>) => ItemsQueryBuilder;
1731
- /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1732
- * @documentationMaturity preview
1733
- */
1734
- limit: (limit: number) => ItemsQueryBuilder;
1735
- /** @param skip - Number of items to skip in the query results before returning the results.
1736
- * @documentationMaturity preview
1737
- */
1738
- skip: (skip: number) => ItemsQueryBuilder;
1739
- /** @documentationMaturity preview */
1740
- find: () => Promise<ItemsQueryResult>;
1741
- }
1742
- interface UpdateItem {
1743
- /**
1744
- * Id of the item in public media
1745
- * @readonly
1746
- */
1747
- _id?: string;
1748
- /**
1749
- * Media type of the item
1750
- * @readonly
1751
- */
1752
- mediaType?: MediaType$1;
1753
- /**
1754
- * Size of the uploaded file in bytes.
1755
- * @readonly
1756
- */
1757
- sizeInBytes?: string | null;
1758
- /** The item title, part of searchable fields */
1759
- title?: string | null;
1760
- /**
1761
- * The aspect ratio of the item
1762
- * An object containing urls for different views of the item
1763
- * @readonly
1764
- */
1765
- assets?: ItemAssets;
1766
- /** Tags describing the image, part of searchable fields */
1767
- displayTags?: string[] | null;
1768
- /** Tags for internal client use, part of searchable fields */
1769
- internalTags?: string[] | null;
1770
- /**
1771
- * Tags for filtering items in the search
1772
- * @readonly
1773
- */
1774
- systemTags?: string[] | null;
1775
- /**
1776
- * Category ids this item belongs to
1777
- * @readonly
1778
- */
1779
- parentCategoryIds?: string[] | null;
1780
- /** Status of the item */
1781
- publishStatus?: PublishStatus;
1782
- /**
1783
- * Date and time the item was created.
1784
- * @readonly
1785
- */
1786
- _createdDate?: Date | null;
1787
- /**
1788
- * Date and time the item was updated.
1789
- * @readonly
1790
- */
1791
- _updatedDate?: Date | null;
1792
- /**
1793
- * An internal id used with different wix media systems
1794
- * @readonly
1795
- */
1796
- internalId?: string | null;
1797
- }
1798
- interface BulkUpdateItemOptions {
1799
- /** Should the response return the updated item */
1800
- returnEntity?: boolean;
1801
- }
1802
- interface LinkItemToCategoriesOptions {
1803
- /** The category ids that the item will be linked to */
1804
- categoryIds?: string[];
1805
- }
1806
- interface UnlinkItemFromCategoriesOptions {
1807
- /** The category ids that the item will be unlinked from */
1808
- categoryIds?: string[];
1809
- }
1810
- interface OverwriteItemCategoriesOptions {
1811
- /** The category ids the item will be linked to after this operation */
1812
- categoryIds?: string[];
1813
- }
1814
-
1815
- declare function itemUploadCallback$1(httpClient: HttpClient): ItemUploadCallbackSignature;
1816
- interface ItemUploadCallbackSignature {
1817
- /**
1818
- * Internal API called by the public media backend, notify about a file that was created enterprise public media server
1819
- */
1820
- (options?: ItemUploadCallbackOptions | undefined): Promise<ItemUploadCallbackResponse>;
1821
- }
1822
- declare function generateFileUploadUrl$3(httpClient: HttpClient): GenerateFileUploadUrlSignature$1;
1823
- interface GenerateFileUploadUrlSignature$1 {
1824
- /**
1825
- * Generate an upload url that will make public media to call the enterprise callback endpoint
1826
- */
1827
- (options?: GenerateFileUploadUrlOptions$1 | undefined): Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
1828
- }
1829
- declare function importFile$3(httpClient: HttpClient): ImportFileSignature$1;
1830
- interface ImportFileSignature$1 {
1831
- /**
1832
- * Import a file using a url
1833
- * @param - The url to the file to be imported
1834
- */
1835
- (url: string, options?: ImportFileOptions$1 | undefined): Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
1836
- }
1837
- declare function bulkImportFiles$3(httpClient: HttpClient): BulkImportFilesSignature$1;
1838
- interface BulkImportFilesSignature$1 {
1839
- /** @param - Information about the files to import. */
1840
- (importFileRequests: ImportFileRequest$1[], options?: BulkImportFilesOptions | undefined): Promise<BulkImportFilesResponse$1 & BulkImportFilesResponseNonNullableFields$1>;
1841
- }
1842
- declare function searchItems$1(httpClient: HttpClient): SearchItemsSignature;
1843
- interface SearchItemsSignature {
1844
- /**
1845
- * Search items, all filters only support equality
1846
- * Each query must contain a categoryId filter
1847
- */
1848
- (options?: SearchItemsOptions | undefined): Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
1849
- }
1850
- declare function queryItems$1(httpClient: HttpClient): QueryItemsSignature;
1851
- interface QueryItemsSignature {
1852
- /**
1853
- * Query items allowing to sort by specified fields, all filters only support equality
1854
- * Each query must contain a categoryId filter
1855
- */
1856
- (): ItemsQueryBuilder;
1857
- }
1858
- declare function updateItem$1(httpClient: HttpClient): UpdateItemSignature;
1859
- interface UpdateItemSignature {
1860
- /**
1861
- * Update an item
1862
- * @param - Id of the item in public media
1863
- * @returns Updated item info
1864
- */
1865
- (_id: string, item: UpdateItem): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1866
- }
1867
- declare function bulkUpdateItem$1(httpClient: HttpClient): BulkUpdateItemSignature;
1868
- interface BulkUpdateItemSignature {
1869
- /**
1870
- * Bulk update an item
1871
- * @param - Requests to update individual item
1872
- */
1873
- (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions | undefined): Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
1874
- }
1875
- declare function getItem$1(httpClient: HttpClient): GetItemSignature;
1876
- interface GetItemSignature {
1877
- /**
1878
- * Get item details
1879
- * @param - Item id
1880
- * @returns item info
1881
- */
1882
- (itemId: string): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1883
- }
1884
- declare function linkItemToCategories$1(httpClient: HttpClient): LinkItemToCategoriesSignature;
1885
- interface LinkItemToCategoriesSignature {
1886
- /**
1887
- * Link the item to multiple categories
1888
- * @param - The item id
1889
- */
1890
- (itemId: string, options?: LinkItemToCategoriesOptions | undefined): Promise<LinkItemToCategoriesResponse>;
1891
- }
1892
- declare function unlinkItemFromCategories$1(httpClient: HttpClient): UnlinkItemFromCategoriesSignature;
1893
- interface UnlinkItemFromCategoriesSignature {
1894
- /**
1895
- * Unlink the item from multiple categories
1896
- * @param - The item id
1897
- */
1898
- (itemId: string, options?: UnlinkItemFromCategoriesOptions | undefined): Promise<UnlinkItemFromCategoriesResponse>;
1899
- }
1900
- declare function overwriteItemCategories$1(httpClient: HttpClient): OverwriteItemCategoriesSignature;
1901
- interface OverwriteItemCategoriesSignature {
1902
- /**
1903
- * Overwrite item categories
1904
- * @param - The item id
1905
- */
1906
- (itemId: string, options?: OverwriteItemCategoriesOptions | undefined): Promise<OverwriteItemCategoriesResponse>;
1907
- }
1908
- declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
1909
- declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
1910
- declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
1911
- declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
1912
-
1913
- declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1914
-
1915
- declare const itemUploadCallback: MaybeContext<BuildRESTFunction<typeof itemUploadCallback$1> & typeof itemUploadCallback$1>;
1916
- declare const generateFileUploadUrl$2: MaybeContext<BuildRESTFunction<typeof generateFileUploadUrl$3> & typeof generateFileUploadUrl$3>;
1917
- declare const importFile$2: MaybeContext<BuildRESTFunction<typeof importFile$3> & typeof importFile$3>;
1918
- declare const bulkImportFiles$2: MaybeContext<BuildRESTFunction<typeof bulkImportFiles$3> & typeof bulkImportFiles$3>;
1919
- declare const searchItems: MaybeContext<BuildRESTFunction<typeof searchItems$1> & typeof searchItems$1>;
1920
- declare const queryItems: MaybeContext<BuildRESTFunction<typeof queryItems$1> & typeof queryItems$1>;
1921
- declare const updateItem: MaybeContext<BuildRESTFunction<typeof updateItem$1> & typeof updateItem$1>;
1922
- declare const bulkUpdateItem: MaybeContext<BuildRESTFunction<typeof bulkUpdateItem$1> & typeof bulkUpdateItem$1>;
1923
- declare const getItem: MaybeContext<BuildRESTFunction<typeof getItem$1> & typeof getItem$1>;
1924
- declare const linkItemToCategories: MaybeContext<BuildRESTFunction<typeof linkItemToCategories$1> & typeof linkItemToCategories$1>;
1925
- declare const unlinkItemFromCategories: MaybeContext<BuildRESTFunction<typeof unlinkItemFromCategories$1> & typeof unlinkItemFromCategories$1>;
1926
- declare const overwriteItemCategories: MaybeContext<BuildRESTFunction<typeof overwriteItemCategories$1> & typeof overwriteItemCategories$1>;
1927
-
1928
- type _publicOnEnterpriseItemCreatedType = typeof onEnterpriseItemCreated$1;
1929
- /**
1930
- * Triggered when an item is created.
1931
- */
1932
- declare const onEnterpriseItemCreated: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemCreatedType>>;
1933
-
1934
- type _publicOnEnterpriseItemUpdatedType = typeof onEnterpriseItemUpdated$1;
1935
- /**
1936
- * Triggered when an item is updated, including when an item is archived or linked to a category
1937
- */
1938
- declare const onEnterpriseItemUpdated: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemUpdatedType>>;
1939
-
1940
- type _publicOnEnterpriseItemItemCategoriesChangedType = typeof onEnterpriseItemItemCategoriesChanged$1;
1941
- /**
1942
- * Triggered when an is linked to a category or unlinked from a category
1943
- */
1944
- declare const onEnterpriseItemItemCategoriesChanged: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemItemCategoriesChangedType>>;
1945
-
1946
- type _publicOnEnterpriseItemPublishStatusChangedType = typeof onEnterpriseItemPublishStatusChanged$1;
1947
- /**
1948
- * Triggered when an item is Published or Unpublished
1949
- */
1950
- declare const onEnterpriseItemPublishStatusChanged: ReturnType<typeof createEventModule$2<_publicOnEnterpriseItemPublishStatusChangedType>>;
1951
-
1952
- type index_d$2_BulkImportFilesOptions = BulkImportFilesOptions;
1953
- type index_d$2_BulkImportFilesResult = BulkImportFilesResult;
1954
- type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
1955
- type index_d$2_BulkUpdateItemOptions = BulkUpdateItemOptions;
1956
- type index_d$2_BulkUpdateItemRequest = BulkUpdateItemRequest;
1957
- type index_d$2_BulkUpdateItemResponse = BulkUpdateItemResponse;
1958
- type index_d$2_BulkUpdateItemResponseNonNullableFields = BulkUpdateItemResponseNonNullableFields;
1959
- type index_d$2_EnterpriseItemCreatedEnvelope = EnterpriseItemCreatedEnvelope;
1960
- type index_d$2_EnterpriseItemItemCategoriesChangedEnvelope = EnterpriseItemItemCategoriesChangedEnvelope;
1961
- type index_d$2_EnterpriseItemPublishStatusChangedEnvelope = EnterpriseItemPublishStatusChangedEnvelope;
1962
- type index_d$2_EnterpriseItemUpdatedEnvelope = EnterpriseItemUpdatedEnvelope;
1963
- type index_d$2_EnterpriseMediaItem = EnterpriseMediaItem;
1964
- type index_d$2_EnterpriseMediaItemNonNullableFields = EnterpriseMediaItemNonNullableFields;
1965
- type index_d$2_GetItemRequest = GetItemRequest;
1966
- type index_d$2_GetItemResponse = GetItemResponse;
1967
- type index_d$2_GetItemResponseNonNullableFields = GetItemResponseNonNullableFields;
1968
- type index_d$2_ItemAssets = ItemAssets;
1969
- type index_d$2_ItemAssetsAssetsOneOf = ItemAssetsAssetsOneOf;
1970
- type index_d$2_ItemCategoriesChanged = ItemCategoriesChanged;
1971
- type index_d$2_ItemUploadCallbackOptions = ItemUploadCallbackOptions;
1972
- type index_d$2_ItemUploadCallbackRequest = ItemUploadCallbackRequest;
1973
- type index_d$2_ItemUploadCallbackResponse = ItemUploadCallbackResponse;
1974
- type index_d$2_ItemsQueryBuilder = ItemsQueryBuilder;
1975
- type index_d$2_ItemsQueryResult = ItemsQueryResult;
1976
- type index_d$2_LinkItemToCategoriesOptions = LinkItemToCategoriesOptions;
1977
- type index_d$2_LinkItemToCategoriesRequest = LinkItemToCategoriesRequest;
1978
- type index_d$2_LinkItemToCategoriesResponse = LinkItemToCategoriesResponse;
1979
- type index_d$2_OverwriteItemCategoriesOptions = OverwriteItemCategoriesOptions;
1980
- type index_d$2_OverwriteItemCategoriesRequest = OverwriteItemCategoriesRequest;
1981
- type index_d$2_OverwriteItemCategoriesResponse = OverwriteItemCategoriesResponse;
1982
- type index_d$2_Paging = Paging;
1983
- type index_d$2_PublishStatus = PublishStatus;
1984
- declare const index_d$2_PublishStatus: typeof PublishStatus;
1985
- type index_d$2_PublishStatusChanged = PublishStatusChanged;
1986
- type index_d$2_QueryItemsRequest = QueryItemsRequest;
1987
- type index_d$2_QueryItemsResponse = QueryItemsResponse;
1988
- type index_d$2_QueryItemsResponseNonNullableFields = QueryItemsResponseNonNullableFields;
1989
- type index_d$2_QueryV2 = QueryV2;
1990
- type index_d$2_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf;
1991
- type index_d$2_Search = Search;
1992
- type index_d$2_SearchDetails = SearchDetails;
1993
- type index_d$2_SearchItemsOptions = SearchItemsOptions;
1994
- type index_d$2_SearchItemsRequest = SearchItemsRequest;
1995
- type index_d$2_SearchItemsResponse = SearchItemsResponse;
1996
- type index_d$2_SearchItemsResponseNonNullableFields = SearchItemsResponseNonNullableFields;
1997
- type index_d$2_SearchPagingMethodOneOf = SearchPagingMethodOneOf;
1998
- type index_d$2_UnlinkItemFromCategoriesOptions = UnlinkItemFromCategoriesOptions;
1999
- type index_d$2_UnlinkItemFromCategoriesRequest = UnlinkItemFromCategoriesRequest;
2000
- type index_d$2_UnlinkItemFromCategoriesResponse = UnlinkItemFromCategoriesResponse;
2001
- type index_d$2_UpdateItem = UpdateItem;
2002
- type index_d$2_UpdateItemRequest = UpdateItemRequest;
2003
- type index_d$2_UpdateItemResponse = UpdateItemResponse;
2004
- type index_d$2_UpdateItemResponseNonNullableFields = UpdateItemResponseNonNullableFields;
2005
- type index_d$2__publicOnEnterpriseItemCreatedType = _publicOnEnterpriseItemCreatedType;
2006
- type index_d$2__publicOnEnterpriseItemItemCategoriesChangedType = _publicOnEnterpriseItemItemCategoriesChangedType;
2007
- type index_d$2__publicOnEnterpriseItemPublishStatusChangedType = _publicOnEnterpriseItemPublishStatusChangedType;
2008
- type index_d$2__publicOnEnterpriseItemUpdatedType = _publicOnEnterpriseItemUpdatedType;
2009
- declare const index_d$2_bulkUpdateItem: typeof bulkUpdateItem;
2010
- declare const index_d$2_getItem: typeof getItem;
2011
- declare const index_d$2_itemUploadCallback: typeof itemUploadCallback;
2012
- declare const index_d$2_linkItemToCategories: typeof linkItemToCategories;
2013
- declare const index_d$2_onEnterpriseItemCreated: typeof onEnterpriseItemCreated;
2014
- declare const index_d$2_onEnterpriseItemItemCategoriesChanged: typeof onEnterpriseItemItemCategoriesChanged;
2015
- declare const index_d$2_onEnterpriseItemPublishStatusChanged: typeof onEnterpriseItemPublishStatusChanged;
2016
- declare const index_d$2_onEnterpriseItemUpdated: typeof onEnterpriseItemUpdated;
2017
- declare const index_d$2_overwriteItemCategories: typeof overwriteItemCategories;
2018
- declare const index_d$2_queryItems: typeof queryItems;
2019
- declare const index_d$2_searchItems: typeof searchItems;
2020
- declare const index_d$2_unlinkItemFromCategories: typeof unlinkItemFromCategories;
2021
- declare const index_d$2_updateItem: typeof updateItem;
2022
- declare namespace index_d$2 {
2023
- export { type ActionEvent$2 as ActionEvent, type ApplicationError$1 as ApplicationError, type Archive$1 as Archive, type BaseEventMetadata$2 as BaseEventMetadata, type BulkActionMetadata$1 as BulkActionMetadata, type index_d$2_BulkImportFilesOptions as BulkImportFilesOptions, type BulkImportFilesRequest$1 as BulkImportFilesRequest, type BulkImportFilesResponse$1 as BulkImportFilesResponse, type BulkImportFilesResponseNonNullableFields$1 as BulkImportFilesResponseNonNullableFields, type index_d$2_BulkImportFilesResult as BulkImportFilesResult, type index_d$2_BulkItemUpdateResult as BulkItemUpdateResult, type index_d$2_BulkUpdateItemOptions as BulkUpdateItemOptions, type index_d$2_BulkUpdateItemRequest as BulkUpdateItemRequest, type index_d$2_BulkUpdateItemResponse as BulkUpdateItemResponse, type index_d$2_BulkUpdateItemResponseNonNullableFields as BulkUpdateItemResponseNonNullableFields, type Cursors$2 as Cursors, type DomainEvent$2 as DomainEvent, type DomainEventBodyOneOf$2 as DomainEventBodyOneOf, type index_d$2_EnterpriseItemCreatedEnvelope as EnterpriseItemCreatedEnvelope, type index_d$2_EnterpriseItemItemCategoriesChangedEnvelope as EnterpriseItemItemCategoriesChangedEnvelope, type index_d$2_EnterpriseItemPublishStatusChangedEnvelope as EnterpriseItemPublishStatusChangedEnvelope, type index_d$2_EnterpriseItemUpdatedEnvelope as EnterpriseItemUpdatedEnvelope, type index_d$2_EnterpriseMediaItem as EnterpriseMediaItem, type index_d$2_EnterpriseMediaItemNonNullableFields as EnterpriseMediaItemNonNullableFields, type EntityCreatedEvent$2 as EntityCreatedEvent, type EntityDeletedEvent$2 as EntityDeletedEvent, type EntityUpdatedEvent$2 as EntityUpdatedEvent, type EventMetadata$2 as EventMetadata, type GenerateFileUploadUrlOptions$1 as GenerateFileUploadUrlOptions, type GenerateFileUploadUrlRequest$1 as GenerateFileUploadUrlRequest, type GenerateFileUploadUrlResponse$1 as GenerateFileUploadUrlResponse, type GenerateFileUploadUrlResponseNonNullableFields$1 as GenerateFileUploadUrlResponseNonNullableFields, type index_d$2_GetItemRequest as GetItemRequest, type index_d$2_GetItemResponse as GetItemResponse, type index_d$2_GetItemResponseNonNullableFields as GetItemResponseNonNullableFields, type IdentificationData$2 as IdentificationData, type IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, type ImportFileOptions$1 as ImportFileOptions, type ImportFileRequest$1 as ImportFileRequest, type ImportFileResponse$1 as ImportFileResponse, type ImportFileResponseNonNullableFields$1 as ImportFileResponseNonNullableFields, type index_d$2_ItemAssets as ItemAssets, type index_d$2_ItemAssetsAssetsOneOf as ItemAssetsAssetsOneOf, type index_d$2_ItemCategoriesChanged as ItemCategoriesChanged, type ItemMetadata$1 as ItemMetadata, type index_d$2_ItemUploadCallbackOptions as ItemUploadCallbackOptions, type index_d$2_ItemUploadCallbackRequest as ItemUploadCallbackRequest, type index_d$2_ItemUploadCallbackResponse as ItemUploadCallbackResponse, type index_d$2_ItemsQueryBuilder as ItemsQueryBuilder, type index_d$2_ItemsQueryResult as ItemsQueryResult, type index_d$2_LinkItemToCategoriesOptions as LinkItemToCategoriesOptions, type index_d$2_LinkItemToCategoriesRequest as LinkItemToCategoriesRequest, type index_d$2_LinkItemToCategoriesResponse as LinkItemToCategoriesResponse, MediaType$1 as MediaType, type MessageEnvelope$2 as MessageEnvelope, type Model3D$1 as Model3D, type index_d$2_OverwriteItemCategoriesOptions as OverwriteItemCategoriesOptions, type index_d$2_OverwriteItemCategoriesRequest as OverwriteItemCategoriesRequest, type index_d$2_OverwriteItemCategoriesResponse as OverwriteItemCategoriesResponse, type index_d$2_Paging as Paging, type PagingMetadataV2$2 as PagingMetadataV2, index_d$2_PublishStatus as PublishStatus, type index_d$2_PublishStatusChanged as PublishStatusChanged, type index_d$2_QueryItemsRequest as QueryItemsRequest, type index_d$2_QueryItemsResponse as QueryItemsResponse, type index_d$2_QueryItemsResponseNonNullableFields as QueryItemsResponseNonNullableFields, type index_d$2_QueryV2 as QueryV2, type index_d$2_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, type RestoreInfo$2 as RestoreInfo, type index_d$2_Search as Search, type index_d$2_SearchDetails as SearchDetails, type index_d$2_SearchItemsOptions as SearchItemsOptions, type index_d$2_SearchItemsRequest as SearchItemsRequest, type index_d$2_SearchItemsResponse as SearchItemsResponse, type index_d$2_SearchItemsResponseNonNullableFields as SearchItemsResponseNonNullableFields, type index_d$2_SearchPagingMethodOneOf as SearchPagingMethodOneOf, SortOrder$2 as SortOrder, type Sorting$2 as Sorting, type index_d$2_UnlinkItemFromCategoriesOptions as UnlinkItemFromCategoriesOptions, type index_d$2_UnlinkItemFromCategoriesRequest as UnlinkItemFromCategoriesRequest, type index_d$2_UnlinkItemFromCategoriesResponse as UnlinkItemFromCategoriesResponse, type index_d$2_UpdateItem as UpdateItem, type index_d$2_UpdateItemRequest as UpdateItemRequest, type index_d$2_UpdateItemResponse as UpdateItemResponse, type index_d$2_UpdateItemResponseNonNullableFields as UpdateItemResponseNonNullableFields, type VideoResolution$1 as VideoResolution, WebhookIdentityType$2 as WebhookIdentityType, type index_d$2__publicOnEnterpriseItemCreatedType as _publicOnEnterpriseItemCreatedType, type index_d$2__publicOnEnterpriseItemItemCategoriesChangedType as _publicOnEnterpriseItemItemCategoriesChangedType, type index_d$2__publicOnEnterpriseItemPublishStatusChangedType as _publicOnEnterpriseItemPublishStatusChangedType, type index_d$2__publicOnEnterpriseItemUpdatedType as _publicOnEnterpriseItemUpdatedType, bulkImportFiles$2 as bulkImportFiles, index_d$2_bulkUpdateItem as bulkUpdateItem, generateFileUploadUrl$2 as generateFileUploadUrl, index_d$2_getItem as getItem, importFile$2 as importFile, index_d$2_itemUploadCallback as itemUploadCallback, index_d$2_linkItemToCategories as linkItemToCategories, index_d$2_onEnterpriseItemCreated as onEnterpriseItemCreated, index_d$2_onEnterpriseItemItemCategoriesChanged as onEnterpriseItemItemCategoriesChanged, index_d$2_onEnterpriseItemPublishStatusChanged as onEnterpriseItemPublishStatusChanged, index_d$2_onEnterpriseItemUpdated as onEnterpriseItemUpdated, index_d$2_overwriteItemCategories as overwriteItemCategories, onEnterpriseItemCreated$1 as publicOnEnterpriseItemCreated, onEnterpriseItemItemCategoriesChanged$1 as publicOnEnterpriseItemItemCategoriesChanged, onEnterpriseItemPublishStatusChanged$1 as publicOnEnterpriseItemPublishStatusChanged, onEnterpriseItemUpdated$1 as publicOnEnterpriseItemUpdated, index_d$2_queryItems as queryItems, index_d$2_searchItems as searchItems, index_d$2_unlinkItemFromCategories as unlinkItemFromCategories, index_d$2_updateItem as updateItem };
2024
- }
2025
-
2026
- interface FileDescriptor {
2027
- /**
2028
- * File ID. Generated when a file is uploaded to the Media Manager.
2029
- * @readonly
2030
- */
2031
- _id?: string;
2032
- /** File name as it appears in the Media Manager. */
2033
- displayName?: string;
2034
- /**
2035
- * Static URL of the file.
2036
- * @readonly
2037
- */
2038
- url?: string;
2039
- /** ID of the file's parent folder. */
2040
- parentFolderId?: string | null;
2041
- /**
2042
- * File hash.
2043
- * @readonly
2044
- */
2045
- hash?: string;
2046
- /**
2047
- * Size of the uploaded file in bytes.
2048
- * @readonly
2049
- */
2050
- sizeInBytes?: string | null;
2051
- /**
2052
- * Whether the file is public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)).
2053
- * @readonly
2054
- */
2055
- private?: boolean;
2056
- /**
2057
- * Media file type.
2058
- * @readonly
2059
- */
2060
- mediaType?: MediaType;
2061
- /**
2062
- * Media file content.
2063
- * @readonly
2064
- */
2065
- media?: FileMedia;
2066
- /**
2067
- * Status of the file that was uploaded.
2068
- * * `FAILED`: The file failed to upload, for example, during media post processing.
2069
- * * `READY`: The file uploaded, finished all processing, and is ready for use.
2070
- * * `PENDING`: The file is processing and the URLs are not yet available. This response is returned when importing a file.
2071
- * @readonly
2072
- */
2073
- operationStatus?: OperationStatus;
2074
- /**
2075
- * URL where the file was uploaded from.
2076
- * @readonly
2077
- */
2078
- sourceUrl?: string | null;
2079
- /**
2080
- * URL of the file's thumbnail.
2081
- * @readonly
2082
- */
2083
- thumbnailUrl?: string | null;
2084
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2085
- labels?: string[];
2086
- /**
2087
- * Date and time the file was created.
2088
- * @readonly
2089
- */
2090
- _createdDate?: Date | null;
2091
- /**
2092
- * Date and time the file was updated.
2093
- * @readonly
2094
- */
2095
- _updatedDate?: Date | null;
2096
- /**
2097
- * The Wix site ID where the media file is stored.
2098
- * @readonly
2099
- */
2100
- siteId?: string;
2101
- /**
2102
- * State of the file.
2103
- * @readonly
2104
- */
2105
- state?: State$1;
2106
- }
2107
- declare enum MediaType {
2108
- UNKNOWN = "UNKNOWN",
2109
- IMAGE = "IMAGE",
2110
- VIDEO = "VIDEO",
2111
- AUDIO = "AUDIO",
2112
- DOCUMENT = "DOCUMENT",
2113
- VECTOR = "VECTOR",
2114
- ARCHIVE = "ARCHIVE",
2115
- MODEL3D = "MODEL3D",
2116
- OTHER = "OTHER"
2117
- }
2118
- interface FileMedia extends FileMediaMediaOneOf {
2119
- /** Information about the image. */
2120
- image?: ImageMedia;
2121
- /** Information about the video. */
2122
- video?: string;
2123
- /** Information about the audio. */
2124
- audio?: AudioV2;
2125
- /** Information about the document. */
2126
- document?: string;
2127
- /** Information about the vector. */
2128
- vector?: ImageMedia;
2129
- /** Information about the archive. */
2130
- archive?: Archive;
2131
- /** Information about the 3D Model. */
2132
- model3d?: Model3D;
2133
- }
2134
- /** @oneof */
2135
- interface FileMediaMediaOneOf {
2136
- /** Information about the image. */
2137
- image?: ImageMedia;
2138
- /** Information about the video. */
2139
- video?: string;
2140
- /** Information about the audio. */
2141
- audio?: AudioV2;
2142
- /** Information about the document. */
2143
- document?: string;
2144
- /** Information about the vector. */
2145
- vector?: ImageMedia;
2146
- /** Information about the archive. */
2147
- archive?: Archive;
2148
- /** Information about the 3D Model. */
2149
- model3d?: Model3D;
2150
- }
2151
- interface ImageMedia {
2152
- /** Image data. */
2153
- image?: string;
2154
- /** Image colors. */
2155
- colors?: Colors;
2156
- /** Information about faces in the image. Use to crop images without cutting out faces. */
2157
- faces?: FaceRecognition[];
2158
- /**
2159
- * Information about the image preview.
2160
- * You can use this to display a preview for private images.
2161
- */
2162
- previewImage?: string;
2163
- /**
2164
- * Optional, An AI generated description of the image
2165
- * @readonly
2166
- */
2167
- caption?: string | null;
2168
- }
2169
- interface FocalPoint {
2170
- /** X-coordinate of the focal point. */
2171
- x?: number;
2172
- /** Y-coordinate of the focal point. */
2173
- y?: number;
2174
- /** crop by height */
2175
- height?: number | null;
2176
- /** crop by width */
2177
- width?: number | null;
2178
- }
2179
- interface Colors {
2180
- /** Main color of the image. */
2181
- prominent?: Color;
2182
- /** Color palette of the image. */
2183
- palette?: Color[];
2184
- }
2185
- interface Color {
2186
- /** HEX color. */
2187
- hex?: string | null;
2188
- /** RGB color. */
2189
- rgb?: ColorRGB;
2190
- }
2191
- interface ColorRGB {
2192
- /** Red channel. */
2193
- r?: number | null;
2194
- /** Green channel. */
2195
- g?: number | null;
2196
- /** Blue channel. */
2197
- b?: number | null;
2198
- }
2199
- /**
2200
- * Using this object you can crop images while centering on faces
2201
- * ------------------------
2202
- * | |
2203
- * | x,y |
2204
- * | *-------- |
2205
- * | | . . | |
2206
- * | | | | height |
2207
- * | | \ / | |
2208
- * | | | |
2209
- * | --------- |
2210
- * | width |
2211
- * | |
2212
- * |______________________|
2213
- */
2214
- interface FaceRecognition {
2215
- /** The accuracy percentage of the face recognition. The likelihood that a face is detected. */
2216
- confidence?: number;
2217
- /** Top left x pixel coordinate of the face. */
2218
- x?: number;
2219
- /** Top left y pixel coordinate of the face. */
2220
- y?: number;
2221
- /** Face pixel height. */
2222
- height?: number;
2223
- /** Face pixel width. */
2224
- width?: number;
2225
- }
2226
- interface VideoResolution {
2227
- /** Video URL. */
2228
- url?: string;
2229
- /** Video height. */
2230
- height?: number;
2231
- /** Video width. */
2232
- width?: number;
2233
- /**
2234
- * Video format
2235
- * Possible values: ['144p.mp4' '144p.webm' '240p.mp4' '240p.webm' '360p.mp4' '360p.webm' '480p.mp4' '480p.webm'
2236
- * '720p.mp4' '720p.webm' '1080p.mp4' '1080p.webm', 'hls' ]
2237
- */
2238
- format?: string;
2239
- }
2240
- interface AudioV2 {
2241
- /** WixMedia ID. */
2242
- _id?: string;
2243
- /** Audio formats available for this file. */
2244
- assets?: string[];
2245
- /**
2246
- * Audio bitrate.
2247
- * @readonly
2248
- */
2249
- bitrate?: number | null;
2250
- /**
2251
- * Audio format.
2252
- * @readonly
2253
- */
2254
- format?: string | null;
2255
- /**
2256
- * Audio duration in seconds.
2257
- * @readonly
2258
- */
2259
- duration?: number | null;
2260
- /**
2261
- * Audio size in bytes.
2262
- * @readonly
2263
- */
2264
- sizeInBytes?: string | null;
2265
- }
2266
- interface Archive {
2267
- /** WixMedia ID. */
2268
- _id?: string;
2269
- /** Archive URL. */
2270
- url?: string;
2271
- /**
2272
- * Archive URL expiration date (when relevant).
2273
- * @readonly
2274
- */
2275
- urlExpirationDate?: Date | null;
2276
- /** Archive size in bytes. */
2277
- sizeInBytes?: string | null;
2278
- /** Archive filename. */
2279
- filename?: string | null;
2280
- }
2281
- interface Model3D {
2282
- /** WixMedia 3D ID. */
2283
- _id?: string;
2284
- /** 3D URL. */
2285
- url?: string;
2286
- /** 3D thumbnail Image */
2287
- thumbnail?: string;
2288
- /** 3D alt text. */
2289
- altText?: string | null;
2290
- /**
2291
- * 3D URL expiration date (when relevant).
2292
- * @readonly
2293
- */
2294
- urlExpirationDate?: Date | null;
2295
- /**
2296
- * 3D filename.
2297
- * @readonly
2298
- */
2299
- filename?: string | null;
2300
- /**
2301
- * 3D size in bytes.
2302
- * @readonly
2303
- */
2304
- sizeInBytes?: string | null;
2305
- }
2306
- interface OtherMedia {
2307
- /** WixMedia ID. for use with Site Media APIs only */
2308
- _id?: string;
2309
- /**
2310
- * The media type of the file: 'package', 'raw'
2311
- * @readonly
2312
- */
2313
- internalMediaType?: string | null;
2314
- /**
2315
- * size in bytes. Optional.
2316
- * @readonly
2317
- */
2318
- sizeInBytes?: string | null;
2319
- /** The file URL. */
2320
- url?: string;
2321
- }
2322
- interface FontMedia {
2323
- /** WixMedia ID. for use with Site Media APIs only */
2324
- _id?: string | null;
2325
- /**
2326
- * size in bytes. Optional.
2327
- * @readonly
2328
- */
2329
- sizeInBytes?: string | null;
2330
- /** The format of the font asset. ttf, woff, woff2 */
2331
- format?: string | null;
2332
- /** The font family name. */
2333
- family?: string | null;
2334
- /** The font name */
2335
- fontName?: string | null;
2336
- /** Font formats available for this file. */
2337
- assets?: FontAsset[];
2338
- }
2339
- interface FontAsset {
2340
- /**
2341
- * Keys for downloading different assets of a file.
2342
- * Default: `src`, key representing the original file's format and quality.
2343
- */
2344
- assetKey?: string | null;
2345
- /** The URL of the font asset. */
2346
- url?: string | null;
2347
- /** The format of the font asset. ttf, woff, woff2 */
2348
- format?: string | null;
2349
- }
2350
- declare enum OperationStatus {
2351
- /** File upload or processing failed */
2352
- FAILED = "FAILED",
2353
- /** File is ready for consumption */
2354
- READY = "READY",
2355
- /** File is waiting for processing or currently being processed */
2356
- PENDING = "PENDING"
2357
- }
2358
- declare enum State$1 {
2359
- /** File is ready for consumption */
2360
- OK = "OK",
2361
- /** Deleted file */
2362
- DELETED = "DELETED"
2363
- }
2364
- declare enum Namespace$1 {
2365
- NO_NAMESPACE = "NO_NAMESPACE",
2366
- OTHERS = "OTHERS",
2367
- /** ANY = 2; */
2368
- WIX_VIDEO = "WIX_VIDEO",
2369
- /** _nsWixMusic */
2370
- WIX_MUSIC = "WIX_MUSIC",
2371
- /** _nsArtStore */
2372
- ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE",
2373
- /** _nsDigitalProduct */
2374
- WIX_ECOM = "WIX_ECOM",
2375
- /** _nsPhotoShareApp */
2376
- PHOTO_SHARE_APP = "PHOTO_SHARE_APP",
2377
- /** _nsSharingApp, */
2378
- SHARING_APP = "SHARING_APP",
2379
- /** engage */
2380
- CHAT = "CHAT",
2381
- /** logobuilder */
2382
- LOGO_BUILDER = "LOGO_BUILDER",
2383
- /** WixExposure */
2384
- ALBUMS_OLD = "ALBUMS_OLD",
2385
- /** chat-mobile-uploads */
2386
- CHAT_MOBILE = "CHAT_MOBILE",
2387
- /** _nsWixForms */
2388
- WIX_FORMS = "WIX_FORMS"
2389
- }
2390
- interface IdentityInfo {
2391
- /** The type of the user that uploaded the file */
2392
- identityType?: IdentityType;
2393
- /** User Id. empty when UNKNOWN */
2394
- identityId?: string | null;
2395
- }
2396
- declare enum IdentityType {
2397
- UNKNOWN = "UNKNOWN",
2398
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
2399
- MEMBER = "MEMBER",
2400
- WIX_USER = "WIX_USER",
2401
- APP = "APP"
2402
- }
2403
- interface FileReady {
2404
- /** File entity that is ready with full information. */
2405
- file?: FileDescriptor;
2406
- /** External information specified in the file import or upload. */
2407
- externalInfo?: ExternalInfo;
2408
- /** File was restored from the trash-bin. */
2409
- triggeredByUndelete?: boolean;
2410
- }
2411
- interface ExternalInfo {
2412
- /** External information to specify in the File Ready or File Failed events. */
2413
- origin?: string;
2414
- /** External IDs to specify in the File Ready or File Failed events. */
2415
- externalIds?: string[];
2416
- }
2417
- interface FileFailed {
2418
- /** External information specified in the file import or upload. */
2419
- externalInfo?: ExternalInfo;
2420
- /** Error information. */
2421
- error?: ApplicationError;
2422
- }
2423
- interface ApplicationError {
2424
- /** Error code. */
2425
- code?: string;
2426
- /** Description of the error. */
2427
- description?: string;
2428
- /** Data related to the error. */
2429
- data?: Record<string, any> | null;
2430
- }
2431
- interface DraftFilePublished {
2432
- /** The file after it was published */
2433
- file?: FileDescriptor;
2434
- /** The namespace the file was published to */
2435
- namespace?: Namespace$1;
2436
- }
2437
- interface BulkAnnotateImagesRequest {
2438
- /** The file ids to run detection on */
2439
- fileIds?: string[];
2440
- /** A list of detections types to fill for the image */
2441
- annotationTypes?: ImageAnnotationType[];
2442
- /** When true the endpoint will detect listed information even if the image has this information */
2443
- overwrite?: boolean | null;
2444
- /** Should the response return the item following the operation */
2445
- returnEntity?: boolean;
2446
- }
2447
- declare enum ImageAnnotationType {
2448
- UNKNOWN_IMAGE_ANNOTATION_TYPE = "UNKNOWN_IMAGE_ANNOTATION_TYPE",
2449
- CONTAINS_TEXT = "CONTAINS_TEXT",
2450
- IS_ANIMATED = "IS_ANIMATED",
2451
- FACES = "FACES",
2452
- LABELS = "LABELS",
2453
- COLORS = "COLORS",
2454
- CAPTION = "CAPTION"
2455
- }
2456
- interface BulkAnnotateImagesResponse {
2457
- /** Results of individual items */
2458
- results?: BulkAnnotateImageResult[];
2459
- /** Metadata of the operation */
2460
- bulkActionMetadata?: BulkActionMetadata;
2461
- }
2462
- interface BulkAnnotateImageResult {
2463
- /** Item metadata */
2464
- itemMetadata?: ItemMetadata;
2465
- /**
2466
- * The item following the operation
2467
- * Only returned if operation was successful and if returnEntity flag was on
2468
- */
2469
- item?: FileDescriptor;
2470
- }
2471
- interface ItemMetadata {
2472
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
2473
- _id?: string | null;
2474
- /** Index of the item within the request array. Allows for correlation between request and response items. */
2475
- originalIndex?: number;
2476
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
2477
- success?: boolean;
2478
- /** Details about the error in case of failure. */
2479
- error?: ApplicationError;
2480
- }
2481
- interface BulkActionMetadata {
2482
- /** Number of items that were successfully processed. */
2483
- totalSuccesses?: number;
2484
- /** Number of items that couldn't be processed. */
2485
- totalFailures?: number;
2486
- /** Number of failures without details because detailed failure threshold was exceeded. */
2487
- undetailedFailures?: number;
2488
- }
2489
- interface GenerateFilesDownloadUrlRequest {
2490
- /**
2491
- * IDs of the files to download.
2492
- *
2493
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2494
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2495
- */
2496
- fileIds: string[];
2497
- }
2498
- interface GenerateFilesDownloadUrlResponse {
2499
- /** URL for downloading the compressed file containing the specified files in the Media Manager. */
2500
- downloadUrl?: string;
2501
- }
2502
- interface GenerateFileDownloadUrlRequest {
2503
- /**
2504
- * File ID.
2505
- *
2506
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
2507
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2508
- */
2509
- fileId: string;
2510
- /**
2511
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
2512
- *
2513
- * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
2514
- */
2515
- downloadFileName?: string | null;
2516
- /**
2517
- * The time that it takes in minutes for the download URL to expire. <br />
2518
- * Default: `600`. <br />
2519
- * Limit: `525600` (1 year).
2520
- */
2521
- expirationInMinutes?: number | null;
2522
- /**
2523
- * The redirect URL for when the temporary download URL with a token expires. <br />
2524
- * Default: A 403 Forbidden response page.
2525
- */
2526
- expirationRedirectUrl?: string | null;
2527
- /**
2528
- * Keys for downloading different assets (format and quality) of a file.
2529
- * Default: `src`, key representing the original file's format and quality.
2530
- */
2531
- assetKeys?: string[] | null;
2532
- /**
2533
- * Whether the link downloads the file or opens the file in the browser.
2534
- *
2535
- * - `ATTACHMENT`: The link downloads the file.
2536
- * - `INLINE`: The link opens the file in the browser.
2537
- *
2538
- * Default: `ATTACHMENT`
2539
- */
2540
- contentDisposition?: ContentDisposition;
2541
- }
2542
- declare enum ContentDisposition {
2543
- /** Using the link in the browser will download the file */
2544
- ATTACHMENT = "ATTACHMENT",
2545
- /** Using the link in the browser will open the file in the browser */
2546
- INLINE = "INLINE"
2547
- }
2548
- interface GenerateFileDownloadUrlResponse {
2549
- /** URL for downloading a specific file in the Media Manager. */
2550
- downloadUrls?: DownloadUrl[];
2551
- }
2552
- interface DownloadUrl {
2553
- /** The file download URL. */
2554
- url?: string;
2555
- /**
2556
- * Key for downloading a different asset (format and quality) of a file.
2557
- * Default: `src`, key representing the original file's format and quality.
2558
- */
2559
- assetKey?: string;
2560
- }
2561
- interface ServiceError {
2562
- /**
2563
- * Error codes are groups of related errors
2564
- * The error code can be used to provide additional details to wix support while debugging service errors
2565
- */
2566
- internalCode?: string | null;
2567
- /** Debugging information, http status code returned from wix media internal API */
2568
- internalHttpStatusCode?: number | null;
2569
- /** Optional Debugging information, error key will represent the error "family" returned from wix media internal API */
2570
- internalKey?: string | null;
2571
- }
2572
- interface GetFileDescriptorRequest {
2573
- /**
2574
- * File ID.
2575
- *
2576
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
2577
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2578
- *
2579
- * If you are working in REST, note that you must encode the Wix media URL to specify it as a query param because it contains special characters. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032` becomes `wix%3Aimage%3A%2F%2Fv1%2F0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg%2Fleon.jpg%23originWidth%3D3024%26originHeight%3D4032`.
2580
- */
2581
- fileId: string;
2582
- }
2583
- interface GetFileDescriptorResponse {
2584
- /** Information about the file. */
2585
- file?: FileDescriptor;
2586
- }
2587
- interface GetFileDescriptorsRequest {
2588
- /**
2589
- * File IDs.
2590
- *
2591
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2592
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2593
- */
2594
- fileIds: string[];
2595
- }
2596
- interface GetFileDescriptorsResponse {
2597
- /** Information about the requested files. */
2598
- files?: FileDescriptor[];
2599
- }
2600
- interface UpdateFileDescriptorRequest {
2601
- /** The file to update. */
2602
- file: FileDescriptor;
2603
- }
2604
- interface UpdateFileDescriptorResponse {
2605
- /** Information about the updated file. */
2606
- file?: FileDescriptor;
2607
- }
2608
- interface UnsupportedRequestValueError$1 {
2609
- /** Optional A list of allowed values */
2610
- allowedValues?: string[];
2611
- /** The unsupported value send in the request */
2612
- requestValue?: string;
2613
- }
2614
- interface GenerateFileUploadUrlRequest {
2615
- /** File mime type. */
2616
- mimeType: string | null;
2617
- /**
2618
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
2619
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
2620
- */
2621
- fileName?: string | null;
2622
- /**
2623
- * File size in bytes.
2624
- * @readonly
2625
- */
2626
- sizeInBytes?: string | null;
2627
- /**
2628
- * ID of the file's parent folder. <br />
2629
- * This folder is the path root for the `filePath`.<br />
2630
- * Default: `media-root`.
2631
- */
2632
- parentFolderId?: string | null;
2633
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2634
- private?: boolean | null;
2635
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2636
- labels?: string[] | null;
2637
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
2638
- externalInfo?: ExternalInfo;
2639
- /**
2640
- * Path to the folder where the file will be stored.
2641
- * For example, `/videos/2024/december`. <br/>
2642
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
2643
- * The folders in the path will be created if they don't already exist. <br />
2644
- */
2645
- filePath?: string | null;
2646
- }
2647
- interface ImageAnnotationConfigurations {
2648
- /** Whether to skip detection for the image */
2649
- skipDetection?: boolean | null;
2650
- /**
2651
- * A list of detections types to fill for the image
2652
- * If specified at least one valid annotation type should be provided
2653
- * Default will be all detections
2654
- */
2655
- annotationTypes?: ImageAnnotationType[];
2656
- }
2657
- interface GenerateFileUploadUrlResponse {
2658
- /** The URL for uploading a file to the Media Manager. */
2659
- uploadUrl?: string;
2660
- }
2661
- interface SiteQuotaExceededError {
2662
- /**
2663
- * Error codes are groups of related errors
2664
- * The error code can be used to provide additional details to wix support while debugging service errors
2665
- */
2666
- internalCode?: string | null;
2667
- /** Debugging information, http status code returned from wix media internal API */
2668
- internalHttpStatusCode?: number | null;
2669
- /** Optional Debugging information, error key will represent the error "family" returned from wix media internal API */
2670
- internalKey?: string | null;
2671
- /** The quota details */
2672
- quota?: TotalQuota;
2673
- }
2674
- interface TotalQuota {
2675
- /** Storage quota in bytes */
2676
- storage?: string | null;
2677
- /** Plans that are related to the quota */
2678
- plans?: Plans;
2679
- /** Time for which the quota is relevant - When the plans were retrieved from premium */
2680
- timestamp?: Date | null;
2681
- }
2682
- interface Plans {
2683
- /** Premium Plan */
2684
- premium?: Plan;
2685
- /** Upgrade URL - the URL which a site owner can use to upgrade their quota. May be empty if an upgrade is not available. */
2686
- upgradeUrl?: string;
2687
- }
2688
- interface Plan {
2689
- /**
2690
- * Plan ID - Premium product ID
2691
- * @readonly
2692
- */
2693
- _id?: string;
2694
- /** Plan name */
2695
- name?: string;
2696
- /** When the plan was created */
2697
- createdAt?: Date | null;
2698
- /** When then plan expires */
2699
- expiresAt?: Date | null;
2700
- }
2701
- interface GenerateFileResumableUploadUrlRequest {
2702
- /** File mime type. */
2703
- mimeType: string | null;
2704
- /**
2705
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
2706
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
2707
- */
2708
- fileName?: string | null;
2709
- /**
2710
- * File size in bytes.
2711
- * @readonly
2712
- */
2713
- sizeInBytes?: string | null;
2714
- /**
2715
- * ID of the file's parent folder. <br />
2716
- * This folder is the path root for the `filePath`.<br />
2717
- * Default: `media-root`.
2718
- */
2719
- parentFolderId?: string | null;
2720
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2721
- private?: boolean | null;
2722
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2723
- labels?: string[] | null;
2724
- /** The upload protocol to use for implementing the resumable upload. */
2725
- uploadProtocol?: UploadProtocol;
2726
- /**
2727
- * Path to the folder where the file will be stored.
2728
- * For example, `/videos/2024/december`. <br/>
2729
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
2730
- * The folders in the path will be created if they don't already exist. <br />
2731
- */
2732
- filePath?: string | null;
2733
- }
2734
- declare enum UploadProtocol {
2735
- /** The upload protocol to use for implementing the resumable upload. */
2736
- TUS = "TUS"
2737
- }
2738
- interface GenerateFileResumableUploadUrlResponse {
2739
- /** The upload protocol to use for implementing the resumable upload. */
2740
- uploadProtocol?: UploadProtocol;
2741
- /** The URL for uploading a file to the Media Manager. */
2742
- uploadUrl?: string;
2743
- /** Single-use upload token. */
2744
- uploadToken?: string;
2745
- }
2746
- interface ImportFileRequest {
2747
- /** Publicly accessible external file URL. */
2748
- url: string;
2749
- /**
2750
- * Media type of the file to import.
2751
- * excluding: OTHER media type
2752
- */
2753
- mediaType?: MediaType;
2754
- /** File name that appears in the Media Manager. */
2755
- displayName?: string | null;
2756
- /**
2757
- * ID of the file's parent folder. <br />
2758
- * This folder is the path root for the `filePath`. <br />
2759
- * Default: `media-root`.
2760
- */
2761
- parentFolderId?: string | null;
2762
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2763
- private?: boolean | null;
2764
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2765
- labels?: string[] | null;
2766
- /** File mime type. */
2767
- mimeType?: string;
2768
- /** Information sent to the File Ready and File Failed events. See Importing Files ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_using-externalinfo) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#using-externalinfo)) to learn more. */
2769
- externalInfo?: ExternalInfo;
2770
- /** Optional parameters that should be sent with the external URL. */
2771
- urlParams?: Record<string, any> | null;
2772
- /** Optional headers that should be sent with the external URL. */
2773
- urlHeaders?: Record<string, any> | null;
2774
- /**
2775
- * Path to the folder where the file will be stored.
2776
- * For example, `/videos/2024/december`. <br/>
2777
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
2778
- * The folders in the path will be created if they don't already exist. <br />
2779
- */
2780
- filePath?: string | null;
2781
- }
2782
- interface ImportFileResponse {
2783
- /** Information about the imported file. */
2784
- file?: FileDescriptor;
2785
- }
2786
- interface BulkImportFilesRequest {
2787
- /** Information about the files to import. */
2788
- importFileRequests: ImportFileRequest[];
2789
- }
2790
- interface BulkImportFilesResponse {
2791
- /** Information about the imported files. */
2792
- files?: FileDescriptor[];
2793
- }
2794
- interface BulkImportFileRequest {
2795
- /** Information about the files to import. */
2796
- importFileRequests: ImportFileRequest[];
2797
- /** Default: `true` */
2798
- returnEntity?: boolean | null;
2799
- }
2800
- interface BulkImportFileResponse {
2801
- /** Items created by bulk action. */
2802
- results?: BulkImportFileResult[];
2803
- /** Bulk action metadata. */
2804
- bulkActionMetadata?: BulkActionMetadata;
2805
- }
2806
- interface BulkImportFileResult {
2807
- /** Item metadata. */
2808
- itemMetadata?: ItemMetadata;
2809
- /** Imported file. This field is included in the response if the operation was successful and `returnEntity` is not set to `false`. */
2810
- item?: FileDescriptor;
2811
- }
2812
- interface ListFilesRequest {
2813
- /**
2814
- * ID of the file's parent folder. <br />
2815
- * Default:`media-root`.
2816
- */
2817
- parentFolderId?: string | null;
2818
- /** File media type. */
2819
- mediaTypes?: MediaType[];
2820
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2821
- private?: boolean | null;
2822
- /**
2823
- * Field name and order to sort by. One of: <br />
2824
- * * `displayName`
2825
- * * `updatedDate`
2826
- * * `sizeInBytes`
2827
- * Default: `updatedDate` in `desc` order.
2828
- */
2829
- sort?: Sorting$1;
2830
- /** Cursor and paging information. */
2831
- paging?: CursorPaging$1;
2832
- }
2833
- interface Sorting$1 {
2834
- /** Name of the field to sort by. */
2835
- fieldName?: string;
2836
- /** Sort order. */
2837
- order?: SortOrder$1;
2838
- }
2839
- declare enum SortOrder$1 {
2840
- ASC = "ASC",
2841
- DESC = "DESC"
2842
- }
2843
- interface CursorPaging$1 {
2844
- /** Maximum number of items to return in the results. */
2845
- limit?: number | null;
2846
- /**
2847
- * Pointer to the next or previous page in the list of results.
2848
- *
2849
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
2850
- * Not relevant for the first request.
2851
- */
2852
- cursor?: string | null;
2853
- }
2854
- interface ListFilesResponse {
2855
- /** List of files in the Media Manager. */
2856
- files?: FileDescriptor[];
2857
- /** The next cursor if it exists. */
2858
- nextCursor?: PagingMetadataV2$1;
2859
- }
2860
- interface PagingMetadataV2$1 {
2861
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
2862
- total?: number | null;
2863
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
2864
- cursors?: Cursors$1;
2865
- }
2866
- interface Cursors$1 {
2867
- /** Cursor string pointing to the next page in the list of results. */
2868
- next?: string | null;
2869
- }
2870
- interface SearchFilesRequest {
2871
- /**
2872
- * Term to search for. Possible terms include the value of a file's
2873
- * `displayName`, `mimeType`, and `label`. <br />
2874
- * For example, if a file's label is cat, the search term is 'cat'.
2875
- */
2876
- search?: string | null;
2877
- /**
2878
- * A root folder in the media manager to search in. <br />
2879
- * Default: `MEDIA_ROOT`.
2880
- */
2881
- rootFolder?: RootFolder$1;
2882
- /** File media type. */
2883
- mediaTypes?: MediaType[];
2884
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2885
- private?: boolean | null;
2886
- /**
2887
- * Field name and order to sort by. One of: <br />
2888
- * * `displayName`
2889
- * * `updatedDate`
2890
- * * `sizeInBytes`
2891
- * Default: `updatedDate` in `desc` order.
2892
- */
2893
- sort?: Sorting$1;
2894
- /** Cursor and paging information. */
2895
- paging?: CursorPaging$1;
2896
- }
2897
- declare enum RootFolder$1 {
2898
- /** Root of all site media */
2899
- MEDIA_ROOT = "MEDIA_ROOT",
2900
- /** Root of the trash system folder */
2901
- TRASH_ROOT = "TRASH_ROOT",
2902
- /** Root of all visitor uploads */
2903
- VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
2904
- }
2905
- interface SearchFilesResponse {
2906
- /** Files matching the query. */
2907
- files?: FileDescriptor[];
2908
- /** The next cursor if it exists. */
2909
- nextCursor?: PagingMetadataV2$1;
2910
- }
2911
- interface GenerateVideoStreamingUrlRequest {
2912
- /**
2913
- * File ID.
2914
- *
2915
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
2916
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2917
- */
2918
- fileId: string;
2919
- /** Video stream format. */
2920
- format?: StreamFormat;
2921
- }
2922
- declare enum StreamFormat {
2923
- UNKNOWN = "UNKNOWN",
2924
- HLS = "HLS",
2925
- DASH = "DASH"
2926
- }
2927
- interface GenerateVideoStreamingUrlResponse {
2928
- /** URL for streaming a specific file in the Media Manager. */
2929
- downloadUrl?: DownloadUrl;
2930
- }
2931
- interface GenerateWebSocketTokenRequest {
2932
- }
2933
- interface GenerateWebSocketTokenResponse {
2934
- /** The web socket token for the identity in the request */
2935
- token?: string;
2936
- }
2937
- interface BulkDeleteFilesRequest {
2938
- /**
2939
- * IDs of the files to move to the Media Manager's trash bin.
2940
- *
2941
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2942
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2943
- */
2944
- fileIds: string[];
2945
- /**
2946
- * Whether the specified files are permanently deleted. <br />
2947
- * Default: `false`
2948
- */
2949
- permanent?: boolean;
2950
- }
2951
- interface BulkDeleteFilesResponse {
2952
- }
2953
- interface BulkRestoreFilesFromTrashBinRequest {
2954
- /**
2955
- * IDs of the files to restore from the Media Manager's trash bin.
2956
- *
2957
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2958
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2959
- */
2960
- fileIds: string[];
2961
- }
2962
- interface BulkRestoreFilesFromTrashBinResponse {
2963
- }
2964
- interface ListDeletedFilesRequest {
2965
- /**
2966
- * ID of the file's parent folder. <br />
2967
- * Default: `media-root`.
2968
- */
2969
- parentFolderId?: string | null;
2970
- /** File media type. */
2971
- mediaTypes?: MediaType[];
2972
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
2973
- private?: boolean | null;
2974
- /**
2975
- * Field name and order to sort by. One of: <br />
2976
- * * `displayName`
2977
- * * `updatedDate`
2978
- * * `sizeInBytes`
2979
- * Default: `updatedDate` in `desc` order.
2980
- */
2981
- sort?: Sorting$1;
2982
- /** Cursor and paging information. */
2983
- paging?: CursorPaging$1;
2984
- }
2985
- interface ListDeletedFilesResponse {
2986
- /** List of files in the Media Manager's trash bin. */
2987
- files?: FileDescriptor[];
2988
- /** The next cursor if it exists. */
2989
- nextCursor?: PagingMetadataV2$1;
2990
- }
2991
- interface BulkPublishDraftFilesRequest {
2992
- /**
2993
- * IDs of the draft files to be published.
2994
- *
2995
- * You can also specify the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
2996
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
2997
- */
2998
- fileIds?: string[];
2999
- /**
3000
- * The namespace the files will be published to
3001
- * Note, private files must have a namespace
3002
- */
3003
- namespace?: Namespace$1;
3004
- /**
3005
- * ID of the file's parent folder. <br />
3006
- * This folder is the path root for the `filePath`. <br />
3007
- * Default: `media-root`.
3008
- */
3009
- parentFolderId?: string | null;
3010
- /**
3011
- * Path to the folder where the file will be stored.
3012
- * For example, `/videos/2024/december`. <br/>
3013
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
3014
- * The folders in the path will be created if they don't already exist. <br />
3015
- */
3016
- filePath?: string | null;
3017
- /** Should the response return the item following the operation */
3018
- returnEntity?: boolean;
3019
- }
3020
- interface BulkPublishDraftFilesResponse {
3021
- /** Results of individual items */
3022
- results?: BulkPublishDraftFileResult[];
3023
- /** Metadata of the operation */
3024
- bulkActionMetadata?: BulkActionMetadata;
3025
- }
3026
- interface BulkPublishDraftFileResult {
3027
- /** Item metadata */
3028
- itemMetadata?: ItemMetadata;
3029
- /**
3030
- * The item following the operation
3031
- * Only returned if operation was successful and if returnEntity flag was on
3032
- */
3033
- item?: FileDescriptor;
3034
- }
3035
- interface UpdateFileRequest {
3036
- /**
3037
- * ID of the file to update.
3038
- *
3039
- * You can also specify the file's Wix media URL. For example, `wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032`.
3040
- * Learn more about the file ID parameter ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/file-and-folder-ids#file-id-as-a-parameter) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/file-id#file-id-as-a-parameter)).
3041
- */
3042
- fileId?: string;
3043
- /** File name that appears in the Media Manager. */
3044
- displayName?: string | null;
3045
- /**
3046
- * ID of the file's parent folder. <br />
3047
- * Default: `media-root`.
3048
- */
3049
- parentFolderId?: string | null;
3050
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
3051
- labels?: string[] | null;
3052
- }
3053
- interface UpdateFileResponse {
3054
- /** Information about the updated file. */
3055
- file?: FileDescriptor;
3056
- }
3057
- interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
3058
- createdEvent?: EntityCreatedEvent$1;
3059
- updatedEvent?: EntityUpdatedEvent$1;
3060
- deletedEvent?: EntityDeletedEvent$1;
3061
- actionEvent?: ActionEvent$1;
3062
- /**
3063
- * Unique event ID.
3064
- * Allows clients to ignore duplicate webhooks.
3065
- */
3066
- _id?: string;
3067
- /**
3068
- * Assumes actions are also always typed to an entity_type
3069
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3070
- */
3071
- entityFqdn?: string;
3072
- /**
3073
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3074
- * This is although the created/updated/deleted notion is duplication of the oneof types
3075
- * Example: created/updated/deleted/started/completed/email_opened
3076
- */
3077
- slug?: string;
3078
- /** ID of the entity associated with the event. */
3079
- entityId?: string;
3080
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3081
- eventTime?: Date | null;
3082
- /**
3083
- * Whether the event was triggered as a result of a privacy regulation application
3084
- * (for example, GDPR).
3085
- */
3086
- triggeredByAnonymizeRequest?: boolean | null;
3087
- /** If present, indicates the action that triggered the event. */
3088
- originatedFrom?: string | null;
3089
- /**
3090
- * A sequence number defining the order of updates to the underlying entity.
3091
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3092
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3093
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3094
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3095
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3096
- */
3097
- entityEventSequence?: string | null;
3098
- }
3099
- /** @oneof */
3100
- interface DomainEventBodyOneOf$1 {
3101
- createdEvent?: EntityCreatedEvent$1;
3102
- updatedEvent?: EntityUpdatedEvent$1;
3103
- deletedEvent?: EntityDeletedEvent$1;
3104
- actionEvent?: ActionEvent$1;
3105
- }
3106
- interface EntityCreatedEvent$1 {
3107
- entity?: string;
3108
- }
3109
- interface RestoreInfo$1 {
3110
- deletedDate?: Date | null;
3111
- }
3112
- interface EntityUpdatedEvent$1 {
3113
- /**
3114
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
3115
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
3116
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
3117
- */
3118
- currentEntity?: string;
3119
- }
3120
- interface EntityDeletedEvent$1 {
3121
- /** Entity that was deleted */
3122
- deletedEntity?: string | null;
3123
- }
3124
- interface ActionEvent$1 {
3125
- body?: string;
3126
- }
3127
- interface MessageEnvelope$1 {
3128
- /** App instance ID. */
3129
- instanceId?: string | null;
3130
- /** Event type. */
3131
- eventType?: string;
3132
- /** The identification type and identity data. */
3133
- identity?: IdentificationData$1;
3134
- /** Stringify payload. */
3135
- data?: string;
3136
- }
3137
- interface IdentificationData$1 extends IdentificationDataIdOneOf$1 {
3138
- /** ID of a site visitor that has not logged in to the site. */
3139
- anonymousVisitorId?: string;
3140
- /** ID of a site visitor that has logged in to the site. */
3141
- memberId?: string;
3142
- /** ID of a Wix user (site owner, contributor, etc.). */
3143
- wixUserId?: string;
3144
- /** ID of an app. */
3145
- appId?: string;
3146
- /** @readonly */
3147
- identityType?: WebhookIdentityType$1;
3148
- }
3149
- /** @oneof */
3150
- interface IdentificationDataIdOneOf$1 {
3151
- /** ID of a site visitor that has not logged in to the site. */
3152
- anonymousVisitorId?: string;
3153
- /** ID of a site visitor that has logged in to the site. */
3154
- memberId?: string;
3155
- /** ID of a Wix user (site owner, contributor, etc.). */
3156
- wixUserId?: string;
3157
- /** ID of an app. */
3158
- appId?: string;
3159
- }
3160
- declare enum WebhookIdentityType$1 {
3161
- UNKNOWN = "UNKNOWN",
3162
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
3163
- MEMBER = "MEMBER",
3164
- WIX_USER = "WIX_USER",
3165
- APP = "APP"
3166
- }
3167
- interface GenerateFilesDownloadUrlResponseNonNullableFields {
3168
- downloadUrl: string;
3169
- }
3170
- interface DownloadUrlNonNullableFields {
3171
- url: string;
3172
- assetKey: string;
3173
- }
3174
- interface GenerateFileDownloadUrlResponseNonNullableFields {
3175
- downloadUrls: DownloadUrlNonNullableFields[];
3176
- }
3177
- interface FaceRecognitionNonNullableFields {
3178
- confidence: number;
3179
- x: number;
3180
- y: number;
3181
- height: number;
3182
- width: number;
3183
- }
3184
- interface ImageMediaNonNullableFields {
3185
- image: string;
3186
- faces: FaceRecognitionNonNullableFields[];
3187
- previewImage: string;
3188
- }
3189
- interface AudioV2NonNullableFields {
3190
- _id: string;
3191
- assets: string[];
3192
- }
3193
- interface ArchiveNonNullableFields {
3194
- _id: string;
3195
- url: string;
3196
- }
3197
- interface Model3DNonNullableFields {
3198
- _id: string;
3199
- url: string;
3200
- thumbnail: string;
3201
- }
3202
- interface OtherMediaNonNullableFields {
3203
- _id: string;
3204
- url: string;
3205
- }
3206
- interface FileMediaNonNullableFields {
3207
- image?: ImageMediaNonNullableFields;
3208
- video: string;
3209
- audio?: AudioV2NonNullableFields;
3210
- document: string;
3211
- vector?: ImageMediaNonNullableFields;
3212
- archive?: ArchiveNonNullableFields;
3213
- model3d?: Model3DNonNullableFields;
3214
- other?: OtherMediaNonNullableFields;
3215
- icon?: ImageMediaNonNullableFields;
3216
- flash?: OtherMediaNonNullableFields;
3217
- }
3218
- interface IdentityInfoNonNullableFields {
3219
- identityType: IdentityType;
3220
- }
3221
- interface FileDescriptorNonNullableFields {
3222
- _id: string;
3223
- displayName: string;
3224
- url: string;
3225
- hash: string;
3226
- private: boolean;
3227
- mediaType: MediaType;
3228
- media?: FileMediaNonNullableFields;
3229
- operationStatus: OperationStatus;
3230
- labels: string[];
3231
- siteId: string;
3232
- state: State$1;
3233
- internalTags: string[];
3234
- namespace: Namespace$1;
3235
- addedBy?: IdentityInfoNonNullableFields;
3236
- }
3237
- interface GetFileDescriptorResponseNonNullableFields {
3238
- file?: FileDescriptorNonNullableFields;
3239
- }
3240
- interface GetFileDescriptorsResponseNonNullableFields {
3241
- files: FileDescriptorNonNullableFields[];
3242
- }
3243
- interface UpdateFileDescriptorResponseNonNullableFields {
3244
- file?: FileDescriptorNonNullableFields;
3245
- }
3246
- interface GenerateFileUploadUrlResponseNonNullableFields {
3247
- uploadUrl: string;
3248
- }
3249
- interface GenerateFileResumableUploadUrlResponseNonNullableFields {
3250
- uploadProtocol: UploadProtocol;
3251
- uploadUrl: string;
3252
- uploadToken: string;
3253
- }
3254
- interface ImportFileResponseNonNullableFields {
3255
- file?: FileDescriptorNonNullableFields;
3256
- }
3257
- interface BulkImportFilesResponseNonNullableFields {
3258
- files: FileDescriptorNonNullableFields[];
3259
- }
3260
- interface ApplicationErrorNonNullableFields {
3261
- code: string;
3262
- description: string;
3263
- }
3264
- interface ItemMetadataNonNullableFields {
3265
- originalIndex: number;
3266
- success: boolean;
3267
- error?: ApplicationErrorNonNullableFields;
3268
- }
3269
- interface BulkImportFileResultNonNullableFields {
3270
- itemMetadata?: ItemMetadataNonNullableFields;
3271
- item?: FileDescriptorNonNullableFields;
3272
- }
3273
- interface BulkActionMetadataNonNullableFields {
3274
- totalSuccesses: number;
3275
- totalFailures: number;
3276
- undetailedFailures: number;
3277
- }
3278
- interface BulkImportFileResponseNonNullableFields {
3279
- results: BulkImportFileResultNonNullableFields[];
3280
- bulkActionMetadata?: BulkActionMetadataNonNullableFields;
3281
- }
3282
- interface ListFilesResponseNonNullableFields {
3283
- files: FileDescriptorNonNullableFields[];
3284
- }
3285
- interface SearchFilesResponseNonNullableFields {
3286
- files: FileDescriptorNonNullableFields[];
3287
- }
3288
- interface GenerateVideoStreamingUrlResponseNonNullableFields {
3289
- downloadUrl?: DownloadUrlNonNullableFields;
3290
- }
3291
- interface ListDeletedFilesResponseNonNullableFields {
3292
- files: FileDescriptorNonNullableFields[];
3293
- }
3294
- interface BaseEventMetadata$1 {
3295
- /** App instance ID. */
3296
- instanceId?: string | null;
3297
- /** Event type. */
3298
- eventType?: string;
3299
- /** The identification type and identity data. */
3300
- identity?: IdentificationData$1;
3301
- }
3302
- interface EventMetadata$1 extends BaseEventMetadata$1 {
3303
- /**
3304
- * Unique event ID.
3305
- * Allows clients to ignore duplicate webhooks.
3306
- */
3307
- _id?: string;
3308
- /**
3309
- * Assumes actions are also always typed to an entity_type
3310
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
3311
- */
3312
- entityFqdn?: string;
3313
- /**
3314
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
3315
- * This is although the created/updated/deleted notion is duplication of the oneof types
3316
- * Example: created/updated/deleted/started/completed/email_opened
3317
- */
3318
- slug?: string;
3319
- /** ID of the entity associated with the event. */
3320
- entityId?: string;
3321
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3322
- eventTime?: Date | null;
3323
- /**
3324
- * Whether the event was triggered as a result of a privacy regulation application
3325
- * (for example, GDPR).
3326
- */
3327
- triggeredByAnonymizeRequest?: boolean | null;
3328
- /** If present, indicates the action that triggered the event. */
3329
- originatedFrom?: string | null;
3330
- /**
3331
- * A sequence number defining the order of updates to the underlying entity.
3332
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
3333
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
3334
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
3335
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
3336
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
3337
- */
3338
- entityEventSequence?: string | null;
3339
- }
3340
- interface FileDescriptorDeletedEnvelope {
3341
- metadata: EventMetadata$1;
3342
- }
3343
- interface FileDescriptorFileFailedEnvelope {
3344
- data: FileFailed;
3345
- metadata: EventMetadata$1;
3346
- }
3347
- interface FileDescriptorFileReadyEnvelope {
3348
- data: FileReady;
3349
- metadata: EventMetadata$1;
3350
- }
3351
- interface FileDescriptorUpdatedEnvelope {
3352
- entity: FileDescriptor;
3353
- metadata: EventMetadata$1;
3354
- }
3355
- interface GenerateFileDownloadUrlOptions {
3356
- /**
3357
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type. <br />
3358
- *
3359
- * **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
3360
- */
3361
- downloadFileName?: string | null;
3362
- /**
3363
- * The time that it takes in minutes for the download URL to expire. <br />
3364
- * Default: `600`. <br />
3365
- * Limit: `525600` (1 year).
3366
- */
3367
- expirationInMinutes?: number | null;
3368
- /**
3369
- * The redirect URL for when the temporary download URL with a token expires. <br />
3370
- * Default: A 403 Forbidden response page.
3371
- */
3372
- expirationRedirectUrl?: string | null;
3373
- /**
3374
- * Keys for downloading different assets (format and quality) of a file.
3375
- * Default: `src`, key representing the original file's format and quality.
3376
- */
3377
- assetKeys?: string[] | null;
3378
- /**
3379
- * Whether the link downloads the file or opens the file in the browser.
3380
- *
3381
- * - `ATTACHMENT`: The link downloads the file.
3382
- * - `INLINE`: The link opens the file in the browser.
3383
- *
3384
- * Default: `ATTACHMENT`
3385
- */
3386
- contentDisposition?: ContentDisposition;
3387
- }
3388
- interface GenerateFileUploadUrlOptions {
3389
- /**
3390
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
3391
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
3392
- */
3393
- fileName?: string | null;
3394
- /**
3395
- * File size in bytes.
3396
- * @readonly
3397
- */
3398
- sizeInBytes?: string | null;
3399
- /**
3400
- * ID of the file's parent folder. <br />
3401
- * This folder is the path root for the `filePath`.<br />
3402
- * Default: `media-root`.
3403
- */
3404
- parentFolderId?: string | null;
3405
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3406
- private?: boolean | null;
3407
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
3408
- labels?: string[] | null;
3409
- /** A place to map an external entity to an uploaded file in the Wix Media Manager. */
3410
- externalInfo?: ExternalInfo;
3411
- /**
3412
- * Path to the folder where the file will be stored.
3413
- * For example, `/videos/2024/december`. <br/>
3414
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
3415
- * The folders in the path will be created if they don't already exist. <br />
3416
- */
3417
- filePath?: string | null;
3418
- }
3419
- interface GenerateFileResumableUploadUrlOptions {
3420
- /**
3421
- * Temporary file name used to identify the file type. For example, a file named "myFile.jpeg" identifies as an "image/jpeg" file type.
3422
- * <br /> **Note:** The name that appears in the Media Manager is taken from the `filename` parameter in the Generate File Upload Url call.
3423
- */
3424
- fileName?: string | null;
3425
- /**
3426
- * File size in bytes.
3427
- * @readonly
3428
- */
3429
- sizeInBytes?: string | null;
3430
- /**
3431
- * ID of the file's parent folder. <br />
3432
- * This folder is the path root for the `filePath`.<br />
3433
- * Default: `media-root`.
3434
- */
3435
- parentFolderId?: string | null;
3436
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3437
- private?: boolean | null;
3438
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
3439
- labels?: string[] | null;
3440
- /** The upload protocol to use for implementing the resumable upload. */
3441
- uploadProtocol?: UploadProtocol;
3442
- /**
3443
- * Path to the folder where the file will be stored.
3444
- * For example, `/videos/2024/december`. <br/>
3445
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
3446
- * The folders in the path will be created if they don't already exist. <br />
3447
- */
3448
- filePath?: string | null;
3449
- }
3450
- interface ImportFileOptions {
3451
- /**
3452
- * Media type of the file to import.
3453
- * excluding: OTHER media type
3454
- */
3455
- mediaType?: MediaType;
3456
- /** File name that appears in the Media Manager. */
3457
- displayName?: string | null;
3458
- /**
3459
- * ID of the file's parent folder. <br />
3460
- * This folder is the path root for the `filePath`. <br />
3461
- * Default: `media-root`.
3462
- */
3463
- parentFolderId?: string | null;
3464
- /** Whether the file will be public or private. Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3465
- private?: boolean | null;
3466
- /** Labels assigned to media files that describe and categorize them. Provided by the Wix user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
3467
- labels?: string[] | null;
3468
- /** File mime type. */
3469
- mimeType?: string;
3470
- /** Information sent to the File Ready and File Failed events. See Importing Files ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_using-externalinfo) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#using-externalinfo)) to learn more. */
3471
- externalInfo?: ExternalInfo;
3472
- /** Optional parameters that should be sent with the external URL. */
3473
- urlParams?: Record<string, any> | null;
3474
- /** Optional headers that should be sent with the external URL. */
3475
- urlHeaders?: Record<string, any> | null;
3476
- /**
3477
- * Path to the folder where the file will be stored.
3478
- * For example, `/videos/2024/december`. <br/>
3479
- * If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
3480
- * The folders in the path will be created if they don't already exist. <br />
3481
- */
3482
- filePath?: string | null;
3483
- }
3484
- interface BulkImportFileOptions {
3485
- /** Default: `true` */
3486
- returnEntity?: boolean | null;
3487
- }
3488
- interface ListFilesOptions {
3489
- /**
3490
- * ID of the file's parent folder. <br />
3491
- * Default:`media-root`.
3492
- */
3493
- parentFolderId?: string | null;
3494
- /** File media type. */
3495
- mediaTypes?: MediaType[];
3496
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3497
- private?: boolean | null;
3498
- /**
3499
- * Field name and order to sort by. One of: <br />
3500
- * * `displayName`
3501
- * * `updatedDate`
3502
- * * `sizeInBytes`
3503
- * Default: `updatedDate` in `desc` order.
3504
- */
3505
- sort?: Sorting$1;
3506
- /** Cursor and paging information. */
3507
- paging?: CursorPaging$1;
3508
- }
3509
- interface SearchFilesOptions {
3510
- /**
3511
- * Term to search for. Possible terms include the value of a file's
3512
- * `displayName`, `mimeType`, and `label`. <br />
3513
- * For example, if a file's label is cat, the search term is 'cat'.
3514
- */
3515
- search?: string | null;
3516
- /**
3517
- * A root folder in the media manager to search in. <br />
3518
- * Default: `MEDIA_ROOT`.
3519
- */
3520
- rootFolder?: RootFolder$1;
3521
- /** File media type. */
3522
- mediaTypes?: MediaType[];
3523
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3524
- private?: boolean | null;
3525
- /**
3526
- * Field name and order to sort by. One of: <br />
3527
- * * `displayName`
3528
- * * `updatedDate`
3529
- * * `sizeInBytes`
3530
- * Default: `updatedDate` in `desc` order.
3531
- */
3532
- sort?: Sorting$1;
3533
- /** Cursor and paging information. */
3534
- paging?: CursorPaging$1;
3535
- }
3536
- interface GenerateVideoStreamingUrlOptions {
3537
- /** Video stream format. */
3538
- format?: StreamFormat;
3539
- }
3540
- interface BulkDeleteFilesOptions {
3541
- /**
3542
- * Whether the specified files are permanently deleted. <br />
3543
- * Default: `false`
3544
- */
3545
- permanent?: boolean;
3546
- }
3547
- interface ListDeletedFilesOptions {
3548
- /**
3549
- * ID of the file's parent folder. <br />
3550
- * Default: `media-root`.
3551
- */
3552
- parentFolderId?: string | null;
3553
- /** File media type. */
3554
- mediaTypes?: MediaType[];
3555
- /** \n`true`: Returns only private files. \n`false`: Returns only public files. \n`undefined`: Returns public and private files. \n Learn more about private files ([SDK](https://dev.wix.com/docs/rest/assets/media/media-manager/files/private-files) | [REST](https://dev.wix.com/docs/sdk/backend-modules/media/files/private-files)). */
3556
- private?: boolean | null;
3557
- /**
3558
- * Field name and order to sort by. One of: <br />
3559
- * * `displayName`
3560
- * * `updatedDate`
3561
- * * `sizeInBytes`
3562
- * Default: `updatedDate` in `desc` order.
3563
- */
3564
- sort?: Sorting$1;
3565
- /** Cursor and paging information. */
3566
- paging?: CursorPaging$1;
3567
- }
3568
-
3569
- declare function generateFilesDownloadUrl$1(httpClient: HttpClient): GenerateFilesDownloadUrlSignature;
3570
- interface GenerateFilesDownloadUrlSignature {
3571
- /**
3572
- * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
3573
- *
3574
- * The compressed file can contain up to 1000 files.
3575
- *
3576
- * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint.
3577
- * Since this is a permanent URL, it is less secure.
3578
- * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
3579
- * @param - IDs of the files to download.
3580
- *
3581
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3582
- * Learn more in the File and Folder IDs article.
3583
- */
3584
- (fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
3585
- }
3586
- declare function generateFileDownloadUrl$1(httpClient: HttpClient): GenerateFileDownloadUrlSignature;
3587
- interface GenerateFileDownloadUrlSignature {
3588
- /**
3589
- * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
3590
- *
3591
- * To download different assets of the file, specify the `assetKeys` parameter which generates a download URL for each asset.
3592
- * If no `assetKey` is specified, it defaults to `src`, which generates one download URL in the original file's format and quality.
3593
- *
3594
- * Call this endpoint to grant external clients access to a private media file. Specify the `expirationInMinutes` parameter to set the URL expiration time, and the `expirationRedirectUrl` parameter to add a redirect url when the URL expires.
3595
- *
3596
- * To generate a permanent URL for downloading a compressed file that contains multiple files in the Media Manager, call the Generate Files Download URL endpoint.
3597
- * Since this is a permanent URL, it is less secure.
3598
- * Therefore, to download private files, call the Generate File Download URL endpoint for each private file that you want to generate a download URL for.
3599
- * @param - Options to use when generating a file's download URL.
3600
- * @param - File ID.
3601
- *
3602
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3603
- * Learn more in the File and Folder IDs article.
3604
- */
3605
- (fileId: string, options?: GenerateFileDownloadUrlOptions | undefined): Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
3606
- }
3607
- declare function getFileDescriptor$1(httpClient: HttpClient): GetFileDescriptorSignature;
3608
- interface GetFileDescriptorSignature {
3609
- /**
3610
- * Gets information about a specific file in the Media Manager.
3611
- * @param - File ID.
3612
- *
3613
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3614
- * Learn more in the File and Folder IDs article.
3615
- * @returns Information about the file.
3616
- */
3617
- (fileId: string): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3618
- }
3619
- declare function getFileDescriptors$1(httpClient: HttpClient): GetFileDescriptorsSignature;
3620
- interface GetFileDescriptorsSignature {
3621
- /**
3622
- * Gets information about specific files in the Media Manager.
3623
- * @param - File IDs.
3624
- *
3625
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3626
- * Learn more in the File and Folder IDs article.
3627
- */
3628
- (fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
3629
- }
3630
- declare function updateFileDescriptor$1(httpClient: HttpClient): UpdateFileDescriptorSignature;
3631
- interface UpdateFileDescriptorSignature {
3632
- /**
3633
- * Updates a file. <br />
3634
- *
3635
- * Specify the `parentFolderId` parameter to move a file from its current folder to a different folder.
3636
- * @param - The file to update.
3637
- * @returns Information about the updated file.
3638
- */
3639
- (file: FileDescriptor): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3640
- }
3641
- declare function generateFileUploadUrl$1(httpClient: HttpClient): GenerateFileUploadUrlSignature;
3642
- interface GenerateFileUploadUrlSignature {
3643
- /**
3644
- * Generates an upload URL to allow external clients to upload a file to the Media Manager. <br/>
3645
- *
3646
- * To learn how external clients can use the generated upload URL in the response to upload a file to the Media Manager, see Upload API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/upload-api) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/upload-api)).
3647
- * > **Notes:**
3648
- * > - When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
3649
- * > - Any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, call Generate File Resumable Upload URL instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption.
3650
- * @param - File mime type.
3651
- * @param - Options to use when generating a file's upload URL.
3652
- */
3653
- (mimeType: string | null, options?: GenerateFileUploadUrlOptions | undefined): Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
3654
- }
3655
- declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): GenerateFileResumableUploadUrlSignature;
3656
- interface GenerateFileResumableUploadUrlSignature {
3657
- /**
3658
- * Generates a resumable upload URL to allow external clients to easily upload large files over 10MB to the Media Manager. <br/>
3659
- *
3660
- * With the resumable upload URL, any interruptions in the upload process pauses the file upload, and resumes the file upload process after the interruption. The resumable upload URL is also helpful when network connection is poor.
3661
- * To learn how external clients can use the generated upload URL in the response to upload large files to the Media Manager, see Resumable Upload API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/resumable-upload-api) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/resumable-upload-api)).
3662
- *
3663
- * > **Note:** When you upload a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
3664
- * @param - File mime type.
3665
- * @param - Options to use when generating a resumable upload URL.
3666
- */
3667
- (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions | undefined): Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
3668
- }
3669
- declare function importFile$1(httpClient: HttpClient): ImportFileSignature;
3670
- interface ImportFileSignature {
3671
- /**
3672
- * Imports a file to the Media Manager using an external url.
3673
- *
3674
- * Returns information about the imported file.
3675
- * Specify the `parentFolderId` and `filePath` parameters to specify which folder you want the file to be imported to.
3676
- * If no folder is specified, the file is imported to the `media-root` folder.
3677
- *
3678
- * >**Notes:**
3679
- * > - The `media` property isn't returned in the `files` response object.
3680
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
3681
- *
3682
- * To import a file, you need to do one of the following:
3683
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3684
- * - Specify its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3685
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3686
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3687
- * @param - Publicly accessible external file URL.
3688
- * @param - Options to use when importing a single file.
3689
- */
3690
- (url: string, options?: ImportFileOptions | undefined): Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
3691
- }
3692
- declare function bulkImportFiles$1(httpClient: HttpClient): BulkImportFilesSignature;
3693
- interface BulkImportFilesSignature {
3694
- /**
3695
- * Imports a bulk of files to the Media Manager using external urls. <br/>
3696
- * <blockquote class='warning'>
3697
- *
3698
- * __Deprecation Notice:__
3699
- *
3700
- * This endpoint has been replaced with Bulk Import File and will be removed on March 31, 2024.
3701
- *
3702
- * </blockquote>
3703
- *
3704
- * Returns information about the imported files.
3705
- *
3706
- * Use the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
3707
- * If no folder is specified, the file is imported to the `media-root` folder.
3708
- *
3709
- * >**Notes:**
3710
- * > - The `media` property isn't returned in the `files` response object.
3711
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
3712
- *
3713
- * To import files, you need to do one of the following for each file:
3714
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3715
- * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3716
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3717
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3718
- * @param - Information about the files to import.
3719
- * @param - Options to use when uploading multiple files.
3720
- * @deprecated
3721
- */
3722
- (importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
3723
- }
3724
- declare function bulkImportFile$1(httpClient: HttpClient): BulkImportFileSignature;
3725
- interface BulkImportFileSignature {
3726
- /**
3727
- * Imports a bulk of files to the Media Manager using external urls. <br/>
3728
- *
3729
- * Returns information about the imported files.
3730
- *
3731
- * Specify the `parentFolderId` and `filePath` parameters to specify the folder you want each file to be imported to.
3732
- * If no folder is specified, the file is imported to the `media-root` folder.
3733
- *
3734
- * >**Notes:**
3735
- * > - The `media` property isn't returned in the `files` response object.
3736
- * > - When you import a file, it's not immediately available, meaning you can't manage or use the file straight away. Learn more about knowing when a file is ready ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/files/importing-files#backend-modules_media_files_knowing-when-a-file-is-ready) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready)).
3737
- *
3738
- * To import files, you need to do one of the following for each file:
3739
- * - Specify its [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) in the `mimeType` field of the request. For example, `mimeType: 'image/jpeg'`.
3740
- * - Include its extension in either the `displayName` or `url` field of the request. For example, `displayName: 'Example Image.jpeg` or `url: https://www.example.com/image.jpeg`.
3741
- * - Ensure the server hosting the file supports HEAD requests. In these cases the Wix servers can retrieve the MIME type from the hosting server.
3742
- * > **Note:** If you want to validate the media type, specify the file's expected media type in the optional `mediaType` field of the request. For example, `mediaType: 'IMAGE'`.
3743
- * @param - Information about the files to import.
3744
- * @param - Options to include the file descriptor in the response.
3745
- */
3746
- (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions | undefined): Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
3747
- }
3748
- declare function listFiles$1(httpClient: HttpClient): ListFilesSignature;
3749
- interface ListFilesSignature {
3750
- /**
3751
- * Retrieves a list of files in the Media Manager.
3752
- *
3753
- * To retrieve a list of files within a specific folder in the Media Manager, specify the folder's ID in the `parentFolderId` parameter. If no folder is specified, the method retrieves the list of files in the root folder of the Media Manager.
3754
- * @param - Options to use when listing media files.
3755
- */
3756
- (options?: ListFilesOptions | undefined): Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
3757
- }
3758
- declare function searchFiles$1(httpClient: HttpClient): SearchFilesSignature;
3759
- interface SearchFilesSignature {
3760
- /**
3761
- * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the parameters. <br/>
3762
- *
3763
- * If no parameters are specified, the endpoint returns all files in the `MEDIA_ROOT` folder.
3764
- * @param - Options to specify which folders to search.
3765
- */
3766
- (options?: SearchFilesOptions | undefined): Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
3767
- }
3768
- declare function generateVideoStreamingUrl$1(httpClient: HttpClient): GenerateVideoStreamingUrlSignature;
3769
- interface GenerateVideoStreamingUrlSignature {
3770
- /**
3771
- * Generates a URL for streaming a specific video file in the Media Manager. <br/>
3772
- *
3773
- * To stream different assets of the file, specify the `assetKeys` parameter which generates a video streaming URL for each asset. If no assetKey is specified, it defaults to `src`, which generates one video streaming URL in the original file's format and quality.
3774
- * @param - Options to use when generating a video file's streaming URL.
3775
- * @param - File ID.
3776
- *
3777
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3778
- * Learn more in the File and Folder IDs article.
3779
- */
3780
- (fileId: string, options?: GenerateVideoStreamingUrlOptions | undefined): Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
3781
- }
3782
- declare function bulkDeleteFiles$1(httpClient: HttpClient): BulkDeleteFilesSignature;
3783
- interface BulkDeleteFilesSignature {
3784
- /**
3785
- * Deletes the specified files from the Media Manager. <br/>
3786
- *
3787
- * The deleted files are moved to the Media Manager's trash bin (`TRASH-ROOT` folder) unless permanently deleted. To permanently delete files, specify the `permanent` parameter with the value `true`. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.
3788
- *
3789
- * Note the following:
3790
- * * The specified files can be from different folders.
3791
- * * Moving multiple files at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
3792
- * * Attempting to delete files that are already in the trash bin doesn't result in an error.
3793
- * * If a site contains deleted media files, the deleted media files still appear on the site as the files are still in the Media Manager (in the trash bin).
3794
- * * You can use Bulk Restore Files From Trash Bin to restore files from the Media Manager's trash bin.
3795
- * @param - Options to use when deleting files.
3796
- * @param - IDs of the files to move to the Media Manager's trash bin.
3797
- *
3798
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3799
- * Learn more in the File and Folder IDs article.
3800
- */
3801
- (fileIds: string[], options?: BulkDeleteFilesOptions | undefined): Promise<void>;
3802
- }
3803
- declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): BulkRestoreFilesFromTrashBinSignature;
3804
- interface BulkRestoreFilesFromTrashBinSignature {
3805
- /**
3806
- * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
3807
- * @param - IDs of the files to restore from the Media Manager's trash bin.
3808
- *
3809
- * You can also pass the files' Wix media URLs. For example, `["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]`.
3810
- * Learn more in the File and Folder IDs article.
3811
- */
3812
- (fileIds: string[]): Promise<void>;
3813
- }
3814
- declare function listDeletedFiles$1(httpClient: HttpClient): ListDeletedFilesSignature;
3815
- interface ListDeletedFilesSignature {
3816
- /**
3817
- * Retrieves a list of files in the Media Manager's trash bin. <br/>
3818
- *
3819
- * >**Note:** The Media Manager's trash bin (`TRASH-ROOT` folder) only contains temporarily deleted files, not permanently deleted files.
3820
- * @param - Options to use when listing deleted files from the trash bin.
3821
- */
3822
- (options?: ListDeletedFilesOptions | undefined): Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
3823
- }
3824
- declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
3825
- declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
3826
- declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
3827
- declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
3828
-
3829
- declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3830
-
3831
- declare const generateFilesDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFilesDownloadUrl$1> & typeof generateFilesDownloadUrl$1>;
3832
- declare const generateFileDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFileDownloadUrl$1> & typeof generateFileDownloadUrl$1>;
3833
- declare const getFileDescriptor: MaybeContext<BuildRESTFunction<typeof getFileDescriptor$1> & typeof getFileDescriptor$1>;
3834
- declare const getFileDescriptors: MaybeContext<BuildRESTFunction<typeof getFileDescriptors$1> & typeof getFileDescriptors$1>;
3835
- declare const updateFileDescriptor: MaybeContext<BuildRESTFunction<typeof updateFileDescriptor$1> & typeof updateFileDescriptor$1>;
3836
- declare const generateFileUploadUrl: MaybeContext<BuildRESTFunction<typeof generateFileUploadUrl$1> & typeof generateFileUploadUrl$1>;
3837
- declare const generateFileResumableUploadUrl: MaybeContext<BuildRESTFunction<typeof generateFileResumableUploadUrl$1> & typeof generateFileResumableUploadUrl$1>;
3838
- declare const importFile: MaybeContext<BuildRESTFunction<typeof importFile$1> & typeof importFile$1>;
3839
- declare const bulkImportFiles: MaybeContext<BuildRESTFunction<typeof bulkImportFiles$1> & typeof bulkImportFiles$1>;
3840
- declare const bulkImportFile: MaybeContext<BuildRESTFunction<typeof bulkImportFile$1> & typeof bulkImportFile$1>;
3841
- declare const listFiles: MaybeContext<BuildRESTFunction<typeof listFiles$1> & typeof listFiles$1>;
3842
- declare const searchFiles: MaybeContext<BuildRESTFunction<typeof searchFiles$1> & typeof searchFiles$1>;
3843
- declare const generateVideoStreamingUrl: MaybeContext<BuildRESTFunction<typeof generateVideoStreamingUrl$1> & typeof generateVideoStreamingUrl$1>;
3844
- declare const bulkDeleteFiles: MaybeContext<BuildRESTFunction<typeof bulkDeleteFiles$1> & typeof bulkDeleteFiles$1>;
3845
- declare const bulkRestoreFilesFromTrashBin: MaybeContext<BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1> & typeof bulkRestoreFilesFromTrashBin$1>;
3846
- declare const listDeletedFiles: MaybeContext<BuildRESTFunction<typeof listDeletedFiles$1> & typeof listDeletedFiles$1>;
3847
-
3848
- type _publicOnFileDescriptorDeletedType = typeof onFileDescriptorDeleted$1;
3849
- /**
3850
- * Triggered when a file is deleted.
3851
- *
3852
- * If the `movedToTrash` property in the event object `true`, the file was moved to the Media Manager's trash bin. If the `movedToTrash` property in the event object is `false`, the file was permanently deleted.
3853
- */
3854
- declare const onFileDescriptorDeleted: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorDeletedType>>;
3855
-
3856
- type _publicOnFileDescriptorFileFailedType = typeof onFileDescriptorFileFailed$1;
3857
- /**
3858
- * Triggered when a file fails during essential post-upload processing.
3859
- */
3860
- declare const onFileDescriptorFileFailed: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorFileFailedType>>;
3861
-
3862
- type _publicOnFileDescriptorFileReadyType = typeof onFileDescriptorFileReady$1;
3863
- /**
3864
- * Triggered when a file is ready to be used, after any post-upload processing.
3865
- *
3866
- * This event is also triggred when a file is restored from the Media Manager's trash bin.
3867
- */
3868
- declare const onFileDescriptorFileReady: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorFileReadyType>>;
3869
-
3870
- type _publicOnFileDescriptorUpdatedType = typeof onFileDescriptorUpdated$1;
3871
- /**
3872
- * Triggered when a file is updated, including when a file is moved to a different folder.
3873
- */
3874
- declare const onFileDescriptorUpdated: ReturnType<typeof createEventModule$1<_publicOnFileDescriptorUpdatedType>>;
3875
-
3876
- type index_d$1_ApplicationError = ApplicationError;
3877
- type index_d$1_Archive = Archive;
3878
- type index_d$1_AudioV2 = AudioV2;
3879
- type index_d$1_BulkActionMetadata = BulkActionMetadata;
3880
- type index_d$1_BulkAnnotateImageResult = BulkAnnotateImageResult;
3881
- type index_d$1_BulkAnnotateImagesRequest = BulkAnnotateImagesRequest;
3882
- type index_d$1_BulkAnnotateImagesResponse = BulkAnnotateImagesResponse;
3883
- type index_d$1_BulkDeleteFilesOptions = BulkDeleteFilesOptions;
3884
- type index_d$1_BulkDeleteFilesRequest = BulkDeleteFilesRequest;
3885
- type index_d$1_BulkDeleteFilesResponse = BulkDeleteFilesResponse;
3886
- type index_d$1_BulkImportFileOptions = BulkImportFileOptions;
3887
- type index_d$1_BulkImportFileRequest = BulkImportFileRequest;
3888
- type index_d$1_BulkImportFileResponse = BulkImportFileResponse;
3889
- type index_d$1_BulkImportFileResponseNonNullableFields = BulkImportFileResponseNonNullableFields;
3890
- type index_d$1_BulkImportFileResult = BulkImportFileResult;
3891
- type index_d$1_BulkImportFilesRequest = BulkImportFilesRequest;
3892
- type index_d$1_BulkImportFilesResponse = BulkImportFilesResponse;
3893
- type index_d$1_BulkImportFilesResponseNonNullableFields = BulkImportFilesResponseNonNullableFields;
3894
- type index_d$1_BulkPublishDraftFileResult = BulkPublishDraftFileResult;
3895
- type index_d$1_BulkPublishDraftFilesRequest = BulkPublishDraftFilesRequest;
3896
- type index_d$1_BulkPublishDraftFilesResponse = BulkPublishDraftFilesResponse;
3897
- type index_d$1_BulkRestoreFilesFromTrashBinRequest = BulkRestoreFilesFromTrashBinRequest;
3898
- type index_d$1_BulkRestoreFilesFromTrashBinResponse = BulkRestoreFilesFromTrashBinResponse;
3899
- type index_d$1_Color = Color;
3900
- type index_d$1_ColorRGB = ColorRGB;
3901
- type index_d$1_Colors = Colors;
3902
- type index_d$1_ContentDisposition = ContentDisposition;
3903
- declare const index_d$1_ContentDisposition: typeof ContentDisposition;
3904
- type index_d$1_DownloadUrl = DownloadUrl;
3905
- type index_d$1_DraftFilePublished = DraftFilePublished;
3906
- type index_d$1_ExternalInfo = ExternalInfo;
3907
- type index_d$1_FaceRecognition = FaceRecognition;
3908
- type index_d$1_FileDescriptor = FileDescriptor;
3909
- type index_d$1_FileDescriptorDeletedEnvelope = FileDescriptorDeletedEnvelope;
3910
- type index_d$1_FileDescriptorFileFailedEnvelope = FileDescriptorFileFailedEnvelope;
3911
- type index_d$1_FileDescriptorFileReadyEnvelope = FileDescriptorFileReadyEnvelope;
3912
- type index_d$1_FileDescriptorNonNullableFields = FileDescriptorNonNullableFields;
3913
- type index_d$1_FileDescriptorUpdatedEnvelope = FileDescriptorUpdatedEnvelope;
3914
- type index_d$1_FileFailed = FileFailed;
3915
- type index_d$1_FileMedia = FileMedia;
3916
- type index_d$1_FileMediaMediaOneOf = FileMediaMediaOneOf;
3917
- type index_d$1_FileReady = FileReady;
3918
- type index_d$1_FocalPoint = FocalPoint;
3919
- type index_d$1_FontAsset = FontAsset;
3920
- type index_d$1_FontMedia = FontMedia;
3921
- type index_d$1_GenerateFileDownloadUrlOptions = GenerateFileDownloadUrlOptions;
3922
- type index_d$1_GenerateFileDownloadUrlRequest = GenerateFileDownloadUrlRequest;
3923
- type index_d$1_GenerateFileDownloadUrlResponse = GenerateFileDownloadUrlResponse;
3924
- type index_d$1_GenerateFileDownloadUrlResponseNonNullableFields = GenerateFileDownloadUrlResponseNonNullableFields;
3925
- type index_d$1_GenerateFileResumableUploadUrlOptions = GenerateFileResumableUploadUrlOptions;
3926
- type index_d$1_GenerateFileResumableUploadUrlRequest = GenerateFileResumableUploadUrlRequest;
3927
- type index_d$1_GenerateFileResumableUploadUrlResponse = GenerateFileResumableUploadUrlResponse;
3928
- type index_d$1_GenerateFileResumableUploadUrlResponseNonNullableFields = GenerateFileResumableUploadUrlResponseNonNullableFields;
3929
- type index_d$1_GenerateFileUploadUrlOptions = GenerateFileUploadUrlOptions;
3930
- type index_d$1_GenerateFileUploadUrlRequest = GenerateFileUploadUrlRequest;
3931
- type index_d$1_GenerateFileUploadUrlResponse = GenerateFileUploadUrlResponse;
3932
- type index_d$1_GenerateFileUploadUrlResponseNonNullableFields = GenerateFileUploadUrlResponseNonNullableFields;
3933
- type index_d$1_GenerateFilesDownloadUrlRequest = GenerateFilesDownloadUrlRequest;
3934
- type index_d$1_GenerateFilesDownloadUrlResponse = GenerateFilesDownloadUrlResponse;
3935
- type index_d$1_GenerateFilesDownloadUrlResponseNonNullableFields = GenerateFilesDownloadUrlResponseNonNullableFields;
3936
- type index_d$1_GenerateVideoStreamingUrlOptions = GenerateVideoStreamingUrlOptions;
3937
- type index_d$1_GenerateVideoStreamingUrlRequest = GenerateVideoStreamingUrlRequest;
3938
- type index_d$1_GenerateVideoStreamingUrlResponse = GenerateVideoStreamingUrlResponse;
3939
- type index_d$1_GenerateVideoStreamingUrlResponseNonNullableFields = GenerateVideoStreamingUrlResponseNonNullableFields;
3940
- type index_d$1_GenerateWebSocketTokenRequest = GenerateWebSocketTokenRequest;
3941
- type index_d$1_GenerateWebSocketTokenResponse = GenerateWebSocketTokenResponse;
3942
- type index_d$1_GetFileDescriptorRequest = GetFileDescriptorRequest;
3943
- type index_d$1_GetFileDescriptorResponse = GetFileDescriptorResponse;
3944
- type index_d$1_GetFileDescriptorResponseNonNullableFields = GetFileDescriptorResponseNonNullableFields;
3945
- type index_d$1_GetFileDescriptorsRequest = GetFileDescriptorsRequest;
3946
- type index_d$1_GetFileDescriptorsResponse = GetFileDescriptorsResponse;
3947
- type index_d$1_GetFileDescriptorsResponseNonNullableFields = GetFileDescriptorsResponseNonNullableFields;
3948
- type index_d$1_IdentityInfo = IdentityInfo;
3949
- type index_d$1_IdentityType = IdentityType;
3950
- declare const index_d$1_IdentityType: typeof IdentityType;
3951
- type index_d$1_ImageAnnotationConfigurations = ImageAnnotationConfigurations;
3952
- type index_d$1_ImageAnnotationType = ImageAnnotationType;
3953
- declare const index_d$1_ImageAnnotationType: typeof ImageAnnotationType;
3954
- type index_d$1_ImageMedia = ImageMedia;
3955
- type index_d$1_ImportFileOptions = ImportFileOptions;
3956
- type index_d$1_ImportFileRequest = ImportFileRequest;
3957
- type index_d$1_ImportFileResponse = ImportFileResponse;
3958
- type index_d$1_ImportFileResponseNonNullableFields = ImportFileResponseNonNullableFields;
3959
- type index_d$1_ItemMetadata = ItemMetadata;
3960
- type index_d$1_ListDeletedFilesOptions = ListDeletedFilesOptions;
3961
- type index_d$1_ListDeletedFilesRequest = ListDeletedFilesRequest;
3962
- type index_d$1_ListDeletedFilesResponse = ListDeletedFilesResponse;
3963
- type index_d$1_ListDeletedFilesResponseNonNullableFields = ListDeletedFilesResponseNonNullableFields;
3964
- type index_d$1_ListFilesOptions = ListFilesOptions;
3965
- type index_d$1_ListFilesRequest = ListFilesRequest;
3966
- type index_d$1_ListFilesResponse = ListFilesResponse;
3967
- type index_d$1_ListFilesResponseNonNullableFields = ListFilesResponseNonNullableFields;
3968
- type index_d$1_MediaType = MediaType;
3969
- declare const index_d$1_MediaType: typeof MediaType;
3970
- type index_d$1_Model3D = Model3D;
3971
- type index_d$1_OperationStatus = OperationStatus;
3972
- declare const index_d$1_OperationStatus: typeof OperationStatus;
3973
- type index_d$1_OtherMedia = OtherMedia;
3974
- type index_d$1_Plan = Plan;
3975
- type index_d$1_Plans = Plans;
3976
- type index_d$1_SearchFilesOptions = SearchFilesOptions;
3977
- type index_d$1_SearchFilesRequest = SearchFilesRequest;
3978
- type index_d$1_SearchFilesResponse = SearchFilesResponse;
3979
- type index_d$1_SearchFilesResponseNonNullableFields = SearchFilesResponseNonNullableFields;
3980
- type index_d$1_ServiceError = ServiceError;
3981
- type index_d$1_SiteQuotaExceededError = SiteQuotaExceededError;
3982
- type index_d$1_StreamFormat = StreamFormat;
3983
- declare const index_d$1_StreamFormat: typeof StreamFormat;
3984
- type index_d$1_TotalQuota = TotalQuota;
3985
- type index_d$1_UpdateFileDescriptorRequest = UpdateFileDescriptorRequest;
3986
- type index_d$1_UpdateFileDescriptorResponse = UpdateFileDescriptorResponse;
3987
- type index_d$1_UpdateFileDescriptorResponseNonNullableFields = UpdateFileDescriptorResponseNonNullableFields;
3988
- type index_d$1_UpdateFileRequest = UpdateFileRequest;
3989
- type index_d$1_UpdateFileResponse = UpdateFileResponse;
3990
- type index_d$1_UploadProtocol = UploadProtocol;
3991
- declare const index_d$1_UploadProtocol: typeof UploadProtocol;
3992
- type index_d$1_VideoResolution = VideoResolution;
3993
- type index_d$1__publicOnFileDescriptorDeletedType = _publicOnFileDescriptorDeletedType;
3994
- type index_d$1__publicOnFileDescriptorFileFailedType = _publicOnFileDescriptorFileFailedType;
3995
- type index_d$1__publicOnFileDescriptorFileReadyType = _publicOnFileDescriptorFileReadyType;
3996
- type index_d$1__publicOnFileDescriptorUpdatedType = _publicOnFileDescriptorUpdatedType;
3997
- declare const index_d$1_bulkDeleteFiles: typeof bulkDeleteFiles;
3998
- declare const index_d$1_bulkImportFile: typeof bulkImportFile;
3999
- declare const index_d$1_bulkImportFiles: typeof bulkImportFiles;
4000
- declare const index_d$1_bulkRestoreFilesFromTrashBin: typeof bulkRestoreFilesFromTrashBin;
4001
- declare const index_d$1_generateFileDownloadUrl: typeof generateFileDownloadUrl;
4002
- declare const index_d$1_generateFileResumableUploadUrl: typeof generateFileResumableUploadUrl;
4003
- declare const index_d$1_generateFileUploadUrl: typeof generateFileUploadUrl;
4004
- declare const index_d$1_generateFilesDownloadUrl: typeof generateFilesDownloadUrl;
4005
- declare const index_d$1_generateVideoStreamingUrl: typeof generateVideoStreamingUrl;
4006
- declare const index_d$1_getFileDescriptor: typeof getFileDescriptor;
4007
- declare const index_d$1_getFileDescriptors: typeof getFileDescriptors;
4008
- declare const index_d$1_importFile: typeof importFile;
4009
- declare const index_d$1_listDeletedFiles: typeof listDeletedFiles;
4010
- declare const index_d$1_listFiles: typeof listFiles;
4011
- declare const index_d$1_onFileDescriptorDeleted: typeof onFileDescriptorDeleted;
4012
- declare const index_d$1_onFileDescriptorFileFailed: typeof onFileDescriptorFileFailed;
4013
- declare const index_d$1_onFileDescriptorFileReady: typeof onFileDescriptorFileReady;
4014
- declare const index_d$1_onFileDescriptorUpdated: typeof onFileDescriptorUpdated;
4015
- declare const index_d$1_searchFiles: typeof searchFiles;
4016
- declare const index_d$1_updateFileDescriptor: typeof updateFileDescriptor;
4017
- declare namespace index_d$1 {
4018
- export { type ActionEvent$1 as ActionEvent, type index_d$1_ApplicationError as ApplicationError, type index_d$1_Archive as Archive, type index_d$1_AudioV2 as AudioV2, type BaseEventMetadata$1 as BaseEventMetadata, type index_d$1_BulkActionMetadata as BulkActionMetadata, type index_d$1_BulkAnnotateImageResult as BulkAnnotateImageResult, type index_d$1_BulkAnnotateImagesRequest as BulkAnnotateImagesRequest, type index_d$1_BulkAnnotateImagesResponse as BulkAnnotateImagesResponse, type index_d$1_BulkDeleteFilesOptions as BulkDeleteFilesOptions, type index_d$1_BulkDeleteFilesRequest as BulkDeleteFilesRequest, type index_d$1_BulkDeleteFilesResponse as BulkDeleteFilesResponse, type index_d$1_BulkImportFileOptions as BulkImportFileOptions, type index_d$1_BulkImportFileRequest as BulkImportFileRequest, type index_d$1_BulkImportFileResponse as BulkImportFileResponse, type index_d$1_BulkImportFileResponseNonNullableFields as BulkImportFileResponseNonNullableFields, type index_d$1_BulkImportFileResult as BulkImportFileResult, type index_d$1_BulkImportFilesRequest as BulkImportFilesRequest, type index_d$1_BulkImportFilesResponse as BulkImportFilesResponse, type index_d$1_BulkImportFilesResponseNonNullableFields as BulkImportFilesResponseNonNullableFields, type index_d$1_BulkPublishDraftFileResult as BulkPublishDraftFileResult, type index_d$1_BulkPublishDraftFilesRequest as BulkPublishDraftFilesRequest, type index_d$1_BulkPublishDraftFilesResponse as BulkPublishDraftFilesResponse, type index_d$1_BulkRestoreFilesFromTrashBinRequest as BulkRestoreFilesFromTrashBinRequest, type index_d$1_BulkRestoreFilesFromTrashBinResponse as BulkRestoreFilesFromTrashBinResponse, type index_d$1_Color as Color, type index_d$1_ColorRGB as ColorRGB, type index_d$1_Colors as Colors, index_d$1_ContentDisposition as ContentDisposition, type CursorPaging$1 as CursorPaging, type Cursors$1 as Cursors, type DomainEvent$1 as DomainEvent, type DomainEventBodyOneOf$1 as DomainEventBodyOneOf, type index_d$1_DownloadUrl as DownloadUrl, type index_d$1_DraftFilePublished as DraftFilePublished, type EntityCreatedEvent$1 as EntityCreatedEvent, type EntityDeletedEvent$1 as EntityDeletedEvent, type EntityUpdatedEvent$1 as EntityUpdatedEvent, type EventMetadata$1 as EventMetadata, type index_d$1_ExternalInfo as ExternalInfo, type index_d$1_FaceRecognition as FaceRecognition, type index_d$1_FileDescriptor as FileDescriptor, type index_d$1_FileDescriptorDeletedEnvelope as FileDescriptorDeletedEnvelope, type index_d$1_FileDescriptorFileFailedEnvelope as FileDescriptorFileFailedEnvelope, type index_d$1_FileDescriptorFileReadyEnvelope as FileDescriptorFileReadyEnvelope, type index_d$1_FileDescriptorNonNullableFields as FileDescriptorNonNullableFields, type index_d$1_FileDescriptorUpdatedEnvelope as FileDescriptorUpdatedEnvelope, type index_d$1_FileFailed as FileFailed, type index_d$1_FileMedia as FileMedia, type index_d$1_FileMediaMediaOneOf as FileMediaMediaOneOf, type index_d$1_FileReady as FileReady, type index_d$1_FocalPoint as FocalPoint, type index_d$1_FontAsset as FontAsset, type index_d$1_FontMedia as FontMedia, type index_d$1_GenerateFileDownloadUrlOptions as GenerateFileDownloadUrlOptions, type index_d$1_GenerateFileDownloadUrlRequest as GenerateFileDownloadUrlRequest, type index_d$1_GenerateFileDownloadUrlResponse as GenerateFileDownloadUrlResponse, type index_d$1_GenerateFileDownloadUrlResponseNonNullableFields as GenerateFileDownloadUrlResponseNonNullableFields, type index_d$1_GenerateFileResumableUploadUrlOptions as GenerateFileResumableUploadUrlOptions, type index_d$1_GenerateFileResumableUploadUrlRequest as GenerateFileResumableUploadUrlRequest, type index_d$1_GenerateFileResumableUploadUrlResponse as GenerateFileResumableUploadUrlResponse, type index_d$1_GenerateFileResumableUploadUrlResponseNonNullableFields as GenerateFileResumableUploadUrlResponseNonNullableFields, type index_d$1_GenerateFileUploadUrlOptions as GenerateFileUploadUrlOptions, type index_d$1_GenerateFileUploadUrlRequest as GenerateFileUploadUrlRequest, type index_d$1_GenerateFileUploadUrlResponse as GenerateFileUploadUrlResponse, type index_d$1_GenerateFileUploadUrlResponseNonNullableFields as GenerateFileUploadUrlResponseNonNullableFields, type index_d$1_GenerateFilesDownloadUrlRequest as GenerateFilesDownloadUrlRequest, type index_d$1_GenerateFilesDownloadUrlResponse as GenerateFilesDownloadUrlResponse, type index_d$1_GenerateFilesDownloadUrlResponseNonNullableFields as GenerateFilesDownloadUrlResponseNonNullableFields, type index_d$1_GenerateVideoStreamingUrlOptions as GenerateVideoStreamingUrlOptions, type index_d$1_GenerateVideoStreamingUrlRequest as GenerateVideoStreamingUrlRequest, type index_d$1_GenerateVideoStreamingUrlResponse as GenerateVideoStreamingUrlResponse, type index_d$1_GenerateVideoStreamingUrlResponseNonNullableFields as GenerateVideoStreamingUrlResponseNonNullableFields, type index_d$1_GenerateWebSocketTokenRequest as GenerateWebSocketTokenRequest, type index_d$1_GenerateWebSocketTokenResponse as GenerateWebSocketTokenResponse, type index_d$1_GetFileDescriptorRequest as GetFileDescriptorRequest, type index_d$1_GetFileDescriptorResponse as GetFileDescriptorResponse, type index_d$1_GetFileDescriptorResponseNonNullableFields as GetFileDescriptorResponseNonNullableFields, type index_d$1_GetFileDescriptorsRequest as GetFileDescriptorsRequest, type index_d$1_GetFileDescriptorsResponse as GetFileDescriptorsResponse, type index_d$1_GetFileDescriptorsResponseNonNullableFields as GetFileDescriptorsResponseNonNullableFields, type IdentificationData$1 as IdentificationData, type IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, type index_d$1_IdentityInfo as IdentityInfo, index_d$1_IdentityType as IdentityType, type index_d$1_ImageAnnotationConfigurations as ImageAnnotationConfigurations, index_d$1_ImageAnnotationType as ImageAnnotationType, type index_d$1_ImageMedia as ImageMedia, type index_d$1_ImportFileOptions as ImportFileOptions, type index_d$1_ImportFileRequest as ImportFileRequest, type index_d$1_ImportFileResponse as ImportFileResponse, type index_d$1_ImportFileResponseNonNullableFields as ImportFileResponseNonNullableFields, type index_d$1_ItemMetadata as ItemMetadata, type index_d$1_ListDeletedFilesOptions as ListDeletedFilesOptions, type index_d$1_ListDeletedFilesRequest as ListDeletedFilesRequest, type index_d$1_ListDeletedFilesResponse as ListDeletedFilesResponse, type index_d$1_ListDeletedFilesResponseNonNullableFields as ListDeletedFilesResponseNonNullableFields, type index_d$1_ListFilesOptions as ListFilesOptions, type index_d$1_ListFilesRequest as ListFilesRequest, type index_d$1_ListFilesResponse as ListFilesResponse, type index_d$1_ListFilesResponseNonNullableFields as ListFilesResponseNonNullableFields, index_d$1_MediaType as MediaType, type MessageEnvelope$1 as MessageEnvelope, type index_d$1_Model3D as Model3D, Namespace$1 as Namespace, index_d$1_OperationStatus as OperationStatus, type index_d$1_OtherMedia as OtherMedia, type PagingMetadataV2$1 as PagingMetadataV2, type index_d$1_Plan as Plan, type index_d$1_Plans as Plans, type RestoreInfo$1 as RestoreInfo, RootFolder$1 as RootFolder, type index_d$1_SearchFilesOptions as SearchFilesOptions, type index_d$1_SearchFilesRequest as SearchFilesRequest, type index_d$1_SearchFilesResponse as SearchFilesResponse, type index_d$1_SearchFilesResponseNonNullableFields as SearchFilesResponseNonNullableFields, type index_d$1_ServiceError as ServiceError, type index_d$1_SiteQuotaExceededError as SiteQuotaExceededError, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, State$1 as State, index_d$1_StreamFormat as StreamFormat, type index_d$1_TotalQuota as TotalQuota, type UnsupportedRequestValueError$1 as UnsupportedRequestValueError, type index_d$1_UpdateFileDescriptorRequest as UpdateFileDescriptorRequest, type index_d$1_UpdateFileDescriptorResponse as UpdateFileDescriptorResponse, type index_d$1_UpdateFileDescriptorResponseNonNullableFields as UpdateFileDescriptorResponseNonNullableFields, type index_d$1_UpdateFileRequest as UpdateFileRequest, type index_d$1_UpdateFileResponse as UpdateFileResponse, index_d$1_UploadProtocol as UploadProtocol, type index_d$1_VideoResolution as VideoResolution, WebhookIdentityType$1 as WebhookIdentityType, type index_d$1__publicOnFileDescriptorDeletedType as _publicOnFileDescriptorDeletedType, type index_d$1__publicOnFileDescriptorFileFailedType as _publicOnFileDescriptorFileFailedType, type index_d$1__publicOnFileDescriptorFileReadyType as _publicOnFileDescriptorFileReadyType, type index_d$1__publicOnFileDescriptorUpdatedType as _publicOnFileDescriptorUpdatedType, index_d$1_bulkDeleteFiles as bulkDeleteFiles, index_d$1_bulkImportFile as bulkImportFile, index_d$1_bulkImportFiles as bulkImportFiles, index_d$1_bulkRestoreFilesFromTrashBin as bulkRestoreFilesFromTrashBin, index_d$1_generateFileDownloadUrl as generateFileDownloadUrl, index_d$1_generateFileResumableUploadUrl as generateFileResumableUploadUrl, index_d$1_generateFileUploadUrl as generateFileUploadUrl, index_d$1_generateFilesDownloadUrl as generateFilesDownloadUrl, index_d$1_generateVideoStreamingUrl as generateVideoStreamingUrl, index_d$1_getFileDescriptor as getFileDescriptor, index_d$1_getFileDescriptors as getFileDescriptors, index_d$1_importFile as importFile, index_d$1_listDeletedFiles as listDeletedFiles, index_d$1_listFiles as listFiles, index_d$1_onFileDescriptorDeleted as onFileDescriptorDeleted, index_d$1_onFileDescriptorFileFailed as onFileDescriptorFileFailed, index_d$1_onFileDescriptorFileReady as onFileDescriptorFileReady, index_d$1_onFileDescriptorUpdated as onFileDescriptorUpdated, onFileDescriptorDeleted$1 as publicOnFileDescriptorDeleted, onFileDescriptorFileFailed$1 as publicOnFileDescriptorFileFailed, onFileDescriptorFileReady$1 as publicOnFileDescriptorFileReady, onFileDescriptorUpdated$1 as publicOnFileDescriptorUpdated, index_d$1_searchFiles as searchFiles, index_d$1_updateFileDescriptor as updateFileDescriptor };
4019
- }
4020
-
4021
- interface Folder {
4022
- /** Folder ID. Generated when a folder is created in the Media Manager. */
4023
- _id?: string;
4024
- /** Folder name as it appears in the Media Manager. */
4025
- displayName?: string;
4026
- /** ID of the folder's parent folder. <br /> Default: `media-root` folder. */
4027
- parentFolderId?: string;
4028
- /**
4029
- * Date the folder was created.
4030
- * @readonly
4031
- */
4032
- _createdDate?: Date | null;
4033
- /**
4034
- * Date the folder was updated.
4035
- * @readonly
4036
- */
4037
- _updatedDate?: Date | null;
4038
- /**
4039
- * State of the folder.
4040
- * @readonly
4041
- */
4042
- state?: State;
4043
- }
4044
- declare enum State {
4045
- OK = "OK",
4046
- DELETED = "DELETED"
4047
- }
4048
- declare enum Namespace {
4049
- NO_NAMESPACE = "NO_NAMESPACE",
4050
- OTHERS = "OTHERS",
4051
- /** ANY = 2; */
4052
- WIX_VIDEO = "WIX_VIDEO",
4053
- /** _nsWixMusic */
4054
- WIX_MUSIC = "WIX_MUSIC",
4055
- /** _nsArtStore */
4056
- ALBUMS_AND_ART_STORE = "ALBUMS_AND_ART_STORE",
4057
- /** _nsDigitalProduct */
4058
- WIX_ECOM = "WIX_ECOM",
4059
- /** _nsPhotoShareApp */
4060
- PHOTO_SHARE_APP = "PHOTO_SHARE_APP",
4061
- /** _nsSharingApp, */
4062
- SHARING_APP = "SHARING_APP",
4063
- /** engage */
4064
- CHAT = "CHAT",
4065
- /** logobuilder */
4066
- LOGO_BUILDER = "LOGO_BUILDER",
4067
- /** WixExposure */
4068
- ALBUMS_OLD = "ALBUMS_OLD",
4069
- /** chat-mobile-uploads */
4070
- CHAT_MOBILE = "CHAT_MOBILE",
4071
- /** _nsWixForms */
4072
- WIX_FORMS = "WIX_FORMS"
4073
- }
4074
- interface CreateFolderRequest {
4075
- /** Folder name that appears in the Media Manager. */
4076
- displayName: string;
4077
- /** ID of the folder's parent folder. */
4078
- parentFolderId?: string | null;
4079
- }
4080
- interface CreateFolderResponse {
4081
- /** Information about the newly created folder. */
4082
- folder?: Folder;
4083
- }
4084
- interface GetFolderRequest {
4085
- /** Folder ID. */
4086
- folderId: string;
4087
- }
4088
- interface GetFolderResponse {
4089
- /** Information about the folder. */
4090
- folder?: Folder;
4091
- }
4092
- interface ListFoldersRequest {
4093
- /**
4094
- * ID of the folder's parent folder.
4095
- * <br /> Default: `media-root` folder.
4096
- */
4097
- parentFolderId?: string | null;
4098
- /**
4099
- * Field name and order to sort by. One of: <br />
4100
- * * `displayName`
4101
- * * `updatedDate`
4102
- * Default: `updatedDate` in `desc` order.
4103
- */
4104
- sort?: Sorting;
4105
- /** Cursor and paging information. */
4106
- paging?: CursorPaging;
4107
- }
4108
- interface Sorting {
4109
- /** Name of the field to sort by. */
4110
- fieldName?: string;
4111
- /** Sort order. */
4112
- order?: SortOrder;
4113
- }
4114
- declare enum SortOrder {
4115
- ASC = "ASC",
4116
- DESC = "DESC"
4117
- }
4118
- interface CursorPaging {
4119
- /** Maximum number of items to return in the results. */
4120
- limit?: number | null;
4121
- /**
4122
- * Pointer to the next or previous page in the list of results.
4123
- *
4124
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
4125
- * Not relevant for the first request.
4126
- */
4127
- cursor?: string | null;
4128
- }
4129
- interface ListFoldersResponse {
4130
- /** Information about the folders in the requested folder. */
4131
- folders?: Folder[];
4132
- /** The next cursor if it exists. */
4133
- nextCursor?: PagingMetadataV2;
4134
- }
4135
- interface PagingMetadataV2 {
4136
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
4137
- total?: number | null;
4138
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
4139
- cursors?: Cursors;
4140
- }
4141
- interface Cursors {
4142
- /** Cursor string pointing to the next page in the list of results. */
4143
- next?: string | null;
4144
- }
4145
- interface SearchFoldersRequest {
4146
- /**
4147
- * A root folder in the Media Manager to search in. <br />
4148
- * Default: `MEDIA_ROOT`.
4149
- */
4150
- rootFolder?: RootFolder;
4151
- /**
4152
- * Field name and order to sort by. One of:
4153
- * * `displayName`
4154
- * * `updatedDate`
4155
- * Default: `updatedDate` in `desc` order.
4156
- */
4157
- sort?: Sorting;
4158
- /** Cursor and paging information. */
4159
- paging?: CursorPaging;
4160
- /**
4161
- * Term to search for, such as the value of a folder's `displayName`. <br />
4162
- * For example, if a folder's `displayName` is 'my-videos-folder', the search term is 'my-videos-folder'.
4163
- */
4164
- search?: string | null;
4165
- }
4166
- declare enum RootFolder {
4167
- /** Root of all site media */
4168
- MEDIA_ROOT = "MEDIA_ROOT",
4169
- /** Root of the trash system folder */
4170
- TRASH_ROOT = "TRASH_ROOT",
4171
- /** Root of all visitor uploads */
4172
- VISITOR_UPLOADS_ROOT = "VISITOR_UPLOADS_ROOT"
4173
- }
4174
- interface SearchFoldersResponse {
4175
- /** Information about the folders in the requested folder. */
4176
- folders?: Folder[];
4177
- /** The next cursor if it exists. */
4178
- nextCursor?: PagingMetadataV2;
4179
- }
4180
- interface UpdateFolderRequest {
4181
- /** Folder to update. */
4182
- folder: Folder;
4183
- }
4184
- interface UpdateFolderResponse {
4185
- /** Information about the updated folder. */
4186
- folder?: Folder;
4187
- }
4188
- interface UnsupportedRequestValueError {
4189
- /** Optional A list of allowed values */
4190
- allowedValues?: string[];
4191
- /** The unsupported value send in the request */
4192
- requestValue?: string;
4193
- }
4194
- interface GenerateFolderDownloadUrlRequest {
4195
- /** Folder ID. */
4196
- folderId: string;
4197
- }
4198
- interface GenerateFolderDownloadUrlResponse {
4199
- /** URL for downloading a specific folder in the Media Manager. */
4200
- downloadUrl?: string;
4201
- }
4202
- interface BulkDeleteFoldersRequest {
4203
- /** IDs of the folders to move to the Media Manager's trash bin. */
4204
- folderIds: string[];
4205
- /**
4206
- * Whether the specified folders are permanently deleted. <br />
4207
- * Default: `false`
4208
- */
4209
- permanent?: boolean;
4210
- }
4211
- interface BulkDeleteFoldersResponse {
4212
- }
4213
- interface BulkRestoreFoldersFromTrashBinRequest {
4214
- /** IDs of the folders to restore from the Media Manager's trash bin. */
4215
- folderIds: string[];
4216
- }
4217
- interface BulkRestoreFoldersFromTrashBinResponse {
4218
- }
4219
- interface ListDeletedFoldersRequest {
4220
- /** ID of the folder's parent folder. */
4221
- parentFolderId?: string | null;
4222
- /**
4223
- * Field name and order to sort by. One of:
4224
- * * `displayName`
4225
- * * `updatedDate`
4226
- * Default: `updatedDate` in `desc` order.
4227
- */
4228
- sort?: Sorting;
4229
- /** Cursor and paging information. */
4230
- paging?: CursorPaging;
4231
- }
4232
- interface ListDeletedFoldersResponse {
4233
- /** List of folders in the Media Manager's trash bin. */
4234
- folders?: Folder[];
4235
- /** The next cursor if it exists. */
4236
- nextCursor?: PagingMetadataV2;
4237
- }
4238
- interface DomainEvent extends DomainEventBodyOneOf {
4239
- createdEvent?: EntityCreatedEvent;
4240
- updatedEvent?: EntityUpdatedEvent;
4241
- deletedEvent?: EntityDeletedEvent;
4242
- actionEvent?: ActionEvent;
4243
- /**
4244
- * Unique event ID.
4245
- * Allows clients to ignore duplicate webhooks.
4246
- */
4247
- _id?: string;
4248
- /**
4249
- * Assumes actions are also always typed to an entity_type
4250
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4251
- */
4252
- entityFqdn?: string;
4253
- /**
4254
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4255
- * This is although the created/updated/deleted notion is duplication of the oneof types
4256
- * Example: created/updated/deleted/started/completed/email_opened
4257
- */
4258
- slug?: string;
4259
- /** ID of the entity associated with the event. */
4260
- entityId?: string;
4261
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
4262
- eventTime?: Date | null;
4263
- /**
4264
- * Whether the event was triggered as a result of a privacy regulation application
4265
- * (for example, GDPR).
4266
- */
4267
- triggeredByAnonymizeRequest?: boolean | null;
4268
- /** If present, indicates the action that triggered the event. */
4269
- originatedFrom?: string | null;
4270
- /**
4271
- * A sequence number defining the order of updates to the underlying entity.
4272
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
4273
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4274
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4275
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
4276
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4277
- */
4278
- entityEventSequence?: string | null;
4279
- }
4280
- /** @oneof */
4281
- interface DomainEventBodyOneOf {
4282
- createdEvent?: EntityCreatedEvent;
4283
- updatedEvent?: EntityUpdatedEvent;
4284
- deletedEvent?: EntityDeletedEvent;
4285
- actionEvent?: ActionEvent;
4286
- }
4287
- interface EntityCreatedEvent {
4288
- entity?: string;
4289
- }
4290
- interface RestoreInfo {
4291
- deletedDate?: Date | null;
4292
- }
4293
- interface EntityUpdatedEvent {
4294
- /**
4295
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
4296
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
4297
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
4298
- */
4299
- currentEntity?: string;
4300
- }
4301
- interface EntityDeletedEvent {
4302
- /** Entity that was deleted */
4303
- deletedEntity?: string | null;
4304
- }
4305
- interface ActionEvent {
4306
- body?: string;
4307
- }
4308
- interface MessageEnvelope {
4309
- /** App instance ID. */
4310
- instanceId?: string | null;
4311
- /** Event type. */
4312
- eventType?: string;
4313
- /** The identification type and identity data. */
4314
- identity?: IdentificationData;
4315
- /** Stringify payload. */
4316
- data?: string;
4317
- }
4318
- interface IdentificationData extends IdentificationDataIdOneOf {
4319
- /** ID of a site visitor that has not logged in to the site. */
4320
- anonymousVisitorId?: string;
4321
- /** ID of a site visitor that has logged in to the site. */
4322
- memberId?: string;
4323
- /** ID of a Wix user (site owner, contributor, etc.). */
4324
- wixUserId?: string;
4325
- /** ID of an app. */
4326
- appId?: string;
4327
- /** @readonly */
4328
- identityType?: WebhookIdentityType;
4329
- }
4330
- /** @oneof */
4331
- interface IdentificationDataIdOneOf {
4332
- /** ID of a site visitor that has not logged in to the site. */
4333
- anonymousVisitorId?: string;
4334
- /** ID of a site visitor that has logged in to the site. */
4335
- memberId?: string;
4336
- /** ID of a Wix user (site owner, contributor, etc.). */
4337
- wixUserId?: string;
4338
- /** ID of an app. */
4339
- appId?: string;
4340
- }
4341
- declare enum WebhookIdentityType {
4342
- UNKNOWN = "UNKNOWN",
4343
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
4344
- MEMBER = "MEMBER",
4345
- WIX_USER = "WIX_USER",
4346
- APP = "APP"
4347
- }
4348
- interface FolderNonNullableFields {
4349
- _id: string;
4350
- displayName: string;
4351
- parentFolderId: string;
4352
- state: State;
4353
- namespace: Namespace;
4354
- }
4355
- interface CreateFolderResponseNonNullableFields {
4356
- folder?: FolderNonNullableFields;
4357
- }
4358
- interface GetFolderResponseNonNullableFields {
4359
- folder?: FolderNonNullableFields;
4360
- }
4361
- interface ListFoldersResponseNonNullableFields {
4362
- folders: FolderNonNullableFields[];
4363
- }
4364
- interface SearchFoldersResponseNonNullableFields {
4365
- folders: FolderNonNullableFields[];
4366
- }
4367
- interface UpdateFolderResponseNonNullableFields {
4368
- folder?: FolderNonNullableFields;
4369
- }
4370
- interface GenerateFolderDownloadUrlResponseNonNullableFields {
4371
- downloadUrl: string;
4372
- }
4373
- interface ListDeletedFoldersResponseNonNullableFields {
4374
- folders: FolderNonNullableFields[];
4375
- }
4376
- interface BaseEventMetadata {
4377
- /** App instance ID. */
4378
- instanceId?: string | null;
4379
- /** Event type. */
4380
- eventType?: string;
4381
- /** The identification type and identity data. */
4382
- identity?: IdentificationData;
4383
- }
4384
- interface EventMetadata extends BaseEventMetadata {
4385
- /**
4386
- * Unique event ID.
4387
- * Allows clients to ignore duplicate webhooks.
4388
- */
4389
- _id?: string;
4390
- /**
4391
- * Assumes actions are also always typed to an entity_type
4392
- * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
4393
- */
4394
- entityFqdn?: string;
4395
- /**
4396
- * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
4397
- * This is although the created/updated/deleted notion is duplication of the oneof types
4398
- * Example: created/updated/deleted/started/completed/email_opened
4399
- */
4400
- slug?: string;
4401
- /** ID of the entity associated with the event. */
4402
- entityId?: string;
4403
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
4404
- eventTime?: Date | null;
4405
- /**
4406
- * Whether the event was triggered as a result of a privacy regulation application
4407
- * (for example, GDPR).
4408
- */
4409
- triggeredByAnonymizeRequest?: boolean | null;
4410
- /** If present, indicates the action that triggered the event. */
4411
- originatedFrom?: string | null;
4412
- /**
4413
- * A sequence number defining the order of updates to the underlying entity.
4414
- * For example, given that some entity was updated at 16:00 and than again at 16:01,
4415
- * it is guaranteed that the sequence number of the second update is strictly higher than the first.
4416
- * As the consumer, you can use this value to ensure that you handle messages in the correct order.
4417
- * To do so, you will need to persist this number on your end, and compare the sequence number from the
4418
- * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
4419
- */
4420
- entityEventSequence?: string | null;
4421
- }
4422
- interface FolderCreatedEnvelope {
4423
- entity: Folder;
4424
- metadata: EventMetadata;
4425
- }
4426
- interface FolderDeletedEnvelope {
4427
- metadata: EventMetadata;
4428
- }
4429
- interface FolderUpdatedEnvelope {
4430
- entity: Folder;
4431
- metadata: EventMetadata;
4432
- }
4433
- interface CreateFolderOptions {
4434
- /** ID of the folder's parent folder. */
4435
- parentFolderId?: string | null;
4436
- }
4437
- interface ListFoldersOptions {
4438
- /**
4439
- * ID of the folder's parent folder.
4440
- * <br /> Default: `media-root` folder.
4441
- */
4442
- parentFolderId?: string | null;
4443
- /**
4444
- * Field name and order to sort by. One of: <br />
4445
- * * `displayName`
4446
- * * `updatedDate`
4447
- * Default: `updatedDate` in `desc` order.
4448
- */
4449
- sort?: Sorting;
4450
- /** Cursor and paging information. */
4451
- paging?: CursorPaging;
4452
- }
4453
- interface SearchFoldersOptions {
4454
- /**
4455
- * A root folder in the Media Manager to search in. <br />
4456
- * Default: `MEDIA_ROOT`.
4457
- */
4458
- rootFolder?: RootFolder;
4459
- /**
4460
- * Field name and order to sort by. One of:
4461
- * * `displayName`
4462
- * * `updatedDate`
4463
- * Default: `updatedDate` in `desc` order.
4464
- */
4465
- sort?: Sorting;
4466
- /** Cursor and paging information. */
4467
- paging?: CursorPaging;
4468
- /**
4469
- * Term to search for, such as the value of a folder's `displayName`. <br />
4470
- * For example, if a folder's `displayName` is 'my-videos-folder', the search term is 'my-videos-folder'.
4471
- */
4472
- search?: string | null;
4473
- }
4474
- interface UpdateFolder {
4475
- /** Folder ID. Generated when a folder is created in the Media Manager. */
4476
- _id?: string;
4477
- /** Folder name as it appears in the Media Manager. */
4478
- displayName?: string;
4479
- /** ID of the folder's parent folder. <br /> Default: `media-root` folder. */
4480
- parentFolderId?: string;
4481
- /**
4482
- * Date the folder was created.
4483
- * @readonly
4484
- */
4485
- _createdDate?: Date | null;
4486
- /**
4487
- * Date the folder was updated.
4488
- * @readonly
4489
- */
4490
- _updatedDate?: Date | null;
4491
- /**
4492
- * State of the folder.
4493
- * @readonly
4494
- */
4495
- state?: State;
4496
- }
4497
- interface BulkDeleteFoldersOptions {
4498
- /**
4499
- * Whether the specified folders are permanently deleted. <br />
4500
- * Default: `false`
4501
- */
4502
- permanent?: boolean;
4503
- }
4504
- interface ListDeletedFoldersOptions {
4505
- /** ID of the folder's parent folder. */
4506
- parentFolderId?: string | null;
4507
- /**
4508
- * Field name and order to sort by. One of:
4509
- * * `displayName`
4510
- * * `updatedDate`
4511
- * Default: `updatedDate` in `desc` order.
4512
- */
4513
- sort?: Sorting;
4514
- /** Cursor and paging information. */
4515
- paging?: CursorPaging;
4516
- }
4517
-
4518
- declare function createFolder$1(httpClient: HttpClient): CreateFolderSignature;
4519
- interface CreateFolderSignature {
4520
- /**
4521
- * Creates a new folder in the Media Manager. <br/>
4522
- *
4523
- * Use the `parentFolderId` parameter to specify in which existing folder you want the new folder to be created.
4524
- * If no folder is specified, the new folder is created in the `media-root` folder.
4525
- * @param - Folder name that appears in the Media Manager.
4526
- * @param - Options for specifying where to create a folder.
4527
- */
4528
- (displayName: string, options?: CreateFolderOptions | undefined): Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
4529
- }
4530
- declare function getFolder$1(httpClient: HttpClient): GetFolderSignature;
4531
- interface GetFolderSignature {
4532
- /**
4533
- * Gets information from a specific folder in the Media Manager.
4534
- * @param - Folder ID.
4535
- * @returns Information about the folder.
4536
- */
4537
- (folderId: string): Promise<Folder & FolderNonNullableFields>;
4538
- }
4539
- declare function listFolders$1(httpClient: HttpClient): ListFoldersSignature;
4540
- interface ListFoldersSignature {
4541
- /**
4542
- * Retrieves a list of folders in the Media Manager. To retrieve a list of folders within a specific folder in the Media Manager, specify the specific folder's ID in the `parentFolderId` parameter. If no folder is specified, the method retrieves a list of folders within the root folder of the Media Manager.
4543
- * @param - Options to use when listing folders from the Media Manager.
4544
- */
4545
- (options?: ListFoldersOptions | undefined): Promise<ListFoldersResponse & ListFoldersResponseNonNullableFields>;
4546
- }
4547
- declare function searchFolders$1(httpClient: HttpClient): SearchFoldersSignature;
4548
- interface SearchFoldersSignature {
4549
- /**
4550
- * Searches the Media Manager and returns a list of folders that match the terms specified in the parameters. <br/>
4551
- *
4552
- * If no parameters are specified, the method returns all folders in the `MEDIA_ROOT` folder.
4553
- * @param - Options specifying which folders to search.
4554
- */
4555
- (options?: SearchFoldersOptions | undefined): Promise<SearchFoldersResponse & SearchFoldersResponseNonNullableFields>;
4556
- }
4557
- declare function updateFolder$1(httpClient: HttpClient): UpdateFolderSignature;
4558
- interface UpdateFolderSignature {
4559
- /**
4560
- * Updates a folder. <br />
4561
- *
4562
- * You can use the `parentFolderId` parameter to move a folder from its current parent folder to a different parent folder.
4563
- * @param - Folder ID. Generated when a folder is created in the Media Manager.
4564
- * @param - Folder to update.
4565
- * @returns Information about the updated folder.
4566
- */
4567
- (_id: string, folder: UpdateFolder): Promise<Folder & FolderNonNullableFields>;
4568
- }
4569
- declare function generateFolderDownloadUrl$1(httpClient: HttpClient): GenerateFolderDownloadUrlSignature;
4570
- interface GenerateFolderDownloadUrlSignature {
4571
- /**
4572
- * Generates a URL for downloading a compressed file containing a specific folder in the Media Manager. <br/>
4573
- *
4574
- * The compressed file can contain sub-folders, and up to 1000 files.
4575
- * @param - Folder ID.
4576
- */
4577
- (folderId: string): Promise<GenerateFolderDownloadUrlResponse & GenerateFolderDownloadUrlResponseNonNullableFields>;
4578
- }
4579
- declare function bulkDeleteFolders$1(httpClient: HttpClient): BulkDeleteFoldersSignature;
4580
- interface BulkDeleteFoldersSignature {
4581
- /**
4582
- * Temporarily deletes the specified folders from the Media Manager. <br/>
4583
- *
4584
- * The deleted folders are moved to the Media Manager's `trash-root` folder (trash bin) unless permanently deleted. To permanently delete folders, specify the `permanent` parameter with the value `true`. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.
4585
- *
4586
- * Note the following:
4587
- * * When a folder is deleted, the files in that folder are deleted.
4588
- * * The specified folders can be from different parent folders.
4589
- * * Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
4590
- * * Attempting to delete folders that are already in the trash bin doesn't result in an error.
4591
- * * If a site contains files from a deleted media folder, the files still appear on the site as the deleted folder is still in the Media Manager (in the trash bin).
4592
- * * You can also use the Bulk Restore Folders From Trash Bin ([SDK](https://dev.wix.com/docs/sdk/backend-modules/media/folders/bulk-restore-folders-from-trash-bin) | [REST](https://dev.wix.com/docs/rest/assets/media/media-manager/folders/bulk-restore-folders-from-trash-bin)) method to restore folders from the Media Manager's trash bin.
4593
- * @param - IDs of the folders to move to the Media Manager's trash bin.
4594
- * @param - Options to use when deleting folders.
4595
- */
4596
- (folderIds: string[], options?: BulkDeleteFoldersOptions | undefined): Promise<void>;
4597
- }
4598
- declare function bulkRestoreFoldersFromTrashBin$1(httpClient: HttpClient): BulkRestoreFoldersFromTrashBinSignature;
4599
- interface BulkRestoreFoldersFromTrashBinSignature {
4600
- /**
4601
- * Restores the specified folders from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
4602
- * @param - IDs of the folders to restore from the Media Manager's trash bin.
4603
- */
4604
- (folderIds: string[]): Promise<void>;
4605
- }
4606
- declare function listDeletedFolders$1(httpClient: HttpClient): ListDeletedFoldersSignature;
4607
- interface ListDeletedFoldersSignature {
4608
- /**
4609
- * Retrieves a list of folders in the Media Manager's trash bin.
4610
- * @param - Options to use when listing deleted folders from the trash bin.
4611
- */
4612
- (options?: ListDeletedFoldersOptions | undefined): Promise<ListDeletedFoldersResponse & ListDeletedFoldersResponseNonNullableFields>;
4613
- }
4614
- declare const onFolderCreated$1: EventDefinition<FolderCreatedEnvelope, "wix.media.site_media.v1.folder_created">;
4615
- declare const onFolderDeleted$1: EventDefinition<FolderDeletedEnvelope, "wix.media.site_media.v1.folder_deleted">;
4616
- declare const onFolderUpdated$1: EventDefinition<FolderUpdatedEnvelope, "wix.media.site_media.v1.folder_updated">;
4617
-
4618
- declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4619
-
4620
- declare const createFolder: MaybeContext<BuildRESTFunction<typeof createFolder$1> & typeof createFolder$1>;
4621
- declare const getFolder: MaybeContext<BuildRESTFunction<typeof getFolder$1> & typeof getFolder$1>;
4622
- declare const listFolders: MaybeContext<BuildRESTFunction<typeof listFolders$1> & typeof listFolders$1>;
4623
- declare const searchFolders: MaybeContext<BuildRESTFunction<typeof searchFolders$1> & typeof searchFolders$1>;
4624
- declare const updateFolder: MaybeContext<BuildRESTFunction<typeof updateFolder$1> & typeof updateFolder$1>;
4625
- declare const generateFolderDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFolderDownloadUrl$1> & typeof generateFolderDownloadUrl$1>;
4626
- declare const bulkDeleteFolders: MaybeContext<BuildRESTFunction<typeof bulkDeleteFolders$1> & typeof bulkDeleteFolders$1>;
4627
- declare const bulkRestoreFoldersFromTrashBin: MaybeContext<BuildRESTFunction<typeof bulkRestoreFoldersFromTrashBin$1> & typeof bulkRestoreFoldersFromTrashBin$1>;
4628
- declare const listDeletedFolders: MaybeContext<BuildRESTFunction<typeof listDeletedFolders$1> & typeof listDeletedFolders$1>;
4629
-
4630
- type _publicOnFolderCreatedType = typeof onFolderCreated$1;
4631
- /**
4632
- * Triggered when a folder is created.
4633
- *
4634
- * This event is also triggered when a folder is restored from the Media Manager's trash bin.
4635
- */
4636
- declare const onFolderCreated: ReturnType<typeof createEventModule<_publicOnFolderCreatedType>>;
4637
-
4638
- type _publicOnFolderDeletedType = typeof onFolderDeleted$1;
4639
- /**
4640
- * Triggered when a folder is deleted.
4641
- *
4642
- * If the `movedToTrash` property in the event object is `true`, the folder was moved to the Media Manager's trash bin. If the `movedToTrash` property in the event object is `false`, the folder was permanently deleted.
4643
- */
4644
- declare const onFolderDeleted: ReturnType<typeof createEventModule<_publicOnFolderDeletedType>>;
4645
-
4646
- type _publicOnFolderUpdatedType = typeof onFolderUpdated$1;
4647
- /**
4648
- * Triggered when a folder is updated, including when a folder is moved to a different parent folder.
4649
- */
4650
- declare const onFolderUpdated: ReturnType<typeof createEventModule<_publicOnFolderUpdatedType>>;
4651
-
4652
- type index_d_ActionEvent = ActionEvent;
4653
- type index_d_BaseEventMetadata = BaseEventMetadata;
4654
- type index_d_BulkDeleteFoldersOptions = BulkDeleteFoldersOptions;
4655
- type index_d_BulkDeleteFoldersRequest = BulkDeleteFoldersRequest;
4656
- type index_d_BulkDeleteFoldersResponse = BulkDeleteFoldersResponse;
4657
- type index_d_BulkRestoreFoldersFromTrashBinRequest = BulkRestoreFoldersFromTrashBinRequest;
4658
- type index_d_BulkRestoreFoldersFromTrashBinResponse = BulkRestoreFoldersFromTrashBinResponse;
4659
- type index_d_CreateFolderOptions = CreateFolderOptions;
4660
- type index_d_CreateFolderRequest = CreateFolderRequest;
4661
- type index_d_CreateFolderResponse = CreateFolderResponse;
4662
- type index_d_CreateFolderResponseNonNullableFields = CreateFolderResponseNonNullableFields;
4663
- type index_d_CursorPaging = CursorPaging;
4664
- type index_d_Cursors = Cursors;
4665
- type index_d_DomainEvent = DomainEvent;
4666
- type index_d_DomainEventBodyOneOf = DomainEventBodyOneOf;
4667
- type index_d_EntityCreatedEvent = EntityCreatedEvent;
4668
- type index_d_EntityDeletedEvent = EntityDeletedEvent;
4669
- type index_d_EntityUpdatedEvent = EntityUpdatedEvent;
4670
- type index_d_EventMetadata = EventMetadata;
4671
- type index_d_Folder = Folder;
4672
- type index_d_FolderCreatedEnvelope = FolderCreatedEnvelope;
4673
- type index_d_FolderDeletedEnvelope = FolderDeletedEnvelope;
4674
- type index_d_FolderNonNullableFields = FolderNonNullableFields;
4675
- type index_d_FolderUpdatedEnvelope = FolderUpdatedEnvelope;
4676
- type index_d_GenerateFolderDownloadUrlRequest = GenerateFolderDownloadUrlRequest;
4677
- type index_d_GenerateFolderDownloadUrlResponse = GenerateFolderDownloadUrlResponse;
4678
- type index_d_GenerateFolderDownloadUrlResponseNonNullableFields = GenerateFolderDownloadUrlResponseNonNullableFields;
4679
- type index_d_GetFolderRequest = GetFolderRequest;
4680
- type index_d_GetFolderResponse = GetFolderResponse;
4681
- type index_d_GetFolderResponseNonNullableFields = GetFolderResponseNonNullableFields;
4682
- type index_d_IdentificationData = IdentificationData;
4683
- type index_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf;
4684
- type index_d_ListDeletedFoldersOptions = ListDeletedFoldersOptions;
4685
- type index_d_ListDeletedFoldersRequest = ListDeletedFoldersRequest;
4686
- type index_d_ListDeletedFoldersResponse = ListDeletedFoldersResponse;
4687
- type index_d_ListDeletedFoldersResponseNonNullableFields = ListDeletedFoldersResponseNonNullableFields;
4688
- type index_d_ListFoldersOptions = ListFoldersOptions;
4689
- type index_d_ListFoldersRequest = ListFoldersRequest;
4690
- type index_d_ListFoldersResponse = ListFoldersResponse;
4691
- type index_d_ListFoldersResponseNonNullableFields = ListFoldersResponseNonNullableFields;
4692
- type index_d_MessageEnvelope = MessageEnvelope;
4693
- type index_d_Namespace = Namespace;
4694
- declare const index_d_Namespace: typeof Namespace;
4695
- type index_d_PagingMetadataV2 = PagingMetadataV2;
4696
- type index_d_RestoreInfo = RestoreInfo;
4697
- type index_d_RootFolder = RootFolder;
4698
- declare const index_d_RootFolder: typeof RootFolder;
4699
- type index_d_SearchFoldersOptions = SearchFoldersOptions;
4700
- type index_d_SearchFoldersRequest = SearchFoldersRequest;
4701
- type index_d_SearchFoldersResponse = SearchFoldersResponse;
4702
- type index_d_SearchFoldersResponseNonNullableFields = SearchFoldersResponseNonNullableFields;
4703
- type index_d_SortOrder = SortOrder;
4704
- declare const index_d_SortOrder: typeof SortOrder;
4705
- type index_d_Sorting = Sorting;
4706
- type index_d_State = State;
4707
- declare const index_d_State: typeof State;
4708
- type index_d_UnsupportedRequestValueError = UnsupportedRequestValueError;
4709
- type index_d_UpdateFolder = UpdateFolder;
4710
- type index_d_UpdateFolderRequest = UpdateFolderRequest;
4711
- type index_d_UpdateFolderResponse = UpdateFolderResponse;
4712
- type index_d_UpdateFolderResponseNonNullableFields = UpdateFolderResponseNonNullableFields;
4713
- type index_d_WebhookIdentityType = WebhookIdentityType;
4714
- declare const index_d_WebhookIdentityType: typeof WebhookIdentityType;
4715
- type index_d__publicOnFolderCreatedType = _publicOnFolderCreatedType;
4716
- type index_d__publicOnFolderDeletedType = _publicOnFolderDeletedType;
4717
- type index_d__publicOnFolderUpdatedType = _publicOnFolderUpdatedType;
4718
- declare const index_d_bulkDeleteFolders: typeof bulkDeleteFolders;
4719
- declare const index_d_bulkRestoreFoldersFromTrashBin: typeof bulkRestoreFoldersFromTrashBin;
4720
- declare const index_d_createFolder: typeof createFolder;
4721
- declare const index_d_generateFolderDownloadUrl: typeof generateFolderDownloadUrl;
4722
- declare const index_d_getFolder: typeof getFolder;
4723
- declare const index_d_listDeletedFolders: typeof listDeletedFolders;
4724
- declare const index_d_listFolders: typeof listFolders;
4725
- declare const index_d_onFolderCreated: typeof onFolderCreated;
4726
- declare const index_d_onFolderDeleted: typeof onFolderDeleted;
4727
- declare const index_d_onFolderUpdated: typeof onFolderUpdated;
4728
- declare const index_d_searchFolders: typeof searchFolders;
4729
- declare const index_d_updateFolder: typeof updateFolder;
4730
- declare namespace index_d {
4731
- export { type index_d_ActionEvent as ActionEvent, type index_d_BaseEventMetadata as BaseEventMetadata, type index_d_BulkDeleteFoldersOptions as BulkDeleteFoldersOptions, type index_d_BulkDeleteFoldersRequest as BulkDeleteFoldersRequest, type index_d_BulkDeleteFoldersResponse as BulkDeleteFoldersResponse, type index_d_BulkRestoreFoldersFromTrashBinRequest as BulkRestoreFoldersFromTrashBinRequest, type index_d_BulkRestoreFoldersFromTrashBinResponse as BulkRestoreFoldersFromTrashBinResponse, type index_d_CreateFolderOptions as CreateFolderOptions, type index_d_CreateFolderRequest as CreateFolderRequest, type index_d_CreateFolderResponse as CreateFolderResponse, type index_d_CreateFolderResponseNonNullableFields as CreateFolderResponseNonNullableFields, type index_d_CursorPaging as CursorPaging, type index_d_Cursors as Cursors, type index_d_DomainEvent as DomainEvent, type index_d_DomainEventBodyOneOf as DomainEventBodyOneOf, type index_d_EntityCreatedEvent as EntityCreatedEvent, type index_d_EntityDeletedEvent as EntityDeletedEvent, type index_d_EntityUpdatedEvent as EntityUpdatedEvent, type index_d_EventMetadata as EventMetadata, type index_d_Folder as Folder, type index_d_FolderCreatedEnvelope as FolderCreatedEnvelope, type index_d_FolderDeletedEnvelope as FolderDeletedEnvelope, type index_d_FolderNonNullableFields as FolderNonNullableFields, type index_d_FolderUpdatedEnvelope as FolderUpdatedEnvelope, type index_d_GenerateFolderDownloadUrlRequest as GenerateFolderDownloadUrlRequest, type index_d_GenerateFolderDownloadUrlResponse as GenerateFolderDownloadUrlResponse, type index_d_GenerateFolderDownloadUrlResponseNonNullableFields as GenerateFolderDownloadUrlResponseNonNullableFields, type index_d_GetFolderRequest as GetFolderRequest, type index_d_GetFolderResponse as GetFolderResponse, type index_d_GetFolderResponseNonNullableFields as GetFolderResponseNonNullableFields, type index_d_IdentificationData as IdentificationData, type index_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, type index_d_ListDeletedFoldersOptions as ListDeletedFoldersOptions, type index_d_ListDeletedFoldersRequest as ListDeletedFoldersRequest, type index_d_ListDeletedFoldersResponse as ListDeletedFoldersResponse, type index_d_ListDeletedFoldersResponseNonNullableFields as ListDeletedFoldersResponseNonNullableFields, type index_d_ListFoldersOptions as ListFoldersOptions, type index_d_ListFoldersRequest as ListFoldersRequest, type index_d_ListFoldersResponse as ListFoldersResponse, type index_d_ListFoldersResponseNonNullableFields as ListFoldersResponseNonNullableFields, type index_d_MessageEnvelope as MessageEnvelope, index_d_Namespace as Namespace, type index_d_PagingMetadataV2 as PagingMetadataV2, type index_d_RestoreInfo as RestoreInfo, index_d_RootFolder as RootFolder, type index_d_SearchFoldersOptions as SearchFoldersOptions, type index_d_SearchFoldersRequest as SearchFoldersRequest, type index_d_SearchFoldersResponse as SearchFoldersResponse, type index_d_SearchFoldersResponseNonNullableFields as SearchFoldersResponseNonNullableFields, index_d_SortOrder as SortOrder, type index_d_Sorting as Sorting, index_d_State as State, type index_d_UnsupportedRequestValueError as UnsupportedRequestValueError, type index_d_UpdateFolder as UpdateFolder, type index_d_UpdateFolderRequest as UpdateFolderRequest, type index_d_UpdateFolderResponse as UpdateFolderResponse, type index_d_UpdateFolderResponseNonNullableFields as UpdateFolderResponseNonNullableFields, index_d_WebhookIdentityType as WebhookIdentityType, type index_d__publicOnFolderCreatedType as _publicOnFolderCreatedType, type index_d__publicOnFolderDeletedType as _publicOnFolderDeletedType, type index_d__publicOnFolderUpdatedType as _publicOnFolderUpdatedType, index_d_bulkDeleteFolders as bulkDeleteFolders, index_d_bulkRestoreFoldersFromTrashBin as bulkRestoreFoldersFromTrashBin, index_d_createFolder as createFolder, index_d_generateFolderDownloadUrl as generateFolderDownloadUrl, index_d_getFolder as getFolder, index_d_listDeletedFolders as listDeletedFolders, index_d_listFolders as listFolders, index_d_onFolderCreated as onFolderCreated, index_d_onFolderDeleted as onFolderDeleted, index_d_onFolderUpdated as onFolderUpdated, onFolderCreated$1 as publicOnFolderCreated, onFolderDeleted$1 as publicOnFolderDeleted, onFolderUpdated$1 as publicOnFolderUpdated, index_d_searchFolders as searchFolders, index_d_updateFolder as updateFolder };
4732
- }
4733
-
4734
- export { index_d$3 as enterpriseMediaCategories, index_d$2 as enterpriseMediaItems, index_d$1 as files, index_d as folders };