@wix/auto_sdk_media_files 1.0.62 → 1.0.64
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 +8 -3
- package/build/cjs/index.js +239 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +195 -2
- package/build/cjs/index.typings.js +215 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +74 -2
- package/build/cjs/meta.js +108 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +8 -3
- package/build/es/index.mjs +238 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +195 -2
- package/build/es/index.typings.mjs +213 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +74 -2
- package/build/es/meta.mjs +107 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +8 -3
- package/build/internal/cjs/index.js +239 -0
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +195 -2
- package/build/internal/cjs/index.typings.js +215 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +74 -2
- package/build/internal/cjs/meta.js +108 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +8 -3
- package/build/internal/es/index.mjs +238 -0
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +195 -2
- package/build/internal/es/index.typings.mjs +213 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +74 -2
- package/build/internal/es/meta.mjs +107 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
|
+
import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
2
2
|
|
|
3
3
|
interface FileDescriptor {
|
|
4
4
|
/**
|
|
@@ -971,6 +971,7 @@ interface ImportFileRequest {
|
|
|
971
971
|
/**
|
|
972
972
|
* Publicly accessible external file URL.
|
|
973
973
|
* @format WEB_URL
|
|
974
|
+
* @minLength 2
|
|
974
975
|
*/
|
|
975
976
|
url: string;
|
|
976
977
|
/**
|
|
@@ -1401,6 +1402,59 @@ interface UpdateFileResponse {
|
|
|
1401
1402
|
/** Information about the updated file. */
|
|
1402
1403
|
file?: FileDescriptor;
|
|
1403
1404
|
}
|
|
1405
|
+
interface QueryFileDescriptorsRequest {
|
|
1406
|
+
query?: CursorQuery;
|
|
1407
|
+
}
|
|
1408
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
1409
|
+
/**
|
|
1410
|
+
* Cursor paging options.
|
|
1411
|
+
*
|
|
1412
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1413
|
+
*/
|
|
1414
|
+
cursorPaging?: CommonCursorPaging;
|
|
1415
|
+
/**
|
|
1416
|
+
* Filter object.
|
|
1417
|
+
*
|
|
1418
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
1419
|
+
*/
|
|
1420
|
+
filter?: Record<string, any> | null;
|
|
1421
|
+
/**
|
|
1422
|
+
* Sort object.
|
|
1423
|
+
*
|
|
1424
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
1425
|
+
* @maxSize 5
|
|
1426
|
+
*/
|
|
1427
|
+
sort?: Sorting[];
|
|
1428
|
+
}
|
|
1429
|
+
/** @oneof */
|
|
1430
|
+
interface CursorQueryPagingMethodOneOf {
|
|
1431
|
+
/**
|
|
1432
|
+
* Cursor paging options.
|
|
1433
|
+
*
|
|
1434
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
1435
|
+
*/
|
|
1436
|
+
cursorPaging?: CommonCursorPaging;
|
|
1437
|
+
}
|
|
1438
|
+
interface CommonCursorPaging {
|
|
1439
|
+
/**
|
|
1440
|
+
* Maximum number of items to return in the results.
|
|
1441
|
+
* @max 100
|
|
1442
|
+
*/
|
|
1443
|
+
limit?: number | null;
|
|
1444
|
+
/**
|
|
1445
|
+
* Pointer to the next or previous page in the list of results.
|
|
1446
|
+
*
|
|
1447
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1448
|
+
* Not relevant for the first request.
|
|
1449
|
+
* @maxLength 16000
|
|
1450
|
+
*/
|
|
1451
|
+
cursor?: string | null;
|
|
1452
|
+
}
|
|
1453
|
+
interface QueryFileDescriptorsResponse {
|
|
1454
|
+
/** @maxSize 200 */
|
|
1455
|
+
files?: FileDescriptor[];
|
|
1456
|
+
pagingMetadata?: PagingMetadataV2;
|
|
1457
|
+
}
|
|
1404
1458
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
1405
1459
|
createdEvent?: EntityCreatedEvent;
|
|
1406
1460
|
updatedEvent?: EntityUpdatedEvent;
|
|
@@ -1535,6 +1589,23 @@ declare enum WebhookIdentityType {
|
|
|
1535
1589
|
}
|
|
1536
1590
|
/** @enumType */
|
|
1537
1591
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1592
|
+
interface AccountDetails {
|
|
1593
|
+
/**
|
|
1594
|
+
* ID of the account.
|
|
1595
|
+
* @format GUID
|
|
1596
|
+
*/
|
|
1597
|
+
accountId?: string | null;
|
|
1598
|
+
/**
|
|
1599
|
+
* ID of the parent account.
|
|
1600
|
+
* @format GUID
|
|
1601
|
+
*/
|
|
1602
|
+
parentAccountId?: string | null;
|
|
1603
|
+
/**
|
|
1604
|
+
* ID of the site, if applicable.
|
|
1605
|
+
* @format GUID
|
|
1606
|
+
*/
|
|
1607
|
+
siteId?: string | null;
|
|
1608
|
+
}
|
|
1538
1609
|
/** @docsIgnore */
|
|
1539
1610
|
type GenerateFileDownloadUrlValidationErrors = {
|
|
1540
1611
|
ruleName?: 'INVALID_ASSET_KEY';
|
|
@@ -2308,5 +2379,127 @@ interface ListDeletedFilesOptions {
|
|
|
2308
2379
|
/** Cursor and paging information. */
|
|
2309
2380
|
paging?: CursorPaging;
|
|
2310
2381
|
}
|
|
2382
|
+
/** @public
|
|
2383
|
+
* @permissionId media:site_media:v1:file_descriptor:query_file_descriptors
|
|
2384
|
+
* @applicableIdentity APP
|
|
2385
|
+
* @fqn com.wix.media.site_media.v1.FilesService.QueryFileDescriptors
|
|
2386
|
+
*/
|
|
2387
|
+
declare function queryFileDescriptors(): FilesQueryBuilder;
|
|
2388
|
+
interface QueryCursorResult {
|
|
2389
|
+
cursors: Cursors;
|
|
2390
|
+
hasNext: () => boolean;
|
|
2391
|
+
hasPrev: () => boolean;
|
|
2392
|
+
length: number;
|
|
2393
|
+
pageSize: number;
|
|
2394
|
+
}
|
|
2395
|
+
interface FilesQueryResult extends QueryCursorResult {
|
|
2396
|
+
items: FileDescriptor[];
|
|
2397
|
+
query: FilesQueryBuilder;
|
|
2398
|
+
next: () => Promise<FilesQueryResult>;
|
|
2399
|
+
prev: () => Promise<FilesQueryResult>;
|
|
2400
|
+
}
|
|
2401
|
+
interface FilesQueryBuilder {
|
|
2402
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
2403
|
+
* @param value - Value to compare against.
|
|
2404
|
+
*/
|
|
2405
|
+
eq: (propertyName: 'private' | 'mediaType' | 'state', value: any) => FilesQueryBuilder;
|
|
2406
|
+
in: (propertyName: 'mediaType', value: any) => FilesQueryBuilder;
|
|
2407
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
2408
|
+
ascending: (...propertyNames: Array<'displayName' | 'sizeInBytes' | '_updatedDate'>) => FilesQueryBuilder;
|
|
2409
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
2410
|
+
descending: (...propertyNames: Array<'displayName' | 'sizeInBytes' | '_updatedDate'>) => FilesQueryBuilder;
|
|
2411
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
2412
|
+
limit: (limit: number) => FilesQueryBuilder;
|
|
2413
|
+
/** @param cursor - A pointer to specific record */
|
|
2414
|
+
skipTo: (cursor: string) => FilesQueryBuilder;
|
|
2415
|
+
find: () => Promise<FilesQueryResult>;
|
|
2416
|
+
}
|
|
2417
|
+
/**
|
|
2418
|
+
* @hidden
|
|
2419
|
+
* @fqn com.wix.media.site_media.v1.FilesService.QueryFileDescriptors
|
|
2420
|
+
* @requiredField query
|
|
2421
|
+
*/
|
|
2422
|
+
declare function typedQueryFileDescriptors(query: FileDescriptorQuery): Promise<NonNullablePaths<QueryFileDescriptorsResponse, `files` | `files.${number}._id` | `files.${number}.displayName` | `files.${number}.url` | `files.${number}.hash` | `files.${number}.private` | `files.${number}.mediaType` | `files.${number}.media.audio._id` | `files.${number}.media.archive._id` | `files.${number}.media.archive.url` | `files.${number}.media.model3d._id` | `files.${number}.media.model3d.url` | `files.${number}.operationStatus` | `files.${number}.siteId` | `files.${number}.state`, 6>>;
|
|
2423
|
+
interface FileDescriptorQuerySpec extends QuerySpec {
|
|
2424
|
+
paging: 'cursor';
|
|
2425
|
+
wql: [
|
|
2426
|
+
{
|
|
2427
|
+
fields: ['displayName'];
|
|
2428
|
+
operators: [];
|
|
2429
|
+
sort: 'BOTH';
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
fields: ['sizeInBytes'];
|
|
2433
|
+
operators: [];
|
|
2434
|
+
sort: 'BOTH';
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
fields: ['private'];
|
|
2438
|
+
operators: ['$eq'];
|
|
2439
|
+
sort: 'NONE';
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
fields: ['mediaType'];
|
|
2443
|
+
operators: ['$eq', '$in'];
|
|
2444
|
+
sort: 'NONE';
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
fields: ['_updatedDate'];
|
|
2448
|
+
operators: [];
|
|
2449
|
+
sort: 'BOTH';
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
fields: ['state'];
|
|
2453
|
+
operators: ['$eq'];
|
|
2454
|
+
sort: 'NONE';
|
|
2455
|
+
}
|
|
2456
|
+
];
|
|
2457
|
+
}
|
|
2458
|
+
type CommonQueryWithEntityContext = Query<FileDescriptor, FileDescriptorQuerySpec>;
|
|
2459
|
+
type FileDescriptorQuery = {
|
|
2460
|
+
/**
|
|
2461
|
+
Cursor paging options.
|
|
2462
|
+
|
|
2463
|
+
Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
2464
|
+
*/
|
|
2465
|
+
cursorPaging?: {
|
|
2466
|
+
/**
|
|
2467
|
+
Maximum number of items to return in the results.
|
|
2468
|
+
@max: 100
|
|
2469
|
+
*/
|
|
2470
|
+
limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
|
|
2471
|
+
/**
|
|
2472
|
+
Pointer to the next or previous page in the list of results.
|
|
2473
|
+
|
|
2474
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
2475
|
+
Not relevant for the first request.
|
|
2476
|
+
@maxLength: 16000
|
|
2477
|
+
*/
|
|
2478
|
+
cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
2479
|
+
};
|
|
2480
|
+
/**
|
|
2481
|
+
Filter object.
|
|
2482
|
+
|
|
2483
|
+
Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
2484
|
+
*/
|
|
2485
|
+
filter?: CommonQueryWithEntityContext['filter'] | null;
|
|
2486
|
+
/**
|
|
2487
|
+
Sort object.
|
|
2488
|
+
|
|
2489
|
+
Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
2490
|
+
@maxSize: 5
|
|
2491
|
+
*/
|
|
2492
|
+
sort?: {
|
|
2493
|
+
/**
|
|
2494
|
+
Name of the field to sort by.
|
|
2495
|
+
@maxLength: 512
|
|
2496
|
+
*/
|
|
2497
|
+
fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
|
|
2498
|
+
/**
|
|
2499
|
+
Sort order.
|
|
2500
|
+
*/
|
|
2501
|
+
order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
|
|
2502
|
+
}[];
|
|
2503
|
+
};
|
|
2311
2504
|
|
|
2312
|
-
export { type ActionEvent, type ApplicationError, type Archive, type AudioV2, type BaseEventMetadata, type BulkActionMetadata, type BulkAnnotateImageResult, type BulkAnnotateImagesRequest, type BulkAnnotateImagesResponse, type BulkDeleteFilesOptions, type BulkDeleteFilesRequest, type BulkDeleteFilesResponse, type BulkImportFileOptions, type BulkImportFileRequest, type BulkImportFileResponse, type BulkImportFileResult, type BulkImportFilesRequest, type BulkImportFilesResponse, type BulkInternalImportFilesRequest, type BulkInternalImportFilesResponse, type BulkPublishDraftFileResult, type BulkPublishDraftFilesRequest, type BulkPublishDraftFilesResponse, type BulkRestoreFilesFromTrashBinRequest, type BulkRestoreFilesFromTrashBinResponse, type Color, type ColorRGB, type Colors, ContentDisposition, type ContentDispositionWithLiterals, type CursorPaging, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type DownloadUrl, type DraftFilePublished, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExternalInfo, type FaceRecognition, type FileDescriptor, type FileDescriptorFileFailedEnvelope, type FileDescriptorFileReadyEnvelope, type FileFailed, type FileMedia, type FileMediaMediaOneOf, type FileReady, type FocalPoint, type FontAsset, type FontMedia, type GenerateAnimatedVectorRequest, type GenerateAnimatedVectorResponse, type GenerateFileDownloadUrlOptions, type GenerateFileDownloadUrlRequest, type GenerateFileDownloadUrlResponse, type GenerateFileDownloadUrlValidationErrors, type GenerateFileResumableUploadUrlOptions, type GenerateFileResumableUploadUrlRequest, type GenerateFileResumableUploadUrlResponse, type GenerateFileResumableUploadUrlValidationErrors, type GenerateFileUploadUrlOptions, type GenerateFileUploadUrlRequest, type GenerateFileUploadUrlResponse, type GenerateFileUploadUrlValidationErrors, type GenerateFilesDownloadUrlRequest, type GenerateFilesDownloadUrlResponse, type GenerateVideoStreamingUrlOptions, type GenerateVideoStreamingUrlRequest, type GenerateVideoStreamingUrlResponse, type GenerateWebSocketTokenRequest, type GenerateWebSocketTokenResponse, type GetFileDescriptorRequest, type GetFileDescriptorResponse, type GetFileDescriptorValidationErrors, type GetFileDescriptorsRequest, type GetFileDescriptorsResponse, type GetFileDescriptorsValidationErrors, type GetSiteFileDescriptorsRequest, type GetSiteFileDescriptorsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IdentityInfo, IdentityType, type IdentityTypeWithLiterals, type ImageAnnotationConfigurations, ImageAnnotationType, type ImageAnnotationTypeWithLiterals, type ImageMedia, type ImportFileOptions, type ImportFileRequest, type ImportFileResponse, type ImportFileValidationErrors, type ItemMetadata, type ListDeletedFilesOptions, type ListDeletedFilesRequest, type ListDeletedFilesResponse, type ListDeletedFilesValidationErrors, type ListFilesOptions, type ListFilesRequest, type ListFilesResponse, type ListFilesValidationErrors, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Model3D, Namespace, type NamespaceWithLiterals, OperationStatus, type OperationStatusWithLiterals, type OtherMedia, type PagingMetadataV2, type Plan, type Plans, type RestoreInfo, RootFolder, type RootFolderWithLiterals, type SearchFilesOptions, type SearchFilesRequest, type SearchFilesResponse, type SearchFilesValidationErrors, type ServiceError, type SiteQuotaExceededError, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, StreamFormat, type StreamFormatWithLiterals, type TotalQuota, type UnsupportedRequestValueError, type UpdateFileDescriptorRequest, type UpdateFileDescriptorResponse, type UpdateFileDescriptorValidationErrors, type UpdateFileRequest, type UpdateFileResponse, UploadProtocol, type UploadProtocolWithLiterals, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteFiles, bulkImportFile, bulkImportFiles, bulkRestoreFilesFromTrashBin, generateFileDownloadUrl, generateFileResumableUploadUrl, generateFileUploadUrl, generateFilesDownloadUrl, generateVideoStreamingUrl, getFileDescriptor, getFileDescriptors, importFile, listDeletedFiles, listFiles, onFileDescriptorFileFailed, onFileDescriptorFileReady, searchFiles, updateFileDescriptor };
|
|
2505
|
+
export { type AccountDetails, type ActionEvent, type ApplicationError, type Archive, type AudioV2, type BaseEventMetadata, type BulkActionMetadata, type BulkAnnotateImageResult, type BulkAnnotateImagesRequest, type BulkAnnotateImagesResponse, type BulkDeleteFilesOptions, type BulkDeleteFilesRequest, type BulkDeleteFilesResponse, type BulkImportFileOptions, type BulkImportFileRequest, type BulkImportFileResponse, type BulkImportFileResult, type BulkImportFilesRequest, type BulkImportFilesResponse, type BulkInternalImportFilesRequest, type BulkInternalImportFilesResponse, type BulkPublishDraftFileResult, type BulkPublishDraftFilesRequest, type BulkPublishDraftFilesResponse, type BulkRestoreFilesFromTrashBinRequest, type BulkRestoreFilesFromTrashBinResponse, type Color, type ColorRGB, type Colors, type CommonCursorPaging, type CommonQueryWithEntityContext, ContentDisposition, type ContentDispositionWithLiterals, type CursorPaging, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type DownloadUrl, type DraftFilePublished, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExternalInfo, type FaceRecognition, type FileDescriptor, type FileDescriptorFileFailedEnvelope, type FileDescriptorFileReadyEnvelope, type FileDescriptorQuery, type FileDescriptorQuerySpec, type FileFailed, type FileMedia, type FileMediaMediaOneOf, type FileReady, type FilesQueryBuilder, type FilesQueryResult, type FocalPoint, type FontAsset, type FontMedia, type GenerateAnimatedVectorRequest, type GenerateAnimatedVectorResponse, type GenerateFileDownloadUrlOptions, type GenerateFileDownloadUrlRequest, type GenerateFileDownloadUrlResponse, type GenerateFileDownloadUrlValidationErrors, type GenerateFileResumableUploadUrlOptions, type GenerateFileResumableUploadUrlRequest, type GenerateFileResumableUploadUrlResponse, type GenerateFileResumableUploadUrlValidationErrors, type GenerateFileUploadUrlOptions, type GenerateFileUploadUrlRequest, type GenerateFileUploadUrlResponse, type GenerateFileUploadUrlValidationErrors, type GenerateFilesDownloadUrlRequest, type GenerateFilesDownloadUrlResponse, type GenerateVideoStreamingUrlOptions, type GenerateVideoStreamingUrlRequest, type GenerateVideoStreamingUrlResponse, type GenerateWebSocketTokenRequest, type GenerateWebSocketTokenResponse, type GetFileDescriptorRequest, type GetFileDescriptorResponse, type GetFileDescriptorValidationErrors, type GetFileDescriptorsRequest, type GetFileDescriptorsResponse, type GetFileDescriptorsValidationErrors, type GetSiteFileDescriptorsRequest, type GetSiteFileDescriptorsResponse, type IdentificationData, type IdentificationDataIdOneOf, type IdentityInfo, IdentityType, type IdentityTypeWithLiterals, type ImageAnnotationConfigurations, ImageAnnotationType, type ImageAnnotationTypeWithLiterals, type ImageMedia, type ImportFileOptions, type ImportFileRequest, type ImportFileResponse, type ImportFileValidationErrors, type ItemMetadata, type ListDeletedFilesOptions, type ListDeletedFilesRequest, type ListDeletedFilesResponse, type ListDeletedFilesValidationErrors, type ListFilesOptions, type ListFilesRequest, type ListFilesResponse, type ListFilesValidationErrors, MediaType, type MediaTypeWithLiterals, type MessageEnvelope, type Model3D, Namespace, type NamespaceWithLiterals, OperationStatus, type OperationStatusWithLiterals, type OtherMedia, type PagingMetadataV2, type Plan, type Plans, type QueryFileDescriptorsRequest, type QueryFileDescriptorsResponse, type RestoreInfo, RootFolder, type RootFolderWithLiterals, type SearchFilesOptions, type SearchFilesRequest, type SearchFilesResponse, type SearchFilesValidationErrors, type ServiceError, type SiteQuotaExceededError, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, StreamFormat, type StreamFormatWithLiterals, type TotalQuota, type UnsupportedRequestValueError, type UpdateFileDescriptorRequest, type UpdateFileDescriptorResponse, type UpdateFileDescriptorValidationErrors, type UpdateFileRequest, type UpdateFileResponse, UploadProtocol, type UploadProtocolWithLiterals, type VideoResolution, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, bulkDeleteFiles, bulkImportFile, bulkImportFiles, bulkRestoreFilesFromTrashBin, generateFileDownloadUrl, generateFileResumableUploadUrl, generateFileUploadUrl, generateFilesDownloadUrl, generateVideoStreamingUrl, getFileDescriptor, getFileDescriptors, importFile, listDeletedFiles, listFiles, onFileDescriptorFileFailed, onFileDescriptorFileReady, queryFileDescriptors, searchFiles, typedQueryFileDescriptors, updateFileDescriptor };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/media-site-media-v1-file-descriptor-files.universal.ts
|
|
2
2
|
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
3
4
|
import {
|
|
4
5
|
renameKeysFromSDKRequestToRESTRequest,
|
|
5
6
|
renameKeysFromRESTResponseToSDKResponse
|
|
@@ -1021,6 +1022,94 @@ function listDeletedFiles(payload) {
|
|
|
1021
1022
|
}
|
|
1022
1023
|
return __listDeletedFiles;
|
|
1023
1024
|
}
|
|
1025
|
+
function queryFileDescriptors(payload) {
|
|
1026
|
+
function __queryFileDescriptors({ host }) {
|
|
1027
|
+
const metadata = {
|
|
1028
|
+
entityFqdn: "wix.media.site_media.v1.file_descriptor",
|
|
1029
|
+
method: "GET",
|
|
1030
|
+
methodFqn: "com.wix.media.site_media.v1.FilesService.QueryFileDescriptors",
|
|
1031
|
+
packageName: PACKAGE_NAME,
|
|
1032
|
+
migrationOptions: {
|
|
1033
|
+
optInTransformResponse: true
|
|
1034
|
+
},
|
|
1035
|
+
url: resolveComWixMediaSiteMediaV1FilesServiceUrl({
|
|
1036
|
+
protoPath: "/v1/files/query",
|
|
1037
|
+
data: payload,
|
|
1038
|
+
host
|
|
1039
|
+
}),
|
|
1040
|
+
params: toURLSearchParams(payload, true),
|
|
1041
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
1042
|
+
{
|
|
1043
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
1044
|
+
paths: [
|
|
1045
|
+
{ path: "files.createdDate" },
|
|
1046
|
+
{ path: "files.updatedDate" },
|
|
1047
|
+
{ path: "files.lastUsedDate" },
|
|
1048
|
+
{ path: "files.media.image.image.urlExpirationDate" },
|
|
1049
|
+
{ path: "files.media.image.previewImage.urlExpirationDate" },
|
|
1050
|
+
{ path: "files.media.video.urlExpirationDate" },
|
|
1051
|
+
{ path: "files.media.video.resolutions.urlExpirationDate" },
|
|
1052
|
+
{
|
|
1053
|
+
path: "files.media.video.resolutions.poster.urlExpirationDate"
|
|
1054
|
+
},
|
|
1055
|
+
{ path: "files.media.video.posters.urlExpirationDate" },
|
|
1056
|
+
{ path: "files.media.audio.assets.urlExpirationDate" },
|
|
1057
|
+
{ path: "files.media.document.urlExpirationDate" },
|
|
1058
|
+
{ path: "files.media.document.thumbnail.urlExpirationDate" },
|
|
1059
|
+
{ path: "files.media.vector.image.urlExpirationDate" },
|
|
1060
|
+
{ path: "files.media.vector.previewImage.urlExpirationDate" },
|
|
1061
|
+
{ path: "files.media.archive.urlExpirationDate" },
|
|
1062
|
+
{ path: "files.media.model3d.urlExpirationDate" },
|
|
1063
|
+
{ path: "files.media.model3d.thumbnail.urlExpirationDate" },
|
|
1064
|
+
{ path: "files.media.icon.image.urlExpirationDate" },
|
|
1065
|
+
{ path: "files.media.icon.previewImage.urlExpirationDate" }
|
|
1066
|
+
]
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
1070
|
+
paths: [
|
|
1071
|
+
{ path: "files.media.image.image.focalPoint.x" },
|
|
1072
|
+
{ path: "files.media.image.image.focalPoint.y" },
|
|
1073
|
+
{ path: "files.media.image.faces.confidence" },
|
|
1074
|
+
{ path: "files.media.image.previewImage.focalPoint.x" },
|
|
1075
|
+
{ path: "files.media.image.previewImage.focalPoint.y" },
|
|
1076
|
+
{ path: "files.media.video.resolutions.poster.focalPoint.x" },
|
|
1077
|
+
{ path: "files.media.video.resolutions.poster.focalPoint.y" },
|
|
1078
|
+
{ path: "files.media.video.posters.focalPoint.x" },
|
|
1079
|
+
{ path: "files.media.video.posters.focalPoint.y" },
|
|
1080
|
+
{ path: "files.media.document.thumbnail.focalPoint.x" },
|
|
1081
|
+
{ path: "files.media.document.thumbnail.focalPoint.y" },
|
|
1082
|
+
{ path: "files.media.vector.image.focalPoint.x" },
|
|
1083
|
+
{ path: "files.media.vector.image.focalPoint.y" },
|
|
1084
|
+
{ path: "files.media.vector.faces.confidence" },
|
|
1085
|
+
{ path: "files.media.vector.previewImage.focalPoint.x" },
|
|
1086
|
+
{ path: "files.media.vector.previewImage.focalPoint.y" },
|
|
1087
|
+
{ path: "files.media.model3d.thumbnail.focalPoint.x" },
|
|
1088
|
+
{ path: "files.media.model3d.thumbnail.focalPoint.y" },
|
|
1089
|
+
{ path: "files.media.icon.image.focalPoint.x" },
|
|
1090
|
+
{ path: "files.media.icon.image.focalPoint.y" },
|
|
1091
|
+
{ path: "files.media.icon.faces.confidence" },
|
|
1092
|
+
{ path: "files.media.icon.previewImage.focalPoint.x" },
|
|
1093
|
+
{ path: "files.media.icon.previewImage.focalPoint.y" }
|
|
1094
|
+
]
|
|
1095
|
+
}
|
|
1096
|
+
]),
|
|
1097
|
+
fallback: [
|
|
1098
|
+
{
|
|
1099
|
+
method: "POST",
|
|
1100
|
+
url: resolveComWixMediaSiteMediaV1FilesServiceUrl({
|
|
1101
|
+
protoPath: "/v1/files/query",
|
|
1102
|
+
data: payload,
|
|
1103
|
+
host
|
|
1104
|
+
}),
|
|
1105
|
+
data: payload
|
|
1106
|
+
}
|
|
1107
|
+
]
|
|
1108
|
+
};
|
|
1109
|
+
return metadata;
|
|
1110
|
+
}
|
|
1111
|
+
return __queryFileDescriptors;
|
|
1112
|
+
}
|
|
1024
1113
|
|
|
1025
1114
|
// src/media-site-media-v1-file-descriptor-files.universal.ts
|
|
1026
1115
|
import { transformSDKAudioToRESTAudio } from "@wix/sdk-runtime/transformations/audio";
|
|
@@ -1904,6 +1993,128 @@ async function listDeletedFiles2(options) {
|
|
|
1904
1993
|
throw transformedError;
|
|
1905
1994
|
}
|
|
1906
1995
|
}
|
|
1996
|
+
function queryFileDescriptors2() {
|
|
1997
|
+
const { httpClient, sideEffects } = arguments[0];
|
|
1998
|
+
return queryBuilder({
|
|
1999
|
+
func: async (payload) => {
|
|
2000
|
+
const reqOpts = queryFileDescriptors(
|
|
2001
|
+
payload
|
|
2002
|
+
);
|
|
2003
|
+
sideEffects?.onSiteCall?.();
|
|
2004
|
+
try {
|
|
2005
|
+
const result = await httpClient.request(reqOpts);
|
|
2006
|
+
sideEffects?.onSuccess?.(result);
|
|
2007
|
+
return result;
|
|
2008
|
+
} catch (err) {
|
|
2009
|
+
sideEffects?.onError?.(err);
|
|
2010
|
+
throw err;
|
|
2011
|
+
}
|
|
2012
|
+
},
|
|
2013
|
+
requestTransformer: (query) => {
|
|
2014
|
+
const args = [query, {}];
|
|
2015
|
+
return renameKeysFromSDKRequestToRESTRequest({
|
|
2016
|
+
...args?.[1],
|
|
2017
|
+
query: args?.[0]
|
|
2018
|
+
});
|
|
2019
|
+
},
|
|
2020
|
+
responseTransformer: ({
|
|
2021
|
+
data
|
|
2022
|
+
}) => {
|
|
2023
|
+
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
2024
|
+
transformPaths2(data, [
|
|
2025
|
+
{
|
|
2026
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2027
|
+
paths: [{ path: "files.media.video" }]
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
transformFn: transformRESTDocumentToSDKDocument,
|
|
2031
|
+
paths: [{ path: "files.media.document" }]
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2035
|
+
paths: [
|
|
2036
|
+
{ path: "files.media.image.image" },
|
|
2037
|
+
{ path: "files.media.image.previewImage" },
|
|
2038
|
+
{ path: "files.media.vector.image" },
|
|
2039
|
+
{ path: "files.media.vector.previewImage" },
|
|
2040
|
+
{ path: "files.media.model3d.thumbnail" },
|
|
2041
|
+
{ path: "files.media.icon.image" },
|
|
2042
|
+
{ path: "files.media.icon.previewImage" }
|
|
2043
|
+
]
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
transformFn: transformRESTAudioToSDKAudio,
|
|
2047
|
+
paths: [{ path: "files.media.audio.assets", isRepeated: true }]
|
|
2048
|
+
}
|
|
2049
|
+
])
|
|
2050
|
+
);
|
|
2051
|
+
return {
|
|
2052
|
+
items: transformedData?.files,
|
|
2053
|
+
pagingMetadata: transformedData?.pagingMetadata
|
|
2054
|
+
};
|
|
2055
|
+
},
|
|
2056
|
+
errorTransformer: (err) => {
|
|
2057
|
+
const transformedError = sdkTransformError(err, {
|
|
2058
|
+
spreadPathsToArguments: {},
|
|
2059
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2060
|
+
singleArgumentUnchanged: false
|
|
2061
|
+
});
|
|
2062
|
+
throw transformedError;
|
|
2063
|
+
},
|
|
2064
|
+
pagingMethod: "CURSOR",
|
|
2065
|
+
transformationPaths: {}
|
|
2066
|
+
});
|
|
2067
|
+
}
|
|
2068
|
+
async function typedQueryFileDescriptors(query) {
|
|
2069
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
2070
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
2071
|
+
const reqOpts = queryFileDescriptors(payload);
|
|
2072
|
+
sideEffects?.onSiteCall?.();
|
|
2073
|
+
try {
|
|
2074
|
+
const result = await httpClient.request(reqOpts);
|
|
2075
|
+
sideEffects?.onSuccess?.(result);
|
|
2076
|
+
return renameKeysFromRESTResponseToSDKResponse(
|
|
2077
|
+
transformPaths2(result.data, [
|
|
2078
|
+
{
|
|
2079
|
+
transformFn: transformRESTVideoV2ToSDKVideoV2,
|
|
2080
|
+
paths: [{ path: "files.media.video" }]
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
transformFn: transformRESTDocumentToSDKDocument,
|
|
2084
|
+
paths: [{ path: "files.media.document" }]
|
|
2085
|
+
},
|
|
2086
|
+
{
|
|
2087
|
+
transformFn: transformRESTImageToSDKImage,
|
|
2088
|
+
paths: [
|
|
2089
|
+
{ path: "files.media.image.image" },
|
|
2090
|
+
{ path: "files.media.image.previewImage" },
|
|
2091
|
+
{ path: "files.media.vector.image" },
|
|
2092
|
+
{ path: "files.media.vector.previewImage" },
|
|
2093
|
+
{ path: "files.media.model3d.thumbnail" },
|
|
2094
|
+
{ path: "files.media.icon.image" },
|
|
2095
|
+
{ path: "files.media.icon.previewImage" }
|
|
2096
|
+
]
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
transformFn: transformRESTAudioToSDKAudio,
|
|
2100
|
+
paths: [{ path: "files.media.audio.assets", isRepeated: true }]
|
|
2101
|
+
}
|
|
2102
|
+
])
|
|
2103
|
+
);
|
|
2104
|
+
} catch (err) {
|
|
2105
|
+
const transformedError = sdkTransformError(
|
|
2106
|
+
err,
|
|
2107
|
+
{
|
|
2108
|
+
spreadPathsToArguments: {},
|
|
2109
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
2110
|
+
singleArgumentUnchanged: false
|
|
2111
|
+
},
|
|
2112
|
+
["query"]
|
|
2113
|
+
);
|
|
2114
|
+
sideEffects?.onError?.(err);
|
|
2115
|
+
throw transformedError;
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
1907
2118
|
export {
|
|
1908
2119
|
ContentDisposition,
|
|
1909
2120
|
IdentityType,
|
|
@@ -1931,7 +2142,9 @@ export {
|
|
|
1931
2142
|
importFile2 as importFile,
|
|
1932
2143
|
listDeletedFiles2 as listDeletedFiles,
|
|
1933
2144
|
listFiles2 as listFiles,
|
|
2145
|
+
queryFileDescriptors2 as queryFileDescriptors,
|
|
1934
2146
|
searchFiles2 as searchFiles,
|
|
2147
|
+
typedQueryFileDescriptors,
|
|
1935
2148
|
updateFileDescriptor2 as updateFileDescriptor
|
|
1936
2149
|
};
|
|
1937
2150
|
//# sourceMappingURL=index.typings.mjs.map
|