@wix/media 1.0.98 → 1.0.100
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 +259 -122
- package/type-bundles/index.bundle.d.ts +212 -87
- package/type-bundles/meta.bundle.d.ts +30 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/media",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.100",
|
|
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.37",
|
|
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": "e037ed493c4a9b4b99feb5b7bc046c8cb76ab20c7421d7b9c73a7495"
|
|
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;
|
|
@@ -1328,6 +1379,7 @@ interface ImportFileRequest {
|
|
|
1328
1379
|
displayName?: string | null;
|
|
1329
1380
|
/**
|
|
1330
1381
|
* ID of the file's parent folder. <br />
|
|
1382
|
+
* This folder is the path root for the `filePath`. <br />
|
|
1331
1383
|
* Default: `media-root`.
|
|
1332
1384
|
*/
|
|
1333
1385
|
parentFolderId?: string | null;
|
|
@@ -1344,11 +1396,10 @@ interface ImportFileRequest {
|
|
|
1344
1396
|
/** Optional headers that should be sent with the external URL. */
|
|
1345
1397
|
urlHeaders?: Record<string, any> | null;
|
|
1346
1398
|
/**
|
|
1347
|
-
*
|
|
1348
|
-
*
|
|
1349
|
-
* If
|
|
1350
|
-
*
|
|
1351
|
-
* example: 'videos/2024/december'
|
|
1399
|
+
* Path to the folder where the file will be stored.
|
|
1400
|
+
* For example, `/videos/2024/december`. <br/>
|
|
1401
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
1402
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
1352
1403
|
*/
|
|
1353
1404
|
filePath?: string | null;
|
|
1354
1405
|
}
|
|
@@ -2052,6 +2103,7 @@ interface GenerateFileUploadUrlOptions {
|
|
|
2052
2103
|
sizeInBytes?: string | null;
|
|
2053
2104
|
/**
|
|
2054
2105
|
* ID of the file's parent folder. <br />
|
|
2106
|
+
* This folder is the path root for the `filePath`.<br />
|
|
2055
2107
|
* Default: `media-root`.
|
|
2056
2108
|
*/
|
|
2057
2109
|
parentFolderId?: string | null;
|
|
@@ -2062,11 +2114,10 @@ interface GenerateFileUploadUrlOptions {
|
|
|
2062
2114
|
/** Information sent to the `onFileDescriptorFileReady( )` and `onFileDescriptorFileFailed( )` events. See the Importing Files article to learn more. */
|
|
2063
2115
|
externalInfo?: ExternalInfo;
|
|
2064
2116
|
/**
|
|
2065
|
-
*
|
|
2066
|
-
*
|
|
2067
|
-
* If
|
|
2068
|
-
*
|
|
2069
|
-
* example: 'videos/2024/december'
|
|
2117
|
+
* Path to the folder where the file will be stored.
|
|
2118
|
+
* For example, `/videos/2024/december`. <br/>
|
|
2119
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
2120
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
2070
2121
|
*/
|
|
2071
2122
|
filePath?: string | null;
|
|
2072
2123
|
}
|
|
@@ -2083,6 +2134,7 @@ interface GenerateFileResumableUploadUrlOptions {
|
|
|
2083
2134
|
sizeInBytes?: string | null;
|
|
2084
2135
|
/**
|
|
2085
2136
|
* ID of the file's parent folder. <br />
|
|
2137
|
+
* This folder is the path root for the `filePath`.<br />
|
|
2086
2138
|
* Default: `media-root`.
|
|
2087
2139
|
*/
|
|
2088
2140
|
parentFolderId?: string | null;
|
|
@@ -2097,11 +2149,10 @@ interface GenerateFileResumableUploadUrlOptions {
|
|
|
2097
2149
|
*/
|
|
2098
2150
|
uploadProtocol?: UploadProtocol;
|
|
2099
2151
|
/**
|
|
2100
|
-
*
|
|
2101
|
-
*
|
|
2102
|
-
* If
|
|
2103
|
-
*
|
|
2104
|
-
* example: 'videos/2024/december'
|
|
2152
|
+
* Path to the folder where the file will be stored.
|
|
2153
|
+
* For example, `/videos/2024/december`. <br/>
|
|
2154
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
2155
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
2105
2156
|
*/
|
|
2106
2157
|
filePath?: string | null;
|
|
2107
2158
|
}
|
|
@@ -2112,6 +2163,7 @@ interface ImportFileOptions {
|
|
|
2112
2163
|
displayName?: string | null;
|
|
2113
2164
|
/**
|
|
2114
2165
|
* ID of the file's parent folder. <br />
|
|
2166
|
+
* This folder is the path root for the `filePath`. <br />
|
|
2115
2167
|
* Default: `media-root`.
|
|
2116
2168
|
*/
|
|
2117
2169
|
parentFolderId?: string | null;
|
|
@@ -2128,11 +2180,10 @@ interface ImportFileOptions {
|
|
|
2128
2180
|
/** Optional headers that should be sent with the external URL. */
|
|
2129
2181
|
urlHeaders?: Record<string, any> | null;
|
|
2130
2182
|
/**
|
|
2131
|
-
*
|
|
2132
|
-
*
|
|
2133
|
-
* If
|
|
2134
|
-
*
|
|
2135
|
-
* example: 'videos/2024/december'
|
|
2183
|
+
* Path to the folder where the file will be stored.
|
|
2184
|
+
* For example, `/videos/2024/december`. <br/>
|
|
2185
|
+
* If `parentFolderId` is defined, the parent folder is used as the path root. Otherwise, the root is `media-root`.
|
|
2186
|
+
* The folders in the path will be created if they don't already exist. <br />
|
|
2136
2187
|
*/
|
|
2137
2188
|
filePath?: string | null;
|
|
2138
2189
|
}
|
|
@@ -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;
|