@wix/auto_sdk_media_files 1.0.61 → 1.0.62
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/build/cjs/index.d.ts +3 -8
- package/build/cjs/index.js +0 -239
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +2 -178
- package/build/cjs/index.typings.js +0 -215
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -57
- package/build/cjs/meta.js +0 -108
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +3 -8
- package/build/es/index.mjs +0 -238
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +2 -178
- package/build/es/index.typings.mjs +0 -213
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -57
- package/build/es/meta.mjs +0 -107
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +3 -8
- package/build/internal/cjs/index.js +0 -239
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -178
- package/build/internal/cjs/index.typings.js +0 -215
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -57
- package/build/internal/cjs/meta.js +0 -108
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +3 -8
- package/build/internal/es/index.mjs +0 -238
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +2 -178
- package/build/internal/es/index.typings.mjs +0 -213
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -57
- package/build/internal/es/meta.mjs +0 -107
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
-
import { GenerateFilesDownloadUrlResponse, GenerateFileDownloadUrlOptions, GenerateFileDownloadUrlResponse, GenerateFileDownloadUrlValidationErrors, FileDescriptor, GetFileDescriptorValidationErrors, GetFileDescriptorsResponse, GetFileDescriptorsValidationErrors, UpdateFileDescriptorValidationErrors, GenerateFileUploadUrlOptions, GenerateFileUploadUrlResponse, GenerateFileUploadUrlValidationErrors, GenerateFileResumableUploadUrlOptions, GenerateFileResumableUploadUrlResponse, GenerateFileResumableUploadUrlValidationErrors, ImportFileOptions, ImportFileResponse, ImportFileValidationErrors, ImportFileRequest, BulkImportFilesResponse, BulkImportFileOptions, BulkImportFileResponse, ListFilesOptions, ListFilesResponse, ListFilesValidationErrors, SearchFilesOptions, SearchFilesResponse, SearchFilesValidationErrors, GenerateVideoStreamingUrlOptions, GenerateVideoStreamingUrlResponse, BulkDeleteFilesOptions, ListDeletedFilesOptions, ListDeletedFilesResponse, ListDeletedFilesValidationErrors, FileDescriptorFileFailedEnvelope, FileDescriptorFileReadyEnvelope
|
|
3
|
-
export { ActionEvent, ApplicationError, Archive, AudioV2, BaseEventMetadata, BulkActionMetadata, BulkAnnotateImageResult, BulkAnnotateImagesRequest, BulkAnnotateImagesResponse, BulkDeleteFilesRequest, BulkDeleteFilesResponse, BulkImportFileRequest, BulkImportFileResult, BulkImportFilesRequest, BulkInternalImportFilesRequest, BulkInternalImportFilesResponse, BulkPublishDraftFileResult, BulkPublishDraftFilesRequest, BulkPublishDraftFilesResponse, BulkRestoreFilesFromTrashBinRequest, BulkRestoreFilesFromTrashBinResponse, Color, ColorRGB, Colors,
|
|
2
|
+
import { GenerateFilesDownloadUrlResponse, GenerateFileDownloadUrlOptions, GenerateFileDownloadUrlResponse, GenerateFileDownloadUrlValidationErrors, FileDescriptor, GetFileDescriptorValidationErrors, GetFileDescriptorsResponse, GetFileDescriptorsValidationErrors, UpdateFileDescriptorValidationErrors, GenerateFileUploadUrlOptions, GenerateFileUploadUrlResponse, GenerateFileUploadUrlValidationErrors, GenerateFileResumableUploadUrlOptions, GenerateFileResumableUploadUrlResponse, GenerateFileResumableUploadUrlValidationErrors, ImportFileOptions, ImportFileResponse, ImportFileValidationErrors, ImportFileRequest, BulkImportFilesResponse, BulkImportFileOptions, BulkImportFileResponse, ListFilesOptions, ListFilesResponse, ListFilesValidationErrors, SearchFilesOptions, SearchFilesResponse, SearchFilesValidationErrors, GenerateVideoStreamingUrlOptions, GenerateVideoStreamingUrlResponse, BulkDeleteFilesOptions, ListDeletedFilesOptions, ListDeletedFilesResponse, ListDeletedFilesValidationErrors, FileDescriptorFileFailedEnvelope, FileDescriptorFileReadyEnvelope } from './index.typings.mjs';
|
|
3
|
+
export { ActionEvent, ApplicationError, Archive, AudioV2, BaseEventMetadata, BulkActionMetadata, BulkAnnotateImageResult, BulkAnnotateImagesRequest, BulkAnnotateImagesResponse, BulkDeleteFilesRequest, BulkDeleteFilesResponse, BulkImportFileRequest, BulkImportFileResult, BulkImportFilesRequest, BulkInternalImportFilesRequest, BulkInternalImportFilesResponse, BulkPublishDraftFileResult, BulkPublishDraftFilesRequest, BulkPublishDraftFilesResponse, BulkRestoreFilesFromTrashBinRequest, BulkRestoreFilesFromTrashBinResponse, Color, ColorRGB, Colors, ContentDisposition, ContentDispositionWithLiterals, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, DownloadUrl, DraftFilePublished, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExternalInfo, FaceRecognition, FileFailed, FileMedia, FileMediaMediaOneOf, FileReady, FocalPoint, FontAsset, FontMedia, GenerateAnimatedVectorRequest, GenerateAnimatedVectorResponse, GenerateFileDownloadUrlRequest, GenerateFileResumableUploadUrlRequest, GenerateFileUploadUrlRequest, GenerateFilesDownloadUrlRequest, GenerateVideoStreamingUrlRequest, GenerateWebSocketTokenRequest, GenerateWebSocketTokenResponse, GetFileDescriptorRequest, GetFileDescriptorResponse, GetFileDescriptorsRequest, GetSiteFileDescriptorsRequest, GetSiteFileDescriptorsResponse, IdentificationData, IdentificationDataIdOneOf, IdentityInfo, IdentityType, IdentityTypeWithLiterals, ImageAnnotationConfigurations, ImageAnnotationType, ImageAnnotationTypeWithLiterals, ImageMedia, ItemMetadata, ListDeletedFilesRequest, ListFilesRequest, MediaType, MediaTypeWithLiterals, MessageEnvelope, Model3D, Namespace, NamespaceWithLiterals, OperationStatus, OperationStatusWithLiterals, OtherMedia, PagingMetadataV2, Plan, Plans, RestoreInfo, RootFolder, RootFolderWithLiterals, SearchFilesRequest, ServiceError, SiteQuotaExceededError, SortOrder, SortOrderWithLiterals, Sorting, State, StateWithLiterals, StreamFormat, StreamFormatWithLiterals, TotalQuota, UnsupportedRequestValueError, UpdateFileDescriptorRequest, UpdateFileDescriptorResponse, UpdateFileRequest, UpdateFileResponse, UploadProtocol, UploadProtocolWithLiterals, VideoResolution, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
4
|
|
|
5
5
|
declare function generateFilesDownloadUrl$1(httpClient: HttpClient): GenerateFilesDownloadUrlSignature;
|
|
6
6
|
interface GenerateFilesDownloadUrlSignature {
|
|
@@ -289,10 +289,6 @@ interface ListDeletedFilesSignature {
|
|
|
289
289
|
declare const onFileDescriptorFileFailed$1: EventDefinition<FileDescriptorFileFailedEnvelope, "wix.media.site_media.v1.file_descriptor_file_failed">;
|
|
290
290
|
declare const onFileDescriptorFileReady$1: EventDefinition<FileDescriptorFileReadyEnvelope, "wix.media.site_media.v1.file_descriptor_file_ready">;
|
|
291
291
|
|
|
292
|
-
declare function customQueryFileDescriptors(httpClient: HttpClient): {
|
|
293
|
-
(): FilesQueryBuilder;
|
|
294
|
-
(query: FileDescriptorQuery): ReturnType<typeof typedQueryFileDescriptors>;
|
|
295
|
-
};
|
|
296
292
|
declare const generateFilesDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFilesDownloadUrl$1> & typeof generateFilesDownloadUrl$1>;
|
|
297
293
|
declare const generateFileDownloadUrl: MaybeContext<BuildRESTFunction<typeof generateFileDownloadUrl$1> & typeof generateFileDownloadUrl$1>;
|
|
298
294
|
declare const getFileDescriptor: MaybeContext<BuildRESTFunction<typeof getFileDescriptor$1> & typeof getFileDescriptor$1>;
|
|
@@ -309,7 +305,6 @@ declare const generateVideoStreamingUrl: MaybeContext<BuildRESTFunction<typeof g
|
|
|
309
305
|
declare const bulkDeleteFiles: MaybeContext<BuildRESTFunction<typeof bulkDeleteFiles$1> & typeof bulkDeleteFiles$1>;
|
|
310
306
|
declare const bulkRestoreFilesFromTrashBin: MaybeContext<BuildRESTFunction<typeof bulkRestoreFilesFromTrashBin$1> & typeof bulkRestoreFilesFromTrashBin$1>;
|
|
311
307
|
declare const listDeletedFiles: MaybeContext<BuildRESTFunction<typeof listDeletedFiles$1> & typeof listDeletedFiles$1>;
|
|
312
|
-
declare const queryFileDescriptors: MaybeContext<BuildRESTFunction<typeof customQueryFileDescriptors> & typeof customQueryFileDescriptors>;
|
|
313
308
|
/**
|
|
314
309
|
* Triggered when a file's import fails. Learn more about [knowing when a file is ready](https://dev.wix.com/docs/api-reference/assets/media/media-manager/files/importing-files#knowing-when-a-file-is-ready).
|
|
315
310
|
*/
|
|
@@ -319,4 +314,4 @@ declare const onFileDescriptorFileFailed: BuildEventDefinition<typeof onFileDesc
|
|
|
319
314
|
*/
|
|
320
315
|
declare const onFileDescriptorFileReady: BuildEventDefinition<typeof onFileDescriptorFileReady$1> & typeof onFileDescriptorFileReady$1;
|
|
321
316
|
|
|
322
|
-
export { BulkDeleteFilesOptions, BulkImportFileOptions, BulkImportFileResponse, BulkImportFilesResponse, FileDescriptor, FileDescriptorFileFailedEnvelope, FileDescriptorFileReadyEnvelope,
|
|
317
|
+
export { BulkDeleteFilesOptions, BulkImportFileOptions, BulkImportFileResponse, BulkImportFilesResponse, FileDescriptor, FileDescriptorFileFailedEnvelope, FileDescriptorFileReadyEnvelope, GenerateFileDownloadUrlOptions, GenerateFileDownloadUrlResponse, GenerateFileDownloadUrlValidationErrors, GenerateFileResumableUploadUrlOptions, GenerateFileResumableUploadUrlResponse, GenerateFileResumableUploadUrlValidationErrors, GenerateFileUploadUrlOptions, GenerateFileUploadUrlResponse, GenerateFileUploadUrlValidationErrors, GenerateFilesDownloadUrlResponse, GenerateVideoStreamingUrlOptions, GenerateVideoStreamingUrlResponse, GetFileDescriptorValidationErrors, GetFileDescriptorsResponse, GetFileDescriptorsValidationErrors, ImportFileOptions, ImportFileRequest, ImportFileResponse, ImportFileValidationErrors, ListDeletedFilesOptions, ListDeletedFilesResponse, ListDeletedFilesValidationErrors, ListFilesOptions, ListFilesResponse, ListFilesValidationErrors, SearchFilesOptions, SearchFilesResponse, SearchFilesValidationErrors, UpdateFileDescriptorValidationErrors, bulkDeleteFiles, bulkImportFile, bulkImportFiles, bulkRestoreFilesFromTrashBin, generateFileDownloadUrl, generateFileResumableUploadUrl, generateFileUploadUrl, generateFilesDownloadUrl, generateVideoStreamingUrl, getFileDescriptor, getFileDescriptors, importFile, listDeletedFiles, listFiles, onFileDescriptorFileFailed, onFileDescriptorFileReady, searchFiles, updateFileDescriptor };
|
package/build/es/index.mjs
CHANGED
|
@@ -11,7 +11,6 @@ import { EventDefinition } from "@wix/sdk-types";
|
|
|
11
11
|
|
|
12
12
|
// src/media-site-media-v1-file-descriptor-files.universal.ts
|
|
13
13
|
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
14
|
-
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
15
14
|
import {
|
|
16
15
|
renameKeysFromSDKRequestToRESTRequest,
|
|
17
16
|
renameKeysFromRESTResponseToSDKResponse
|
|
@@ -1033,94 +1032,6 @@ function listDeletedFiles(payload) {
|
|
|
1033
1032
|
}
|
|
1034
1033
|
return __listDeletedFiles;
|
|
1035
1034
|
}
|
|
1036
|
-
function queryFileDescriptors(payload) {
|
|
1037
|
-
function __queryFileDescriptors({ host }) {
|
|
1038
|
-
const metadata = {
|
|
1039
|
-
entityFqdn: "wix.media.site_media.v1.file_descriptor",
|
|
1040
|
-
method: "GET",
|
|
1041
|
-
methodFqn: "com.wix.media.site_media.v1.FilesService.QueryFileDescriptors",
|
|
1042
|
-
packageName: PACKAGE_NAME,
|
|
1043
|
-
migrationOptions: {
|
|
1044
|
-
optInTransformResponse: true
|
|
1045
|
-
},
|
|
1046
|
-
url: resolveComWixMediaSiteMediaV1FilesServiceUrl({
|
|
1047
|
-
protoPath: "/v1/files/query",
|
|
1048
|
-
data: payload,
|
|
1049
|
-
host
|
|
1050
|
-
}),
|
|
1051
|
-
params: toURLSearchParams(payload, true),
|
|
1052
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1053
|
-
{
|
|
1054
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1055
|
-
paths: [
|
|
1056
|
-
{ path: "files.createdDate" },
|
|
1057
|
-
{ path: "files.updatedDate" },
|
|
1058
|
-
{ path: "files.lastUsedDate" },
|
|
1059
|
-
{ path: "files.media.image.image.urlExpirationDate" },
|
|
1060
|
-
{ path: "files.media.image.previewImage.urlExpirationDate" },
|
|
1061
|
-
{ path: "files.media.video.urlExpirationDate" },
|
|
1062
|
-
{ path: "files.media.video.resolutions.urlExpirationDate" },
|
|
1063
|
-
{
|
|
1064
|
-
path: "files.media.video.resolutions.poster.urlExpirationDate"
|
|
1065
|
-
},
|
|
1066
|
-
{ path: "files.media.video.posters.urlExpirationDate" },
|
|
1067
|
-
{ path: "files.media.audio.assets.urlExpirationDate" },
|
|
1068
|
-
{ path: "files.media.document.urlExpirationDate" },
|
|
1069
|
-
{ path: "files.media.document.thumbnail.urlExpirationDate" },
|
|
1070
|
-
{ path: "files.media.vector.image.urlExpirationDate" },
|
|
1071
|
-
{ path: "files.media.vector.previewImage.urlExpirationDate" },
|
|
1072
|
-
{ path: "files.media.archive.urlExpirationDate" },
|
|
1073
|
-
{ path: "files.media.model3d.urlExpirationDate" },
|
|
1074
|
-
{ path: "files.media.model3d.thumbnail.urlExpirationDate" },
|
|
1075
|
-
{ path: "files.media.icon.image.urlExpirationDate" },
|
|
1076
|
-
{ path: "files.media.icon.previewImage.urlExpirationDate" }
|
|
1077
|
-
]
|
|
1078
|
-
},
|
|
1079
|
-
{
|
|
1080
|
-
transformFn: transformRESTFloatToSDKFloat,
|
|
1081
|
-
paths: [
|
|
1082
|
-
{ path: "files.media.image.image.focalPoint.x" },
|
|
1083
|
-
{ path: "files.media.image.image.focalPoint.y" },
|
|
1084
|
-
{ path: "files.media.image.faces.confidence" },
|
|
1085
|
-
{ path: "files.media.image.previewImage.focalPoint.x" },
|
|
1086
|
-
{ path: "files.media.image.previewImage.focalPoint.y" },
|
|
1087
|
-
{ path: "files.media.video.resolutions.poster.focalPoint.x" },
|
|
1088
|
-
{ path: "files.media.video.resolutions.poster.focalPoint.y" },
|
|
1089
|
-
{ path: "files.media.video.posters.focalPoint.x" },
|
|
1090
|
-
{ path: "files.media.video.posters.focalPoint.y" },
|
|
1091
|
-
{ path: "files.media.document.thumbnail.focalPoint.x" },
|
|
1092
|
-
{ path: "files.media.document.thumbnail.focalPoint.y" },
|
|
1093
|
-
{ path: "files.media.vector.image.focalPoint.x" },
|
|
1094
|
-
{ path: "files.media.vector.image.focalPoint.y" },
|
|
1095
|
-
{ path: "files.media.vector.faces.confidence" },
|
|
1096
|
-
{ path: "files.media.vector.previewImage.focalPoint.x" },
|
|
1097
|
-
{ path: "files.media.vector.previewImage.focalPoint.y" },
|
|
1098
|
-
{ path: "files.media.model3d.thumbnail.focalPoint.x" },
|
|
1099
|
-
{ path: "files.media.model3d.thumbnail.focalPoint.y" },
|
|
1100
|
-
{ path: "files.media.icon.image.focalPoint.x" },
|
|
1101
|
-
{ path: "files.media.icon.image.focalPoint.y" },
|
|
1102
|
-
{ path: "files.media.icon.faces.confidence" },
|
|
1103
|
-
{ path: "files.media.icon.previewImage.focalPoint.x" },
|
|
1104
|
-
{ path: "files.media.icon.previewImage.focalPoint.y" }
|
|
1105
|
-
]
|
|
1106
|
-
}
|
|
1107
|
-
]),
|
|
1108
|
-
fallback: [
|
|
1109
|
-
{
|
|
1110
|
-
method: "POST",
|
|
1111
|
-
url: resolveComWixMediaSiteMediaV1FilesServiceUrl({
|
|
1112
|
-
protoPath: "/v1/files/query",
|
|
1113
|
-
data: payload,
|
|
1114
|
-
host
|
|
1115
|
-
}),
|
|
1116
|
-
data: payload
|
|
1117
|
-
}
|
|
1118
|
-
]
|
|
1119
|
-
};
|
|
1120
|
-
return metadata;
|
|
1121
|
-
}
|
|
1122
|
-
return __queryFileDescriptors;
|
|
1123
|
-
}
|
|
1124
1035
|
|
|
1125
1036
|
// src/media-site-media-v1-file-descriptor-files.universal.ts
|
|
1126
1037
|
import { transformSDKAudioToRESTAudio } from "@wix/sdk-runtime/transformations/audio";
|
|
@@ -2004,128 +1915,6 @@ async function listDeletedFiles2(options) {
|
|
|
2004
1915
|
throw transformedError;
|
|
2005
1916
|
}
|
|
2006
1917
|
}
|
|
2007
|
-
function queryFileDescriptors2() {
|
|
2008
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
2009
|
-
return queryBuilder({
|
|
2010
|
-
func: async (payload) => {
|
|
2011
|
-
const reqOpts = queryFileDescriptors(
|
|
2012
|
-
payload
|
|
2013
|
-
);
|
|
2014
|
-
sideEffects?.onSiteCall?.();
|
|
2015
|
-
try {
|
|
2016
|
-
const result = await httpClient.request(reqOpts);
|
|
2017
|
-
sideEffects?.onSuccess?.(result);
|
|
2018
|
-
return result;
|
|
2019
|
-
} catch (err) {
|
|
2020
|
-
sideEffects?.onError?.(err);
|
|
2021
|
-
throw err;
|
|
2022
|
-
}
|
|
2023
|
-
},
|
|
2024
|
-
requestTransformer: (query) => {
|
|
2025
|
-
const args = [query, {}];
|
|
2026
|
-
return renameKeysFromSDKRequestToRESTRequest({
|
|
2027
|
-
...args?.[1],
|
|
2028
|
-
query: args?.[0]
|
|
2029
|
-
});
|
|
2030
|
-
},
|
|
2031
|
-
responseTransformer: ({
|
|
2032
|
-
data
|
|
2033
|
-
}) => {
|
|
2034
|
-
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
2035
|
-
transformPaths2(data, [
|
|
2036
|
-
{
|
|
2037
|
-
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2038
|
-
paths: [{ path: "files.media.video" }]
|
|
2039
|
-
},
|
|
2040
|
-
{
|
|
2041
|
-
transformFn: transformRESTDocumentToSDKDocument,
|
|
2042
|
-
paths: [{ path: "files.media.document" }]
|
|
2043
|
-
},
|
|
2044
|
-
{
|
|
2045
|
-
transformFn: transformRESTImageToSDKImage,
|
|
2046
|
-
paths: [
|
|
2047
|
-
{ path: "files.media.image.image" },
|
|
2048
|
-
{ path: "files.media.image.previewImage" },
|
|
2049
|
-
{ path: "files.media.vector.image" },
|
|
2050
|
-
{ path: "files.media.vector.previewImage" },
|
|
2051
|
-
{ path: "files.media.model3d.thumbnail" },
|
|
2052
|
-
{ path: "files.media.icon.image" },
|
|
2053
|
-
{ path: "files.media.icon.previewImage" }
|
|
2054
|
-
]
|
|
2055
|
-
},
|
|
2056
|
-
{
|
|
2057
|
-
transformFn: transformRESTAudioToSDKAudio,
|
|
2058
|
-
paths: [{ path: "files.media.audio.assets", isRepeated: true }]
|
|
2059
|
-
}
|
|
2060
|
-
])
|
|
2061
|
-
);
|
|
2062
|
-
return {
|
|
2063
|
-
items: transformedData?.files,
|
|
2064
|
-
pagingMetadata: transformedData?.pagingMetadata
|
|
2065
|
-
};
|
|
2066
|
-
},
|
|
2067
|
-
errorTransformer: (err) => {
|
|
2068
|
-
const transformedError = sdkTransformError(err, {
|
|
2069
|
-
spreadPathsToArguments: {},
|
|
2070
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
2071
|
-
singleArgumentUnchanged: false
|
|
2072
|
-
});
|
|
2073
|
-
throw transformedError;
|
|
2074
|
-
},
|
|
2075
|
-
pagingMethod: "CURSOR",
|
|
2076
|
-
transformationPaths: {}
|
|
2077
|
-
});
|
|
2078
|
-
}
|
|
2079
|
-
async function typedQueryFileDescriptors(query) {
|
|
2080
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
2081
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
2082
|
-
const reqOpts = queryFileDescriptors(payload);
|
|
2083
|
-
sideEffects?.onSiteCall?.();
|
|
2084
|
-
try {
|
|
2085
|
-
const result = await httpClient.request(reqOpts);
|
|
2086
|
-
sideEffects?.onSuccess?.(result);
|
|
2087
|
-
return renameKeysFromRESTResponseToSDKResponse(
|
|
2088
|
-
transformPaths2(result.data, [
|
|
2089
|
-
{
|
|
2090
|
-
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2091
|
-
paths: [{ path: "files.media.video" }]
|
|
2092
|
-
},
|
|
2093
|
-
{
|
|
2094
|
-
transformFn: transformRESTDocumentToSDKDocument,
|
|
2095
|
-
paths: [{ path: "files.media.document" }]
|
|
2096
|
-
},
|
|
2097
|
-
{
|
|
2098
|
-
transformFn: transformRESTImageToSDKImage,
|
|
2099
|
-
paths: [
|
|
2100
|
-
{ path: "files.media.image.image" },
|
|
2101
|
-
{ path: "files.media.image.previewImage" },
|
|
2102
|
-
{ path: "files.media.vector.image" },
|
|
2103
|
-
{ path: "files.media.vector.previewImage" },
|
|
2104
|
-
{ path: "files.media.model3d.thumbnail" },
|
|
2105
|
-
{ path: "files.media.icon.image" },
|
|
2106
|
-
{ path: "files.media.icon.previewImage" }
|
|
2107
|
-
]
|
|
2108
|
-
},
|
|
2109
|
-
{
|
|
2110
|
-
transformFn: transformRESTAudioToSDKAudio,
|
|
2111
|
-
paths: [{ path: "files.media.audio.assets", isRepeated: true }]
|
|
2112
|
-
}
|
|
2113
|
-
])
|
|
2114
|
-
);
|
|
2115
|
-
} catch (err) {
|
|
2116
|
-
const transformedError = sdkTransformError(
|
|
2117
|
-
err,
|
|
2118
|
-
{
|
|
2119
|
-
spreadPathsToArguments: {},
|
|
2120
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
2121
|
-
singleArgumentUnchanged: false
|
|
2122
|
-
},
|
|
2123
|
-
["query"]
|
|
2124
|
-
);
|
|
2125
|
-
sideEffects?.onError?.(err);
|
|
2126
|
-
throw transformedError;
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
1918
|
|
|
2130
1919
|
// src/media-site-media-v1-file-descriptor-files.public.ts
|
|
2131
1920
|
function generateFilesDownloadUrl3(httpClient) {
|
|
@@ -2247,19 +2036,6 @@ function listDeletedFiles3(httpClient) {
|
|
|
2247
2036
|
{ httpClient }
|
|
2248
2037
|
);
|
|
2249
2038
|
}
|
|
2250
|
-
function queryFileDescriptors3(httpClient) {
|
|
2251
|
-
return () => queryFileDescriptors2(
|
|
2252
|
-
// @ts-ignore
|
|
2253
|
-
{ httpClient }
|
|
2254
|
-
);
|
|
2255
|
-
}
|
|
2256
|
-
function typedQueryFileDescriptors2(httpClient) {
|
|
2257
|
-
return (query) => typedQueryFileDescriptors(
|
|
2258
|
-
query,
|
|
2259
|
-
// @ts-ignore
|
|
2260
|
-
{ httpClient }
|
|
2261
|
-
);
|
|
2262
|
-
}
|
|
2263
2039
|
var onFileDescriptorFileFailed = EventDefinition(
|
|
2264
2040
|
"wix.media.site_media.v1.file_descriptor_file_failed",
|
|
2265
2041
|
true,
|
|
@@ -2327,18 +2103,6 @@ var onFileDescriptorFileReady = EventDefinition(
|
|
|
2327
2103
|
// src/media-site-media-v1-file-descriptor-files.context.ts
|
|
2328
2104
|
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
2329
2105
|
import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
|
|
2330
|
-
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
2331
|
-
function customQueryFileDescriptors(httpClient) {
|
|
2332
|
-
const router = createQueryOverloadRouter({
|
|
2333
|
-
builderQueryFunction: () => queryFileDescriptors3(httpClient)(),
|
|
2334
|
-
typedQueryFunction: (query) => typedQueryFileDescriptors2(httpClient)(query),
|
|
2335
|
-
hasOptionsParameter: false
|
|
2336
|
-
});
|
|
2337
|
-
function overloadedQuery(query) {
|
|
2338
|
-
return router(...arguments);
|
|
2339
|
-
}
|
|
2340
|
-
return overloadedQuery;
|
|
2341
|
-
}
|
|
2342
2106
|
var generateFilesDownloadUrl4 = /* @__PURE__ */ createRESTModule(generateFilesDownloadUrl3);
|
|
2343
2107
|
var generateFileDownloadUrl4 = /* @__PURE__ */ createRESTModule(generateFileDownloadUrl3);
|
|
2344
2108
|
var getFileDescriptor4 = /* @__PURE__ */ createRESTModule(getFileDescriptor3);
|
|
@@ -2355,7 +2119,6 @@ var generateVideoStreamingUrl4 = /* @__PURE__ */ createRESTModule(generateVideoS
|
|
|
2355
2119
|
var bulkDeleteFiles4 = /* @__PURE__ */ createRESTModule(bulkDeleteFiles3);
|
|
2356
2120
|
var bulkRestoreFilesFromTrashBin4 = /* @__PURE__ */ createRESTModule(bulkRestoreFilesFromTrashBin3);
|
|
2357
2121
|
var listDeletedFiles4 = /* @__PURE__ */ createRESTModule(listDeletedFiles3);
|
|
2358
|
-
var queryFileDescriptors4 = /* @__PURE__ */ createRESTModule(customQueryFileDescriptors);
|
|
2359
2122
|
var onFileDescriptorFileFailed2 = createEventModule(
|
|
2360
2123
|
onFileDescriptorFileFailed
|
|
2361
2124
|
);
|
|
@@ -2391,7 +2154,6 @@ export {
|
|
|
2391
2154
|
listFiles4 as listFiles,
|
|
2392
2155
|
onFileDescriptorFileFailed2 as onFileDescriptorFileFailed,
|
|
2393
2156
|
onFileDescriptorFileReady2 as onFileDescriptorFileReady,
|
|
2394
|
-
queryFileDescriptors4 as queryFileDescriptors,
|
|
2395
2157
|
searchFiles4 as searchFiles,
|
|
2396
2158
|
updateFileDescriptor4 as updateFileDescriptor
|
|
2397
2159
|
};
|