@wix/auto_sdk_media-collections_media-collections 1.0.21 → 1.0.22

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.
Files changed (48) hide show
  1. package/build/cjs/index.d.ts +120 -0
  2. package/build/cjs/index.js.map +1 -0
  3. package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
  4. package/build/cjs/index.typings.js +1003 -0
  5. package/build/cjs/index.typings.js.map +1 -0
  6. package/build/{internal → cjs}/meta.d.ts +2 -1
  7. package/build/es/index.d.mts +120 -0
  8. package/build/es/index.mjs.map +1 -0
  9. package/build/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
  10. package/build/es/index.typings.mjs +958 -0
  11. package/build/es/index.typings.mjs.map +1 -0
  12. package/build/{internal → es}/meta.d.mts +2 -1
  13. package/build/es/package.json +3 -0
  14. package/build/internal/cjs/index.d.ts +120 -0
  15. package/build/internal/cjs/index.js.map +1 -0
  16. package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.mts → cjs/index.typings.d.ts} +126 -1
  17. package/build/internal/cjs/index.typings.js +1003 -0
  18. package/build/internal/cjs/index.typings.js.map +1 -0
  19. package/build/{meta.d.ts → internal/cjs/meta.d.ts} +2 -1
  20. package/build/internal/cjs/meta.js.map +1 -0
  21. package/build/internal/es/index.d.mts +120 -0
  22. package/build/internal/es/index.mjs.map +1 -0
  23. package/build/internal/{collections-v1-collection-media-collections.universal-CUKnIZcW.d.ts → es/index.typings.d.mts} +126 -1
  24. package/build/internal/es/index.typings.mjs +958 -0
  25. package/build/internal/es/index.typings.mjs.map +1 -0
  26. package/build/{meta.d.mts → internal/es/meta.d.mts} +2 -1
  27. package/build/internal/es/meta.mjs.map +1 -0
  28. package/package.json +13 -12
  29. package/build/index.d.mts +0 -120
  30. package/build/index.d.ts +0 -120
  31. package/build/index.js.map +0 -1
  32. package/build/index.mjs.map +0 -1
  33. package/build/internal/index.d.mts +0 -120
  34. package/build/internal/index.d.ts +0 -120
  35. package/build/internal/index.js.map +0 -1
  36. package/build/internal/index.mjs.map +0 -1
  37. package/build/meta.js.map +0 -1
  38. package/build/meta.mjs.map +0 -1
  39. /package/build/{index.js → cjs/index.js} +0 -0
  40. /package/build/{internal → cjs}/meta.js +0 -0
  41. /package/build/{internal → cjs}/meta.js.map +0 -0
  42. /package/build/{index.mjs → es/index.mjs} +0 -0
  43. /package/build/{internal → es}/meta.mjs +0 -0
  44. /package/build/{internal → es}/meta.mjs.map +0 -0
  45. /package/build/internal/{index.js → cjs/index.js} +0 -0
  46. /package/build/{meta.js → internal/cjs/meta.js} +0 -0
  47. /package/build/internal/{index.mjs → es/index.mjs} +0 -0
  48. /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 DomainEventBodyOneOf as $, type AddItemsOptions as A, type EmailLink as B, type CreateOptions as C, DataType as D, type ExternalLink as E, type PhoneLink as F, type GetOptions as G, type AddressLink as H, type WhatsAppLink as I, type TpaPageLink as J, type PhotoMetadata as K, type ListCollectionsForItemOptions as L, type MediaCollection as M, type Point as N, type Thumbnail as O, type PartiallyUpdateMediaCollection as P, type Resolution as Q, type RemoveItemsOptions as R, Source as S, Type as T, type UnsharpMasking as U, type VideoMetadata as V, WebhookIdentityType as W, type TextMetadata as X, type PermanentSiteDeletedResponse as Y, type Empty as Z, type DomainEvent as _, type ListCollectionsForItemResponse as a, type EntityCreatedEvent as a0, type RestoreInfo as a1, type EntityUpdatedEvent as a2, type EntityDeletedEvent as a3, type ActionEvent as a4, type MessageEnvelope as a5, type IdentificationData as a6, type IdentificationDataIdOneOf as a7, type CollectionEvent as a8, type CollectionEventEventTypeOneOf as a9, type AddItemsResponse as aA, type RemoveItemsRequest as aB, type RemoveItemsResponse as aC, type UpdateItemsRequest as aD, type UpdateItem as aE, type UpdateItemsResponse as aF, type JoinToCollectionRequest as aG, type JoinToCollectionResponse as aH, type RemoveMemberFromCollectionRequest as aI, type RemoveMemberFromCollectionResponse as aJ, type LeaveCollectionRequest as aK, type LeaveCollectionResponse as aL, type ListCollectionItemsRequest as aM, type CollectionItem as aN, type ListAllItemsBelongToCollectionRequest as aO, type ListAllItemsBelongToCollectionResponse as aP, type BaseEventMetadata as aQ, type EventMetadata as aR, type CollectionItemId as aa, type CollectionCreated as ab, type ItemsAddedToCollection as ac, type ItemsRemovedFromCollection as ad, type MemberJoinedToCollection as ae, type MemberLeftCollection as af, type GetMediaCollectionRequest as ag, type GetMediaCollectionResponse as ah, type ListCollectionsForItemRequest as ai, type ItemInCollection as aj, type GetCollectionItemRequest as ak, type ListMediaCollectionsRequest as al, type FilterByRoles as am, type CollectionAndStatus as an, type CreateMediaCollectionRequest as ao, type AddItem as ap, type PartiallyUpdateMediaCollectionRequest as aq, type PartiallyUpdateMediaCollectionResponse as ar, type UpdateCollectionLockRequest as as, type UpdateCollectionLockResponse as at, type DeleteMediaCollectionRequest as au, type DeleteMediaCollectionResponse as av, type ListCollectionMembersRequest as aw, type FilterBy as ax, type MemberAndStatus as ay, type AddItemsRequest as az, type GetCollectionItemIdentifiers as b, type GetCollectionItemResponse as c, type ListOptions as d, type ListMediaCollectionsResponse as e, type CreateMediaCollectionResponse as f, type PartiallyUpdateOptions as g, type ListCollectionMembersOptions as h, type ListCollectionMembersResponse as i, type ListCollectionItemsResponse as j, type CollectionCreatedEnvelope as k, LinkRel as l, MediaOwner as m, PrivacySettings as n, Status as o, MemberStatus as p, type CollectionMember as q, type MediaCollectionItem as r, type MediaCollectionItemMetadataOneOf as s, type Link as t, type WixLink as u, type WixLinkLinkOneOf as v, type PageLink as w, type AnchorLink as x, type DynamicPageLink as y, type DocumentLink as z };
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 };