@wix/pro-gallery 1.0.32 → 1.0.34
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/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.context.d.ts +12 -0
- package/build/cjs/src/pro-gallery-v2-gallery.context.js +115 -0
- package/build/cjs/src/pro-gallery-v2-gallery.context.js.map +1 -0
- package/build/cjs/src/pro-gallery-v2-gallery.http.js +464 -240
- package/build/cjs/src/pro-gallery-v2-gallery.http.js.map +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.meta.d.ts +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.meta.js +5 -1
- package/build/cjs/src/pro-gallery-v2-gallery.meta.js.map +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.public.d.ts +6 -5
- package/build/cjs/src/pro-gallery-v2-gallery.public.js +8 -1
- package/build/cjs/src/pro-gallery-v2-gallery.public.js.map +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.types.d.ts +69 -65
- package/build/cjs/src/pro-gallery-v2-gallery.types.js +8 -8
- package/build/cjs/src/pro-gallery-v2-gallery.types.js.map +1 -1
- package/build/cjs/src/pro-gallery-v2-gallery.universal.d.ts +99 -72
- package/build/cjs/src/pro-gallery-v2-gallery.universal.js +110 -68
- package/build/cjs/src/pro-gallery-v2-gallery.universal.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/src/pro-gallery-v2-gallery.context.d.ts +12 -0
- package/build/es/src/pro-gallery-v2-gallery.context.js +102 -0
- package/build/es/src/pro-gallery-v2-gallery.context.js.map +1 -0
- package/build/es/src/pro-gallery-v2-gallery.http.js +464 -240
- package/build/es/src/pro-gallery-v2-gallery.http.js.map +1 -1
- package/build/es/src/pro-gallery-v2-gallery.meta.d.ts +1 -1
- package/build/es/src/pro-gallery-v2-gallery.public.d.ts +6 -5
- package/build/es/src/pro-gallery-v2-gallery.public.js +1 -0
- package/build/es/src/pro-gallery-v2-gallery.public.js.map +1 -1
- package/build/es/src/pro-gallery-v2-gallery.types.d.ts +69 -65
- package/build/es/src/pro-gallery-v2-gallery.types.js.map +1 -1
- package/build/es/src/pro-gallery-v2-gallery.universal.d.ts +99 -72
- package/build/es/src/pro-gallery-v2-gallery.universal.js +97 -59
- package/build/es/src/pro-gallery-v2-gallery.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +12 -6
@@ -1,9 +1,4 @@
|
|
1
|
-
|
2
|
-
verboseLogging: {
|
3
|
-
on: () => boolean;
|
4
|
-
off: () => boolean;
|
5
|
-
};
|
6
|
-
};
|
1
|
+
import { EventDefinition } from '@wix/sdk-types';
|
7
2
|
export interface Gallery {
|
8
3
|
/**
|
9
4
|
* Gallery ID.
|
@@ -475,6 +470,82 @@ export interface HtmlSiteRCPublished {
|
|
475
470
|
/** Optional branch Id */
|
476
471
|
branchId?: string | null;
|
477
472
|
}
|
473
|
+
export interface DomainEvent<T = string> extends DomainEventBodyOneOf<T> {
|
474
|
+
/** Information about a newly-created gallery. */
|
475
|
+
createdEvent?: EntityCreatedEvent<T>;
|
476
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
477
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
478
|
+
actionEvent?: ActionEvent<T>;
|
479
|
+
/**
|
480
|
+
* Unique event ID.
|
481
|
+
* Allows clients to ignore duplicate webhooks.
|
482
|
+
*/
|
483
|
+
_id?: string;
|
484
|
+
/**
|
485
|
+
* Assumes actions are also always typed to an entity_type
|
486
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
487
|
+
*/
|
488
|
+
entityFqdn?: string;
|
489
|
+
/**
|
490
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
491
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
492
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
493
|
+
*/
|
494
|
+
slug?: string;
|
495
|
+
/** ID of the entity associated with the event. */
|
496
|
+
entityId?: string;
|
497
|
+
/** Event timestamp. */
|
498
|
+
eventTime?: Date;
|
499
|
+
/**
|
500
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
501
|
+
* (for example, GDPR).
|
502
|
+
*/
|
503
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
504
|
+
/** If present, indicates the action that triggered the event. */
|
505
|
+
originatedFrom?: string | null;
|
506
|
+
/**
|
507
|
+
* A sequence number defining the order of updates to the underlying entity.
|
508
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
509
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
510
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
511
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
512
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
513
|
+
*/
|
514
|
+
entityEventSequence?: string | null;
|
515
|
+
}
|
516
|
+
export interface DomainCreatedEvent<T> extends Omit<DomainEvent<T>, 'deletedEvent' | 'updatedEvent' | 'actionEvent'> {
|
517
|
+
}
|
518
|
+
export interface DomainDeletedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'updatedEvent' | 'actionEvent'> {
|
519
|
+
}
|
520
|
+
export interface DomainUpdatedEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'actionEvent'> {
|
521
|
+
}
|
522
|
+
export interface DomainActionEvent<T> extends Omit<DomainEvent<T>, 'createdEvent' | 'deletedEvent' | 'updatedEvent'> {
|
523
|
+
}
|
524
|
+
/** @oneof */
|
525
|
+
export interface DomainEventBodyOneOf<T> {
|
526
|
+
createdEvent?: EntityCreatedEvent<T>;
|
527
|
+
updatedEvent?: EntityUpdatedEvent<T>;
|
528
|
+
deletedEvent?: EntityDeletedEvent<T>;
|
529
|
+
actionEvent?: ActionEvent<T>;
|
530
|
+
}
|
531
|
+
export interface EntityCreatedEvent<T> {
|
532
|
+
entity?: T;
|
533
|
+
}
|
534
|
+
export interface EntityUpdatedEvent<T> {
|
535
|
+
/**
|
536
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
537
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
538
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
539
|
+
*/
|
540
|
+
currentEntity?: T;
|
541
|
+
}
|
542
|
+
export interface EntityDeletedEvent<T> {
|
543
|
+
/** Entity that was deleted */
|
544
|
+
deletedEntity?: T | null;
|
545
|
+
}
|
546
|
+
export interface ActionEvent<T> {
|
547
|
+
body?: T;
|
548
|
+
}
|
478
549
|
export interface UpdateDocumentsEvent extends UpdateDocumentsEventOperationOneOf {
|
479
550
|
/** insert/update documents */
|
480
551
|
update?: DocumentUpdateOperation;
|
@@ -523,6 +594,8 @@ export interface IndexDocument {
|
|
523
594
|
permittedMemberGroups?: string[];
|
524
595
|
/** if true SEO is disabled for this document */
|
525
596
|
seoHidden?: boolean | null;
|
597
|
+
/** if true the page is a lightbox popup */
|
598
|
+
isPopup?: boolean | null;
|
526
599
|
}
|
527
600
|
export interface DocumentPayload {
|
528
601
|
/** url of the page representing the document */
|
@@ -780,72 +853,6 @@ export interface PublishGalleryResponse {
|
|
780
853
|
/** Published gallery. */
|
781
854
|
gallery?: Gallery;
|
782
855
|
}
|
783
|
-
export interface DomainEvent extends DomainEventBodyOneOf {
|
784
|
-
/** Information about a newly-created gallery. */
|
785
|
-
createdEvent?: EntityCreatedEvent;
|
786
|
-
updatedEvent?: EntityUpdatedEvent;
|
787
|
-
deletedEvent?: EntityDeletedEvent;
|
788
|
-
actionEvent?: ActionEvent;
|
789
|
-
/**
|
790
|
-
* Unique event ID.
|
791
|
-
* Allows clients to ignore duplicate webhooks.
|
792
|
-
*/
|
793
|
-
_id?: string;
|
794
|
-
/**
|
795
|
-
* Assumes actions are also always typed to an entity_type
|
796
|
-
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
797
|
-
*/
|
798
|
-
entityFqdn?: string;
|
799
|
-
/**
|
800
|
-
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
801
|
-
* This is although the created/updated/deleted notion is duplication of the oneof types
|
802
|
-
* Example: created/updated/deleted/started/completed/email_opened
|
803
|
-
*/
|
804
|
-
slug?: string;
|
805
|
-
/** ID of the entity associated with the event. */
|
806
|
-
entityId?: string;
|
807
|
-
/** Event timestamp. */
|
808
|
-
eventTime?: Date;
|
809
|
-
/**
|
810
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
811
|
-
* (for example, GDPR).
|
812
|
-
*/
|
813
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
814
|
-
/** If present, indicates the action that triggered the event. */
|
815
|
-
originatedFrom?: string | null;
|
816
|
-
/**
|
817
|
-
* A sequence number defining the order of updates to the underlying entity.
|
818
|
-
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
819
|
-
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
820
|
-
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
821
|
-
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
822
|
-
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
823
|
-
*/
|
824
|
-
entityEventSequence?: string | null;
|
825
|
-
}
|
826
|
-
/** @oneof */
|
827
|
-
export interface DomainEventBodyOneOf {
|
828
|
-
createdEvent?: EntityCreatedEvent;
|
829
|
-
updatedEvent?: EntityUpdatedEvent;
|
830
|
-
deletedEvent?: EntityDeletedEvent;
|
831
|
-
actionEvent?: ActionEvent;
|
832
|
-
}
|
833
|
-
export interface EntityCreatedEvent {
|
834
|
-
entityAsJson?: string;
|
835
|
-
}
|
836
|
-
export interface EntityUpdatedEvent {
|
837
|
-
/**
|
838
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
839
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
840
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
841
|
-
*/
|
842
|
-
currentEntityAsJson?: string;
|
843
|
-
}
|
844
|
-
export interface EntityDeletedEvent {
|
845
|
-
}
|
846
|
-
export interface ActionEvent {
|
847
|
-
bodyAsJson?: string;
|
848
|
-
}
|
849
856
|
export interface ListGalleriesResponseNonNullableFields {
|
850
857
|
galleries: {
|
851
858
|
items: {
|
@@ -1012,6 +1019,12 @@ export interface UpdateGalleryItemResponseNonNullableFields {
|
|
1012
1019
|
export interface DeleteGalleryItemResponseNonNullableFields {
|
1013
1020
|
itemId: string;
|
1014
1021
|
}
|
1022
|
+
export declare const onGalleryCreated: EventDefinition<DomainCreatedEvent<Gallery>, "wix.pro_gallery.gallery_v2_created">;
|
1023
|
+
export declare const onGalleryUpdated: EventDefinition<DomainUpdatedEvent<Gallery>, "wix.pro_gallery.gallery_v2_updated">;
|
1024
|
+
export declare const onGalleryDeleted: EventDefinition<DomainDeletedEvent<Gallery>, "wix.pro_gallery.gallery_v2_deleted">;
|
1025
|
+
export declare const onGalleryItemCreated: EventDefinition<DomainActionEvent<GalleryItemCreated>, "wix.pro_gallery.gallery_v2_gallery_item_created">;
|
1026
|
+
export declare const onGalleryItemUpdated: EventDefinition<DomainActionEvent<GalleryItemUpdated>, "wix.pro_gallery.gallery_v2_gallery_item_updated">;
|
1027
|
+
export declare const onGalleryItemDeleted: EventDefinition<DomainActionEvent<GalleryItemDeleted>, "wix.pro_gallery.gallery_v2_gallery_item_deleted">;
|
1015
1028
|
/**
|
1016
1029
|
* Retrieves a list of galleries.
|
1017
1030
|
*
|
@@ -1020,7 +1033,9 @@ export interface DeleteGalleryItemResponseNonNullableFields {
|
|
1020
1033
|
* @documentationMaturity preview
|
1021
1034
|
* @param options - Options to use when getting the list of galleries.
|
1022
1035
|
* @permissionScope Manage Galleries
|
1036
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1023
1037
|
* @permissionScope Read Galleries
|
1038
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1024
1039
|
* @applicableIdentity APP
|
1025
1040
|
* @applicableIdentity MEMBER
|
1026
1041
|
* @applicableIdentity VISITOR
|
@@ -1044,7 +1059,9 @@ export interface ListGalleriesOptions {
|
|
1044
1059
|
* @requiredField galleryId
|
1045
1060
|
* @param options - Options to use when getting the gallery.
|
1046
1061
|
* @permissionScope Manage Galleries
|
1062
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1047
1063
|
* @permissionScope Read Galleries
|
1064
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1048
1065
|
* @applicableIdentity APP
|
1049
1066
|
* @applicableIdentity MEMBER
|
1050
1067
|
* @applicableIdentity VISITOR
|
@@ -1073,7 +1090,9 @@ export interface GetGalleryOptions extends GetGalleryRequestVersionOneOf {
|
|
1073
1090
|
* @requiredField galleryId
|
1074
1091
|
* @param options - Options to use when getting the list of gallery items.
|
1075
1092
|
* @permissionScope Manage Galleries
|
1093
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1076
1094
|
* @permissionScope Read Galleries
|
1095
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1077
1096
|
* @applicableIdentity APP
|
1078
1097
|
* @applicableIdentity MEMBER
|
1079
1098
|
* @applicableIdentity VISITOR
|
@@ -1102,7 +1121,9 @@ export interface ListGalleryItemsOptions {
|
|
1102
1121
|
* @requiredField identifiers.itemId
|
1103
1122
|
* @param identifiers - Gallery ID and Item ID.
|
1104
1123
|
* @permissionScope Manage Galleries
|
1124
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1105
1125
|
* @permissionScope Read Galleries
|
1126
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
|
1106
1127
|
* @applicableIdentity APP
|
1107
1128
|
* @applicableIdentity MEMBER
|
1108
1129
|
* @applicableIdentity VISITOR
|
@@ -1143,6 +1164,7 @@ export interface GetGalleryItemIdentifiers {
|
|
1143
1164
|
* @requiredField options.gallery.items.video.videoInfo
|
1144
1165
|
* @param options - Options to use when creating the gallery.
|
1145
1166
|
* @permissionScope Manage Galleries
|
1167
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1146
1168
|
* @applicableIdentity APP
|
1147
1169
|
* @returns Created gallery.
|
1148
1170
|
*/
|
@@ -1180,6 +1202,7 @@ export interface CreateGalleryOptions {
|
|
1180
1202
|
* @param _id - ID of the gallery to update.
|
1181
1203
|
* @param gallery - The information for the gallery being updated.
|
1182
1204
|
* @permissionScope Manage Galleries
|
1205
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1183
1206
|
* @applicableIdentity APP
|
1184
1207
|
* @returns Updated gallery.
|
1185
1208
|
*/
|
@@ -1226,6 +1249,7 @@ export interface UpdateGallery {
|
|
1226
1249
|
* @documentationMaturity preview
|
1227
1250
|
* @requiredField galleryId
|
1228
1251
|
* @permissionScope Manage Galleries
|
1252
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1229
1253
|
* @applicableIdentity APP
|
1230
1254
|
*/
|
1231
1255
|
export declare function deleteGallery(galleryId: string): Promise<DeleteGalleryResponse & DeleteGalleryResponseNonNullableFields>;
|
@@ -1256,6 +1280,7 @@ export declare function deleteGallery(galleryId: string): Promise<DeleteGalleryR
|
|
1256
1280
|
* @requiredField item.text.html
|
1257
1281
|
* @requiredField item.video.videoInfo
|
1258
1282
|
* @permissionScope Manage Galleries
|
1283
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1259
1284
|
* @applicableIdentity APP
|
1260
1285
|
* @returns Created media item.
|
1261
1286
|
*/
|
@@ -1289,6 +1314,7 @@ export declare function createGalleryItem(galleryId: string, item: Item): Promis
|
|
1289
1314
|
* @param item - The information for the gallery item being updated.
|
1290
1315
|
* @param identifiers - Gallery ID and Item ID.
|
1291
1316
|
* @permissionScope Manage Galleries
|
1317
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1292
1318
|
* @applicableIdentity APP
|
1293
1319
|
* @returns Updated media item.
|
1294
1320
|
*/
|
@@ -1360,6 +1386,7 @@ export interface UpdateGalleryItem {
|
|
1360
1386
|
* @requiredField identifiers.itemId
|
1361
1387
|
* @param identifiers - Gallery ID and Item ID.
|
1362
1388
|
* @permissionScope Manage Galleries
|
1389
|
+
* @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
|
1363
1390
|
* @applicableIdentity APP
|
1364
1391
|
*/
|
1365
1392
|
export declare function deleteGalleryItem(identifiers: DeleteGalleryItemIdentifiers): Promise<DeleteGalleryItemResponse & DeleteGalleryItemResponseNonNullableFields>;
|