@wix/auto_sdk_media-collections_media-collections 1.0.21 → 1.0.23
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 +120 -0
- package/build/{internal → cjs}/index.js +3 -1
- package/build/cjs/index.js.map +1 -0
- package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
- package/build/cjs/index.typings.js +1003 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/{internal → cjs}/meta.d.ts +2 -1
- package/build/es/index.d.mts +120 -0
- package/build/{internal → es}/index.mjs +3 -1
- package/build/es/index.mjs.map +1 -0
- package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
- package/build/es/index.typings.mjs +958 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/{internal → es}/meta.d.mts +2 -1
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +120 -0
- package/build/{index.js → internal/cjs/index.js} +3 -1
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
- package/build/internal/cjs/index.typings.js +1003 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +120 -0
- package/build/{index.mjs → internal/es/index.mjs} +3 -1
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
- package/build/internal/es/index.typings.mjs +958 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
- package/build/internal/es/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/index.d.mts +0 -120
- package/build/index.d.ts +0 -120
- package/build/index.js.map +0 -1
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -120
- package/build/internal/index.d.ts +0 -120
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs.map +0 -1
- package/build/meta.js.map +0 -1
- package/build/meta.mjs.map +0 -1
- /package/build/{internal → cjs}/meta.js +0 -0
- /package/build/{internal → cjs}/meta.js.map +0 -0
- /package/build/{internal → es}/meta.mjs +0 -0
- /package/build/{internal → es}/meta.mjs.map +0 -0
- /package/build/{meta.js → internal/cjs/meta.js} +0 -0
- /package/build/{meta.mjs → internal/es/meta.mjs} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
|
|
1
3
|
interface MediaCollection {
|
|
2
4
|
/**
|
|
3
5
|
* Collection id
|
|
@@ -1090,6 +1092,23 @@ interface CollectionCreatedEnvelope {
|
|
|
1090
1092
|
entity: MediaCollection;
|
|
1091
1093
|
metadata: EventMetadata;
|
|
1092
1094
|
}
|
|
1095
|
+
/** @webhook
|
|
1096
|
+
* @eventType wix.collections.collection_created
|
|
1097
|
+
* @serviceIdentifier com.wixpress.exposure.mediacollections.MediaCollectionsService
|
|
1098
|
+
* @slug created
|
|
1099
|
+
* @documentationMaturity preview
|
|
1100
|
+
*/
|
|
1101
|
+
declare function onCollectionCreated(handler: (event: CollectionCreatedEnvelope) => void | Promise<void>): void;
|
|
1102
|
+
/**
|
|
1103
|
+
* Get a specific collection by its id
|
|
1104
|
+
* @param mediaCollectionId - Collection id
|
|
1105
|
+
* @public
|
|
1106
|
+
* @documentationMaturity preview
|
|
1107
|
+
* @requiredField mediaCollectionId
|
|
1108
|
+
* @returns The collection
|
|
1109
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.Get
|
|
1110
|
+
*/
|
|
1111
|
+
declare function get(mediaCollectionId: string, options?: GetOptions): Promise<NonNullablePaths<MediaCollection, `_id` | `name` | `membersCount` | `creator.memberId` | `items` | `items.${number}.photoMetadata.focalPoint.x` | `items.${number}.photoMetadata.focalPoint.y` | `items.${number}.videoMetadata.source` | `items.${number}.link.type` | `items.${number}.dataType` | `items.${number}.mediaOwner` | `items.${number}.galleryId` | `itemsCount` | `privacySettings` | `locked`, 6>>;
|
|
1093
1112
|
interface GetOptions {
|
|
1094
1113
|
/** number of items to skip in the current sort order, default is 0 */
|
|
1095
1114
|
offset?: number | null;
|
|
@@ -1100,6 +1119,15 @@ interface GetOptions {
|
|
|
1100
1119
|
*/
|
|
1101
1120
|
limit?: number | null;
|
|
1102
1121
|
}
|
|
1122
|
+
/**
|
|
1123
|
+
* List all collections that the member has a role in them
|
|
1124
|
+
* @param itemId - Item id
|
|
1125
|
+
* @public
|
|
1126
|
+
* @documentationMaturity preview
|
|
1127
|
+
* @requiredField itemId
|
|
1128
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionsForItem
|
|
1129
|
+
*/
|
|
1130
|
+
declare function listCollectionsForItem(itemId: string, options?: ListCollectionsForItemOptions): Promise<NonNullablePaths<ListCollectionsForItemResponse, `itemInCollections` | `itemInCollections.${number}.mediaCollectionId` | `itemInCollections.${number}.name` | `itemInCollections.${number}.isItemInCollection` | `itemInCollections.${number}.isLocked` | `itemInCollections.${number}.role` | `itemInCollections.${number}.firstItem.videoMetadata.source` | `itemInCollections.${number}.firstItem.link.type` | `itemInCollections.${number}.firstItem.dataType` | `itemInCollections.${number}.firstItem.mediaOwner` | `itemInCollections.${number}.firstItem.galleryId`, 6>>;
|
|
1103
1131
|
interface ListCollectionsForItemOptions {
|
|
1104
1132
|
/**
|
|
1105
1133
|
* Gallery id
|
|
@@ -1107,6 +1135,16 @@ interface ListCollectionsForItemOptions {
|
|
|
1107
1135
|
*/
|
|
1108
1136
|
galleryId?: string;
|
|
1109
1137
|
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Get a specific item from a collection
|
|
1140
|
+
* @public
|
|
1141
|
+
* @documentationMaturity preview
|
|
1142
|
+
* @requiredField identifiers
|
|
1143
|
+
* @requiredField identifiers.itemId
|
|
1144
|
+
* @requiredField identifiers.mediaCollectionId
|
|
1145
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.GetCollectionItem
|
|
1146
|
+
*/
|
|
1147
|
+
declare function getCollectionItem(identifiers: NonNullablePaths<GetCollectionItemIdentifiers, `itemId` | `mediaCollectionId`, 2>): Promise<NonNullablePaths<GetCollectionItemResponse, `item.photoMetadata.focalPoint.x` | `item.photoMetadata.focalPoint.y` | `item.videoMetadata.source` | `item.videoMetadata.posters` | `item.videoMetadata.resolutions` | `item.link.type` | `item.link.wixLinkData.external.url` | `item.link.wixLinkData.page.pageId` | `item.link.wixLinkData.page.rel` | `item.link.wixLinkData.anchor.anchorName` | `item.link.wixLinkData.anchor.anchorDataId` | `item.link.wixLinkData.anchor.pageId` | `item.link.wixLinkData.anchor.rel` | `item.link.wixLinkData.dynamicPage.routerId` | `item.link.wixLinkData.dynamicPage.innerRoute` | `item.link.wixLinkData.dynamicPage.rel` | `item.link.wixLinkData.document.docId` | `item.link.wixLinkData.document.indexable` | `item.link.wixLinkData.email.recipient` | `item.link.wixLinkData.phone.phoneNumber` | `item.link.wixLinkData.address.address` | `item.link.wixLinkData.whatsApp.phoneNumber` | `item.link.wixLinkData.tpaPage.itemTypeIdentifier` | `item.link.wixLinkData.tpaPage.itemId` | `item.link.wixLinkData.tpaPage.pageId` | `item.link.wixLinkData.tpaPage.appDefinitionId` | `item.link.wixLinkData.tpaPage.path` | `item.link.wixLinkData.tpaPage.rel` | `item.dataType` | `item.mediaOwner` | `item.tags` | `item.galleryId`, 6>>;
|
|
1110
1148
|
interface GetCollectionItemIdentifiers {
|
|
1111
1149
|
/**
|
|
1112
1150
|
* Collection id
|
|
@@ -1119,6 +1157,13 @@ interface GetCollectionItemIdentifiers {
|
|
|
1119
1157
|
*/
|
|
1120
1158
|
itemId: string;
|
|
1121
1159
|
}
|
|
1160
|
+
/**
|
|
1161
|
+
* List all collections that the item belongs to
|
|
1162
|
+
* @public
|
|
1163
|
+
* @documentationMaturity preview
|
|
1164
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.List
|
|
1165
|
+
*/
|
|
1166
|
+
declare function list(options?: ListOptions): Promise<NonNullablePaths<ListMediaCollectionsResponse, `collectionsStatus` | `collectionsStatus.${number}.mediaCollection._id` | `collectionsStatus.${number}.mediaCollection.name` | `collectionsStatus.${number}.mediaCollection.membersCount` | `collectionsStatus.${number}.mediaCollection.creator.memberId` | `collectionsStatus.${number}.mediaCollection.itemsCount` | `collectionsStatus.${number}.mediaCollection.privacySettings` | `collectionsStatus.${number}.mediaCollection.locked` | `collectionsStatus.${number}.memberStatus`, 6>>;
|
|
1122
1167
|
interface ListOptions {
|
|
1123
1168
|
/**
|
|
1124
1169
|
* the amount of collections per response, default is 1000
|
|
@@ -1134,6 +1179,15 @@ interface ListOptions {
|
|
|
1134
1179
|
*/
|
|
1135
1180
|
filterByRoles?: FilterByRoles;
|
|
1136
1181
|
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Create a new collection
|
|
1184
|
+
* @param name - Name of the collection
|
|
1185
|
+
* @public
|
|
1186
|
+
* @documentationMaturity preview
|
|
1187
|
+
* @requiredField name
|
|
1188
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.Create
|
|
1189
|
+
*/
|
|
1190
|
+
declare function create(name: string, options?: CreateOptions): Promise<NonNullablePaths<CreateMediaCollectionResponse, `mediaCollectionId`, 2>>;
|
|
1137
1191
|
interface CreateOptions {
|
|
1138
1192
|
/**
|
|
1139
1193
|
* Description of the collection
|
|
@@ -1145,6 +1199,18 @@ interface CreateOptions {
|
|
|
1145
1199
|
/** Items to add to the collection */
|
|
1146
1200
|
items?: AddItem[];
|
|
1147
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Update a collection
|
|
1204
|
+
* @param _id - Collection id
|
|
1205
|
+
* @public
|
|
1206
|
+
* @documentationMaturity preview
|
|
1207
|
+
* @requiredField _id
|
|
1208
|
+
* @requiredField mediaCollection
|
|
1209
|
+
* @requiredField options
|
|
1210
|
+
* @requiredField options.fieldMask
|
|
1211
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.PartiallyUpdate
|
|
1212
|
+
*/
|
|
1213
|
+
declare function partiallyUpdate(_id: string, mediaCollection: PartiallyUpdateMediaCollection, options: NonNullablePaths<PartiallyUpdateOptions, `fieldMask`, 2>): Promise<void>;
|
|
1148
1214
|
interface PartiallyUpdateMediaCollection {
|
|
1149
1215
|
/**
|
|
1150
1216
|
* Collection id
|
|
@@ -1193,14 +1259,50 @@ interface PartiallyUpdateOptions {
|
|
|
1193
1259
|
*/
|
|
1194
1260
|
fieldMask: string[];
|
|
1195
1261
|
}
|
|
1262
|
+
/**
|
|
1263
|
+
* Delete a collection
|
|
1264
|
+
* @param mediaCollectionId - the collection to delete
|
|
1265
|
+
* @public
|
|
1266
|
+
* @documentationMaturity preview
|
|
1267
|
+
* @requiredField mediaCollectionId
|
|
1268
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService._delete
|
|
1269
|
+
*/
|
|
1270
|
+
declare function _delete(mediaCollectionId: string): Promise<void>;
|
|
1271
|
+
/**
|
|
1272
|
+
* List all members of a collection
|
|
1273
|
+
* @param mediaCollectionId - the collection to get its members
|
|
1274
|
+
* @public
|
|
1275
|
+
* @documentationMaturity preview
|
|
1276
|
+
* @requiredField mediaCollectionId
|
|
1277
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionMembers
|
|
1278
|
+
*/
|
|
1279
|
+
declare function listCollectionMembers(mediaCollectionId: string, options?: ListCollectionMembersOptions): Promise<NonNullablePaths<ListCollectionMembersResponse, `membersRoles` | `membersRoles.${number}.member.memberId` | `membersRoles.${number}.memberStatus`, 5>>;
|
|
1196
1280
|
interface ListCollectionMembersOptions {
|
|
1197
1281
|
/** Filter the members by their role in the collection */
|
|
1198
1282
|
filterBy?: FilterBy;
|
|
1199
1283
|
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Add items to a collection
|
|
1286
|
+
* @param mediaCollectionId - Collection to add items
|
|
1287
|
+
* @public
|
|
1288
|
+
* @documentationMaturity preview
|
|
1289
|
+
* @requiredField mediaCollectionId
|
|
1290
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.AddItems
|
|
1291
|
+
*/
|
|
1292
|
+
declare function addItems(mediaCollectionId: string, options?: AddItemsOptions): Promise<void>;
|
|
1200
1293
|
interface AddItemsOptions {
|
|
1201
1294
|
/** Items to add */
|
|
1202
1295
|
items?: AddItem[];
|
|
1203
1296
|
}
|
|
1297
|
+
/**
|
|
1298
|
+
* Remove items from a collection
|
|
1299
|
+
* @param mediaCollectionId - Collection to remove items from
|
|
1300
|
+
* @public
|
|
1301
|
+
* @documentationMaturity preview
|
|
1302
|
+
* @requiredField mediaCollectionId
|
|
1303
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.RemoveItems
|
|
1304
|
+
*/
|
|
1305
|
+
declare function removeItems(mediaCollectionId: string, options?: RemoveItemsOptions): Promise<void>;
|
|
1204
1306
|
interface RemoveItemsOptions {
|
|
1205
1307
|
/**
|
|
1206
1308
|
* Items to remove
|
|
@@ -1208,5 +1310,28 @@ interface RemoveItemsOptions {
|
|
|
1208
1310
|
*/
|
|
1209
1311
|
itemsIds?: string[];
|
|
1210
1312
|
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Join to a collection
|
|
1315
|
+
* @param mediaCollectionId - Collection to join
|
|
1316
|
+
* @public
|
|
1317
|
+
* @documentationMaturity preview
|
|
1318
|
+
* @requiredField mediaCollectionId
|
|
1319
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.JoinToCollection
|
|
1320
|
+
*/
|
|
1321
|
+
declare function joinToCollection(mediaCollectionId: string): Promise<void>;
|
|
1322
|
+
/** @param mediaCollectionId - Collection the member will be leaving
|
|
1323
|
+
* @public
|
|
1324
|
+
* @documentationMaturity preview
|
|
1325
|
+
* @requiredField mediaCollectionId
|
|
1326
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.LeaveCollection
|
|
1327
|
+
*/
|
|
1328
|
+
declare function leaveCollection(mediaCollectionId: string): Promise<void>;
|
|
1329
|
+
/** @param mediaCollectionId - Collection to get its items
|
|
1330
|
+
* @public
|
|
1331
|
+
* @documentationMaturity preview
|
|
1332
|
+
* @requiredField mediaCollectionId
|
|
1333
|
+
* @fqn com.wixpress.exposure.mediacollections.MediaCollectionsService.ListCollectionItems
|
|
1334
|
+
*/
|
|
1335
|
+
declare function listCollectionItems(mediaCollectionId: string): Promise<NonNullablePaths<ListCollectionItemsResponse, `collectionItems` | `collectionItems.${number}.galleryId` | `collectionItems.${number}.itemId`, 4>>;
|
|
1211
1336
|
|
|
1212
|
-
export { type
|
|
1337
|
+
export { type ActionEvent, type AddItem, type AddItemsOptions, type AddItemsRequest, type AddItemsResponse, type AddressLink, type AnchorLink, type BaseEventMetadata, type CollectionAndStatus, type CollectionCreated, type CollectionCreatedEnvelope, type CollectionEvent, type CollectionEventEventTypeOneOf, type CollectionItem, type CollectionItemId, type CollectionMember, type CreateMediaCollectionRequest, type CreateMediaCollectionResponse, type CreateOptions, DataType, type DataTypeWithLiterals, type DeleteMediaCollectionRequest, type DeleteMediaCollectionResponse, type DocumentLink, type DomainEvent, type DomainEventBodyOneOf, type DynamicPageLink, type EmailLink, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExternalLink, type FilterBy, type FilterByRoles, type GetCollectionItemIdentifiers, type GetCollectionItemRequest, type GetCollectionItemResponse, type GetMediaCollectionRequest, type GetMediaCollectionResponse, type GetOptions, type IdentificationData, type IdentificationDataIdOneOf, type ItemInCollection, type ItemsAddedToCollection, type ItemsRemovedFromCollection, type JoinToCollectionRequest, type JoinToCollectionResponse, type LeaveCollectionRequest, type LeaveCollectionResponse, type Link, LinkRel, type LinkRelWithLiterals, type ListAllItemsBelongToCollectionRequest, type ListAllItemsBelongToCollectionResponse, type ListCollectionItemsRequest, type ListCollectionItemsResponse, type ListCollectionMembersOptions, type ListCollectionMembersRequest, type ListCollectionMembersResponse, type ListCollectionsForItemOptions, type ListCollectionsForItemRequest, type ListCollectionsForItemResponse, type ListMediaCollectionsRequest, type ListMediaCollectionsResponse, type ListOptions, type MediaCollection, type MediaCollectionItem, type MediaCollectionItemMetadataOneOf, MediaOwner, type MediaOwnerWithLiterals, type MemberAndStatus, type MemberJoinedToCollection, type MemberLeftCollection, MemberStatus, type MemberStatusWithLiterals, type MessageEnvelope, type PageLink, type PartiallyUpdateMediaCollection, type PartiallyUpdateMediaCollectionRequest, type PartiallyUpdateMediaCollectionResponse, type PartiallyUpdateOptions, type PermanentSiteDeletedResponse, type PhoneLink, type PhotoMetadata, type Point, PrivacySettings, type PrivacySettingsWithLiterals, type RemoveItemsOptions, type RemoveItemsRequest, type RemoveItemsResponse, type RemoveMemberFromCollectionRequest, type RemoveMemberFromCollectionResponse, type Resolution, type RestoreInfo, Source, type SourceWithLiterals, Status, type StatusWithLiterals, type TextMetadata, type Thumbnail, type TpaPageLink, Type, type TypeWithLiterals, type UnsharpMasking, type UpdateCollectionLockRequest, type UpdateCollectionLockResponse, type UpdateItem, type UpdateItemsRequest, type UpdateItemsResponse, type VideoMetadata, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WhatsAppLink, type WixLink, type WixLinkLinkOneOf, _delete, addItems, create, get, getCollectionItem, joinToCollection, leaveCollection, list, listCollectionItems, listCollectionMembers, listCollectionsForItem, onCollectionCreated, partiallyUpdate, removeItems };
|