@wix/media 1.0.102 → 1.0.103
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 +2 -2
- package/type-bundles/context.bundle.d.ts +230 -101
- package/type-bundles/index.bundle.d.ts +170 -53
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/media",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.103",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"fqdn": ""
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "2ad2189b65f06d2774aac0e94a14b6a63e996477e10f29cd986e3438"
|
|
49
49
|
}
|
|
@@ -181,41 +181,41 @@ interface EnterpriseOnboardingOptions {
|
|
|
181
181
|
accountName?: string;
|
|
182
182
|
}
|
|
183
183
|
|
|
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>>;
|
|
184
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
185
|
+
interface HttpClient$3 {
|
|
186
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
187
187
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
188
188
|
}
|
|
189
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
190
|
-
type HttpResponse<T = any> = {
|
|
189
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
190
|
+
type HttpResponse$3<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<_TResponse = any, Data = any> = {
|
|
197
|
+
type RequestOptions$3<_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$3;
|
|
203
|
+
type APIMetadata$3 = {
|
|
204
204
|
methodFqn?: string;
|
|
205
205
|
entityFqdn?: string;
|
|
206
206
|
packageName?: string;
|
|
207
207
|
};
|
|
208
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
209
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
208
|
+
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
209
|
+
type EventDefinition$3<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<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;
|
|
216
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
217
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
218
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<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): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
227
|
+
declare function createCategory$1(httpClient: HttpClient$3): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
228
228
|
_id: string;
|
|
229
229
|
publishStatus: PublishStatus$1;
|
|
230
230
|
}>;
|
|
231
|
-
declare function deleteCategory$1(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
232
|
-
declare function updateCategory$1(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
231
|
+
declare function deleteCategory$1(httpClient: HttpClient$3): (categoryId: string) => Promise<void>;
|
|
232
|
+
declare function updateCategory$1(httpClient: HttpClient$3): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
233
233
|
_id: string;
|
|
234
234
|
publishStatus: PublishStatus$1;
|
|
235
235
|
}>;
|
|
236
|
-
declare function getCategory$1(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
236
|
+
declare function getCategory$1(httpClient: HttpClient$3): (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): (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">;
|
|
243
|
+
declare function enterpriseOnboarding$1(httpClient: HttpClient$3): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
244
|
+
declare function getMediaManagerCategories$1(httpClient: HttpClient$3): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
245
|
+
declare const onEnterpriseCategoryCreated$1: EventDefinition$3<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
246
|
+
declare const onEnterpriseCategoryDeleted$1: EventDefinition$3<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
247
|
+
declare const onEnterpriseCategoryUpdated$1: EventDefinition$3<EnterpriseCategoryUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_updated">;
|
|
248
248
|
|
|
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>;
|
|
249
|
+
declare const createCategory: BuildRESTFunction$3<typeof createCategory$1>;
|
|
250
|
+
declare const deleteCategory: BuildRESTFunction$3<typeof deleteCategory$1>;
|
|
251
|
+
declare const updateCategory: BuildRESTFunction$3<typeof updateCategory$1>;
|
|
252
|
+
declare const getCategory: BuildRESTFunction$3<typeof getCategory$1>;
|
|
253
|
+
declare const enterpriseOnboarding: BuildRESTFunction$3<typeof enterpriseOnboarding$1>;
|
|
254
|
+
declare const getMediaManagerCategories: BuildRESTFunction$3<typeof getMediaManagerCategories$1>;
|
|
255
|
+
declare const onEnterpriseCategoryCreated: BuildEventDefinition$3<typeof onEnterpriseCategoryCreated$1>;
|
|
256
|
+
declare const onEnterpriseCategoryDeleted: BuildEventDefinition$3<typeof onEnterpriseCategoryDeleted$1>;
|
|
257
|
+
declare const onEnterpriseCategoryUpdated: BuildEventDefinition$3<typeof onEnterpriseCategoryUpdated$1>;
|
|
258
258
|
|
|
259
259
|
declare const context$3_createCategory: typeof createCategory;
|
|
260
260
|
declare const context$3_deleteCategory: typeof deleteCategory;
|
|
@@ -903,12 +903,55 @@ interface OverwriteItemCategoriesOptions {
|
|
|
903
903
|
categoryIds?: string[];
|
|
904
904
|
}
|
|
905
905
|
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
906
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
907
|
+
interface HttpClient$2 {
|
|
908
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
909
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
910
|
+
}
|
|
911
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
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 & {
|
|
912
955
|
_id: string;
|
|
913
956
|
mediaType: MediaType$1;
|
|
914
957
|
assets?: {
|
|
@@ -929,8 +972,8 @@ declare function updateItem$1(httpClient: HttpClient): (_id: string, item: Updat
|
|
|
929
972
|
} | undefined;
|
|
930
973
|
publishStatus: PublishStatus;
|
|
931
974
|
}>;
|
|
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 & {
|
|
975
|
+
declare function bulkUpdateItem$1(httpClient: HttpClient$2): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
976
|
+
declare function getItem$1(httpClient: HttpClient$2): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
934
977
|
_id: string;
|
|
935
978
|
mediaType: MediaType$1;
|
|
936
979
|
assets?: {
|
|
@@ -951,29 +994,29 @@ declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<
|
|
|
951
994
|
} | undefined;
|
|
952
995
|
publishStatus: PublishStatus;
|
|
953
996
|
}>;
|
|
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">;
|
|
997
|
+
declare function linkItemToCategories$1(httpClient: HttpClient$2): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
998
|
+
declare function unlinkItemFromCategories$1(httpClient: HttpClient$2): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
999
|
+
declare function overwriteItemCategories$1(httpClient: HttpClient$2): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
1000
|
+
declare const onEnterpriseItemCreated$1: EventDefinition$2<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
1001
|
+
declare const onEnterpriseItemUpdated$1: EventDefinition$2<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
1002
|
+
declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition$2<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
1003
|
+
declare const onEnterpriseItemPublishStatusChanged$1: EventDefinition$2<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
|
|
961
1004
|
|
|
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>;
|
|
1005
|
+
declare const itemUploadCallback: BuildRESTFunction$2<typeof itemUploadCallback$1>;
|
|
1006
|
+
declare const generateFileUploadUrl$2: BuildRESTFunction$2<typeof generateFileUploadUrl$3>;
|
|
1007
|
+
declare const importFile$2: BuildRESTFunction$2<typeof importFile$3>;
|
|
1008
|
+
declare const searchItems: BuildRESTFunction$2<typeof searchItems$1>;
|
|
1009
|
+
declare const queryItems: BuildRESTFunction$2<typeof queryItems$1>;
|
|
1010
|
+
declare const updateItem: BuildRESTFunction$2<typeof updateItem$1>;
|
|
1011
|
+
declare const bulkUpdateItem: BuildRESTFunction$2<typeof bulkUpdateItem$1>;
|
|
1012
|
+
declare const getItem: BuildRESTFunction$2<typeof getItem$1>;
|
|
1013
|
+
declare const linkItemToCategories: BuildRESTFunction$2<typeof linkItemToCategories$1>;
|
|
1014
|
+
declare const unlinkItemFromCategories: BuildRESTFunction$2<typeof unlinkItemFromCategories$1>;
|
|
1015
|
+
declare const overwriteItemCategories: BuildRESTFunction$2<typeof overwriteItemCategories$1>;
|
|
1016
|
+
declare const onEnterpriseItemCreated: BuildEventDefinition$2<typeof onEnterpriseItemCreated$1>;
|
|
1017
|
+
declare const onEnterpriseItemUpdated: BuildEventDefinition$2<typeof onEnterpriseItemUpdated$1>;
|
|
1018
|
+
declare const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition$2<typeof onEnterpriseItemItemCategoriesChanged$1>;
|
|
1019
|
+
declare const onEnterpriseItemPublishStatusChanged: BuildEventDefinition$2<typeof onEnterpriseItemPublishStatusChanged$1>;
|
|
977
1020
|
|
|
978
1021
|
declare const context$2_bulkUpdateItem: typeof bulkUpdateItem;
|
|
979
1022
|
declare const context$2_getItem: typeof getItem;
|
|
@@ -2249,9 +2292,52 @@ interface ListDeletedFilesOptions {
|
|
|
2249
2292
|
paging?: CursorPaging$1;
|
|
2250
2293
|
}
|
|
2251
2294
|
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2295
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2296
|
+
interface HttpClient$1 {
|
|
2297
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
2298
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2299
|
+
}
|
|
2300
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
2301
|
+
type HttpResponse$1<T = any> = {
|
|
2302
|
+
data: T;
|
|
2303
|
+
status: number;
|
|
2304
|
+
statusText: string;
|
|
2305
|
+
headers: any;
|
|
2306
|
+
request?: any;
|
|
2307
|
+
};
|
|
2308
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
2309
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2310
|
+
url: string;
|
|
2311
|
+
data?: Data;
|
|
2312
|
+
params?: URLSearchParams;
|
|
2313
|
+
} & APIMetadata$1;
|
|
2314
|
+
type APIMetadata$1 = {
|
|
2315
|
+
methodFqn?: string;
|
|
2316
|
+
entityFqdn?: string;
|
|
2317
|
+
packageName?: string;
|
|
2318
|
+
};
|
|
2319
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
2320
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
2321
|
+
__type: 'event-definition';
|
|
2322
|
+
type: Type;
|
|
2323
|
+
isDomainEvent?: boolean;
|
|
2324
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2325
|
+
__payload: Payload;
|
|
2326
|
+
};
|
|
2327
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
2328
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
2329
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
2330
|
+
|
|
2331
|
+
declare global {
|
|
2332
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2333
|
+
interface SymbolConstructor {
|
|
2334
|
+
readonly observable: symbol;
|
|
2335
|
+
}
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
declare function generateFilesDownloadUrl$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
2339
|
+
declare function generateFileDownloadUrl$1(httpClient: HttpClient$1): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
2340
|
+
declare function getFileDescriptor$1(httpClient: HttpClient$1): (fileId: string) => Promise<FileDescriptor & {
|
|
2255
2341
|
_id: string;
|
|
2256
2342
|
displayName: string;
|
|
2257
2343
|
url: string;
|
|
@@ -2308,8 +2394,8 @@ declare function getFileDescriptor$1(httpClient: HttpClient): (fileId: string) =
|
|
|
2308
2394
|
siteId: string;
|
|
2309
2395
|
state: State$1;
|
|
2310
2396
|
}>;
|
|
2311
|
-
declare function getFileDescriptors$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
2312
|
-
declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
2397
|
+
declare function getFileDescriptors$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
2398
|
+
declare function updateFileDescriptor$1(httpClient: HttpClient$1): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
2313
2399
|
_id: string;
|
|
2314
2400
|
displayName: string;
|
|
2315
2401
|
url: string;
|
|
@@ -2366,42 +2452,42 @@ declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDesc
|
|
|
2366
2452
|
siteId: string;
|
|
2367
2453
|
state: State$1;
|
|
2368
2454
|
}>;
|
|
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">;
|
|
2455
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
2456
|
+
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
2457
|
+
declare function importFile$1(httpClient: HttpClient$1): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
2458
|
+
declare function bulkImportFiles$1(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
2459
|
+
declare function bulkImportFile$1(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
2460
|
+
declare function listFiles$1(httpClient: HttpClient$1): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
2461
|
+
declare function searchFiles$1(httpClient: HttpClient$1): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
2462
|
+
declare function generateVideoStreamingUrl$1(httpClient: HttpClient$1): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
2463
|
+
declare function bulkDeleteFiles$1(httpClient: HttpClient$1): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
2464
|
+
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<void>;
|
|
2465
|
+
declare function listDeletedFiles$1(httpClient: HttpClient$1): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
2466
|
+
declare const onFileDescriptorUpdated$1: EventDefinition$1<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
2467
|
+
declare const onFileDescriptorDeleted$1: EventDefinition$1<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
2468
|
+
declare const onFileDescriptorFileReady$1: EventDefinition$1<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
2469
|
+
declare const onFileDescriptorFileFailed$1: EventDefinition$1<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
2384
2470
|
|
|
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>;
|
|
2471
|
+
declare const generateFilesDownloadUrl: BuildRESTFunction$1<typeof generateFilesDownloadUrl$1>;
|
|
2472
|
+
declare const generateFileDownloadUrl: BuildRESTFunction$1<typeof generateFileDownloadUrl$1>;
|
|
2473
|
+
declare const getFileDescriptor: BuildRESTFunction$1<typeof getFileDescriptor$1>;
|
|
2474
|
+
declare const getFileDescriptors: BuildRESTFunction$1<typeof getFileDescriptors$1>;
|
|
2475
|
+
declare const updateFileDescriptor: BuildRESTFunction$1<typeof updateFileDescriptor$1>;
|
|
2476
|
+
declare const generateFileUploadUrl: BuildRESTFunction$1<typeof generateFileUploadUrl$1>;
|
|
2477
|
+
declare const generateFileResumableUploadUrl: BuildRESTFunction$1<typeof generateFileResumableUploadUrl$1>;
|
|
2478
|
+
declare const importFile: BuildRESTFunction$1<typeof importFile$1>;
|
|
2479
|
+
declare const bulkImportFiles: BuildRESTFunction$1<typeof bulkImportFiles$1>;
|
|
2480
|
+
declare const bulkImportFile: BuildRESTFunction$1<typeof bulkImportFile$1>;
|
|
2481
|
+
declare const listFiles: BuildRESTFunction$1<typeof listFiles$1>;
|
|
2482
|
+
declare const searchFiles: BuildRESTFunction$1<typeof searchFiles$1>;
|
|
2483
|
+
declare const generateVideoStreamingUrl: BuildRESTFunction$1<typeof generateVideoStreamingUrl$1>;
|
|
2484
|
+
declare const bulkDeleteFiles: BuildRESTFunction$1<typeof bulkDeleteFiles$1>;
|
|
2485
|
+
declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction$1<typeof bulkRestoreFilesFromTrashBin$1>;
|
|
2486
|
+
declare const listDeletedFiles: BuildRESTFunction$1<typeof listDeletedFiles$1>;
|
|
2487
|
+
declare const onFileDescriptorUpdated: BuildEventDefinition$1<typeof onFileDescriptorUpdated$1>;
|
|
2488
|
+
declare const onFileDescriptorDeleted: BuildEventDefinition$1<typeof onFileDescriptorDeleted$1>;
|
|
2489
|
+
declare const onFileDescriptorFileReady: BuildEventDefinition$1<typeof onFileDescriptorFileReady$1>;
|
|
2490
|
+
declare const onFileDescriptorFileFailed: BuildEventDefinition$1<typeof onFileDescriptorFileFailed$1>;
|
|
2405
2491
|
|
|
2406
2492
|
declare const context$1_bulkDeleteFiles: typeof bulkDeleteFiles;
|
|
2407
2493
|
declare const context$1_bulkImportFile: typeof bulkImportFile;
|
|
@@ -2730,6 +2816,49 @@ interface ListDeletedFoldersOptions {
|
|
|
2730
2816
|
paging?: CursorPaging;
|
|
2731
2817
|
}
|
|
2732
2818
|
|
|
2819
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
2820
|
+
interface HttpClient {
|
|
2821
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
2822
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
2823
|
+
}
|
|
2824
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
2825
|
+
type HttpResponse<T = any> = {
|
|
2826
|
+
data: T;
|
|
2827
|
+
status: number;
|
|
2828
|
+
statusText: string;
|
|
2829
|
+
headers: any;
|
|
2830
|
+
request?: any;
|
|
2831
|
+
};
|
|
2832
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
2833
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2834
|
+
url: string;
|
|
2835
|
+
data?: Data;
|
|
2836
|
+
params?: URLSearchParams;
|
|
2837
|
+
} & APIMetadata;
|
|
2838
|
+
type APIMetadata = {
|
|
2839
|
+
methodFqn?: string;
|
|
2840
|
+
entityFqdn?: string;
|
|
2841
|
+
packageName?: string;
|
|
2842
|
+
};
|
|
2843
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
2844
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
2845
|
+
__type: 'event-definition';
|
|
2846
|
+
type: Type;
|
|
2847
|
+
isDomainEvent?: boolean;
|
|
2848
|
+
transformations?: (envelope: unknown) => Payload;
|
|
2849
|
+
__payload: Payload;
|
|
2850
|
+
};
|
|
2851
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
2852
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
2853
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
2854
|
+
|
|
2855
|
+
declare global {
|
|
2856
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
2857
|
+
interface SymbolConstructor {
|
|
2858
|
+
readonly observable: symbol;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2733
2862
|
declare function createFolder$1(httpClient: HttpClient): (displayName: string, options?: CreateFolderOptions) => Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
|
|
2734
2863
|
declare function getFolder$1(httpClient: HttpClient): (folderId: string) => Promise<Folder & {
|
|
2735
2864
|
_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<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
350
|
+
interface HttpClient$3 {
|
|
351
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
352
352
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
353
353
|
}
|
|
354
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
355
|
-
type HttpResponse<T = any> = {
|
|
354
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
355
|
+
type HttpResponse$3<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<_TResponse = any, Data = any> = {
|
|
362
|
+
type RequestOptions$3<_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$3;
|
|
368
|
+
type APIMetadata$3 = {
|
|
369
369
|
methodFqn?: string;
|
|
370
370
|
entityFqdn?: string;
|
|
371
371
|
packageName?: string;
|
|
372
372
|
};
|
|
373
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
373
|
+
type EventDefinition$3<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<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
380
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<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): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
392
|
+
declare function createCategory(httpClient: HttpClient$3): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
393
393
|
_id: string;
|
|
394
394
|
publishStatus: PublishStatus$1;
|
|
395
395
|
}>;
|
|
396
|
-
declare function deleteCategory(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
397
|
-
declare function updateCategory(httpClient: HttpClient): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
396
|
+
declare function deleteCategory(httpClient: HttpClient$3): (categoryId: string) => Promise<void>;
|
|
397
|
+
declare function updateCategory(httpClient: HttpClient$3): (_id: string, category: UpdateCategory) => Promise<EnterpriseCategory & {
|
|
398
398
|
_id: string;
|
|
399
399
|
publishStatus: PublishStatus$1;
|
|
400
400
|
}>;
|
|
401
|
-
declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
401
|
+
declare function getCategory(httpClient: HttpClient$3): (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): (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">;
|
|
408
|
+
declare function enterpriseOnboarding(httpClient: HttpClient$3): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
409
|
+
declare function getMediaManagerCategories(httpClient: HttpClient$3): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
410
|
+
declare const onEnterpriseCategoryCreated: EventDefinition$3<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
411
|
+
declare const onEnterpriseCategoryDeleted: EventDefinition$3<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
412
|
+
declare const onEnterpriseCategoryUpdated: EventDefinition$3<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,15 +1369,54 @@ 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
|
+
|
|
1372
1411
|
declare const __metadata$2: {
|
|
1373
1412
|
PACKAGE_NAME: string;
|
|
1374
1413
|
};
|
|
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 & {
|
|
1414
|
+
declare function itemUploadCallback(httpClient: HttpClient$2): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
1415
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient$2): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
1416
|
+
declare function importFile$1(httpClient: HttpClient$2): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
1417
|
+
declare function searchItems(httpClient: HttpClient$2): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
1418
|
+
declare function queryItems(httpClient: HttpClient$2): () => ItemsQueryBuilder;
|
|
1419
|
+
declare function updateItem(httpClient: HttpClient$2): (_id: string, item: UpdateItem) => Promise<EnterpriseMediaItem & {
|
|
1381
1420
|
_id: string;
|
|
1382
1421
|
mediaType: MediaType$1;
|
|
1383
1422
|
assets?: {
|
|
@@ -1398,8 +1437,8 @@ declare function updateItem(httpClient: HttpClient): (_id: string, item: UpdateI
|
|
|
1398
1437
|
} | undefined;
|
|
1399
1438
|
publishStatus: PublishStatus;
|
|
1400
1439
|
}>;
|
|
1401
|
-
declare function bulkUpdateItem(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1402
|
-
declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
1440
|
+
declare function bulkUpdateItem(httpClient: HttpClient$2): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1441
|
+
declare function getItem(httpClient: HttpClient$2): (itemId: string) => Promise<EnterpriseMediaItem & {
|
|
1403
1442
|
_id: string;
|
|
1404
1443
|
mediaType: MediaType$1;
|
|
1405
1444
|
assets?: {
|
|
@@ -1420,13 +1459,13 @@ declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<En
|
|
|
1420
1459
|
} | undefined;
|
|
1421
1460
|
publishStatus: PublishStatus;
|
|
1422
1461
|
}>;
|
|
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">;
|
|
1462
|
+
declare function linkItemToCategories(httpClient: HttpClient$2): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
1463
|
+
declare function unlinkItemFromCategories(httpClient: HttpClient$2): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
1464
|
+
declare function overwriteItemCategories(httpClient: HttpClient$2): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
1465
|
+
declare const onEnterpriseItemCreated: EventDefinition$2<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
1466
|
+
declare const onEnterpriseItemUpdated: EventDefinition$2<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
1467
|
+
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition$2<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
1468
|
+
declare const onEnterpriseItemPublishStatusChanged: EventDefinition$2<EnterpriseItemPublishStatusChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_publish_status_changed">;
|
|
1430
1469
|
|
|
1431
1470
|
type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
|
|
1432
1471
|
type index_d$2_BulkUpdateItemOptions = BulkUpdateItemOptions;
|
|
@@ -3326,12 +3365,51 @@ interface ListDeletedFilesOptions {
|
|
|
3326
3365
|
paging?: CursorPaging$1;
|
|
3327
3366
|
}
|
|
3328
3367
|
|
|
3368
|
+
interface HttpClient$1 {
|
|
3369
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3370
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3371
|
+
}
|
|
3372
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3373
|
+
type HttpResponse$1<T = any> = {
|
|
3374
|
+
data: T;
|
|
3375
|
+
status: number;
|
|
3376
|
+
statusText: string;
|
|
3377
|
+
headers: any;
|
|
3378
|
+
request?: any;
|
|
3379
|
+
};
|
|
3380
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3381
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3382
|
+
url: string;
|
|
3383
|
+
data?: Data;
|
|
3384
|
+
params?: URLSearchParams;
|
|
3385
|
+
} & APIMetadata$1;
|
|
3386
|
+
type APIMetadata$1 = {
|
|
3387
|
+
methodFqn?: string;
|
|
3388
|
+
entityFqdn?: string;
|
|
3389
|
+
packageName?: string;
|
|
3390
|
+
};
|
|
3391
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3392
|
+
__type: 'event-definition';
|
|
3393
|
+
type: Type;
|
|
3394
|
+
isDomainEvent?: boolean;
|
|
3395
|
+
transformations?: (envelope: unknown) => Payload;
|
|
3396
|
+
__payload: Payload;
|
|
3397
|
+
};
|
|
3398
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3399
|
+
|
|
3400
|
+
declare global {
|
|
3401
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3402
|
+
interface SymbolConstructor {
|
|
3403
|
+
readonly observable: symbol;
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
|
|
3329
3407
|
declare const __metadata$1: {
|
|
3330
3408
|
PACKAGE_NAME: string;
|
|
3331
3409
|
};
|
|
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 & {
|
|
3410
|
+
declare function generateFilesDownloadUrl(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
3411
|
+
declare function generateFileDownloadUrl(httpClient: HttpClient$1): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
3412
|
+
declare function getFileDescriptor(httpClient: HttpClient$1): (fileId: string) => Promise<FileDescriptor & {
|
|
3335
3413
|
_id: string;
|
|
3336
3414
|
displayName: string;
|
|
3337
3415
|
url: string;
|
|
@@ -3388,8 +3466,8 @@ declare function getFileDescriptor(httpClient: HttpClient): (fileId: string) =>
|
|
|
3388
3466
|
siteId: string;
|
|
3389
3467
|
state: State$1;
|
|
3390
3468
|
}>;
|
|
3391
|
-
declare function getFileDescriptors(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3392
|
-
declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3469
|
+
declare function getFileDescriptors(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3470
|
+
declare function updateFileDescriptor(httpClient: HttpClient$1): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3393
3471
|
_id: string;
|
|
3394
3472
|
displayName: string;
|
|
3395
3473
|
url: string;
|
|
@@ -3446,21 +3524,21 @@ declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescri
|
|
|
3446
3524
|
siteId: string;
|
|
3447
3525
|
state: State$1;
|
|
3448
3526
|
}>;
|
|
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">;
|
|
3527
|
+
declare function generateFileUploadUrl(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
3528
|
+
declare function generateFileResumableUploadUrl(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
3529
|
+
declare function importFile(httpClient: HttpClient$1): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
3530
|
+
declare function bulkImportFiles(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
3531
|
+
declare function bulkImportFile(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
3532
|
+
declare function listFiles(httpClient: HttpClient$1): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
3533
|
+
declare function searchFiles(httpClient: HttpClient$1): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
3534
|
+
declare function generateVideoStreamingUrl(httpClient: HttpClient$1): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
3535
|
+
declare function bulkDeleteFiles(httpClient: HttpClient$1): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
3536
|
+
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient$1): (fileIds: string[]) => Promise<void>;
|
|
3537
|
+
declare function listDeletedFiles(httpClient: HttpClient$1): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
3538
|
+
declare const onFileDescriptorUpdated: EventDefinition$1<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
3539
|
+
declare const onFileDescriptorDeleted: EventDefinition$1<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
3540
|
+
declare const onFileDescriptorFileReady: EventDefinition$1<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
3541
|
+
declare const onFileDescriptorFileFailed: EventDefinition$1<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
3464
3542
|
|
|
3465
3543
|
type index_d$1_ApplicationError = ApplicationError;
|
|
3466
3544
|
type index_d$1_Archive = Archive;
|
|
@@ -4102,6 +4180,45 @@ interface ListDeletedFoldersOptions {
|
|
|
4102
4180
|
paging?: CursorPaging;
|
|
4103
4181
|
}
|
|
4104
4182
|
|
|
4183
|
+
interface HttpClient {
|
|
4184
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
4185
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
4186
|
+
}
|
|
4187
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
4188
|
+
type HttpResponse<T = any> = {
|
|
4189
|
+
data: T;
|
|
4190
|
+
status: number;
|
|
4191
|
+
statusText: string;
|
|
4192
|
+
headers: any;
|
|
4193
|
+
request?: any;
|
|
4194
|
+
};
|
|
4195
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
4196
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
4197
|
+
url: string;
|
|
4198
|
+
data?: Data;
|
|
4199
|
+
params?: URLSearchParams;
|
|
4200
|
+
} & APIMetadata;
|
|
4201
|
+
type APIMetadata = {
|
|
4202
|
+
methodFqn?: string;
|
|
4203
|
+
entityFqdn?: string;
|
|
4204
|
+
packageName?: string;
|
|
4205
|
+
};
|
|
4206
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
4207
|
+
__type: 'event-definition';
|
|
4208
|
+
type: Type;
|
|
4209
|
+
isDomainEvent?: boolean;
|
|
4210
|
+
transformations?: (envelope: unknown) => Payload;
|
|
4211
|
+
__payload: Payload;
|
|
4212
|
+
};
|
|
4213
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
4214
|
+
|
|
4215
|
+
declare global {
|
|
4216
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
4217
|
+
interface SymbolConstructor {
|
|
4218
|
+
readonly observable: symbol;
|
|
4219
|
+
}
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4105
4222
|
declare const __metadata: {
|
|
4106
4223
|
PACKAGE_NAME: string;
|
|
4107
4224
|
};
|