@wix/media 1.0.100 → 1.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/type-bundles/context.bundle.d.ts +106 -230
- package/type-bundles/index.bundle.d.ts +58 -170
- package/type-bundles/meta.bundle.d.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/media",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.102",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@wix/media_enterprise-media-categories": "1.0.24",
|
|
22
22
|
"@wix/media_enterprise-media-items": "1.0.27",
|
|
23
|
-
"@wix/media_files": "1.0.
|
|
23
|
+
"@wix/media_files": "1.0.38",
|
|
24
24
|
"@wix/media_folders": "1.0.27"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"fqdn": ""
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "4bdba50cf058ff4245bbd51a0c55a6958ccadfff828bb18086cf5ad6"
|
|
49
49
|
}
|
|
@@ -181,41 +181,41 @@ interface EnterpriseOnboardingOptions {
|
|
|
181
181
|
accountName?: string;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
type RESTFunctionDescriptor
|
|
185
|
-
interface HttpClient
|
|
186
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
184
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
185
|
+
interface HttpClient {
|
|
186
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
187
187
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
188
188
|
}
|
|
189
|
-
type RequestOptionsFactory
|
|
190
|
-
type HttpResponse
|
|
189
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
190
|
+
type HttpResponse<T = any> = {
|
|
191
191
|
data: T;
|
|
192
192
|
status: number;
|
|
193
193
|
statusText: string;
|
|
194
194
|
headers: any;
|
|
195
195
|
request?: any;
|
|
196
196
|
};
|
|
197
|
-
type RequestOptions
|
|
197
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
198
198
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
199
199
|
url: string;
|
|
200
200
|
data?: Data;
|
|
201
201
|
params?: URLSearchParams;
|
|
202
|
-
} & APIMetadata
|
|
203
|
-
type APIMetadata
|
|
202
|
+
} & APIMetadata;
|
|
203
|
+
type APIMetadata = {
|
|
204
204
|
methodFqn?: string;
|
|
205
205
|
entityFqdn?: string;
|
|
206
206
|
packageName?: string;
|
|
207
207
|
};
|
|
208
|
-
type BuildRESTFunction
|
|
209
|
-
type EventDefinition
|
|
208
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
209
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
210
210
|
__type: 'event-definition';
|
|
211
211
|
type: Type;
|
|
212
212
|
isDomainEvent?: boolean;
|
|
213
213
|
transformations?: (envelope: unknown) => Payload;
|
|
214
214
|
__payload: Payload;
|
|
215
215
|
};
|
|
216
|
-
declare function EventDefinition
|
|
217
|
-
type EventHandler
|
|
218
|
-
type BuildEventDefinition
|
|
216
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
217
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
218
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
219
219
|
|
|
220
220
|
declare global {
|
|
221
221
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -224,37 +224,37 @@ declare global {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
declare function createCategory$1(httpClient: HttpClient
|
|
227
|
+
declare function createCategory$1(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
228
228
|
_id: string;
|
|
229
229
|
publishStatus: PublishStatus$1;
|
|
230
230
|
}>;
|
|
231
|
-
declare function deleteCategory$1(httpClient: HttpClient
|
|
232
|
-
declare function updateCategory$1(httpClient: HttpClient
|
|
231
|
+
declare function deleteCategory$1(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
232
|
+
declare function updateCategory$1(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
233
233
|
_id: string;
|
|
234
234
|
publishStatus: PublishStatus$1;
|
|
235
235
|
}>;
|
|
236
|
-
declare function getCategory$1(httpClient: HttpClient
|
|
236
|
+
declare function getCategory$1(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
237
237
|
category?: {
|
|
238
238
|
_id: string;
|
|
239
239
|
publishStatus: PublishStatus$1;
|
|
240
240
|
} | undefined;
|
|
241
241
|
subCategories: (any | undefined)[];
|
|
242
242
|
}>;
|
|
243
|
-
declare function enterpriseOnboarding$1(httpClient: HttpClient
|
|
244
|
-
declare function getMediaManagerCategories$1(httpClient: HttpClient
|
|
245
|
-
declare const onEnterpriseCategoryCreated$1: EventDefinition
|
|
246
|
-
declare const onEnterpriseCategoryDeleted$1: EventDefinition
|
|
247
|
-
declare const onEnterpriseCategoryUpdated$1: EventDefinition
|
|
243
|
+
declare function enterpriseOnboarding$1(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
244
|
+
declare function getMediaManagerCategories$1(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
245
|
+
declare const onEnterpriseCategoryCreated$1: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
246
|
+
declare const onEnterpriseCategoryDeleted$1: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
247
|
+
declare const onEnterpriseCategoryUpdated$1: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
|
|
248
248
|
|
|
249
|
-
declare const createCategory: BuildRESTFunction
|
|
250
|
-
declare const deleteCategory: BuildRESTFunction
|
|
251
|
-
declare const updateCategory: BuildRESTFunction
|
|
252
|
-
declare const getCategory: BuildRESTFunction
|
|
253
|
-
declare const enterpriseOnboarding: BuildRESTFunction
|
|
254
|
-
declare const getMediaManagerCategories: BuildRESTFunction
|
|
255
|
-
declare const onEnterpriseCategoryCreated: BuildEventDefinition
|
|
256
|
-
declare const onEnterpriseCategoryDeleted: BuildEventDefinition
|
|
257
|
-
declare const onEnterpriseCategoryUpdated: BuildEventDefinition
|
|
249
|
+
declare const createCategory: BuildRESTFunction<typeof createCategory$1>;
|
|
250
|
+
declare const deleteCategory: BuildRESTFunction<typeof deleteCategory$1>;
|
|
251
|
+
declare const updateCategory: BuildRESTFunction<typeof updateCategory$1>;
|
|
252
|
+
declare const getCategory: BuildRESTFunction<typeof getCategory$1>;
|
|
253
|
+
declare const enterpriseOnboarding: BuildRESTFunction<typeof enterpriseOnboarding$1>;
|
|
254
|
+
declare const getMediaManagerCategories: BuildRESTFunction<typeof getMediaManagerCategories$1>;
|
|
255
|
+
declare const onEnterpriseCategoryCreated: BuildEventDefinition<typeof onEnterpriseCategoryCreated$1>;
|
|
256
|
+
declare const onEnterpriseCategoryDeleted: BuildEventDefinition<typeof onEnterpriseCategoryDeleted$1>;
|
|
257
|
+
declare const onEnterpriseCategoryUpdated: BuildEventDefinition<typeof onEnterpriseCategoryUpdated$1>;
|
|
258
258
|
|
|
259
259
|
declare const context$3_createCategory: typeof createCategory;
|
|
260
260
|
declare const context$3_deleteCategory: typeof deleteCategory;
|
|
@@ -903,55 +903,12 @@ interface OverwriteItemCategoriesOptions {
|
|
|
903
903
|
categoryIds?: string[];
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
type HttpResponse$2<T = any> = {
|
|
913
|
-
data: T;
|
|
914
|
-
status: number;
|
|
915
|
-
statusText: string;
|
|
916
|
-
headers: any;
|
|
917
|
-
request?: any;
|
|
918
|
-
};
|
|
919
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
920
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
921
|
-
url: string;
|
|
922
|
-
data?: Data;
|
|
923
|
-
params?: URLSearchParams;
|
|
924
|
-
} & APIMetadata$2;
|
|
925
|
-
type APIMetadata$2 = {
|
|
926
|
-
methodFqn?: string;
|
|
927
|
-
entityFqdn?: string;
|
|
928
|
-
packageName?: string;
|
|
929
|
-
};
|
|
930
|
-
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
931
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
932
|
-
__type: 'event-definition';
|
|
933
|
-
type: Type;
|
|
934
|
-
isDomainEvent?: boolean;
|
|
935
|
-
transformations?: (envelope: unknown) => Payload;
|
|
936
|
-
__payload: Payload;
|
|
937
|
-
};
|
|
938
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
939
|
-
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
940
|
-
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
941
|
-
|
|
942
|
-
declare global {
|
|
943
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
944
|
-
interface SymbolConstructor {
|
|
945
|
-
readonly observable: symbol;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
declare function itemUploadCallback$1(httpClient: HttpClient$2): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
950
|
-
declare function generateFileUploadUrl$3(httpClient: HttpClient$2): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
951
|
-
declare function importFile$3(httpClient: HttpClient$2): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
952
|
-
declare function searchItems$1(httpClient: HttpClient$2): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
953
|
-
declare function queryItems$1(httpClient: HttpClient$2): () => ItemsQueryBuilder;
|
|
954
|
-
declare function updateItem$1(httpClient: HttpClient$2): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
|
|
906
|
+
declare function itemUploadCallback$1(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
907
|
+
declare function generateFileUploadUrl$3(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
908
|
+
declare function importFile$3(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
909
|
+
declare function searchItems$1(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
910
|
+
declare function queryItems$1(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
911
|
+
declare function updateItem$1(httpClient: HttpClient): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
|
|
955
912
|
_id: string;
|
|
956
913
|
mediaType: MediaType$1;
|
|
957
914
|
assets?: {
|
|
@@ -972,8 +929,8 @@ declare function updateItem$1(httpClient: HttpClient$2): (_id: string, item: Upd
|
|
|
972
929
|
} | undefined;
|
|
973
930
|
publishStatus: PublishStatus;
|
|
974
931
|
}>;
|
|
975
|
-
declare function bulkUpdateItem$1(httpClient: HttpClient
|
|
976
|
-
declare function getItem$1(httpClient: HttpClient
|
|
932
|
+
declare function bulkUpdateItem$1(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
933
|
+
declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
977
934
|
_id: string;
|
|
978
935
|
mediaType: MediaType$1;
|
|
979
936
|
assets?: {
|
|
@@ -994,29 +951,29 @@ declare function getItem$1(httpClient: HttpClient$2): (itemId: string) => Promis
|
|
|
994
951
|
} | undefined;
|
|
995
952
|
publishStatus: PublishStatus;
|
|
996
953
|
}>;
|
|
997
|
-
declare function linkItemToCategories$1(httpClient: HttpClient
|
|
998
|
-
declare function unlinkItemFromCategories$1(httpClient: HttpClient
|
|
999
|
-
declare function overwriteItemCategories$1(httpClient: HttpClient
|
|
1000
|
-
declare const onEnterpriseItemCreated$1: EventDefinition
|
|
1001
|
-
declare const onEnterpriseItemUpdated$1: EventDefinition
|
|
1002
|
-
declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition
|
|
1003
|
-
declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition
|
|
954
|
+
declare function linkItemToCategories$1(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
955
|
+
declare function unlinkItemFromCategories$1(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
956
|
+
declare function overwriteItemCategories$1(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
957
|
+
declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
958
|
+
declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
959
|
+
declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
960
|
+
declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
|
|
1004
961
|
|
|
1005
|
-
declare const itemUploadCallback: BuildRESTFunction
|
|
1006
|
-
declare const generateFileUploadUrl$2: BuildRESTFunction
|
|
1007
|
-
declare const importFile$2: BuildRESTFunction
|
|
1008
|
-
declare const searchItems: BuildRESTFunction
|
|
1009
|
-
declare const queryItems: BuildRESTFunction
|
|
1010
|
-
declare const updateItem: BuildRESTFunction
|
|
1011
|
-
declare const bulkUpdateItem: BuildRESTFunction
|
|
1012
|
-
declare const getItem: BuildRESTFunction
|
|
1013
|
-
declare const linkItemToCategories: BuildRESTFunction
|
|
1014
|
-
declare const unlinkItemFromCategories: BuildRESTFunction
|
|
1015
|
-
declare const overwriteItemCategories: BuildRESTFunction
|
|
1016
|
-
declare const onEnterpriseItemCreated: BuildEventDefinition
|
|
1017
|
-
declare const onEnterpriseItemUpdated: BuildEventDefinition
|
|
1018
|
-
declare const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition
|
|
1019
|
-
declare const onEnterpriseItemPublishStatusChanged: BuildEventDefinition
|
|
962
|
+
declare const itemUploadCallback: BuildRESTFunction<typeof itemUploadCallback$1>;
|
|
963
|
+
declare const generateFileUploadUrl$2: BuildRESTFunction<typeof generateFileUploadUrl$3>;
|
|
964
|
+
declare const importFile$2: BuildRESTFunction<typeof importFile$3>;
|
|
965
|
+
declare const searchItems: BuildRESTFunction<typeof searchItems$1>;
|
|
966
|
+
declare const queryItems: BuildRESTFunction<typeof queryItems$1>;
|
|
967
|
+
declare const updateItem: BuildRESTFunction<typeof updateItem$1>;
|
|
968
|
+
declare const bulkUpdateItem: BuildRESTFunction<typeof bulkUpdateItem$1>;
|
|
969
|
+
declare const getItem: BuildRESTFunction<typeof getItem$1>;
|
|
970
|
+
declare const linkItemToCategories: BuildRESTFunction<typeof linkItemToCategories$1>;
|
|
971
|
+
declare const unlinkItemFromCategories: BuildRESTFunction<typeof unlinkItemFromCategories$1>;
|
|
972
|
+
declare const overwriteItemCategories: BuildRESTFunction<typeof overwriteItemCategories$1>;
|
|
973
|
+
declare const onEnterpriseItemCreated: BuildEventDefinition<typeof onEnterpriseItemCreated$1>;
|
|
974
|
+
declare const onEnterpriseItemUpdated: BuildEventDefinition<typeof onEnterpriseItemUpdated$1>;
|
|
975
|
+
declare const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition<typeof onEnterpriseItemItemCategoriesChanged$1>;
|
|
976
|
+
declare const onEnterpriseItemPublishStatusChanged: BuildEventDefinition<typeof onEnterpriseItemPublishStatusChanged$1>;
|
|
1020
977
|
|
|
1021
978
|
declare const context$2_bulkUpdateItem: typeof bulkUpdateItem;
|
|
1022
979
|
declare const context$2_getItem: typeof getItem;
|
|
@@ -1177,6 +1134,11 @@ interface ImageMedia {
|
|
|
1177
1134
|
* @readonly
|
|
1178
1135
|
*/
|
|
1179
1136
|
caption?: string | null;
|
|
1137
|
+
/**
|
|
1138
|
+
* Optional, return true or false if the image has text, or empty for unknown
|
|
1139
|
+
* @readonly
|
|
1140
|
+
*/
|
|
1141
|
+
containsText?: boolean | null;
|
|
1180
1142
|
}
|
|
1181
1143
|
interface Colors {
|
|
1182
1144
|
/** Main color of the image. */
|
|
@@ -2287,52 +2249,9 @@ interface ListDeletedFilesOptions {
|
|
|
2287
2249
|
paging?: CursorPaging$1;
|
|
2288
2250
|
}
|
|
2289
2251
|
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2294
|
-
}
|
|
2295
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2296
|
-
type HttpResponse$1<T = any> = {
|
|
2297
|
-
data: T;
|
|
2298
|
-
status: number;
|
|
2299
|
-
statusText: string;
|
|
2300
|
-
headers: any;
|
|
2301
|
-
request?: any;
|
|
2302
|
-
};
|
|
2303
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2304
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2305
|
-
url: string;
|
|
2306
|
-
data?: Data;
|
|
2307
|
-
params?: URLSearchParams;
|
|
2308
|
-
} & APIMetadata$1;
|
|
2309
|
-
type APIMetadata$1 = {
|
|
2310
|
-
methodFqn?: string;
|
|
2311
|
-
entityFqdn?: string;
|
|
2312
|
-
packageName?: string;
|
|
2313
|
-
};
|
|
2314
|
-
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2315
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2316
|
-
__type: 'event-definition';
|
|
2317
|
-
type: Type;
|
|
2318
|
-
isDomainEvent?: boolean;
|
|
2319
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2320
|
-
__payload: Payload;
|
|
2321
|
-
};
|
|
2322
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2323
|
-
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2324
|
-
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
2325
|
-
|
|
2326
|
-
declare global {
|
|
2327
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2328
|
-
interface SymbolConstructor {
|
|
2329
|
-
readonly observable: symbol;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
declare function generateFilesDownloadUrl$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
2334
|
-
declare function generateFileDownloadUrl$1(httpClient: HttpClient$1): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
2335
|
-
declare function getFileDescriptor$1(httpClient: HttpClient$1): (fileId: string) => Promise<FileDescriptor & {
|
|
2252
|
+
declare function generateFilesDownloadUrl$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
2253
|
+
declare function generateFileDownloadUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
2254
|
+
declare function getFileDescriptor$1(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & {
|
|
2336
2255
|
_id: string;
|
|
2337
2256
|
displayName: string;
|
|
2338
2257
|
url: string;
|
|
@@ -2389,8 +2308,8 @@ declare function getFileDescriptor$1(httpClient: HttpClient$1): (fileId: string)
|
|
|
2389
2308
|
siteId: string;
|
|
2390
2309
|
state: State$1;
|
|
2391
2310
|
}>;
|
|
2392
|
-
declare function getFileDescriptors$1(httpClient: HttpClient
|
|
2393
|
-
declare function updateFileDescriptor$1(httpClient: HttpClient
|
|
2311
|
+
declare function getFileDescriptors$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
2312
|
+
declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
2394
2313
|
_id: string;
|
|
2395
2314
|
displayName: string;
|
|
2396
2315
|
url: string;
|
|
@@ -2447,42 +2366,42 @@ declare function updateFileDescriptor$1(httpClient: HttpClient$1): (file: FileDe
|
|
|
2447
2366
|
siteId: string;
|
|
2448
2367
|
state: State$1;
|
|
2449
2368
|
}>;
|
|
2450
|
-
declare function generateFileUploadUrl$1(httpClient: HttpClient
|
|
2451
|
-
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient
|
|
2452
|
-
declare function importFile$1(httpClient: HttpClient
|
|
2453
|
-
declare function bulkImportFiles$1(httpClient: HttpClient
|
|
2454
|
-
declare function bulkImportFile$1(httpClient: HttpClient
|
|
2455
|
-
declare function listFiles$1(httpClient: HttpClient
|
|
2456
|
-
declare function searchFiles$1(httpClient: HttpClient
|
|
2457
|
-
declare function generateVideoStreamingUrl$1(httpClient: HttpClient
|
|
2458
|
-
declare function bulkDeleteFiles$1(httpClient: HttpClient
|
|
2459
|
-
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient
|
|
2460
|
-
declare function listDeletedFiles$1(httpClient: HttpClient
|
|
2461
|
-
declare const onFileDescriptorUpdated$1: EventDefinition
|
|
2462
|
-
declare const onFileDescriptorDeleted$1: EventDefinition
|
|
2463
|
-
declare const onFileDescriptorFileReady$1: EventDefinition
|
|
2464
|
-
declare const onFileDescriptorFileFailed$1: EventDefinition
|
|
2369
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
2370
|
+
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
2371
|
+
declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
2372
|
+
declare function bulkImportFiles$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
2373
|
+
declare function bulkImportFile$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
2374
|
+
declare function listFiles$1(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
2375
|
+
declare function searchFiles$1(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
2376
|
+
declare function generateVideoStreamingUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
2377
|
+
declare function bulkDeleteFiles$1(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
2378
|
+
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
|
|
2379
|
+
declare function listDeletedFiles$1(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
2380
|
+
declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
2381
|
+
declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
2382
|
+
declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
2383
|
+
declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
2465
2384
|
|
|
2466
|
-
declare const generateFilesDownloadUrl: BuildRESTFunction
|
|
2467
|
-
declare const generateFileDownloadUrl: BuildRESTFunction
|
|
2468
|
-
declare const getFileDescriptor: BuildRESTFunction
|
|
2469
|
-
declare const getFileDescriptors: BuildRESTFunction
|
|
2470
|
-
declare const updateFileDescriptor: BuildRESTFunction
|
|
2471
|
-
declare const generateFileUploadUrl: BuildRESTFunction
|
|
2472
|
-
declare const generateFileResumableUploadUrl: BuildRESTFunction
|
|
2473
|
-
declare const importFile: BuildRESTFunction
|
|
2474
|
-
declare const bulkImportFiles: BuildRESTFunction
|
|
2475
|
-
declare const bulkImportFile: BuildRESTFunction
|
|
2476
|
-
declare const listFiles: BuildRESTFunction
|
|
2477
|
-
declare const searchFiles: BuildRESTFunction
|
|
2478
|
-
declare const generateVideoStreamingUrl: BuildRESTFunction
|
|
2479
|
-
declare const bulkDeleteFiles: BuildRESTFunction
|
|
2480
|
-
declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction
|
|
2481
|
-
declare const listDeletedFiles: BuildRESTFunction
|
|
2482
|
-
declare const onFileDescriptorUpdated: BuildEventDefinition
|
|
2483
|
-
declare const onFileDescriptorDeleted: BuildEventDefinition
|
|
2484
|
-
declare const onFileDescriptorFileReady: BuildEventDefinition
|
|
2485
|
-
declare const onFileDescriptorFileFailed: BuildEventDefinition
|
|
2385
|
+
declare const generateFilesDownloadUrl: BuildRESTFunction<typeof generateFilesDownloadUrl$1>;
|
|
2386
|
+
declare const generateFileDownloadUrl: BuildRESTFunction<typeof generateFileDownloadUrl$1>;
|
|
2387
|
+
declare const getFileDescriptor: BuildRESTFunction<typeof getFileDescriptor$1>;
|
|
2388
|
+
declare const getFileDescriptors: BuildRESTFunction<typeof getFileDescriptors$1>;
|
|
2389
|
+
declare const updateFileDescriptor: BuildRESTFunction<typeof updateFileDescriptor$1>;
|
|
2390
|
+
declare const generateFileUploadUrl: BuildRESTFunction<typeof generateFileUploadUrl$1>;
|
|
2391
|
+
declare const generateFileResumableUploadUrl: BuildRESTFunction<typeof generateFileResumableUploadUrl$1>;
|
|
2392
|
+
declare const importFile: BuildRESTFunction<typeof importFile$1>;
|
|
2393
|
+
declare const bulkImportFiles: BuildRESTFunction<typeof bulkImportFiles$1>;
|
|
2394
|
+
declare const bulkImportFile: BuildRESTFunction<typeof bulkImportFile$1>;
|
|
2395
|
+
declare const listFiles: BuildRESTFunction<typeof listFiles$1>;
|
|
2396
|
+
declare const searchFiles: BuildRESTFunction<typeof searchFiles$1>;
|
|
2397
|
+
declare const generateVideoStreamingUrl: BuildRESTFunction<typeof generateVideoStreamingUrl$1>;
|
|
2398
|
+
declare const bulkDeleteFiles: BuildRESTFunction<typeof bulkDeleteFiles$1>;
|
|
2399
|
+
declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1>;
|
|
2400
|
+
declare const listDeletedFiles: BuildRESTFunction<typeof listDeletedFiles$1>;
|
|
2401
|
+
declare const onFileDescriptorUpdated: BuildEventDefinition<typeof onFileDescriptorUpdated$1>;
|
|
2402
|
+
declare const onFileDescriptorDeleted: BuildEventDefinition<typeof onFileDescriptorDeleted$1>;
|
|
2403
|
+
declare const onFileDescriptorFileReady: BuildEventDefinition<typeof onFileDescriptorFileReady$1>;
|
|
2404
|
+
declare const onFileDescriptorFileFailed: BuildEventDefinition<typeof onFileDescriptorFileFailed$1>;
|
|
2486
2405
|
|
|
2487
2406
|
declare const context$1_bulkDeleteFiles: typeof bulkDeleteFiles;
|
|
2488
2407
|
declare const context$1_bulkImportFile: typeof bulkImportFile;
|
|
@@ -2811,49 +2730,6 @@ interface ListDeletedFoldersOptions {
|
|
|
2811
2730
|
paging?: CursorPaging;
|
|
2812
2731
|
}
|
|
2813
2732
|
|
|
2814
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2815
|
-
interface HttpClient {
|
|
2816
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2817
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2818
|
-
}
|
|
2819
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2820
|
-
type HttpResponse<T = any> = {
|
|
2821
|
-
data: T;
|
|
2822
|
-
status: number;
|
|
2823
|
-
statusText: string;
|
|
2824
|
-
headers: any;
|
|
2825
|
-
request?: any;
|
|
2826
|
-
};
|
|
2827
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2828
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2829
|
-
url: string;
|
|
2830
|
-
data?: Data;
|
|
2831
|
-
params?: URLSearchParams;
|
|
2832
|
-
} & APIMetadata;
|
|
2833
|
-
type APIMetadata = {
|
|
2834
|
-
methodFqn?: string;
|
|
2835
|
-
entityFqdn?: string;
|
|
2836
|
-
packageName?: string;
|
|
2837
|
-
};
|
|
2838
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2839
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2840
|
-
__type: 'event-definition';
|
|
2841
|
-
type: Type;
|
|
2842
|
-
isDomainEvent?: boolean;
|
|
2843
|
-
transformations?: (envelope: unknown) => Payload;
|
|
2844
|
-
__payload: Payload;
|
|
2845
|
-
};
|
|
2846
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2847
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2848
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2849
|
-
|
|
2850
|
-
declare global {
|
|
2851
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2852
|
-
interface SymbolConstructor {
|
|
2853
|
-
readonly observable: symbol;
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
|
|
2857
2733
|
declare function createFolder$1(httpClient: HttpClient): (displayName: string, options?: CreateFolderOptions) => Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
|
|
2858
2734
|
declare function getFolder$1(httpClient: HttpClient): (folderId: string) => Promise<Folder & {
|
|
2859
2735
|
_id: string;
|
|
@@ -347,37 +347,37 @@ interface EnterpriseOnboardingOptions {
|
|
|
347
347
|
accountName?: string;
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
interface HttpClient
|
|
351
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
350
|
+
interface HttpClient {
|
|
351
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
352
352
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
353
353
|
}
|
|
354
|
-
type RequestOptionsFactory
|
|
355
|
-
type HttpResponse
|
|
354
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
355
|
+
type HttpResponse<T = any> = {
|
|
356
356
|
data: T;
|
|
357
357
|
status: number;
|
|
358
358
|
statusText: string;
|
|
359
359
|
headers: any;
|
|
360
360
|
request?: any;
|
|
361
361
|
};
|
|
362
|
-
type RequestOptions
|
|
362
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
363
363
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
364
364
|
url: string;
|
|
365
365
|
data?: Data;
|
|
366
366
|
params?: URLSearchParams;
|
|
367
|
-
} & APIMetadata
|
|
368
|
-
type APIMetadata
|
|
367
|
+
} & APIMetadata;
|
|
368
|
+
type APIMetadata = {
|
|
369
369
|
methodFqn?: string;
|
|
370
370
|
entityFqdn?: string;
|
|
371
371
|
packageName?: string;
|
|
372
372
|
};
|
|
373
|
-
type EventDefinition
|
|
373
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
374
374
|
__type: 'event-definition';
|
|
375
375
|
type: Type;
|
|
376
376
|
isDomainEvent?: boolean;
|
|
377
377
|
transformations?: (envelope: unknown) => Payload;
|
|
378
378
|
__payload: Payload;
|
|
379
379
|
};
|
|
380
|
-
declare function EventDefinition
|
|
380
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
381
381
|
|
|
382
382
|
declare global {
|
|
383
383
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -389,27 +389,27 @@ declare global {
|
|
|
389
389
|
declare const __metadata$3: {
|
|
390
390
|
PACKAGE_NAME: string;
|
|
391
391
|
};
|
|
392
|
-
declare function createCategory(httpClient: HttpClient
|
|
392
|
+
declare function createCategory(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
393
393
|
_id: string;
|
|
394
394
|
publishStatus: PublishStatus$1;
|
|
395
395
|
}>;
|
|
396
|
-
declare function deleteCategory(httpClient: HttpClient
|
|
397
|
-
declare function updateCategory(httpClient: HttpClient
|
|
396
|
+
declare function deleteCategory(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
397
|
+
declare function updateCategory(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
398
398
|
_id: string;
|
|
399
399
|
publishStatus: PublishStatus$1;
|
|
400
400
|
}>;
|
|
401
|
-
declare function getCategory(httpClient: HttpClient
|
|
401
|
+
declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
402
402
|
category?: {
|
|
403
403
|
_id: string;
|
|
404
404
|
publishStatus: PublishStatus$1;
|
|
405
405
|
} | undefined;
|
|
406
406
|
subCategories: (any | undefined)[];
|
|
407
407
|
}>;
|
|
408
|
-
declare function enterpriseOnboarding(httpClient: HttpClient
|
|
409
|
-
declare function getMediaManagerCategories(httpClient: HttpClient
|
|
410
|
-
declare const onEnterpriseCategoryCreated: EventDefinition
|
|
411
|
-
declare const onEnterpriseCategoryDeleted: EventDefinition
|
|
412
|
-
declare const onEnterpriseCategoryUpdated: EventDefinition
|
|
408
|
+
declare function enterpriseOnboarding(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
409
|
+
declare function getMediaManagerCategories(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
410
|
+
declare const onEnterpriseCategoryCreated: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
411
|
+
declare const onEnterpriseCategoryDeleted: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
412
|
+
declare const onEnterpriseCategoryUpdated: EventDefinition<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
|
|
413
413
|
|
|
414
414
|
type index_d$3_CreateCategoryRequest = CreateCategoryRequest;
|
|
415
415
|
type index_d$3_CreateCategoryResponse = CreateCategoryResponse;
|
|
@@ -1369,54 +1369,15 @@ interface OverwriteItemCategoriesOptions {
|
|
|
1369
1369
|
categoryIds?: string[];
|
|
1370
1370
|
}
|
|
1371
1371
|
|
|
1372
|
-
interface HttpClient$2 {
|
|
1373
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
1374
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
1375
|
-
}
|
|
1376
|
-
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
1377
|
-
type HttpResponse$2<T = any> = {
|
|
1378
|
-
data: T;
|
|
1379
|
-
status: number;
|
|
1380
|
-
statusText: string;
|
|
1381
|
-
headers: any;
|
|
1382
|
-
request?: any;
|
|
1383
|
-
};
|
|
1384
|
-
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
1385
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1386
|
-
url: string;
|
|
1387
|
-
data?: Data;
|
|
1388
|
-
params?: URLSearchParams;
|
|
1389
|
-
} & APIMetadata$2;
|
|
1390
|
-
type APIMetadata$2 = {
|
|
1391
|
-
methodFqn?: string;
|
|
1392
|
-
entityFqdn?: string;
|
|
1393
|
-
packageName?: string;
|
|
1394
|
-
};
|
|
1395
|
-
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
1396
|
-
__type: 'event-definition';
|
|
1397
|
-
type: Type;
|
|
1398
|
-
isDomainEvent?: boolean;
|
|
1399
|
-
transformations?: (envelope: unknown) => Payload;
|
|
1400
|
-
__payload: Payload;
|
|
1401
|
-
};
|
|
1402
|
-
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
1403
|
-
|
|
1404
|
-
declare global {
|
|
1405
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
1406
|
-
interface SymbolConstructor {
|
|
1407
|
-
readonly observable: symbol;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
1372
|
declare const __metadata$2: {
|
|
1412
1373
|
PACKAGE_NAME: string;
|
|
1413
1374
|
};
|
|
1414
|
-
declare function itemUploadCallback(httpClient: HttpClient
|
|
1415
|
-
declare function generateFileUploadUrl$1(httpClient: HttpClient
|
|
1416
|
-
declare function importFile$1(httpClient: HttpClient
|
|
1417
|
-
declare function searchItems(httpClient: HttpClient
|
|
1418
|
-
declare function queryItems(httpClient: HttpClient
|
|
1419
|
-
declare function updateItem(httpClient: HttpClient
|
|
1375
|
+
declare function itemUploadCallback(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
1376
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
1377
|
+
declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
1378
|
+
declare function searchItems(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
1379
|
+
declare function queryItems(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
1380
|
+
declare function updateItem(httpClient: HttpClient): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
|
|
1420
1381
|
_id: string;
|
|
1421
1382
|
mediaType: MediaType$1;
|
|
1422
1383
|
assets?: {
|
|
@@ -1437,8 +1398,8 @@ declare function updateItem(httpClient: HttpClient$2): (_id: string, item: Updat
|
|
|
1437
1398
|
} | undefined;
|
|
1438
1399
|
publishStatus: PublishStatus;
|
|
1439
1400
|
}>;
|
|
1440
|
-
declare function bulkUpdateItem(httpClient: HttpClient
|
|
1441
|
-
declare function getItem(httpClient: HttpClient
|
|
1401
|
+
declare function bulkUpdateItem(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1402
|
+
declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
1442
1403
|
_id: string;
|
|
1443
1404
|
mediaType: MediaType$1;
|
|
1444
1405
|
assets?: {
|
|
@@ -1459,13 +1420,13 @@ declare function getItem(httpClient: HttpClient$2): (itemId: string) => Promise<
|
|
|
1459
1420
|
} | undefined;
|
|
1460
1421
|
publishStatus: PublishStatus;
|
|
1461
1422
|
}>;
|
|
1462
|
-
declare function linkItemToCategories(httpClient: HttpClient
|
|
1463
|
-
declare function unlinkItemFromCategories(httpClient: HttpClient
|
|
1464
|
-
declare function overwriteItemCategories(httpClient: HttpClient
|
|
1465
|
-
declare const onEnterpriseItemCreated: EventDefinition
|
|
1466
|
-
declare const onEnterpriseItemUpdated: EventDefinition
|
|
1467
|
-
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition
|
|
1468
|
-
declare const onEnterpriseItemPublishStatusChanged: EventDefinition
|
|
1423
|
+
declare function linkItemToCategories(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
1424
|
+
declare function unlinkItemFromCategories(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
1425
|
+
declare function overwriteItemCategories(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
1426
|
+
declare const onEnterpriseItemCreated: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
1427
|
+
declare const onEnterpriseItemUpdated: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
1428
|
+
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
1429
|
+
declare const onEnterpriseItemPublishStatusChanged: EventDefinition<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
|
|
1469
1430
|
|
|
1470
1431
|
type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
|
|
1471
1432
|
type index_d$2_BulkUpdateItemOptions = BulkUpdateItemOptions;
|
|
@@ -1676,6 +1637,11 @@ interface ImageMedia {
|
|
|
1676
1637
|
* @readonly
|
|
1677
1638
|
*/
|
|
1678
1639
|
caption?: string | null;
|
|
1640
|
+
/**
|
|
1641
|
+
* Optional, return true or false if the image has text, or empty for unknown
|
|
1642
|
+
* @readonly
|
|
1643
|
+
*/
|
|
1644
|
+
containsText?: boolean | null;
|
|
1679
1645
|
}
|
|
1680
1646
|
interface Colors {
|
|
1681
1647
|
/** Main color of the image. */
|
|
@@ -3360,51 +3326,12 @@ interface ListDeletedFilesOptions {
|
|
|
3360
3326
|
paging?: CursorPaging$1;
|
|
3361
3327
|
}
|
|
3362
3328
|
|
|
3363
|
-
interface HttpClient$1 {
|
|
3364
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3365
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3366
|
-
}
|
|
3367
|
-
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3368
|
-
type HttpResponse$1<T = any> = {
|
|
3369
|
-
data: T;
|
|
3370
|
-
status: number;
|
|
3371
|
-
statusText: string;
|
|
3372
|
-
headers: any;
|
|
3373
|
-
request?: any;
|
|
3374
|
-
};
|
|
3375
|
-
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3376
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3377
|
-
url: string;
|
|
3378
|
-
data?: Data;
|
|
3379
|
-
params?: URLSearchParams;
|
|
3380
|
-
} & APIMetadata$1;
|
|
3381
|
-
type APIMetadata$1 = {
|
|
3382
|
-
methodFqn?: string;
|
|
3383
|
-
entityFqdn?: string;
|
|
3384
|
-
packageName?: string;
|
|
3385
|
-
};
|
|
3386
|
-
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3387
|
-
__type: 'event-definition';
|
|
3388
|
-
type: Type;
|
|
3389
|
-
isDomainEvent?: boolean;
|
|
3390
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3391
|
-
__payload: Payload;
|
|
3392
|
-
};
|
|
3393
|
-
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3394
|
-
|
|
3395
|
-
declare global {
|
|
3396
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3397
|
-
interface SymbolConstructor {
|
|
3398
|
-
readonly observable: symbol;
|
|
3399
|
-
}
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
3329
|
declare const __metadata$1: {
|
|
3403
3330
|
PACKAGE_NAME: string;
|
|
3404
3331
|
};
|
|
3405
|
-
declare function generateFilesDownloadUrl(httpClient: HttpClient
|
|
3406
|
-
declare function generateFileDownloadUrl(httpClient: HttpClient
|
|
3407
|
-
declare function getFileDescriptor(httpClient: HttpClient
|
|
3332
|
+
declare function generateFilesDownloadUrl(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
3333
|
+
declare function generateFileDownloadUrl(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
3334
|
+
declare function getFileDescriptor(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & {
|
|
3408
3335
|
_id: string;
|
|
3409
3336
|
displayName: string;
|
|
3410
3337
|
url: string;
|
|
@@ -3461,8 +3388,8 @@ declare function getFileDescriptor(httpClient: HttpClient$1): (fileId: string) =
|
|
|
3461
3388
|
siteId: string;
|
|
3462
3389
|
state: State$1;
|
|
3463
3390
|
}>;
|
|
3464
|
-
declare function getFileDescriptors(httpClient: HttpClient
|
|
3465
|
-
declare function updateFileDescriptor(httpClient: HttpClient
|
|
3391
|
+
declare function getFileDescriptors(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3392
|
+
declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3466
3393
|
_id: string;
|
|
3467
3394
|
displayName: string;
|
|
3468
3395
|
url: string;
|
|
@@ -3519,21 +3446,21 @@ declare function updateFileDescriptor(httpClient: HttpClient$1): (file: FileDesc
|
|
|
3519
3446
|
siteId: string;
|
|
3520
3447
|
state: State$1;
|
|
3521
3448
|
}>;
|
|
3522
|
-
declare function generateFileUploadUrl(httpClient: HttpClient
|
|
3523
|
-
declare function generateFileResumableUploadUrl(httpClient: HttpClient
|
|
3524
|
-
declare function importFile(httpClient: HttpClient
|
|
3525
|
-
declare function bulkImportFiles(httpClient: HttpClient
|
|
3526
|
-
declare function bulkImportFile(httpClient: HttpClient
|
|
3527
|
-
declare function listFiles(httpClient: HttpClient
|
|
3528
|
-
declare function searchFiles(httpClient: HttpClient
|
|
3529
|
-
declare function generateVideoStreamingUrl(httpClient: HttpClient
|
|
3530
|
-
declare function bulkDeleteFiles(httpClient: HttpClient
|
|
3531
|
-
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient
|
|
3532
|
-
declare function listDeletedFiles(httpClient: HttpClient
|
|
3533
|
-
declare const onFileDescriptorUpdated: EventDefinition
|
|
3534
|
-
declare const onFileDescriptorDeleted: EventDefinition
|
|
3535
|
-
declare const onFileDescriptorFileReady: EventDefinition
|
|
3536
|
-
declare const onFileDescriptorFileFailed: EventDefinition
|
|
3449
|
+
declare function generateFileUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
3450
|
+
declare function generateFileResumableUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
3451
|
+
declare function importFile(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
3452
|
+
declare function bulkImportFiles(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
3453
|
+
declare function bulkImportFile(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
3454
|
+
declare function listFiles(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
3455
|
+
declare function searchFiles(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
3456
|
+
declare function generateVideoStreamingUrl(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
3457
|
+
declare function bulkDeleteFiles(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
3458
|
+
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
|
|
3459
|
+
declare function listDeletedFiles(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
3460
|
+
declare const onFileDescriptorUpdated: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
3461
|
+
declare const onFileDescriptorDeleted: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
3462
|
+
declare const onFileDescriptorFileReady: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
3463
|
+
declare const onFileDescriptorFileFailed: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
3537
3464
|
|
|
3538
3465
|
type index_d$1_ApplicationError = ApplicationError;
|
|
3539
3466
|
type index_d$1_Archive = Archive;
|
|
@@ -4175,45 +4102,6 @@ interface ListDeletedFoldersOptions {
|
|
|
4175
4102
|
paging?: CursorPaging;
|
|
4176
4103
|
}
|
|
4177
4104
|
|
|
4178
|
-
interface HttpClient {
|
|
4179
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4180
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4181
|
-
}
|
|
4182
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4183
|
-
type HttpResponse<T = any> = {
|
|
4184
|
-
data: T;
|
|
4185
|
-
status: number;
|
|
4186
|
-
statusText: string;
|
|
4187
|
-
headers: any;
|
|
4188
|
-
request?: any;
|
|
4189
|
-
};
|
|
4190
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4191
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4192
|
-
url: string;
|
|
4193
|
-
data?: Data;
|
|
4194
|
-
params?: URLSearchParams;
|
|
4195
|
-
} & APIMetadata;
|
|
4196
|
-
type APIMetadata = {
|
|
4197
|
-
methodFqn?: string;
|
|
4198
|
-
entityFqdn?: string;
|
|
4199
|
-
packageName?: string;
|
|
4200
|
-
};
|
|
4201
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4202
|
-
__type: 'event-definition';
|
|
4203
|
-
type: Type;
|
|
4204
|
-
isDomainEvent?: boolean;
|
|
4205
|
-
transformations?: (envelope: unknown) => Payload;
|
|
4206
|
-
__payload: Payload;
|
|
4207
|
-
};
|
|
4208
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4209
|
-
|
|
4210
|
-
declare global {
|
|
4211
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4212
|
-
interface SymbolConstructor {
|
|
4213
|
-
readonly observable: symbol;
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
|
|
4217
4105
|
declare const __metadata: {
|
|
4218
4106
|
PACKAGE_NAME: string;
|
|
4219
4107
|
};
|
|
@@ -1905,6 +1905,11 @@ interface ImageMedia$1 {
|
|
|
1905
1905
|
* @readonly
|
|
1906
1906
|
*/
|
|
1907
1907
|
caption?: string | null;
|
|
1908
|
+
/**
|
|
1909
|
+
* Optional, return true or false if the image has text, or empty for unknown
|
|
1910
|
+
* @readonly
|
|
1911
|
+
*/
|
|
1912
|
+
containsText?: boolean | null;
|
|
1908
1913
|
}
|
|
1909
1914
|
interface Image {
|
|
1910
1915
|
/** WixMedia image ID. */
|
|
@@ -3862,6 +3867,11 @@ interface ImageMedia {
|
|
|
3862
3867
|
* @readonly
|
|
3863
3868
|
*/
|
|
3864
3869
|
caption?: string | null;
|
|
3870
|
+
/**
|
|
3871
|
+
* Optional, return true or false if the image has text, or empty for unknown
|
|
3872
|
+
* @readonly
|
|
3873
|
+
*/
|
|
3874
|
+
containsText?: boolean | null;
|
|
3865
3875
|
}
|
|
3866
3876
|
interface Colors {
|
|
3867
3877
|
/** Main color of the image. */
|