@wix/media 1.0.126 → 1.0.128

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,39 +1,131 @@
1
- type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
2
- interface HttpClient$3 {
3
- request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
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>>;
4
46
  fetchWithAuth: typeof fetch;
5
47
  wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
48
+ getActiveToken?: () => string | undefined;
6
49
  }
7
- type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
8
- type HttpResponse$3<T = any> = {
50
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
51
+ type HttpResponse<T = any> = {
9
52
  data: T;
10
53
  status: number;
11
54
  statusText: string;
12
55
  headers: any;
13
56
  request?: any;
14
57
  };
15
- type RequestOptions$3<_TResponse = any, Data = any> = {
58
+ type RequestOptions<_TResponse = any, Data = any> = {
16
59
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
60
  url: string;
18
61
  data?: Data;
19
62
  params?: URLSearchParams;
20
- } & APIMetadata$3;
21
- type APIMetadata$3 = {
63
+ } & APIMetadata;
64
+ type APIMetadata = {
22
65
  methodFqn?: string;
23
66
  entityFqdn?: string;
24
67
  packageName?: string;
25
68
  };
26
- type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
27
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
69
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
70
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
71
  __type: 'event-definition';
29
72
  type: Type;
30
73
  isDomainEvent?: boolean;
31
74
  transformations?: (envelope: unknown) => Payload;
32
75
  __payload: Payload;
33
76
  };
34
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
35
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
36
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
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;
37
129
 
38
130
  declare global {
39
131
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
@@ -42,6 +134,348 @@ declare global {
42
134
  }
43
135
  }
44
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
+
45
479
  interface EnterpriseCategory {
46
480
  /**
47
481
  * Id of the category
@@ -60,12 +494,12 @@ interface EnterpriseCategory {
60
494
  * Date and time the category was created.
61
495
  * @readonly
62
496
  */
63
- _createdDate?: Date;
497
+ _createdDate?: Date | null;
64
498
  /**
65
499
  * Date and time the category was updated.
66
500
  * @readonly
67
501
  */
68
- _updatedDate?: Date;
502
+ _updatedDate?: Date | null;
69
503
  }
70
504
  declare enum PublishStatus$1 {
71
505
  UNDEFINED = "UNDEFINED",
@@ -179,7 +613,7 @@ interface DomainEvent$3 extends DomainEventBodyOneOf$3 {
179
613
  /** ID of the entity associated with the event. */
180
614
  entityId?: string;
181
615
  /** Event timestamp. */
182
- eventTime?: Date;
616
+ eventTime?: Date | null;
183
617
  /**
184
618
  * Whether the event was triggered as a result of a privacy regulation application
185
619
  * (for example, GDPR).
@@ -314,7 +748,7 @@ interface EventMetadata$3 extends BaseEventMetadata$3 {
314
748
  /** ID of the entity associated with the event. */
315
749
  entityId?: string;
316
750
  /** Event timestamp. */
317
- eventTime?: Date;
751
+ eventTime?: Date | null;
318
752
  /**
319
753
  * Whether the event was triggered as a result of a privacy regulation application
320
754
  * (for example, GDPR).
@@ -362,12 +796,12 @@ interface UpdateCategory {
362
796
  * Date and time the category was created.
363
797
  * @readonly
364
798
  */
365
- _createdDate?: Date;
799
+ _createdDate?: Date | null;
366
800
  /**
367
801
  * Date and time the category was updated.
368
802
  * @readonly
369
803
  */
370
- _updatedDate?: Date;
804
+ _updatedDate?: Date | null;
371
805
  }
372
806
  interface GetCategoryOptions {
373
807
  /** number of sub category levels */
@@ -380,7 +814,7 @@ interface EnterpriseOnboardingOptions {
380
814
  accountName?: string;
381
815
  }
382
816
 
383
- declare function createCategory$1(httpClient: HttpClient$3): CreateCategorySignature;
817
+ declare function createCategory$1(httpClient: HttpClient): CreateCategorySignature;
384
818
  interface CreateCategorySignature {
385
819
  /**
386
820
  * Fetch a list of random media from different providers, using site information to customize results when available
@@ -389,7 +823,7 @@ interface CreateCategorySignature {
389
823
  */
390
824
  (category: EnterpriseCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
391
825
  }
392
- declare function deleteCategory$1(httpClient: HttpClient$3): DeleteCategorySignature;
826
+ declare function deleteCategory$1(httpClient: HttpClient): DeleteCategorySignature;
393
827
  interface DeleteCategorySignature {
394
828
  /**
395
829
  * Delete a category including all its subcategories - but not the items
@@ -397,7 +831,7 @@ interface DeleteCategorySignature {
397
831
  */
398
832
  (categoryId: string): Promise<void>;
399
833
  }
400
- declare function updateCategory$1(httpClient: HttpClient$3): UpdateCategorySignature;
834
+ declare function updateCategory$1(httpClient: HttpClient): UpdateCategorySignature;
401
835
  interface UpdateCategorySignature {
402
836
  /**
403
837
  * Update category details
@@ -406,7 +840,7 @@ interface UpdateCategorySignature {
406
840
  */
407
841
  (_id: string, category: UpdateCategory): Promise<EnterpriseCategory & EnterpriseCategoryNonNullableFields>;
408
842
  }
409
- declare function getCategory$1(httpClient: HttpClient$3): GetCategorySignature;
843
+ declare function getCategory$1(httpClient: HttpClient): GetCategorySignature;
410
844
  interface GetCategorySignature {
411
845
  /**
412
846
  * Get information about a specific category
@@ -415,7 +849,7 @@ interface GetCategorySignature {
415
849
  */
416
850
  (categoryId: string, options?: GetCategoryOptions | undefined): Promise<EnterpriseCategoryTree & EnterpriseCategoryTreeNonNullableFields>;
417
851
  }
418
- declare function enterpriseOnboarding$1(httpClient: HttpClient$3): EnterpriseOnboardingSignature;
852
+ declare function enterpriseOnboarding$1(httpClient: HttpClient): EnterpriseOnboardingSignature;
419
853
  interface EnterpriseOnboardingSignature {
420
854
  /**
421
855
  * Create the enterprise category under "enterprise-media" main category
@@ -424,25 +858,25 @@ interface EnterpriseOnboardingSignature {
424
858
  */
425
859
  (accountId: string, options?: EnterpriseOnboardingOptions | undefined): Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
426
860
  }
427
- declare function getMediaManagerCategories$1(httpClient: HttpClient$3): GetMediaManagerCategoriesSignature;
861
+ declare function getMediaManagerCategories$1(httpClient: HttpClient): GetMediaManagerCategoriesSignature;
428
862
  interface GetMediaManagerCategoriesSignature {
429
863
  /**
430
864
  * Get the account category tree details
431
865
  */
432
866
  (): Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
433
867
  }
434
- declare const onEnterpriseCategoryCreated$1: EventDefinition$3<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
435
- declare const onEnterpriseCategoryDeleted$1: EventDefinition$3<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
436
- declare const onEnterpriseCategoryUpdated$1: EventDefinition$3<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
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">;
437
871
 
438
- declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
872
+ declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
439
873
 
440
- declare const createCategory: BuildRESTFunction$3<typeof createCategory$1> & typeof createCategory$1;
441
- declare const deleteCategory: BuildRESTFunction$3<typeof deleteCategory$1> & typeof deleteCategory$1;
442
- declare const updateCategory: BuildRESTFunction$3<typeof updateCategory$1> & typeof updateCategory$1;
443
- declare const getCategory: BuildRESTFunction$3<typeof getCategory$1> & typeof getCategory$1;
444
- declare const enterpriseOnboarding: BuildRESTFunction$3<typeof enterpriseOnboarding$1> & typeof enterpriseOnboarding$1;
445
- declare const getMediaManagerCategories: BuildRESTFunction$3<typeof getMediaManagerCategories$1> & typeof getMediaManagerCategories$1;
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>;
446
880
 
447
881
  type _publicOnEnterpriseCategoryCreatedType = typeof onEnterpriseCategoryCreated$1;
448
882
  /** */
@@ -503,50 +937,6 @@ declare namespace index_d$3 {
503
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 };
504
938
  }
505
939
 
506
- type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
507
- interface HttpClient$2 {
508
- request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
509
- fetchWithAuth: typeof fetch;
510
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
511
- }
512
- type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
513
- type HttpResponse$2<T = any> = {
514
- data: T;
515
- status: number;
516
- statusText: string;
517
- headers: any;
518
- request?: any;
519
- };
520
- type RequestOptions$2<_TResponse = any, Data = any> = {
521
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
522
- url: string;
523
- data?: Data;
524
- params?: URLSearchParams;
525
- } & APIMetadata$2;
526
- type APIMetadata$2 = {
527
- methodFqn?: string;
528
- entityFqdn?: string;
529
- packageName?: string;
530
- };
531
- type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
532
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
533
- __type: 'event-definition';
534
- type: Type;
535
- isDomainEvent?: boolean;
536
- transformations?: (envelope: unknown) => Payload;
537
- __payload: Payload;
538
- };
539
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
540
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
541
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
542
-
543
- declare global {
544
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
545
- interface SymbolConstructor {
546
- readonly observable: symbol;
547
- }
548
- }
549
-
550
940
  /**
551
941
  * Duration for video fits better if there will be type specific media item.. however, is it ok to implement
552
942
  * an additional one of field called details?
@@ -595,12 +985,12 @@ interface EnterpriseMediaItem {
595
985
  * Date and time the item was created.
596
986
  * @readonly
597
987
  */
598
- _createdDate?: Date;
988
+ _createdDate?: Date | null;
599
989
  /**
600
990
  * Date and time the item was updated.
601
991
  * @readonly
602
992
  */
603
- _updatedDate?: Date;
993
+ _updatedDate?: Date | null;
604
994
  /**
605
995
  * An internal id used with different wix media systems
606
996
  * @readonly
@@ -673,7 +1063,7 @@ interface Archive$1 {
673
1063
  * Archive URL expiration date (when relevant).
674
1064
  * @readonly
675
1065
  */
676
- urlExpirationDate?: Date;
1066
+ urlExpirationDate?: Date | null;
677
1067
  /** Archive size in bytes. */
678
1068
  sizeInBytes?: string | null;
679
1069
  /** Archive filename. */
@@ -692,7 +1082,7 @@ interface Model3D$1 {
692
1082
  * 3D URL expiration date (when relevant).
693
1083
  * @readonly
694
1084
  */
695
- urlExpirationDate?: Date;
1085
+ urlExpirationDate?: Date | null;
696
1086
  /**
697
1087
  * 3D filename.
698
1088
  * @readonly
@@ -997,7 +1387,7 @@ interface DomainEvent$2 extends DomainEventBodyOneOf$2 {
997
1387
  /** ID of the entity associated with the event. */
998
1388
  entityId?: string;
999
1389
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1000
- eventTime?: Date;
1390
+ eventTime?: Date | null;
1001
1391
  /**
1002
1392
  * Whether the event was triggered as a result of a privacy regulation application
1003
1393
  * (for example, GDPR).
@@ -1026,7 +1416,7 @@ interface EntityCreatedEvent$2 {
1026
1416
  entity?: string;
1027
1417
  }
1028
1418
  interface RestoreInfo$2 {
1029
- deletedDate?: Date;
1419
+ deletedDate?: Date | null;
1030
1420
  }
1031
1421
  interface EntityUpdatedEvent$2 {
1032
1422
  /**
@@ -1175,7 +1565,7 @@ interface EventMetadata$2 extends BaseEventMetadata$2 {
1175
1565
  /** ID of the entity associated with the event. */
1176
1566
  entityId?: string;
1177
1567
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1178
- eventTime?: Date;
1568
+ eventTime?: Date | null;
1179
1569
  /**
1180
1570
  * Whether the event was triggered as a result of a privacy regulation application
1181
1571
  * (for example, GDPR).
@@ -1347,12 +1737,12 @@ interface UpdateItem {
1347
1737
  * Date and time the item was created.
1348
1738
  * @readonly
1349
1739
  */
1350
- _createdDate?: Date;
1740
+ _createdDate?: Date | null;
1351
1741
  /**
1352
1742
  * Date and time the item was updated.
1353
1743
  * @readonly
1354
1744
  */
1355
- _updatedDate?: Date;
1745
+ _updatedDate?: Date | null;
1356
1746
  /**
1357
1747
  * An internal id used with different wix media systems
1358
1748
  * @readonly
@@ -1376,21 +1766,21 @@ interface OverwriteItemCategoriesOptions {
1376
1766
  categoryIds?: string[];
1377
1767
  }
1378
1768
 
1379
- declare function itemUploadCallback$1(httpClient: HttpClient$2): ItemUploadCallbackSignature;
1769
+ declare function itemUploadCallback$1(httpClient: HttpClient): ItemUploadCallbackSignature;
1380
1770
  interface ItemUploadCallbackSignature {
1381
1771
  /**
1382
1772
  * Internal API called by the public media backend, notify about a file that was created enterprise public media server
1383
1773
  */
1384
1774
  (options?: ItemUploadCallbackOptions | undefined): Promise<ItemUploadCallbackResponse>;
1385
1775
  }
1386
- declare function generateFileUploadUrl$3(httpClient: HttpClient$2): GenerateFileUploadUrlSignature$1;
1776
+ declare function generateFileUploadUrl$3(httpClient: HttpClient): GenerateFileUploadUrlSignature$1;
1387
1777
  interface GenerateFileUploadUrlSignature$1 {
1388
1778
  /**
1389
1779
  * Generate an upload url that will make public media to call the enterprise callback endpoint
1390
1780
  */
1391
1781
  (options?: GenerateFileUploadUrlOptions$1 | undefined): Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
1392
1782
  }
1393
- declare function importFile$3(httpClient: HttpClient$2): ImportFileSignature$1;
1783
+ declare function importFile$3(httpClient: HttpClient): ImportFileSignature$1;
1394
1784
  interface ImportFileSignature$1 {
1395
1785
  /**
1396
1786
  * Import a file using a url
@@ -1398,7 +1788,7 @@ interface ImportFileSignature$1 {
1398
1788
  */
1399
1789
  (url: string, options?: ImportFileOptions$1 | undefined): Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
1400
1790
  }
1401
- declare function searchItems$1(httpClient: HttpClient$2): SearchItemsSignature;
1791
+ declare function searchItems$1(httpClient: HttpClient): SearchItemsSignature;
1402
1792
  interface SearchItemsSignature {
1403
1793
  /**
1404
1794
  * Search items, all filters only support equality
@@ -1406,7 +1796,7 @@ interface SearchItemsSignature {
1406
1796
  */
1407
1797
  (options?: SearchItemsOptions | undefined): Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
1408
1798
  }
1409
- declare function queryItems$1(httpClient: HttpClient$2): QueryItemsSignature;
1799
+ declare function queryItems$1(httpClient: HttpClient): QueryItemsSignature;
1410
1800
  interface QueryItemsSignature {
1411
1801
  /**
1412
1802
  * Query items allowing to sort by specified fields, all filters only support equality
@@ -1414,7 +1804,7 @@ interface QueryItemsSignature {
1414
1804
  */
1415
1805
  (): ItemsQueryBuilder;
1416
1806
  }
1417
- declare function updateItem$1(httpClient: HttpClient$2): UpdateItemSignature;
1807
+ declare function updateItem$1(httpClient: HttpClient): UpdateItemSignature;
1418
1808
  interface UpdateItemSignature {
1419
1809
  /**
1420
1810
  * Update an item
@@ -1423,7 +1813,7 @@ interface UpdateItemSignature {
1423
1813
  */
1424
1814
  (_id: string, item: UpdateItem): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1425
1815
  }
1426
- declare function bulkUpdateItem$1(httpClient: HttpClient$2): BulkUpdateItemSignature;
1816
+ declare function bulkUpdateItem$1(httpClient: HttpClient): BulkUpdateItemSignature;
1427
1817
  interface BulkUpdateItemSignature {
1428
1818
  /**
1429
1819
  * Bulk update an item
@@ -1431,7 +1821,7 @@ interface BulkUpdateItemSignature {
1431
1821
  */
1432
1822
  (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions | undefined): Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
1433
1823
  }
1434
- declare function getItem$1(httpClient: HttpClient$2): GetItemSignature;
1824
+ declare function getItem$1(httpClient: HttpClient): GetItemSignature;
1435
1825
  interface GetItemSignature {
1436
1826
  /**
1437
1827
  * Get item details
@@ -1440,7 +1830,7 @@ interface GetItemSignature {
1440
1830
  */
1441
1831
  (itemId: string): Promise<EnterpriseMediaItem & EnterpriseMediaItemNonNullableFields>;
1442
1832
  }
1443
- declare function linkItemToCategories$1(httpClient: HttpClient$2): LinkItemToCategoriesSignature;
1833
+ declare function linkItemToCategories$1(httpClient: HttpClient): LinkItemToCategoriesSignature;
1444
1834
  interface LinkItemToCategoriesSignature {
1445
1835
  /**
1446
1836
  * Link the item to multiple categories
@@ -1448,7 +1838,7 @@ interface LinkItemToCategoriesSignature {
1448
1838
  */
1449
1839
  (itemId: string, options?: LinkItemToCategoriesOptions | undefined): Promise<LinkItemToCategoriesResponse>;
1450
1840
  }
1451
- declare function unlinkItemFromCategories$1(httpClient: HttpClient$2): UnlinkItemFromCategoriesSignature;
1841
+ declare function unlinkItemFromCategories$1(httpClient: HttpClient): UnlinkItemFromCategoriesSignature;
1452
1842
  interface UnlinkItemFromCategoriesSignature {
1453
1843
  /**
1454
1844
  * Unlink the item from multiple categories
@@ -1456,7 +1846,7 @@ interface UnlinkItemFromCategoriesSignature {
1456
1846
  */
1457
1847
  (itemId: string, options?: UnlinkItemFromCategoriesOptions | undefined): Promise<UnlinkItemFromCategoriesResponse>;
1458
1848
  }
1459
- declare function overwriteItemCategories$1(httpClient: HttpClient$2): OverwriteItemCategoriesSignature;
1849
+ declare function overwriteItemCategories$1(httpClient: HttpClient): OverwriteItemCategoriesSignature;
1460
1850
  interface OverwriteItemCategoriesSignature {
1461
1851
  /**
1462
1852
  * Overwrite item categories
@@ -1464,24 +1854,24 @@ interface OverwriteItemCategoriesSignature {
1464
1854
  */
1465
1855
  (itemId: string, options?: OverwriteItemCategoriesOptions | undefined): Promise<OverwriteItemCategoriesResponse>;
1466
1856
  }
1467
- declare const onEnterpriseItemCreated$1: EventDefinition$2<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
1468
- declare const onEnterpriseItemUpdated$1: EventDefinition$2<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
1469
- declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition$2<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
1470
- declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition$2<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
1857
+ declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
1858
+ declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
1859
+ declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
1860
+ declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
1471
1861
 
1472
- declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
1862
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
1473
1863
 
1474
- declare const itemUploadCallback: BuildRESTFunction$2<typeof itemUploadCallback$1> & typeof itemUploadCallback$1;
1475
- declare const generateFileUploadUrl$2: BuildRESTFunction$2<typeof generateFileUploadUrl$3> & typeof generateFileUploadUrl$3;
1476
- declare const importFile$2: BuildRESTFunction$2<typeof importFile$3> & typeof importFile$3;
1477
- declare const searchItems: BuildRESTFunction$2<typeof searchItems$1> & typeof searchItems$1;
1478
- declare const queryItems: BuildRESTFunction$2<typeof queryItems$1> & typeof queryItems$1;
1479
- declare const updateItem: BuildRESTFunction$2<typeof updateItem$1> & typeof updateItem$1;
1480
- declare const bulkUpdateItem: BuildRESTFunction$2<typeof bulkUpdateItem$1> & typeof bulkUpdateItem$1;
1481
- declare const getItem: BuildRESTFunction$2<typeof getItem$1> & typeof getItem$1;
1482
- declare const linkItemToCategories: BuildRESTFunction$2<typeof linkItemToCategories$1> & typeof linkItemToCategories$1;
1483
- declare const unlinkItemFromCategories: BuildRESTFunction$2<typeof unlinkItemFromCategories$1> & typeof unlinkItemFromCategories$1;
1484
- declare const overwriteItemCategories: BuildRESTFunction$2<typeof overwriteItemCategories$1> & typeof overwriteItemCategories$1;
1864
+ declare const itemUploadCallback: MaybeContext<BuildRESTFunction<typeof itemUploadCallback$1> & typeof itemUploadCallback$1>;
1865
+ declare const generateFileUploadUrl$2: MaybeContext<BuildRESTFunction<typeof generateFileUploadUrl$3> & typeof generateFileUploadUrl$3>;
1866
+ declare const importFile$2: MaybeContext<BuildRESTFunction<typeof importFile$3> & typeof importFile$3>;
1867
+ declare const searchItems: MaybeContext<BuildRESTFunction<typeof searchItems$1> & typeof searchItems$1>;
1868
+ declare const queryItems: MaybeContext<BuildRESTFunction<typeof queryItems$1> & typeof queryItems$1>;
1869
+ declare const updateItem: MaybeContext<BuildRESTFunction<typeof updateItem$1> & typeof updateItem$1>;
1870
+ declare const bulkUpdateItem: MaybeContext<BuildRESTFunction<typeof bulkUpdateItem$1> & typeof bulkUpdateItem$1>;
1871
+ declare const getItem: MaybeContext<BuildRESTFunction<typeof getItem$1> & typeof getItem$1>;
1872
+ declare const linkItemToCategories: MaybeContext<BuildRESTFunction<typeof linkItemToCategories$1> & typeof linkItemToCategories$1>;
1873
+ declare const unlinkItemFromCategories: MaybeContext<BuildRESTFunction<typeof unlinkItemFromCategories$1> & typeof unlinkItemFromCategories$1>;
1874
+ declare const overwriteItemCategories: MaybeContext<BuildRESTFunction<typeof overwriteItemCategories$1> & typeof overwriteItemCategories$1>;
1485
1875
 
1486
1876
  type _publicOnEnterpriseItemCreatedType = typeof onEnterpriseItemCreated$1;
1487
1877
  /**
@@ -1579,50 +1969,6 @@ declare namespace index_d$2 {
1579
1969
  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_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, 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 };
1580
1970
  }
1581
1971
 
1582
- type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
1583
- interface HttpClient$1 {
1584
- request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
1585
- fetchWithAuth: typeof fetch;
1586
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
1587
- }
1588
- type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
1589
- type HttpResponse$1<T = any> = {
1590
- data: T;
1591
- status: number;
1592
- statusText: string;
1593
- headers: any;
1594
- request?: any;
1595
- };
1596
- type RequestOptions$1<_TResponse = any, Data = any> = {
1597
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
1598
- url: string;
1599
- data?: Data;
1600
- params?: URLSearchParams;
1601
- } & APIMetadata$1;
1602
- type APIMetadata$1 = {
1603
- methodFqn?: string;
1604
- entityFqdn?: string;
1605
- packageName?: string;
1606
- };
1607
- type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
1608
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
1609
- __type: 'event-definition';
1610
- type: Type;
1611
- isDomainEvent?: boolean;
1612
- transformations?: (envelope: unknown) => Payload;
1613
- __payload: Payload;
1614
- };
1615
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
1616
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
1617
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
1618
-
1619
- declare global {
1620
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
1621
- interface SymbolConstructor {
1622
- readonly observable: symbol;
1623
- }
1624
- }
1625
-
1626
1972
  interface FileDescriptor {
1627
1973
  /**
1628
1974
  * File ID. Generated when a file is uploaded to the Media Manager.
@@ -1649,7 +1995,7 @@ interface FileDescriptor {
1649
1995
  */
1650
1996
  sizeInBytes?: string | null;
1651
1997
  /**
1652
- * Whether the link to the uploaded file is public or private. Private links require a token.
1998
+ * Whether the file is public or private. For more, see the Private Files article.
1653
1999
  * @readonly
1654
2000
  */
1655
2001
  private?: boolean;
@@ -1687,12 +2033,12 @@ interface FileDescriptor {
1687
2033
  * Date and time the file was created.
1688
2034
  * @readonly
1689
2035
  */
1690
- _createdDate?: Date;
2036
+ _createdDate?: Date | null;
1691
2037
  /**
1692
2038
  * Date and time the file was updated.
1693
2039
  * @readonly
1694
2040
  */
1695
- _updatedDate?: Date;
2041
+ _updatedDate?: Date | null;
1696
2042
  /**
1697
2043
  * The Wix site ID where the media file is stored.
1698
2044
  * @readonly
@@ -1862,7 +2208,7 @@ interface Archive {
1862
2208
  * Archive URL expiration date (when relevant).
1863
2209
  * @readonly
1864
2210
  */
1865
- urlExpirationDate?: Date;
2211
+ urlExpirationDate?: Date | null;
1866
2212
  /** Archive size in bytes. */
1867
2213
  sizeInBytes?: string | null;
1868
2214
  /** Archive filename. */
@@ -1881,7 +2227,7 @@ interface Model3D {
1881
2227
  * 3D URL expiration date (when relevant).
1882
2228
  * @readonly
1883
2229
  */
1884
- urlExpirationDate?: Date;
2230
+ urlExpirationDate?: Date | null;
1885
2231
  /**
1886
2232
  * 3D filename.
1887
2233
  * @readonly
@@ -2136,7 +2482,7 @@ interface GenerateFileUploadUrlRequest {
2136
2482
  * Default: `media-root`.
2137
2483
  */
2138
2484
  parentFolderId?: string | null;
2139
- /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
2485
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2140
2486
  private?: boolean | null;
2141
2487
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2142
2488
  labels?: string[] | null;
@@ -2173,7 +2519,7 @@ interface GenerateFileResumableUploadUrlRequest {
2173
2519
  * Default: `media-root`.
2174
2520
  */
2175
2521
  parentFolderId?: string | null;
2176
- /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
2522
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2177
2523
  private?: boolean | null;
2178
2524
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2179
2525
  labels?: string[] | null;
@@ -2216,7 +2562,7 @@ interface ImportFileRequest {
2216
2562
  * Default: `media-root`.
2217
2563
  */
2218
2564
  parentFolderId?: string | null;
2219
- /** Whether the link to the imported file is public or private. */
2565
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2220
2566
  private?: boolean | null;
2221
2567
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2222
2568
  labels?: string[] | null;
@@ -2299,7 +2645,12 @@ interface ListFilesRequest {
2299
2645
  * excluding: OTHER media type
2300
2646
  */
2301
2647
  mediaTypes?: MediaType[];
2302
- /** Whether the link to the imported file is public or private. */
2648
+ /**
2649
+ * `true`: Returns only private files.
2650
+ * `false`: Returns only public files.
2651
+ * `undefined`: Returns public and private files.
2652
+ * For more, see the Private Files article.
2653
+ */
2303
2654
  private?: boolean | null;
2304
2655
  /**
2305
2656
  * Field name and order to sort by. One of:
@@ -2368,7 +2719,12 @@ interface SearchFilesRequest {
2368
2719
  * excluding: OTHER media type
2369
2720
  */
2370
2721
  mediaTypes?: MediaType[];
2371
- /** Whether the link to the imported file is public or private. */
2722
+ /**
2723
+ * `true`: Returns only private files.
2724
+ * `false`: Returns only public files.
2725
+ * `undefined`: Returns public and private files.
2726
+ * For more, see the Private Files article.
2727
+ */
2372
2728
  private?: boolean | null;
2373
2729
  /**
2374
2730
  * Field name and order to sort by. One of:
@@ -2461,7 +2817,12 @@ interface ListDeletedFilesRequest {
2461
2817
  * excluding: OTHER media type
2462
2818
  */
2463
2819
  mediaTypes?: MediaType[];
2464
- /** Whether the link to the imported file is public or private. */
2820
+ /**
2821
+ * `true`: Returns only private files.
2822
+ * `false`: Returns only public files.
2823
+ * `undefined`: Returns public and private files.
2824
+ * For more, see the Private Files article.
2825
+ */
2465
2826
  private?: boolean | null;
2466
2827
  /**
2467
2828
  * Field name and order to sort by. One of:
@@ -2528,7 +2889,7 @@ interface DomainEvent$1 extends DomainEventBodyOneOf$1 {
2528
2889
  /** ID of the entity associated with the event. */
2529
2890
  entityId?: string;
2530
2891
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2531
- eventTime?: Date;
2892
+ eventTime?: Date | null;
2532
2893
  /**
2533
2894
  * Whether the event was triggered as a result of a privacy regulation application
2534
2895
  * (for example, GDPR).
@@ -2557,7 +2918,7 @@ interface EntityCreatedEvent$1 {
2557
2918
  entity?: string;
2558
2919
  }
2559
2920
  interface RestoreInfo$1 {
2560
- deletedDate?: Date;
2921
+ deletedDate?: Date | null;
2561
2922
  }
2562
2923
  interface EntityUpdatedEvent$1 {
2563
2924
  /**
@@ -2767,7 +3128,7 @@ interface EventMetadata$1 extends BaseEventMetadata$1 {
2767
3128
  /** ID of the entity associated with the event. */
2768
3129
  entityId?: string;
2769
3130
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
2770
- eventTime?: Date;
3131
+ eventTime?: Date | null;
2771
3132
  /**
2772
3133
  * Whether the event was triggered as a result of a privacy regulation application
2773
3134
  * (for example, GDPR).
@@ -2850,7 +3211,7 @@ interface GenerateFileUploadUrlOptions {
2850
3211
  * Default: `media-root`.
2851
3212
  */
2852
3213
  parentFolderId?: string | null;
2853
- /** Whether the link to the uploaded file is public or private. See `Private Files` in terminology. */
3214
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2854
3215
  private?: boolean | null;
2855
3216
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2856
3217
  labels?: string[] | null;
@@ -2881,7 +3242,7 @@ interface GenerateFileResumableUploadUrlOptions {
2881
3242
  * Default: `media-root`.
2882
3243
  */
2883
3244
  parentFolderId?: string | null;
2884
- /** Whether the link to the imported file is public or private. See `Private Files` in terminology. */
3245
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2885
3246
  private?: boolean | null;
2886
3247
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2887
3248
  labels?: string[] | null;
@@ -2910,7 +3271,7 @@ interface ImportFileOptions {
2910
3271
  * Default: `media-root`.
2911
3272
  */
2912
3273
  parentFolderId?: string | null;
2913
- /** Whether the link to the imported file is public or private. */
3274
+ /** Whether the file will be public or private. For more, see the Private Files article. */
2914
3275
  private?: boolean | null;
2915
3276
  /** Labels assigned to media files that describe and categorize them. Provided by the user, or generated by [Google Vision API](https://cloud.google.com/vision/docs/drag-and-drop) for images. */
2916
3277
  labels?: string[] | null;
@@ -2946,7 +3307,12 @@ interface ListFilesOptions {
2946
3307
  parentFolderId?: string | null;
2947
3308
  /** Media file type. */
2948
3309
  mediaTypes?: MediaType[];
2949
- /** Whether the link to the imported file is public or private. */
3310
+ /**
3311
+ * `true`: Returns only private files.
3312
+ * `false`: Returns only public files.
3313
+ * `undefined`: Returns public and private files.
3314
+ * For more, see the Private Files article.
3315
+ */
2950
3316
  private?: boolean | null;
2951
3317
  /**
2952
3318
  * Field name and order to sort by. One of:
@@ -2977,7 +3343,10 @@ interface SearchFilesOptions {
2977
3343
  /** Media file type. */
2978
3344
  mediaTypes?: MediaType[];
2979
3345
  /**
2980
- * Whether the link to the imported file is public or private.
3346
+ * `true`: Returns only private files.
3347
+ * `false`: Returns only public files.
3348
+ * `undefined`: Returns public and private files.
3349
+ * For more, see the Private Files article.
2981
3350
  *
2982
3351
  * Default: `false`.
2983
3352
  */
@@ -3014,7 +3383,12 @@ interface ListDeletedFilesOptions {
3014
3383
  parentFolderId?: string | null;
3015
3384
  /** Media file type. */
3016
3385
  mediaTypes?: MediaType[];
3017
- /** Whether the link to the imported file is public or private. */
3386
+ /**
3387
+ * `true`: Returns only private files.
3388
+ * `false`: Returns only public files.
3389
+ * `undefined`: Returns public and private files.
3390
+ * For more, see the Private Files article.
3391
+ */
3018
3392
  private?: boolean | null;
3019
3393
  /**
3020
3394
  * Field name and order to sort by. One of:
@@ -3030,7 +3404,7 @@ interface ListDeletedFilesOptions {
3030
3404
  paging?: CursorPaging$1;
3031
3405
  }
3032
3406
 
3033
- declare function generateFilesDownloadUrl$1(httpClient: HttpClient$1): GenerateFilesDownloadUrlSignature;
3407
+ declare function generateFilesDownloadUrl$1(httpClient: HttpClient): GenerateFilesDownloadUrlSignature;
3034
3408
  interface GenerateFilesDownloadUrlSignature {
3035
3409
  /**
3036
3410
  * Generates a URL for downloading a compressed file containing specific files in the Media Manager.
@@ -3049,7 +3423,7 @@ interface GenerateFilesDownloadUrlSignature {
3049
3423
  */
3050
3424
  (fileIds: string[]): Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
3051
3425
  }
3052
- declare function generateFileDownloadUrl$1(httpClient: HttpClient$1): GenerateFileDownloadUrlSignature;
3426
+ declare function generateFileDownloadUrl$1(httpClient: HttpClient): GenerateFileDownloadUrlSignature;
3053
3427
  interface GenerateFileDownloadUrlSignature {
3054
3428
  /**
3055
3429
  * Generates one or more temporary URLs for downloading a specific file in the Media Manager.
@@ -3071,7 +3445,7 @@ interface GenerateFileDownloadUrlSignature {
3071
3445
  */
3072
3446
  (fileId: string, options?: GenerateFileDownloadUrlOptions | undefined): Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
3073
3447
  }
3074
- declare function getFileDescriptor$1(httpClient: HttpClient$1): GetFileDescriptorSignature;
3448
+ declare function getFileDescriptor$1(httpClient: HttpClient): GetFileDescriptorSignature;
3075
3449
  interface GetFileDescriptorSignature {
3076
3450
  /**
3077
3451
  * Gets information about the specified file in the Media Manager.
@@ -3088,7 +3462,7 @@ interface GetFileDescriptorSignature {
3088
3462
  */
3089
3463
  (fileId: string): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3090
3464
  }
3091
- declare function getFileDescriptors$1(httpClient: HttpClient$1): GetFileDescriptorsSignature;
3465
+ declare function getFileDescriptors$1(httpClient: HttpClient): GetFileDescriptorsSignature;
3092
3466
  interface GetFileDescriptorsSignature {
3093
3467
  /**
3094
3468
  * Gets information about the specified files in the Media Manager.
@@ -3104,7 +3478,7 @@ interface GetFileDescriptorsSignature {
3104
3478
  */
3105
3479
  (fileIds: string[]): Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
3106
3480
  }
3107
- declare function updateFileDescriptor$1(httpClient: HttpClient$1): UpdateFileDescriptorSignature;
3481
+ declare function updateFileDescriptor$1(httpClient: HttpClient): UpdateFileDescriptorSignature;
3108
3482
  interface UpdateFileDescriptorSignature {
3109
3483
  /**
3110
3484
  * Updates a file.
@@ -3118,7 +3492,7 @@ interface UpdateFileDescriptorSignature {
3118
3492
  */
3119
3493
  (file: FileDescriptor): Promise<FileDescriptor & FileDescriptorNonNullableFields>;
3120
3494
  }
3121
- declare function generateFileUploadUrl$1(httpClient: HttpClient$1): GenerateFileUploadUrlSignature;
3495
+ declare function generateFileUploadUrl$1(httpClient: HttpClient): GenerateFileUploadUrlSignature;
3122
3496
  interface GenerateFileUploadUrlSignature {
3123
3497
  /**
3124
3498
  * Generates an upload URL to allow external clients to upload a file to the Media Manager.
@@ -3135,7 +3509,7 @@ interface GenerateFileUploadUrlSignature {
3135
3509
  */
3136
3510
  (mimeType: string | null, options?: GenerateFileUploadUrlOptions | undefined): Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
3137
3511
  }
3138
- declare function generateFileResumableUploadUrl$1(httpClient: HttpClient$1): GenerateFileResumableUploadUrlSignature;
3512
+ declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): GenerateFileResumableUploadUrlSignature;
3139
3513
  interface GenerateFileResumableUploadUrlSignature {
3140
3514
  /**
3141
3515
  * Generates a resumable upload URL to allow external clients to upload large files over 10MB to the Media Manager.
@@ -3152,7 +3526,7 @@ interface GenerateFileResumableUploadUrlSignature {
3152
3526
  */
3153
3527
  (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions | undefined): Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
3154
3528
  }
3155
- declare function importFile$1(httpClient: HttpClient$1): ImportFileSignature;
3529
+ declare function importFile$1(httpClient: HttpClient): ImportFileSignature;
3156
3530
  interface ImportFileSignature {
3157
3531
  /**
3158
3532
  * Imports a file to the Media Manager using an external URL.
@@ -3175,7 +3549,7 @@ interface ImportFileSignature {
3175
3549
  */
3176
3550
  (url: string, options?: ImportFileOptions | undefined): Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
3177
3551
  }
3178
- declare function bulkImportFiles$1(httpClient: HttpClient$1): BulkImportFilesSignature;
3552
+ declare function bulkImportFiles$1(httpClient: HttpClient): BulkImportFilesSignature;
3179
3553
  interface BulkImportFilesSignature {
3180
3554
  /**
3181
3555
  * > **Deprecated.**
@@ -3202,7 +3576,7 @@ interface BulkImportFilesSignature {
3202
3576
  */
3203
3577
  (importFileRequests: ImportFileRequest[]): Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
3204
3578
  }
3205
- declare function bulkImportFile$1(httpClient: HttpClient$1): BulkImportFileSignature;
3579
+ declare function bulkImportFile$1(httpClient: HttpClient): BulkImportFileSignature;
3206
3580
  interface BulkImportFileSignature {
3207
3581
  /**
3208
3582
  * Imports a bulk of files to the Media Manager using external urls.
@@ -3224,7 +3598,7 @@ interface BulkImportFileSignature {
3224
3598
  */
3225
3599
  (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions | undefined): Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
3226
3600
  }
3227
- declare function listFiles$1(httpClient: HttpClient$1): ListFilesSignature;
3601
+ declare function listFiles$1(httpClient: HttpClient): ListFilesSignature;
3228
3602
  interface ListFilesSignature {
3229
3603
  /**
3230
3604
  * Retrieves a list of files in the Media Manager.
@@ -3238,7 +3612,7 @@ interface ListFilesSignature {
3238
3612
  */
3239
3613
  (options?: ListFilesOptions | undefined): Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
3240
3614
  }
3241
- declare function searchFiles$1(httpClient: HttpClient$1): SearchFilesSignature;
3615
+ declare function searchFiles$1(httpClient: HttpClient): SearchFilesSignature;
3242
3616
  interface SearchFilesSignature {
3243
3617
  /**
3244
3618
  * Searches all folders in the Media Manager and returns a list of files that match the terms specified in the optional parameters.
@@ -3250,7 +3624,7 @@ interface SearchFilesSignature {
3250
3624
  */
3251
3625
  (options?: SearchFilesOptions | undefined): Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
3252
3626
  }
3253
- declare function generateVideoStreamingUrl$1(httpClient: HttpClient$1): GenerateVideoStreamingUrlSignature;
3627
+ declare function generateVideoStreamingUrl$1(httpClient: HttpClient): GenerateVideoStreamingUrlSignature;
3254
3628
  interface GenerateVideoStreamingUrlSignature {
3255
3629
  /**
3256
3630
  * Generates a URL for streaming a specific video file in the Media Manager.
@@ -3267,7 +3641,7 @@ interface GenerateVideoStreamingUrlSignature {
3267
3641
  */
3268
3642
  (fileId: string, options?: GenerateVideoStreamingUrlOptions | undefined): Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
3269
3643
  }
3270
- declare function bulkDeleteFiles$1(httpClient: HttpClient$1): BulkDeleteFilesSignature;
3644
+ declare function bulkDeleteFiles$1(httpClient: HttpClient): BulkDeleteFilesSignature;
3271
3645
  interface BulkDeleteFilesSignature {
3272
3646
  /**
3273
3647
  * Deletes the specified files from the Media Manager.
@@ -3291,7 +3665,7 @@ interface BulkDeleteFilesSignature {
3291
3665
  */
3292
3666
  (fileIds: string[], options?: BulkDeleteFilesOptions | undefined): Promise<void>;
3293
3667
  }
3294
- declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient$1): BulkRestoreFilesFromTrashBinSignature;
3668
+ declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): BulkRestoreFilesFromTrashBinSignature;
3295
3669
  interface BulkRestoreFilesFromTrashBinSignature {
3296
3670
  /**
3297
3671
  * Restores the specified files from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.
@@ -3304,7 +3678,7 @@ interface BulkRestoreFilesFromTrashBinSignature {
3304
3678
  */
3305
3679
  (fileIds: string[]): Promise<void>;
3306
3680
  }
3307
- declare function listDeletedFiles$1(httpClient: HttpClient$1): ListDeletedFilesSignature;
3681
+ declare function listDeletedFiles$1(httpClient: HttpClient): ListDeletedFilesSignature;
3308
3682
  interface ListDeletedFilesSignature {
3309
3683
  /**
3310
3684
  * Retrieves a list of files in the Media Manager's trash bin.
@@ -3318,29 +3692,29 @@ interface ListDeletedFilesSignature {
3318
3692
  */
3319
3693
  (options?: ListDeletedFilesOptions | undefined): Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
3320
3694
  }
3321
- declare const onFileDescriptorUpdated$1: EventDefinition$1<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
3322
- declare const onFileDescriptorDeleted$1: EventDefinition$1<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
3323
- declare const onFileDescriptorFileReady$1: EventDefinition$1<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
3324
- declare const onFileDescriptorFileFailed$1: EventDefinition$1<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
3695
+ declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
3696
+ declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
3697
+ declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
3698
+ declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
3325
3699
 
3326
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
3700
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3327
3701
 
3328
- declare const generateFilesDownloadUrl: BuildRESTFunction$1<typeof generateFilesDownloadUrl$1> & typeof generateFilesDownloadUrl$1;
3329
- declare const generateFileDownloadUrl: BuildRESTFunction$1<typeof generateFileDownloadUrl$1> & typeof generateFileDownloadUrl$1;
3330
- declare const getFileDescriptor: BuildRESTFunction$1<typeof getFileDescriptor$1> & typeof getFileDescriptor$1;
3331
- declare const getFileDescriptors: BuildRESTFunction$1<typeof getFileDescriptors$1> & typeof getFileDescriptors$1;
3332
- declare const updateFileDescriptor: BuildRESTFunction$1<typeof updateFileDescriptor$1> & typeof updateFileDescriptor$1;
3333
- declare const generateFileUploadUrl: BuildRESTFunction$1<typeof generateFileUploadUrl$1> & typeof generateFileUploadUrl$1;
3334
- declare const generateFileResumableUploadUrl: BuildRESTFunction$1<typeof generateFileResumableUploadUrl$1> & typeof generateFileResumableUploadUrl$1;
3335
- declare const importFile: BuildRESTFunction$1<typeof importFile$1> & typeof importFile$1;
3336
- declare const bulkImportFiles: BuildRESTFunction$1<typeof bulkImportFiles$1> & typeof bulkImportFiles$1;
3337
- declare const bulkImportFile: BuildRESTFunction$1<typeof bulkImportFile$1> & typeof bulkImportFile$1;
3338
- declare const listFiles: BuildRESTFunction$1<typeof listFiles$1> & typeof listFiles$1;
3339
- declare const searchFiles: BuildRESTFunction$1<typeof searchFiles$1> & typeof searchFiles$1;
3340
- declare const generateVideoStreamingUrl: BuildRESTFunction$1<typeof generateVideoStreamingUrl$1> & typeof generateVideoStreamingUrl$1;
3341
- declare const bulkDeleteFiles: BuildRESTFunction$1<typeof bulkDeleteFiles$1> & typeof bulkDeleteFiles$1;
3342
- declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction$1<typeof bulkRestoreFilesFromTrashBin$1> & typeof bulkRestoreFilesFromTrashBin$1;
3343
- declare const listDeletedFiles: BuildRESTFunction$1<typeof listDeletedFiles$1> & typeof listDeletedFiles$1;
3702
+ declare const generateFilesDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFilesDownloadUrl$1> & typeof generateFilesDownloadUrl$1>;
3703
+ declare const generateFileDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFileDownloadUrl$1> & typeof generateFileDownloadUrl$1>;
3704
+ declare const getFileDescriptor: MaybeContext<BuildRESTFunction<typeof getFileDescriptor$1> & typeof getFileDescriptor$1>;
3705
+ declare const getFileDescriptors: MaybeContext<BuildRESTFunction<typeof getFileDescriptors$1> & typeof getFileDescriptors$1>;
3706
+ declare const updateFileDescriptor: MaybeContext<BuildRESTFunction<typeof updateFileDescriptor$1> & typeof updateFileDescriptor$1>;
3707
+ declare const generateFileUploadUrl: MaybeContext<BuildRESTFunction<typeof generateFileUploadUrl$1> & typeof generateFileUploadUrl$1>;
3708
+ declare const generateFileResumableUploadUrl: MaybeContext<BuildRESTFunction<typeof generateFileResumableUploadUrl$1> & typeof generateFileResumableUploadUrl$1>;
3709
+ declare const importFile: MaybeContext<BuildRESTFunction<typeof importFile$1> & typeof importFile$1>;
3710
+ declare const bulkImportFiles: MaybeContext<BuildRESTFunction<typeof bulkImportFiles$1> & typeof bulkImportFiles$1>;
3711
+ declare const bulkImportFile: MaybeContext<BuildRESTFunction<typeof bulkImportFile$1> & typeof bulkImportFile$1>;
3712
+ declare const listFiles: MaybeContext<BuildRESTFunction<typeof listFiles$1> & typeof listFiles$1>;
3713
+ declare const searchFiles: MaybeContext<BuildRESTFunction<typeof searchFiles$1> & typeof searchFiles$1>;
3714
+ declare const generateVideoStreamingUrl: MaybeContext<BuildRESTFunction<typeof generateVideoStreamingUrl$1> & typeof generateVideoStreamingUrl$1>;
3715
+ declare const bulkDeleteFiles: MaybeContext<BuildRESTFunction<typeof bulkDeleteFiles$1> & typeof bulkDeleteFiles$1>;
3716
+ declare const bulkRestoreFilesFromTrashBin: MaybeContext<BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1> & typeof bulkRestoreFilesFromTrashBin$1>;
3717
+ declare const listDeletedFiles: MaybeContext<BuildRESTFunction<typeof listDeletedFiles$1> & typeof listDeletedFiles$1>;
3344
3718
 
3345
3719
  type _publicOnFileDescriptorUpdatedType = typeof onFileDescriptorUpdated$1;
3346
3720
  /** */
@@ -3489,50 +3863,6 @@ declare namespace index_d$1 {
3489
3863
  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_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_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 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_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, 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 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, SortOrder$1 as SortOrder, type Sorting$1 as Sorting, State$1 as State, index_d$1_StreamFormat as StreamFormat, 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 };
3490
3864
  }
3491
3865
 
3492
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
3493
- interface HttpClient {
3494
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
3495
- fetchWithAuth: typeof fetch;
3496
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
3497
- }
3498
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
3499
- type HttpResponse<T = any> = {
3500
- data: T;
3501
- status: number;
3502
- statusText: string;
3503
- headers: any;
3504
- request?: any;
3505
- };
3506
- type RequestOptions<_TResponse = any, Data = any> = {
3507
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3508
- url: string;
3509
- data?: Data;
3510
- params?: URLSearchParams;
3511
- } & APIMetadata;
3512
- type APIMetadata = {
3513
- methodFqn?: string;
3514
- entityFqdn?: string;
3515
- packageName?: string;
3516
- };
3517
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
3518
- type EventDefinition<Payload = unknown, Type extends string = string> = {
3519
- __type: 'event-definition';
3520
- type: Type;
3521
- isDomainEvent?: boolean;
3522
- transformations?: (envelope: unknown) => Payload;
3523
- __payload: Payload;
3524
- };
3525
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
3526
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
3527
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
3528
-
3529
- declare global {
3530
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3531
- interface SymbolConstructor {
3532
- readonly observable: symbol;
3533
- }
3534
- }
3535
-
3536
3866
  interface Folder {
3537
3867
  /** Folder ID. Generated when a folder is created in the Media Manager. */
3538
3868
  _id?: string;
@@ -3544,12 +3874,12 @@ interface Folder {
3544
3874
  * Date the folder was created.
3545
3875
  * @readonly
3546
3876
  */
3547
- _createdDate?: Date;
3877
+ _createdDate?: Date | null;
3548
3878
  /**
3549
3879
  * Date the folder was updated.
3550
3880
  * @readonly
3551
3881
  */
3552
- _updatedDate?: Date;
3882
+ _updatedDate?: Date | null;
3553
3883
  /**
3554
3884
  * State of the folder.
3555
3885
  * @readonly
@@ -3770,7 +4100,7 @@ interface DomainEvent extends DomainEventBodyOneOf {
3770
4100
  /** ID of the entity associated with the event. */
3771
4101
  entityId?: string;
3772
4102
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3773
- eventTime?: Date;
4103
+ eventTime?: Date | null;
3774
4104
  /**
3775
4105
  * Whether the event was triggered as a result of a privacy regulation application
3776
4106
  * (for example, GDPR).
@@ -3799,7 +4129,7 @@ interface EntityCreatedEvent {
3799
4129
  entity?: string;
3800
4130
  }
3801
4131
  interface RestoreInfo {
3802
- deletedDate?: Date;
4132
+ deletedDate?: Date | null;
3803
4133
  }
3804
4134
  interface EntityUpdatedEvent {
3805
4135
  /**
@@ -3912,7 +4242,7 @@ interface EventMetadata extends BaseEventMetadata {
3912
4242
  /** ID of the entity associated with the event. */
3913
4243
  entityId?: string;
3914
4244
  /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
3915
- eventTime?: Date;
4245
+ eventTime?: Date | null;
3916
4246
  /**
3917
4247
  * Whether the event was triggered as a result of a privacy regulation application
3918
4248
  * (for example, GDPR).
@@ -3996,12 +4326,12 @@ interface UpdateFolder {
3996
4326
  * Date the folder was created.
3997
4327
  * @readonly
3998
4328
  */
3999
- _createdDate?: Date;
4329
+ _createdDate?: Date | null;
4000
4330
  /**
4001
4331
  * Date the folder was updated.
4002
4332
  * @readonly
4003
4333
  */
4004
- _updatedDate?: Date;
4334
+ _updatedDate?: Date | null;
4005
4335
  /**
4006
4336
  * State of the folder.
4007
4337
  * @readonly
@@ -4157,15 +4487,15 @@ declare const onFolderDeleted$1: EventDefinition<FolderDeletedEnvelope, "wix.med
4157
4487
 
4158
4488
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4159
4489
 
4160
- declare const createFolder: BuildRESTFunction<typeof createFolder$1> & typeof createFolder$1;
4161
- declare const getFolder: BuildRESTFunction<typeof getFolder$1> & typeof getFolder$1;
4162
- declare const listFolders: BuildRESTFunction<typeof listFolders$1> & typeof listFolders$1;
4163
- declare const searchFolders: BuildRESTFunction<typeof searchFolders$1> & typeof searchFolders$1;
4164
- declare const updateFolder: BuildRESTFunction<typeof updateFolder$1> & typeof updateFolder$1;
4165
- declare const generateFolderDownloadUrl: BuildRESTFunction<typeof generateFolderDownloadUrl$1> & typeof generateFolderDownloadUrl$1;
4166
- declare const bulkDeleteFolders: BuildRESTFunction<typeof bulkDeleteFolders$1> & typeof bulkDeleteFolders$1;
4167
- declare const bulkRestoreFoldersFromTrashBin: BuildRESTFunction<typeof bulkRestoreFoldersFromTrashBin$1> & typeof bulkRestoreFoldersFromTrashBin$1;
4168
- declare const listDeletedFolders: BuildRESTFunction<typeof listDeletedFolders$1> & typeof listDeletedFolders$1;
4490
+ declare const createFolder: MaybeContext<BuildRESTFunction<typeof createFolder$1> & typeof createFolder$1>;
4491
+ declare const getFolder: MaybeContext<BuildRESTFunction<typeof getFolder$1> & typeof getFolder$1>;
4492
+ declare const listFolders: MaybeContext<BuildRESTFunction<typeof listFolders$1> & typeof listFolders$1>;
4493
+ declare const searchFolders: MaybeContext<BuildRESTFunction<typeof searchFolders$1> & typeof searchFolders$1>;
4494
+ declare const updateFolder: MaybeContext<BuildRESTFunction<typeof updateFolder$1> & typeof updateFolder$1>;
4495
+ declare const generateFolderDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFolderDownloadUrl$1> & typeof generateFolderDownloadUrl$1>;
4496
+ declare const bulkDeleteFolders: MaybeContext<BuildRESTFunction<typeof bulkDeleteFolders$1> & typeof bulkDeleteFolders$1>;
4497
+ declare const bulkRestoreFoldersFromTrashBin: MaybeContext<BuildRESTFunction<typeof bulkRestoreFoldersFromTrashBin$1> & typeof bulkRestoreFoldersFromTrashBin$1>;
4498
+ declare const listDeletedFolders: MaybeContext<BuildRESTFunction<typeof listDeletedFolders$1> & typeof listDeletedFolders$1>;
4169
4499
 
4170
4500
  type _publicOnFolderCreatedType = typeof onFolderCreated$1;
4171
4501
  /** */