@wix/auto_sdk_pro-gallery_pro-gallery 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/{index.d.ts → cjs/index.d.ts} +15 -15
- package/build/{internal → cjs}/index.js +1 -0
- package/build/cjs/index.js.map +1 -0
- package/build/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.mts → cjs/index.typings.d.ts} +318 -3
- package/build/cjs/index.typings.js +1467 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/{internal → cjs}/meta.d.ts +2 -1
- package/build/{index.d.mts → es/index.d.mts} +15 -15
- package/build/{index.mjs → es/index.mjs} +1 -0
- package/build/es/index.mjs.map +1 -0
- package/build/{internal/pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.ts → es/index.typings.d.mts} +318 -3
- package/build/es/index.typings.mjs +1422 -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/{index.d.ts → cjs/index.d.ts} +15 -15
- package/build/{index.js → internal/cjs/index.js} +1 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.ts → internal/cjs/index.typings.d.ts} +318 -3
- package/build/internal/cjs/index.typings.js +1467 -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/{index.d.mts → es/index.d.mts} +15 -15
- package/build/internal/{index.mjs → es/index.mjs} +1 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.mts → es/index.typings.d.mts} +318 -3
- package/build/internal/es/index.typings.mjs +1422 -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.js.map +0 -1
- package/build/index.mjs.map +0 -1
- 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
package/build/{pro-gallery-v2-gallery-pro-gallery.universal-CExTgtbV.d.mts → cjs/index.typings.d.ts}
RENAMED
@@ -1,3 +1,5 @@
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
2
|
+
|
1
3
|
interface Gallery {
|
2
4
|
/**
|
3
5
|
* Gallery ID.
|
@@ -93,6 +95,8 @@ declare enum LinkType {
|
|
93
95
|
/** For internal usage using wixLinkData. */
|
94
96
|
INTERNAL = "INTERNAL"
|
95
97
|
}
|
98
|
+
/** @enumType */
|
99
|
+
type LinkTypeWithLiterals = LinkType | 'UNDEFINED' | 'EXTERNAL' | 'INTERNAL';
|
96
100
|
/** The link object generated by panels in the editor and used by applications in Wix */
|
97
101
|
interface WixLink extends WixLinkLinkOneOf {
|
98
102
|
/** External link type */
|
@@ -292,6 +296,8 @@ declare enum ImageType {
|
|
292
296
|
WIX_MEDIA = "WIX_MEDIA",
|
293
297
|
EXTERNAL = "EXTERNAL"
|
294
298
|
}
|
299
|
+
/** @enumType */
|
300
|
+
type ImageTypeWithLiterals = ImageType | 'UNDEFINED' | 'WIX_MEDIA' | 'EXTERNAL';
|
295
301
|
interface Point {
|
296
302
|
/** X-coordinate of the focal point. */
|
297
303
|
x?: number;
|
@@ -654,10 +660,11 @@ declare enum RCLabel {
|
|
654
660
|
MOBILE_APP_BUILDER = "MOBILE_APP_BUILDER",
|
655
661
|
SEO = "SEO",
|
656
662
|
FEEDBACK = "FEEDBACK",
|
657
|
-
ACCESSIBILITY = "ACCESSIBILITY"
|
663
|
+
ACCESSIBILITY = "ACCESSIBILITY",
|
664
|
+
ENTERPRISE_APPROVALS = "ENTERPRISE_APPROVALS"
|
658
665
|
}
|
659
666
|
/** @enumType */
|
660
|
-
type RCLabelWithLiterals = RCLabel | 'UNKNOWN' | 'RELEASE_MANAGER' | 'BLOCKS' | 'WIX_CLI' | 'MOBILE_APP_BUILDER' | 'SEO' | 'FEEDBACK' | 'ACCESSIBILITY';
|
667
|
+
type RCLabelWithLiterals = RCLabel | 'UNKNOWN' | 'RELEASE_MANAGER' | 'BLOCKS' | 'WIX_CLI' | 'MOBILE_APP_BUILDER' | 'SEO' | 'FEEDBACK' | 'ACCESSIBILITY' | 'ENTERPRISE_APPROVALS';
|
661
668
|
interface DomainEvent extends DomainEventBodyOneOf {
|
662
669
|
/** Information about a newly-created gallery. */
|
663
670
|
createdEvent?: EntityCreatedEvent;
|
@@ -881,6 +888,8 @@ declare enum State {
|
|
881
888
|
/** The gallery in the LiveSite. */
|
882
889
|
PUBLISHED = "PUBLISHED"
|
883
890
|
}
|
891
|
+
/** @enumType */
|
892
|
+
type StateWithLiterals = State | 'UNDEFINED' | 'SAVED' | 'PUBLISHED';
|
884
893
|
interface ListGalleriesResponse {
|
885
894
|
/** Total number of galleries in the site. */
|
886
895
|
totalGalleries?: number | null;
|
@@ -1281,25 +1290,130 @@ interface GalleryCreatedEnvelope {
|
|
1281
1290
|
entity: Gallery;
|
1282
1291
|
metadata: EventMetadata;
|
1283
1292
|
}
|
1293
|
+
/**
|
1294
|
+
* Triggered when a gallery is created.
|
1295
|
+
*
|
1296
|
+
* > __Note:__ The event data doesn't include gallery items or their IDs.
|
1297
|
+
* > To receive information about the created items you need to listen to the [Gallery Item Created webhook](https://dev.wix.com/api/rest/site-content/pro-gallery/gallery-item-created-webhook).
|
1298
|
+
* @permissionScope Manage Galleries
|
1299
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1300
|
+
* @permissionScope Read Galleries
|
1301
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1302
|
+
* @permissionId PRO_GALLERY.READ
|
1303
|
+
* @webhook
|
1304
|
+
* @eventType wix.pro_gallery.gallery_v2_created
|
1305
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1306
|
+
* @slug created
|
1307
|
+
* @documentationMaturity preview
|
1308
|
+
*/
|
1309
|
+
declare function onGalleryCreated(handler: (event: GalleryCreatedEnvelope) => void | Promise<void>): void;
|
1284
1310
|
interface GalleryDeletedEnvelope {
|
1285
1311
|
metadata: EventMetadata;
|
1286
1312
|
}
|
1313
|
+
/**
|
1314
|
+
* Triggered when a gallery is deleted.
|
1315
|
+
* @permissionScope Manage Galleries
|
1316
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1317
|
+
* @permissionScope Read Galleries
|
1318
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1319
|
+
* @permissionId PRO_GALLERY.READ
|
1320
|
+
* @webhook
|
1321
|
+
* @eventType wix.pro_gallery.gallery_v2_deleted
|
1322
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1323
|
+
* @slug deleted
|
1324
|
+
* @documentationMaturity preview
|
1325
|
+
*/
|
1326
|
+
declare function onGalleryDeleted(handler: (event: GalleryDeletedEnvelope) => void | Promise<void>): void;
|
1287
1327
|
interface GalleryItemCreatedEnvelope {
|
1288
1328
|
data: GalleryItemCreated;
|
1289
1329
|
metadata: EventMetadata;
|
1290
1330
|
}
|
1331
|
+
/**
|
1332
|
+
* Triggered when a media item in a specified gallery is created.
|
1333
|
+
* @permissionScope Manage Galleries
|
1334
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1335
|
+
* @permissionScope Read Galleries
|
1336
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1337
|
+
* @permissionId PRO_GALLERY.READ
|
1338
|
+
* @webhook
|
1339
|
+
* @eventType wix.pro_gallery.gallery_v2_gallery_item_created
|
1340
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1341
|
+
* @slug gallery_item_created
|
1342
|
+
* @documentationMaturity preview
|
1343
|
+
*/
|
1344
|
+
declare function onGalleryItemCreated(handler: (event: GalleryItemCreatedEnvelope) => void | Promise<void>): void;
|
1291
1345
|
interface GalleryItemDeletedEnvelope {
|
1292
1346
|
data: GalleryItemDeleted;
|
1293
1347
|
metadata: EventMetadata;
|
1294
1348
|
}
|
1349
|
+
/**
|
1350
|
+
* Triggered when a media item in a specified gallery is deleted.
|
1351
|
+
*
|
1352
|
+
* > __Note:__ The event is triggered when a gallery item is deleted individually and when a gallery item is deleted because its gallery is deleted.
|
1353
|
+
* > The property `originatedFrom` has the value `Gallery Deleted` if the entire gallery is deleted. If the gallery item is deleted individually, this field is empty.
|
1354
|
+
* @permissionScope Manage Galleries
|
1355
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1356
|
+
* @permissionScope Read Galleries
|
1357
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1358
|
+
* @permissionId PRO_GALLERY.READ
|
1359
|
+
* @webhook
|
1360
|
+
* @eventType wix.pro_gallery.gallery_v2_gallery_item_deleted
|
1361
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1362
|
+
* @slug gallery_item_deleted
|
1363
|
+
* @documentationMaturity preview
|
1364
|
+
*/
|
1365
|
+
declare function onGalleryItemDeleted(handler: (event: GalleryItemDeletedEnvelope) => void | Promise<void>): void;
|
1295
1366
|
interface GalleryItemUpdatedEnvelope {
|
1296
1367
|
data: GalleryItemUpdated;
|
1297
1368
|
metadata: EventMetadata;
|
1298
1369
|
}
|
1370
|
+
/**
|
1371
|
+
* Triggered when a media item in a specified gallery is updated.
|
1372
|
+
* @permissionScope Manage Galleries
|
1373
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1374
|
+
* @permissionScope Read Galleries
|
1375
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1376
|
+
* @permissionId PRO_GALLERY.READ
|
1377
|
+
* @webhook
|
1378
|
+
* @eventType wix.pro_gallery.gallery_v2_gallery_item_updated
|
1379
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1380
|
+
* @slug gallery_item_updated
|
1381
|
+
* @documentationMaturity preview
|
1382
|
+
*/
|
1383
|
+
declare function onGalleryItemUpdated(handler: (event: GalleryItemUpdatedEnvelope) => void | Promise<void>): void;
|
1299
1384
|
interface GalleryUpdatedEnvelope {
|
1300
1385
|
entity: Gallery;
|
1301
1386
|
metadata: EventMetadata;
|
1302
1387
|
}
|
1388
|
+
/**
|
1389
|
+
* Triggered when a gallery is updated.
|
1390
|
+
*
|
1391
|
+
* > __Note:__ The event data doesn't include gallery items or their IDs.
|
1392
|
+
* > To receive information about the updated items you need to listen to the [Gallery Item Updated webhook](https://dev.wix.com/api/rest/site-content/pro-gallery/gallery-item-updated-webhook).
|
1393
|
+
* @permissionScope Manage Galleries
|
1394
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1395
|
+
* @permissionScope Read Galleries
|
1396
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1397
|
+
* @permissionId PRO_GALLERY.READ
|
1398
|
+
* @webhook
|
1399
|
+
* @eventType wix.pro_gallery.gallery_v2_updated
|
1400
|
+
* @serviceIdentifier com.wixpress.exposure.progallery.ProGallery
|
1401
|
+
* @slug updated
|
1402
|
+
* @documentationMaturity preview
|
1403
|
+
*/
|
1404
|
+
declare function onGalleryUpdated(handler: (event: GalleryUpdatedEnvelope) => void | Promise<void>): void;
|
1405
|
+
/**
|
1406
|
+
* Retrieves a list of galleries.
|
1407
|
+
*
|
1408
|
+
* This function retrieves a list of up to 10 galleries at a given time. To list the next 10 galleries in your site's backend, use the `offset` parameter.
|
1409
|
+
* @public
|
1410
|
+
* @documentationMaturity preview
|
1411
|
+
* @param options - Options to use when getting the list of galleries.
|
1412
|
+
* @permissionId PRO_GALLERY.READ
|
1413
|
+
* @applicableIdentity APP
|
1414
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.ListGalleries
|
1415
|
+
*/
|
1416
|
+
declare function listGalleries(options?: ListGalleriesOptions): Promise<NonNullablePaths<ListGalleriesResponse, `galleries`, 2>>;
|
1303
1417
|
interface ListGalleriesOptions {
|
1304
1418
|
/**
|
1305
1419
|
* Number of galleries to list. Defaults to `10`.
|
@@ -1316,6 +1430,19 @@ interface ListGalleriesOptions {
|
|
1316
1430
|
*/
|
1317
1431
|
limit?: number | null;
|
1318
1432
|
}
|
1433
|
+
/**
|
1434
|
+
* Retrieves a gallery by ID.
|
1435
|
+
* @param galleryId - Gallery ID.
|
1436
|
+
* @public
|
1437
|
+
* @documentationMaturity preview
|
1438
|
+
* @requiredField galleryId
|
1439
|
+
* @param options - Options to use when getting the gallery.
|
1440
|
+
* @permissionId PRO_GALLERY.READ
|
1441
|
+
* @applicableIdentity APP
|
1442
|
+
* @returns Returned gallery.
|
1443
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.GetGallery
|
1444
|
+
*/
|
1445
|
+
declare function getGallery(galleryId: string, options?: GetGalleryOptions): Promise<NonNullablePaths<Gallery, `items` | `items.${number}.image.focalPoint.x` | `items.${number}.image.focalPoint.y` | `items.${number}.video.type` | `items.${number}.type`, 6>>;
|
1319
1446
|
interface GetGalleryOptions extends GetGalleryOptionsVersionOneOf {
|
1320
1447
|
/** Number of media items to skip in the returns. Defaults to `0`. */
|
1321
1448
|
itemOffset?: number | null;
|
@@ -1333,6 +1460,20 @@ interface GetGalleryOptions extends GetGalleryOptionsVersionOneOf {
|
|
1333
1460
|
/** @oneof */
|
1334
1461
|
interface GetGalleryOptionsVersionOneOf {
|
1335
1462
|
}
|
1463
|
+
/**
|
1464
|
+
* Retrieves a list of media items in a specified gallery.
|
1465
|
+
*
|
1466
|
+
* This function retrieves a list of up to 100 gallery items. The gallery items are listed by `sortOrder` in descending order.
|
1467
|
+
* @param galleryId - Gallery ID.
|
1468
|
+
* @public
|
1469
|
+
* @documentationMaturity preview
|
1470
|
+
* @requiredField galleryId
|
1471
|
+
* @param options - Options to use when getting the list of gallery items.
|
1472
|
+
* @permissionId PRO_GALLERY.READ
|
1473
|
+
* @applicableIdentity APP
|
1474
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.ListGalleryItems
|
1475
|
+
*/
|
1476
|
+
declare function listGalleryItems(galleryId: string, options?: ListGalleryItemsOptions): Promise<NonNullablePaths<ListGalleryItemsResponse, `items` | `items.${number}.image.focalPoint.x` | `items.${number}.image.focalPoint.y` | `items.${number}.video.type` | `items.${number}.type`, 6>>;
|
1336
1477
|
interface ListGalleryItemsOptions {
|
1337
1478
|
/** Number of media items to skip in the returns. Defaults to `0`. */
|
1338
1479
|
itemOffset?: number | null;
|
@@ -1347,6 +1488,20 @@ interface ListGalleryItemsOptions {
|
|
1347
1488
|
*/
|
1348
1489
|
itemLimit?: number | null;
|
1349
1490
|
}
|
1491
|
+
/**
|
1492
|
+
* Retrieves a gallery item by ID.
|
1493
|
+
* @public
|
1494
|
+
* @documentationMaturity preview
|
1495
|
+
* @requiredField identifiers
|
1496
|
+
* @requiredField identifiers.galleryId
|
1497
|
+
* @requiredField identifiers.itemId
|
1498
|
+
* @param identifiers - Gallery ID and Item ID.
|
1499
|
+
* @permissionId PRO_GALLERY.READ
|
1500
|
+
* @applicableIdentity APP
|
1501
|
+
* @returns Returned media item.
|
1502
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.GetGalleryItem
|
1503
|
+
*/
|
1504
|
+
declare function getGalleryItem(identifiers: NonNullablePaths<GetGalleryItemIdentifiers, `galleryId` | `itemId`, 2>): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `video.type` | `type` | `tags.values`, 4>>;
|
1350
1505
|
interface GetGalleryItemIdentifiers {
|
1351
1506
|
/**
|
1352
1507
|
* Gallery ID.
|
@@ -1359,6 +1514,31 @@ interface GetGalleryItemIdentifiers {
|
|
1359
1514
|
*/
|
1360
1515
|
itemId: string;
|
1361
1516
|
}
|
1517
|
+
/**
|
1518
|
+
* Creates a new gallery.
|
1519
|
+
*
|
1520
|
+
* You can create your own gallery by providing the gallery information, or clone an existing gallery using the ID of that existing gallery. When a gallery is cloned, the newly-created gallery includes the same properties as the existing gallery except for the gallery and item IDs, sort order, and created and updated dates.
|
1521
|
+
*
|
1522
|
+
* The newly-created gallery is only available on your backend, and doesn't appear on your live site. To display your backend gallery on your live site, you need to connect it to a gallery component on your live site. To do this, import the `createGallery()` function to your page code, and write code to convert the backend gallery object to the frontend gallery component object. Once converted, the newly created backend gallery is visible on your live site. For reference, check out the code example, "Create a gallery and display it on your live site". To learn more, see [Displaying a Pro Gallery on Your Site Using the Pro Gallery Backend API](https://support.wix.com/en/article/velo-tutorial-displaying-a-pro-gallery-on-your-site-using-the-pro-gallery-backend-api).
|
1523
|
+
*
|
1524
|
+
* <blockquote class="important">
|
1525
|
+
*
|
1526
|
+
* __Important:__
|
1527
|
+
* When creating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
|
1528
|
+
*
|
1529
|
+
* </blockquote>
|
1530
|
+
* @public
|
1531
|
+
* @documentationMaturity preview
|
1532
|
+
* @requiredField options.gallery.items.metadata.image.imageInfo
|
1533
|
+
* @requiredField options.gallery.items.metadata.text.html
|
1534
|
+
* @requiredField options.gallery.items.metadata.video.videoInfo
|
1535
|
+
* @param options - Options to use when creating the gallery.
|
1536
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1537
|
+
* @applicableIdentity APP
|
1538
|
+
* @returns Created gallery.
|
1539
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.CreateGallery
|
1540
|
+
*/
|
1541
|
+
declare function createGallery(options?: NonNullablePaths<CreateGalleryOptions, `gallery.items.${number}.image.imageInfo` | `gallery.items.${number}.text.html` | `gallery.items.${number}.video.videoInfo`, 6>): Promise<NonNullablePaths<Gallery, `items` | `items.${number}.image.focalPoint.x` | `items.${number}.image.focalPoint.y` | `items.${number}.video.type` | `items.${number}.type`, 6>>;
|
1362
1542
|
interface CreateGalleryOptions {
|
1363
1543
|
/** Gallery to create. */
|
1364
1544
|
gallery?: Gallery;
|
@@ -1368,6 +1548,32 @@ interface CreateGalleryOptions {
|
|
1368
1548
|
*/
|
1369
1549
|
cloneFromGalleryId?: string | null;
|
1370
1550
|
}
|
1551
|
+
/**
|
1552
|
+
* Updates a gallery.
|
1553
|
+
*
|
1554
|
+
* Only the fields in the `gallery` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
|
1555
|
+
*
|
1556
|
+
* <blockquote class="important">
|
1557
|
+
*
|
1558
|
+
* __Important:__
|
1559
|
+
* When updating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
|
1560
|
+
*
|
1561
|
+
* </blockquote>
|
1562
|
+
* @public
|
1563
|
+
* @documentationMaturity preview
|
1564
|
+
* @requiredField _id
|
1565
|
+
* @requiredField gallery
|
1566
|
+
* @requiredField gallery.items.metadata.image.imageInfo
|
1567
|
+
* @requiredField gallery.items.metadata.text.html
|
1568
|
+
* @requiredField gallery.items.metadata.video.videoInfo
|
1569
|
+
* @param _id - ID of the gallery to update.
|
1570
|
+
* @param gallery - The information for the gallery being updated.
|
1571
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1572
|
+
* @applicableIdentity APP
|
1573
|
+
* @returns Updated gallery.
|
1574
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.UpdateGallery
|
1575
|
+
*/
|
1576
|
+
declare function updateGallery(_id: string, gallery: NonNullablePaths<UpdateGallery, `items.${number}.image.imageInfo` | `items.${number}.text.html` | `items.${number}.video.videoInfo`, 5>): Promise<NonNullablePaths<Gallery, `items` | `items.${number}.image.focalPoint.x` | `items.${number}.image.focalPoint.y` | `items.${number}.video.type` | `items.${number}.type`, 6>>;
|
1371
1577
|
interface UpdateGallery {
|
1372
1578
|
/**
|
1373
1579
|
* Gallery ID.
|
@@ -1396,6 +1602,33 @@ interface UpdateGallery {
|
|
1396
1602
|
*/
|
1397
1603
|
_createdDate?: Date | null;
|
1398
1604
|
}
|
1605
|
+
/**
|
1606
|
+
* Deletes a gallery.
|
1607
|
+
*
|
1608
|
+
* When a gallery is deleted, the deleted gallery is no longer returned when calling the [`listGalleries()`](/pro-gallery/list-galleries) function.
|
1609
|
+
* @param galleryId - ID of the gallery to delete.
|
1610
|
+
* @public
|
1611
|
+
* @documentationMaturity preview
|
1612
|
+
* @requiredField galleryId
|
1613
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1614
|
+
* @applicableIdentity APP
|
1615
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.DeleteGallery
|
1616
|
+
*/
|
1617
|
+
declare function deleteGallery(galleryId: string): Promise<NonNullablePaths<DeleteGalleryResponse, `galleryId`, 2>>;
|
1618
|
+
/**
|
1619
|
+
* Deletes multiple media items from a gallery.
|
1620
|
+
* @param galleryId - Gallery ID.
|
1621
|
+
* @public
|
1622
|
+
* @documentationMaturity preview
|
1623
|
+
* @requiredField galleryId
|
1624
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1625
|
+
* @applicableIdentity APP
|
1626
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItems
|
1627
|
+
* @deprecated
|
1628
|
+
* @replacedBy wix.pro_gallery.v2.gallery.BulkDeleteGalleryItems
|
1629
|
+
* @targetRemovalDate 2024-08-15
|
1630
|
+
*/
|
1631
|
+
declare function deleteGalleryItems(galleryId: string, options?: DeleteGalleryItemsOptions): Promise<NonNullablePaths<DeleteGalleryItemsResponse, `gallery.items` | `gallery.items.${number}.image.focalPoint.x` | `gallery.items.${number}.image.focalPoint.y` | `gallery.items.${number}.video.type` | `gallery.items.${number}.type`, 7>>;
|
1399
1632
|
interface DeleteGalleryItemsOptions {
|
1400
1633
|
/**
|
1401
1634
|
* ID of the media item to delete.
|
@@ -1403,6 +1636,73 @@ interface DeleteGalleryItemsOptions {
|
|
1403
1636
|
*/
|
1404
1637
|
itemsIds?: string[];
|
1405
1638
|
}
|
1639
|
+
/**
|
1640
|
+
* Deletes multiple media items from a gallery.
|
1641
|
+
* @param galleryId - Gallery ID.
|
1642
|
+
* @param itemIds - IDs of the media items to delete.
|
1643
|
+
* @public
|
1644
|
+
* @documentationMaturity preview
|
1645
|
+
* @requiredField galleryId
|
1646
|
+
* @requiredField itemIds
|
1647
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1648
|
+
* @applicableIdentity APP
|
1649
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.BulkDeleteGalleryItems
|
1650
|
+
*/
|
1651
|
+
declare function bulkDeleteGalleryItems(galleryId: string, itemIds: string[]): Promise<NonNullablePaths<BulkDeleteGalleryItemsResponse, `itemIds`, 2>>;
|
1652
|
+
/**
|
1653
|
+
* Creates a media item in a specified gallery.
|
1654
|
+
*
|
1655
|
+
* The `createGalleryItem()` function returns a Promise that resolves to a newly-created gallery item after it has successfully been created.
|
1656
|
+
*
|
1657
|
+
* <blockquote class="important">
|
1658
|
+
*
|
1659
|
+
* __Important:__
|
1660
|
+
* When creating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
|
1661
|
+
*
|
1662
|
+
* </blockquote>
|
1663
|
+
* @param galleryId - Gallery ID.
|
1664
|
+
* @param item - Media item to create.
|
1665
|
+
* @public
|
1666
|
+
* @documentationMaturity preview
|
1667
|
+
* @requiredField galleryId
|
1668
|
+
* @requiredField item
|
1669
|
+
* @requiredField item.metadata.image.imageInfo
|
1670
|
+
* @requiredField item.metadata.text.html
|
1671
|
+
* @requiredField item.metadata.video.videoInfo
|
1672
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1673
|
+
* @applicableIdentity APP
|
1674
|
+
* @returns Created media item.
|
1675
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.CreateGalleryItem
|
1676
|
+
*/
|
1677
|
+
declare function createGalleryItem(galleryId: string, item: NonNullablePaths<Item, `image.imageInfo` | `text.html` | `video.videoInfo`, 3>): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `video.type` | `type` | `tags.values`, 4>>;
|
1678
|
+
/**
|
1679
|
+
* Updates a media item in a specified gallery.
|
1680
|
+
*
|
1681
|
+
* Only the fields in the `item` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
|
1682
|
+
*
|
1683
|
+
* <blockquote class="important">
|
1684
|
+
*
|
1685
|
+
* __Important:__
|
1686
|
+
* When updating `image` items in your gallery, the images must be uploaded to the [Wix Media Manager](https://support.wix.com/en/article/wix-media-uploading-media-to-the-media-manager) first as the `imageInfo` parameter currently only supports the Wix media URL.
|
1687
|
+
*
|
1688
|
+
* </blockquote>
|
1689
|
+
* @public
|
1690
|
+
* @documentationMaturity preview
|
1691
|
+
* @requiredField identifiers
|
1692
|
+
* @requiredField identifiers.galleryId
|
1693
|
+
* @requiredField identifiers.itemId
|
1694
|
+
* @requiredField item
|
1695
|
+
* @requiredField item.metadata.image.imageInfo
|
1696
|
+
* @requiredField item.metadata.text.html
|
1697
|
+
* @requiredField item.metadata.video.videoInfo
|
1698
|
+
* @param item - The information for the gallery item being updated.
|
1699
|
+
* @param identifiers - Gallery ID and Item ID.
|
1700
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1701
|
+
* @applicableIdentity APP
|
1702
|
+
* @returns Updated media item.
|
1703
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.UpdateGalleryItem
|
1704
|
+
*/
|
1705
|
+
declare function updateGalleryItem(identifiers: NonNullablePaths<UpdateGalleryItemIdentifiers, `galleryId` | `itemId`, 2>, item: NonNullablePaths<UpdateGalleryItem, `image.imageInfo` | `text.html` | `video.videoInfo`, 3>): Promise<NonNullablePaths<Item, `image.focalPoint.x` | `image.focalPoint.y` | `video.type` | `type` | `tags.values`, 4>>;
|
1406
1706
|
interface UpdateGalleryItemIdentifiers {
|
1407
1707
|
/**
|
1408
1708
|
* ID of the gallery containing the item to update.
|
@@ -1461,6 +1761,21 @@ interface UpdateGalleryItem {
|
|
1461
1761
|
/** Item tags. */
|
1462
1762
|
tags?: Tags;
|
1463
1763
|
}
|
1764
|
+
/**
|
1765
|
+
* Deletes a media item from a gallery.
|
1766
|
+
*
|
1767
|
+
* When a gallery item is deleted, the deleted gallery item is no longer returned when calling the [`listGalleryItems()`](/pro-gallery/list-gallery-items) function.
|
1768
|
+
* @public
|
1769
|
+
* @documentationMaturity preview
|
1770
|
+
* @requiredField identifiers
|
1771
|
+
* @requiredField identifiers.galleryId
|
1772
|
+
* @requiredField identifiers.itemId
|
1773
|
+
* @param identifiers - Gallery ID and Item ID.
|
1774
|
+
* @permissionId PRO_GALLERY.MANAGE
|
1775
|
+
* @applicableIdentity APP
|
1776
|
+
* @fqn com.wixpress.exposure.progallery.ProGallery.DeleteGalleryItem
|
1777
|
+
*/
|
1778
|
+
declare function deleteGalleryItem(identifiers: NonNullablePaths<DeleteGalleryItemIdentifiers, `galleryId` | `itemId`, 2>): Promise<NonNullablePaths<DeleteGalleryItemResponse, `itemId`, 2>>;
|
1464
1779
|
interface DeleteGalleryItemIdentifiers {
|
1465
1780
|
/**
|
1466
1781
|
* Gallery ID.
|
@@ -1474,4 +1789,4 @@ interface DeleteGalleryItemIdentifiers {
|
|
1474
1789
|
itemId: string;
|
1475
1790
|
}
|
1476
1791
|
|
1477
|
-
export { type
|
1792
|
+
export { type ActionEvent, type AddressLink, type AnchorLink, type App, type BaseEventMetadata, type BulkDeleteGalleryItemsRequest, type BulkDeleteGalleryItemsResponse, type CleanDeletedGalleriesEvent, type CreateGalleryItemRequest, type CreateGalleryItemResponse, type CreateGalleryItemsRequest, type CreateGalleryItemsResponse, type CreateGalleryOptions, type CreateGalleryRequest, type CreateGalleryResponse, type CustomTag, type DeleteByFilterOperation, type DeleteByIdsOperation, type DeleteGalleryItemIdentifiers, type DeleteGalleryItemRequest, type DeleteGalleryItemResponse, type DeleteGalleryItemsOptions, type DeleteGalleryItemsRequest, type DeleteGalleryItemsResponse, type DeleteGalleryRequest, type DeleteGalleryResponse, type DocumentImage, type DocumentLink, type DocumentPayload, type DocumentUpdateOperation, type DomainEvent, type DomainEventBodyOneOf, type DynamicPageLink, type EmailLink, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Enum, type EnumWithLiterals, type EventMetadata, type EventsPage, type ExternalLink, type File, type Gallery, type GalleryCreatedEnvelope, type GalleryDeletedEnvelope, type GalleryItemCreated, type GalleryItemCreatedEnvelope, type GalleryItemDeleted, type GalleryItemDeletedEnvelope, type GalleryItemUpdated, type GalleryItemUpdatedEnvelope, type GalleryPublished, type GalleryUpdatedEnvelope, type GetActiveGalleryRevisionRequest, type GetActiveGalleryRevisionResponse, type GetGalleryItemIdentifiers, type GetGalleryItemRequest, type GetGalleryItemResponse, type GetGalleryOptions, type GetGalleryOptionsVersionOneOf, type GetGalleryRequest, type GetGalleryRequestVersionOneOf, type GetGalleryResponse, type GetGalleryRevisionRequest, type GetGalleryRevisionResponse, type HtmlSitePublished, type HtmlSiteRCPublished, type IdentificationData, type IdentificationDataIdOneOf, type Image, ImageType, type ImageTypeWithLiterals, type IndexDocument, type InvalidateCache, type InvalidateCacheGetByOneOf, type Item, type ItemId, type ItemMetadataOneOf, type ItemsInGallery, type Link, LinkRel, type LinkRelWithLiterals, LinkType, type LinkTypeWithLiterals, type ListGalleriesItemsRequest, type ListGalleriesItemsResponse, type ListGalleriesOptions, type ListGalleriesRequest, type ListGalleriesResponse, type ListGalleryItemsOptions, type ListGalleryItemsRequest, type ListGalleryItemsResponse, type MessageEnvelope, type Page, type PageLink, type PhoneLink, type Point, type ProgallerypublisherPublishGalleryRequest, type ProgallerypublisherPublishGalleryResponse, type PublishGalleryItemRequest, type PublishGalleryItemResponse, type PublishGalleryItemsRequest, type PublishGalleryItemsResponse, type PublishGalleryRequest, type PublishGalleryResponse, RCLabel, type RCLabelWithLiterals, type RestoreAllGalleriesEvent, type RestoreInfo, type SearchIndexingNotification, SearchIndexingNotificationState, type SearchIndexingNotificationStateWithLiterals, type SecondaryMedia, type SecondaryMediaMetadataOneOf, State, type StateWithLiterals, type Tags, type Text, type TpaPageLink, type TriggerRestoreAllGalleriesAsyncRequest, type TriggerRestoreAllGalleriesAsyncResponse, Type, type TypeWithLiterals, type URI, type UnsharpMasking, type UpdateByFilterOperation, type UpdateDocumentsEvent, type UpdateDocumentsEventOperationOneOf, type UpdateExistingOperation, type UpdateGallery, type UpdateGalleryItem, type UpdateGalleryItemIdentifiers, type UpdateGalleryItemRequest, type UpdateGalleryItemResponse, type UpdateGalleryRequest, type UpdateGalleryResponse, type Video, type VideoResolution, VideoType, type VideoTypeWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WhatsAppLink, type WixLink, type WixLinkLinkOneOf, bulkDeleteGalleryItems, createGallery, createGalleryItem, deleteGallery, deleteGalleryItem, deleteGalleryItems, getGallery, getGalleryItem, listGalleries, listGalleryItems, onGalleryCreated, onGalleryDeleted, onGalleryItemCreated, onGalleryItemDeleted, onGalleryItemUpdated, onGalleryUpdated, updateGallery, updateGalleryItem };
|