@wix/media 1.0.98 → 1.0.99
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 +6 -7
- package/type-bundles/context.bundle.d.ts +239 -102
- package/type-bundles/index.bundle.d.ts +179 -54
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/media",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.99",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/media_enterprise-media-categories": "1.0.
|
|
22
|
-
"@wix/media_enterprise-media-items": "1.0.
|
|
23
|
-
"@wix/media_files": "1.0.
|
|
24
|
-
"@wix/media_folders": "1.0.
|
|
21
|
+
"@wix/media_enterprise-media-categories": "1.0.24",
|
|
22
|
+
"@wix/media_enterprise-media-items": "1.0.27",
|
|
23
|
+
"@wix/media_files": "1.0.36",
|
|
24
|
+
"@wix/media_folders": "1.0.27"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
28
27
|
"glob": "^10.4.1",
|
|
29
28
|
"rollup": "^4.18.0",
|
|
30
29
|
"rollup-plugin-dts": "^6.1.1",
|
|
@@ -46,5 +45,5 @@
|
|
|
46
45
|
"fqdn": ""
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
48
|
+
"falconPackageHash": "e5841a18caf169746ec11327ddec9ad82d5c95cee90cba2cc853d489"
|
|
50
49
|
}
|
|
@@ -181,72 +181,80 @@ 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
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
187
188
|
}
|
|
188
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
189
|
-
type HttpResponse<T = any> = {
|
|
189
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
190
|
+
type HttpResponse$3<T = any> = {
|
|
190
191
|
data: T;
|
|
191
192
|
status: number;
|
|
192
193
|
statusText: string;
|
|
193
194
|
headers: any;
|
|
194
195
|
request?: any;
|
|
195
196
|
};
|
|
196
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
197
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
197
198
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
198
199
|
url: string;
|
|
199
200
|
data?: Data;
|
|
200
201
|
params?: URLSearchParams;
|
|
201
|
-
} & APIMetadata;
|
|
202
|
-
type APIMetadata = {
|
|
202
|
+
} & APIMetadata$3;
|
|
203
|
+
type APIMetadata$3 = {
|
|
203
204
|
methodFqn?: string;
|
|
204
205
|
entityFqdn?: string;
|
|
205
206
|
packageName?: string;
|
|
206
207
|
};
|
|
207
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
208
|
-
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> = {
|
|
209
210
|
__type: 'event-definition';
|
|
210
211
|
type: Type;
|
|
211
212
|
isDomainEvent?: boolean;
|
|
212
|
-
transformations?: unknown;
|
|
213
|
+
transformations?: (envelope: unknown) => Payload;
|
|
213
214
|
__payload: Payload;
|
|
214
215
|
};
|
|
215
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
216
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
217
|
-
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;
|
|
218
219
|
|
|
219
|
-
declare
|
|
220
|
+
declare global {
|
|
221
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
222
|
+
interface SymbolConstructor {
|
|
223
|
+
readonly observable: symbol;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare function createCategory$1(httpClient: HttpClient$3): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
220
228
|
_id: string;
|
|
221
229
|
publishStatus: PublishStatus$1;
|
|
222
230
|
}>;
|
|
223
|
-
declare function deleteCategory$1(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
224
|
-
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 & {
|
|
225
233
|
_id: string;
|
|
226
234
|
publishStatus: PublishStatus$1;
|
|
227
235
|
}>;
|
|
228
|
-
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 & {
|
|
229
237
|
category?: {
|
|
230
238
|
_id: string;
|
|
231
239
|
publishStatus: PublishStatus$1;
|
|
232
240
|
} | undefined;
|
|
233
241
|
subCategories: (any | undefined)[];
|
|
234
242
|
}>;
|
|
235
|
-
declare function enterpriseOnboarding$1(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
236
|
-
declare function getMediaManagerCategories$1(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
237
|
-
declare const onEnterpriseCategoryCreated$1: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
238
|
-
declare const onEnterpriseCategoryDeleted$1: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
239
|
-
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">;
|
|
240
248
|
|
|
241
|
-
declare const createCategory: BuildRESTFunction<typeof createCategory$1>;
|
|
242
|
-
declare const deleteCategory: BuildRESTFunction<typeof deleteCategory$1>;
|
|
243
|
-
declare const updateCategory: BuildRESTFunction<typeof updateCategory$1>;
|
|
244
|
-
declare const getCategory: BuildRESTFunction<typeof getCategory$1>;
|
|
245
|
-
declare const enterpriseOnboarding: BuildRESTFunction<typeof enterpriseOnboarding$1>;
|
|
246
|
-
declare const getMediaManagerCategories: BuildRESTFunction<typeof getMediaManagerCategories$1>;
|
|
247
|
-
declare const onEnterpriseCategoryCreated: BuildEventDefinition<typeof onEnterpriseCategoryCreated$1>;
|
|
248
|
-
declare const onEnterpriseCategoryDeleted: BuildEventDefinition<typeof onEnterpriseCategoryDeleted$1>;
|
|
249
|
-
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>;
|
|
250
258
|
|
|
251
259
|
declare const context$3_createCategory: typeof createCategory;
|
|
252
260
|
declare const context$3_deleteCategory: typeof deleteCategory;
|
|
@@ -895,12 +903,55 @@ interface OverwriteItemCategoriesOptions {
|
|
|
895
903
|
categoryIds?: string[];
|
|
896
904
|
}
|
|
897
905
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
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 & {
|
|
904
955
|
_id: string;
|
|
905
956
|
mediaType: MediaType$1;
|
|
906
957
|
assets?: {
|
|
@@ -921,8 +972,8 @@ declare function updateItem$1(httpClient: HttpClient): (_id: string, item: Updat
|
|
|
921
972
|
} | undefined;
|
|
922
973
|
publishStatus: PublishStatus;
|
|
923
974
|
}>;
|
|
924
|
-
declare function bulkUpdateItem$1(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
925
|
-
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 & {
|
|
926
977
|
_id: string;
|
|
927
978
|
mediaType: MediaType$1;
|
|
928
979
|
assets?: {
|
|
@@ -943,29 +994,29 @@ declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<
|
|
|
943
994
|
} | undefined;
|
|
944
995
|
publishStatus: PublishStatus;
|
|
945
996
|
}>;
|
|
946
|
-
declare function linkItemToCategories$1(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
947
|
-
declare function unlinkItemFromCategories$1(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
948
|
-
declare function overwriteItemCategories$1(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
949
|
-
declare const onEnterpriseItemCreated$1: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
950
|
-
declare const onEnterpriseItemUpdated$1: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
951
|
-
declare const onEnterpriseItemItemCategoriesChanged$1: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
952
|
-
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">;
|
|
953
1004
|
|
|
954
|
-
declare const itemUploadCallback: BuildRESTFunction<typeof itemUploadCallback$1>;
|
|
955
|
-
declare const generateFileUploadUrl$2: BuildRESTFunction<typeof generateFileUploadUrl$3>;
|
|
956
|
-
declare const importFile$2: BuildRESTFunction<typeof importFile$3>;
|
|
957
|
-
declare const searchItems: BuildRESTFunction<typeof searchItems$1>;
|
|
958
|
-
declare const queryItems: BuildRESTFunction<typeof queryItems$1>;
|
|
959
|
-
declare const updateItem: BuildRESTFunction<typeof updateItem$1>;
|
|
960
|
-
declare const bulkUpdateItem: BuildRESTFunction<typeof bulkUpdateItem$1>;
|
|
961
|
-
declare const getItem: BuildRESTFunction<typeof getItem$1>;
|
|
962
|
-
declare const linkItemToCategories: BuildRESTFunction<typeof linkItemToCategories$1>;
|
|
963
|
-
declare const unlinkItemFromCategories: BuildRESTFunction<typeof unlinkItemFromCategories$1>;
|
|
964
|
-
declare const overwriteItemCategories: BuildRESTFunction<typeof overwriteItemCategories$1>;
|
|
965
|
-
declare const onEnterpriseItemCreated: BuildEventDefinition<typeof onEnterpriseItemCreated$1>;
|
|
966
|
-
declare const onEnterpriseItemUpdated: BuildEventDefinition<typeof onEnterpriseItemUpdated$1>;
|
|
967
|
-
declare const onEnterpriseItemItemCategoriesChanged: BuildEventDefinition<typeof onEnterpriseItemItemCategoriesChanged$1>;
|
|
968
|
-
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>;
|
|
969
1020
|
|
|
970
1021
|
declare const context$2_bulkUpdateItem: typeof bulkUpdateItem;
|
|
971
1022
|
declare const context$2_getItem: typeof getItem;
|
|
@@ -2236,9 +2287,52 @@ interface ListDeletedFilesOptions {
|
|
|
2236
2287
|
paging?: CursorPaging$1;
|
|
2237
2288
|
}
|
|
2238
2289
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2290
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
2291
|
+
interface HttpClient$1 {
|
|
2292
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
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 & {
|
|
2242
2336
|
_id: string;
|
|
2243
2337
|
displayName: string;
|
|
2244
2338
|
url: string;
|
|
@@ -2295,8 +2389,8 @@ declare function getFileDescriptor$1(httpClient: HttpClient): (fileId: string) =
|
|
|
2295
2389
|
siteId: string;
|
|
2296
2390
|
state: State$1;
|
|
2297
2391
|
}>;
|
|
2298
|
-
declare function getFileDescriptors$1(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
2299
|
-
declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
2392
|
+
declare function getFileDescriptors$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
2393
|
+
declare function updateFileDescriptor$1(httpClient: HttpClient$1): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
2300
2394
|
_id: string;
|
|
2301
2395
|
displayName: string;
|
|
2302
2396
|
url: string;
|
|
@@ -2353,42 +2447,42 @@ declare function updateFileDescriptor$1(httpClient: HttpClient): (file: FileDesc
|
|
|
2353
2447
|
siteId: string;
|
|
2354
2448
|
state: State$1;
|
|
2355
2449
|
}>;
|
|
2356
|
-
declare function generateFileUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
2357
|
-
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
2358
|
-
declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
2359
|
-
declare function bulkImportFiles$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
2360
|
-
declare function bulkImportFile$1(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
2361
|
-
declare function listFiles$1(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
2362
|
-
declare function searchFiles$1(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
2363
|
-
declare function generateVideoStreamingUrl$1(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
2364
|
-
declare function bulkDeleteFiles$1(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
2365
|
-
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
|
|
2366
|
-
declare function listDeletedFiles$1(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
2367
|
-
declare const onFileDescriptorUpdated$1: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
2368
|
-
declare const onFileDescriptorDeleted$1: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
2369
|
-
declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
2370
|
-
declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
2450
|
+
declare function generateFileUploadUrl$1(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
2451
|
+
declare function generateFileResumableUploadUrl$1(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
2452
|
+
declare function importFile$1(httpClient: HttpClient$1): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
2453
|
+
declare function bulkImportFiles$1(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
2454
|
+
declare function bulkImportFile$1(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
2455
|
+
declare function listFiles$1(httpClient: HttpClient$1): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
2456
|
+
declare function searchFiles$1(httpClient: HttpClient$1): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
2457
|
+
declare function generateVideoStreamingUrl$1(httpClient: HttpClient$1): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
2458
|
+
declare function bulkDeleteFiles$1(httpClient: HttpClient$1): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
2459
|
+
declare function bulkRestoreFilesFromTrashBin$1(httpClient: HttpClient$1): (fileIds: string[]) => Promise<void>;
|
|
2460
|
+
declare function listDeletedFiles$1(httpClient: HttpClient$1): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
2461
|
+
declare const onFileDescriptorUpdated$1: EventDefinition$1<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
2462
|
+
declare const onFileDescriptorDeleted$1: EventDefinition$1<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
2463
|
+
declare const onFileDescriptorFileReady$1: EventDefinition$1<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
2464
|
+
declare const onFileDescriptorFileFailed$1: EventDefinition$1<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
2371
2465
|
|
|
2372
|
-
declare const generateFilesDownloadUrl: BuildRESTFunction<typeof generateFilesDownloadUrl$1>;
|
|
2373
|
-
declare const generateFileDownloadUrl: BuildRESTFunction<typeof generateFileDownloadUrl$1>;
|
|
2374
|
-
declare const getFileDescriptor: BuildRESTFunction<typeof getFileDescriptor$1>;
|
|
2375
|
-
declare const getFileDescriptors: BuildRESTFunction<typeof getFileDescriptors$1>;
|
|
2376
|
-
declare const updateFileDescriptor: BuildRESTFunction<typeof updateFileDescriptor$1>;
|
|
2377
|
-
declare const generateFileUploadUrl: BuildRESTFunction<typeof generateFileUploadUrl$1>;
|
|
2378
|
-
declare const generateFileResumableUploadUrl: BuildRESTFunction<typeof generateFileResumableUploadUrl$1>;
|
|
2379
|
-
declare const importFile: BuildRESTFunction<typeof importFile$1>;
|
|
2380
|
-
declare const bulkImportFiles: BuildRESTFunction<typeof bulkImportFiles$1>;
|
|
2381
|
-
declare const bulkImportFile: BuildRESTFunction<typeof bulkImportFile$1>;
|
|
2382
|
-
declare const listFiles: BuildRESTFunction<typeof listFiles$1>;
|
|
2383
|
-
declare const searchFiles: BuildRESTFunction<typeof searchFiles$1>;
|
|
2384
|
-
declare const generateVideoStreamingUrl: BuildRESTFunction<typeof generateVideoStreamingUrl$1>;
|
|
2385
|
-
declare const bulkDeleteFiles: BuildRESTFunction<typeof bulkDeleteFiles$1>;
|
|
2386
|
-
declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1>;
|
|
2387
|
-
declare const listDeletedFiles: BuildRESTFunction<typeof listDeletedFiles$1>;
|
|
2388
|
-
declare const onFileDescriptorUpdated: BuildEventDefinition<typeof onFileDescriptorUpdated$1>;
|
|
2389
|
-
declare const onFileDescriptorDeleted: BuildEventDefinition<typeof onFileDescriptorDeleted$1>;
|
|
2390
|
-
declare const onFileDescriptorFileReady: BuildEventDefinition<typeof onFileDescriptorFileReady$1>;
|
|
2391
|
-
declare const onFileDescriptorFileFailed: BuildEventDefinition<typeof onFileDescriptorFileFailed$1>;
|
|
2466
|
+
declare const generateFilesDownloadUrl: BuildRESTFunction$1<typeof generateFilesDownloadUrl$1>;
|
|
2467
|
+
declare const generateFileDownloadUrl: BuildRESTFunction$1<typeof generateFileDownloadUrl$1>;
|
|
2468
|
+
declare const getFileDescriptor: BuildRESTFunction$1<typeof getFileDescriptor$1>;
|
|
2469
|
+
declare const getFileDescriptors: BuildRESTFunction$1<typeof getFileDescriptors$1>;
|
|
2470
|
+
declare const updateFileDescriptor: BuildRESTFunction$1<typeof updateFileDescriptor$1>;
|
|
2471
|
+
declare const generateFileUploadUrl: BuildRESTFunction$1<typeof generateFileUploadUrl$1>;
|
|
2472
|
+
declare const generateFileResumableUploadUrl: BuildRESTFunction$1<typeof generateFileResumableUploadUrl$1>;
|
|
2473
|
+
declare const importFile: BuildRESTFunction$1<typeof importFile$1>;
|
|
2474
|
+
declare const bulkImportFiles: BuildRESTFunction$1<typeof bulkImportFiles$1>;
|
|
2475
|
+
declare const bulkImportFile: BuildRESTFunction$1<typeof bulkImportFile$1>;
|
|
2476
|
+
declare const listFiles: BuildRESTFunction$1<typeof listFiles$1>;
|
|
2477
|
+
declare const searchFiles: BuildRESTFunction$1<typeof searchFiles$1>;
|
|
2478
|
+
declare const generateVideoStreamingUrl: BuildRESTFunction$1<typeof generateVideoStreamingUrl$1>;
|
|
2479
|
+
declare const bulkDeleteFiles: BuildRESTFunction$1<typeof bulkDeleteFiles$1>;
|
|
2480
|
+
declare const bulkRestoreFilesFromTrashBin: BuildRESTFunction$1<typeof bulkRestoreFilesFromTrashBin$1>;
|
|
2481
|
+
declare const listDeletedFiles: BuildRESTFunction$1<typeof listDeletedFiles$1>;
|
|
2482
|
+
declare const onFileDescriptorUpdated: BuildEventDefinition$1<typeof onFileDescriptorUpdated$1>;
|
|
2483
|
+
declare const onFileDescriptorDeleted: BuildEventDefinition$1<typeof onFileDescriptorDeleted$1>;
|
|
2484
|
+
declare const onFileDescriptorFileReady: BuildEventDefinition$1<typeof onFileDescriptorFileReady$1>;
|
|
2485
|
+
declare const onFileDescriptorFileFailed: BuildEventDefinition$1<typeof onFileDescriptorFileFailed$1>;
|
|
2392
2486
|
|
|
2393
2487
|
declare const context$1_bulkDeleteFiles: typeof bulkDeleteFiles;
|
|
2394
2488
|
declare const context$1_bulkImportFile: typeof bulkImportFile;
|
|
@@ -2717,6 +2811,49 @@ interface ListDeletedFoldersOptions {
|
|
|
2717
2811
|
paging?: CursorPaging;
|
|
2718
2812
|
}
|
|
2719
2813
|
|
|
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
|
+
|
|
2720
2857
|
declare function createFolder$1(httpClient: HttpClient): (displayName: string, options?: CreateFolderOptions) => Promise<CreateFolderResponse & CreateFolderResponseNonNullableFields>;
|
|
2721
2858
|
declare function getFolder$1(httpClient: HttpClient): (folderId: string) => Promise<Folder & {
|
|
2722
2859
|
_id: string;
|
|
@@ -347,61 +347,69 @@ 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
|
+
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
352
353
|
}
|
|
353
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
354
|
-
type HttpResponse<T = any> = {
|
|
354
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
355
|
+
type HttpResponse$3<T = any> = {
|
|
355
356
|
data: T;
|
|
356
357
|
status: number;
|
|
357
358
|
statusText: string;
|
|
358
359
|
headers: any;
|
|
359
360
|
request?: any;
|
|
360
361
|
};
|
|
361
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
362
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
362
363
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
363
364
|
url: string;
|
|
364
365
|
data?: Data;
|
|
365
366
|
params?: URLSearchParams;
|
|
366
|
-
} & APIMetadata;
|
|
367
|
-
type APIMetadata = {
|
|
367
|
+
} & APIMetadata$3;
|
|
368
|
+
type APIMetadata$3 = {
|
|
368
369
|
methodFqn?: string;
|
|
369
370
|
entityFqdn?: string;
|
|
370
371
|
packageName?: string;
|
|
371
372
|
};
|
|
372
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
373
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
373
374
|
__type: 'event-definition';
|
|
374
375
|
type: Type;
|
|
375
376
|
isDomainEvent?: boolean;
|
|
376
|
-
transformations?: unknown;
|
|
377
|
+
transformations?: (envelope: unknown) => Payload;
|
|
377
378
|
__payload: Payload;
|
|
378
379
|
};
|
|
379
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean,
|
|
380
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
381
|
+
|
|
382
|
+
declare global {
|
|
383
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
384
|
+
interface SymbolConstructor {
|
|
385
|
+
readonly observable: symbol;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
380
388
|
|
|
381
389
|
declare const __metadata$3: {
|
|
382
390
|
PACKAGE_NAME: string;
|
|
383
391
|
};
|
|
384
|
-
declare function createCategory(httpClient: HttpClient): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
392
|
+
declare function createCategory(httpClient: HttpClient$3): (category: EnterpriseCategory) => Promise<EnterpriseCategory & {
|
|
385
393
|
_id: string;
|
|
386
394
|
publishStatus: PublishStatus$1;
|
|
387
395
|
}>;
|
|
388
|
-
declare function deleteCategory(httpClient: HttpClient): (categoryId: string) => Promise<void>;
|
|
389
|
-
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 & {
|
|
390
398
|
_id: string;
|
|
391
399
|
publishStatus: PublishStatus$1;
|
|
392
400
|
}>;
|
|
393
|
-
declare function getCategory(httpClient: HttpClient): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
401
|
+
declare function getCategory(httpClient: HttpClient$3): (categoryId: string, options?: GetCategoryOptions) => Promise<EnterpriseCategoryTree & {
|
|
394
402
|
category?: {
|
|
395
403
|
_id: string;
|
|
396
404
|
publishStatus: PublishStatus$1;
|
|
397
405
|
} | undefined;
|
|
398
406
|
subCategories: (any | undefined)[];
|
|
399
407
|
}>;
|
|
400
|
-
declare function enterpriseOnboarding(httpClient: HttpClient): (accountId: string, options?: EnterpriseOnboardingOptions) => Promise<EnterpriseOnboardingResponse & EnterpriseOnboardingResponseNonNullableFields>;
|
|
401
|
-
declare function getMediaManagerCategories(httpClient: HttpClient): () => Promise<GetMediaManagerCategoriesResponse & GetMediaManagerCategoriesResponseNonNullableFields>;
|
|
402
|
-
declare const onEnterpriseCategoryCreated: EventDefinition<EnterpriseCategoryCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_created">;
|
|
403
|
-
declare const onEnterpriseCategoryDeleted: EventDefinition<EnterpriseCategoryDeletedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_category_deleted">;
|
|
404
|
-
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">;
|
|
405
413
|
|
|
406
414
|
type index_d$3_CreateCategoryRequest = CreateCategoryRequest;
|
|
407
415
|
type index_d$3_CreateCategoryResponse = CreateCategoryResponse;
|
|
@@ -1361,15 +1369,54 @@ interface OverwriteItemCategoriesOptions {
|
|
|
1361
1369
|
categoryIds?: string[];
|
|
1362
1370
|
}
|
|
1363
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
|
+
|
|
1364
1411
|
declare const __metadata$2: {
|
|
1365
1412
|
PACKAGE_NAME: string;
|
|
1366
1413
|
};
|
|
1367
|
-
declare function itemUploadCallback(httpClient: HttpClient): (options?: ItemUploadCallbackOptions) => Promise<void>;
|
|
1368
|
-
declare function generateFileUploadUrl$1(httpClient: HttpClient): (options?: GenerateFileUploadUrlOptions$1) => Promise<GenerateFileUploadUrlResponse$1 & GenerateFileUploadUrlResponseNonNullableFields$1>;
|
|
1369
|
-
declare function importFile$1(httpClient: HttpClient): (url: string, options?: ImportFileOptions$1) => Promise<ImportFileResponse$1 & ImportFileResponseNonNullableFields$1>;
|
|
1370
|
-
declare function searchItems(httpClient: HttpClient): (options?: SearchItemsOptions) => Promise<SearchItemsResponse & SearchItemsResponseNonNullableFields>;
|
|
1371
|
-
declare function queryItems(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
1372
|
-
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 & {
|
|
1373
1420
|
_id: string;
|
|
1374
1421
|
mediaType: MediaType$1;
|
|
1375
1422
|
assets?: {
|
|
@@ -1390,8 +1437,8 @@ declare function updateItem(httpClient: HttpClient): (_id: string, item: UpdateI
|
|
|
1390
1437
|
} | undefined;
|
|
1391
1438
|
publishStatus: PublishStatus;
|
|
1392
1439
|
}>;
|
|
1393
|
-
declare function bulkUpdateItem(httpClient: HttpClient): (updateItemRequests: UpdateItemRequest[], options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1394
|
-
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 & {
|
|
1395
1442
|
_id: string;
|
|
1396
1443
|
mediaType: MediaType$1;
|
|
1397
1444
|
assets?: {
|
|
@@ -1412,13 +1459,13 @@ declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<En
|
|
|
1412
1459
|
} | undefined;
|
|
1413
1460
|
publishStatus: PublishStatus;
|
|
1414
1461
|
}>;
|
|
1415
|
-
declare function linkItemToCategories(httpClient: HttpClient): (itemId: string, options?: LinkItemToCategoriesOptions) => Promise<LinkItemToCategoriesResponse>;
|
|
1416
|
-
declare function unlinkItemFromCategories(httpClient: HttpClient): (itemId: string, options?: UnlinkItemFromCategoriesOptions) => Promise<UnlinkItemFromCategoriesResponse>;
|
|
1417
|
-
declare function overwriteItemCategories(httpClient: HttpClient): (itemId: string, options?: OverwriteItemCategoriesOptions) => Promise<OverwriteItemCategoriesResponse>;
|
|
1418
|
-
declare const onEnterpriseItemCreated: EventDefinition<EnterpriseItemCreatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_created">;
|
|
1419
|
-
declare const onEnterpriseItemUpdated: EventDefinition<EnterpriseItemUpdatedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_updated">;
|
|
1420
|
-
declare const onEnterpriseItemItemCategoriesChanged: EventDefinition<EnterpriseItemItemCategoriesChangedEnvelope, "wix.media.enterprise_public_media.v1.enterprise_item_item_categories_changed">;
|
|
1421
|
-
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">;
|
|
1422
1469
|
|
|
1423
1470
|
type index_d$2_BulkItemUpdateResult = BulkItemUpdateResult;
|
|
1424
1471
|
type index_d$2_BulkUpdateItemOptions = BulkUpdateItemOptions;
|
|
@@ -3313,12 +3360,51 @@ interface ListDeletedFilesOptions {
|
|
|
3313
3360
|
paging?: CursorPaging$1;
|
|
3314
3361
|
}
|
|
3315
3362
|
|
|
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
|
+
|
|
3316
3402
|
declare const __metadata$1: {
|
|
3317
3403
|
PACKAGE_NAME: string;
|
|
3318
3404
|
};
|
|
3319
|
-
declare function generateFilesDownloadUrl(httpClient: HttpClient): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
3320
|
-
declare function generateFileDownloadUrl(httpClient: HttpClient): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
3321
|
-
declare function getFileDescriptor(httpClient: HttpClient): (fileId: string) => Promise<FileDescriptor & {
|
|
3405
|
+
declare function generateFilesDownloadUrl(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GenerateFilesDownloadUrlResponse & GenerateFilesDownloadUrlResponseNonNullableFields>;
|
|
3406
|
+
declare function generateFileDownloadUrl(httpClient: HttpClient$1): (fileId: string, options?: GenerateFileDownloadUrlOptions) => Promise<GenerateFileDownloadUrlResponse & GenerateFileDownloadUrlResponseNonNullableFields>;
|
|
3407
|
+
declare function getFileDescriptor(httpClient: HttpClient$1): (fileId: string) => Promise<FileDescriptor & {
|
|
3322
3408
|
_id: string;
|
|
3323
3409
|
displayName: string;
|
|
3324
3410
|
url: string;
|
|
@@ -3375,8 +3461,8 @@ declare function getFileDescriptor(httpClient: HttpClient): (fileId: string) =>
|
|
|
3375
3461
|
siteId: string;
|
|
3376
3462
|
state: State$1;
|
|
3377
3463
|
}>;
|
|
3378
|
-
declare function getFileDescriptors(httpClient: HttpClient): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3379
|
-
declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3464
|
+
declare function getFileDescriptors(httpClient: HttpClient$1): (fileIds: string[]) => Promise<GetFileDescriptorsResponse & GetFileDescriptorsResponseNonNullableFields>;
|
|
3465
|
+
declare function updateFileDescriptor(httpClient: HttpClient$1): (file: FileDescriptor) => Promise<FileDescriptor & {
|
|
3380
3466
|
_id: string;
|
|
3381
3467
|
displayName: string;
|
|
3382
3468
|
url: string;
|
|
@@ -3433,21 +3519,21 @@ declare function updateFileDescriptor(httpClient: HttpClient): (file: FileDescri
|
|
|
3433
3519
|
siteId: string;
|
|
3434
3520
|
state: State$1;
|
|
3435
3521
|
}>;
|
|
3436
|
-
declare function generateFileUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
3437
|
-
declare function generateFileResumableUploadUrl(httpClient: HttpClient): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
3438
|
-
declare function importFile(httpClient: HttpClient): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
3439
|
-
declare function bulkImportFiles(httpClient: HttpClient): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
3440
|
-
declare function bulkImportFile(httpClient: HttpClient): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
3441
|
-
declare function listFiles(httpClient: HttpClient): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
3442
|
-
declare function searchFiles(httpClient: HttpClient): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
3443
|
-
declare function generateVideoStreamingUrl(httpClient: HttpClient): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
3444
|
-
declare function bulkDeleteFiles(httpClient: HttpClient): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
3445
|
-
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient): (fileIds: string[]) => Promise<void>;
|
|
3446
|
-
declare function listDeletedFiles(httpClient: HttpClient): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
3447
|
-
declare const onFileDescriptorUpdated: EventDefinition<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
3448
|
-
declare const onFileDescriptorDeleted: EventDefinition<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
3449
|
-
declare const onFileDescriptorFileReady: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
3450
|
-
declare const onFileDescriptorFileFailed: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
3522
|
+
declare function generateFileUploadUrl(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileUploadUrlOptions) => Promise<GenerateFileUploadUrlResponse & GenerateFileUploadUrlResponseNonNullableFields>;
|
|
3523
|
+
declare function generateFileResumableUploadUrl(httpClient: HttpClient$1): (mimeType: string | null, options?: GenerateFileResumableUploadUrlOptions) => Promise<GenerateFileResumableUploadUrlResponse & GenerateFileResumableUploadUrlResponseNonNullableFields>;
|
|
3524
|
+
declare function importFile(httpClient: HttpClient$1): (url: string, options?: ImportFileOptions) => Promise<ImportFileResponse & ImportFileResponseNonNullableFields>;
|
|
3525
|
+
declare function bulkImportFiles(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[]) => Promise<BulkImportFilesResponse & BulkImportFilesResponseNonNullableFields>;
|
|
3526
|
+
declare function bulkImportFile(httpClient: HttpClient$1): (importFileRequests: ImportFileRequest[], options?: BulkImportFileOptions) => Promise<BulkImportFileResponse & BulkImportFileResponseNonNullableFields>;
|
|
3527
|
+
declare function listFiles(httpClient: HttpClient$1): (options?: ListFilesOptions) => Promise<ListFilesResponse & ListFilesResponseNonNullableFields>;
|
|
3528
|
+
declare function searchFiles(httpClient: HttpClient$1): (options?: SearchFilesOptions) => Promise<SearchFilesResponse & SearchFilesResponseNonNullableFields>;
|
|
3529
|
+
declare function generateVideoStreamingUrl(httpClient: HttpClient$1): (fileId: string, options?: GenerateVideoStreamingUrlOptions) => Promise<GenerateVideoStreamingUrlResponse & GenerateVideoStreamingUrlResponseNonNullableFields>;
|
|
3530
|
+
declare function bulkDeleteFiles(httpClient: HttpClient$1): (fileIds: string[], options?: BulkDeleteFilesOptions) => Promise<void>;
|
|
3531
|
+
declare function bulkRestoreFilesFromTrashBin(httpClient: HttpClient$1): (fileIds: string[]) => Promise<void>;
|
|
3532
|
+
declare function listDeletedFiles(httpClient: HttpClient$1): (options?: ListDeletedFilesOptions) => Promise<ListDeletedFilesResponse & ListDeletedFilesResponseNonNullableFields>;
|
|
3533
|
+
declare const onFileDescriptorUpdated: EventDefinition$1<FileDescriptorUpdatedEnvelope, "wix.media.site_media.v1.file_descriptor_updated">;
|
|
3534
|
+
declare const onFileDescriptorDeleted: EventDefinition$1<FileDescriptorDeletedEnvelope, "wix.media.site_media.v1.file_descriptor_deleted">;
|
|
3535
|
+
declare const onFileDescriptorFileReady: EventDefinition$1<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
3536
|
+
declare const onFileDescriptorFileFailed: EventDefinition$1<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
3451
3537
|
|
|
3452
3538
|
type index_d$1_ApplicationError = ApplicationError;
|
|
3453
3539
|
type index_d$1_Archive = Archive;
|
|
@@ -4089,6 +4175,45 @@ interface ListDeletedFoldersOptions {
|
|
|
4089
4175
|
paging?: CursorPaging;
|
|
4090
4176
|
}
|
|
4091
4177
|
|
|
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
|
+
|
|
4092
4217
|
declare const __metadata: {
|
|
4093
4218
|
PACKAGE_NAME: string;
|
|
4094
4219
|
};
|