@wix/pro-gallery 1.0.34 → 1.0.36

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 (57) hide show
  1. package/build/cjs/context.d.ts +1 -1
  2. package/build/cjs/context.js +1 -1
  3. package/build/cjs/index.d.ts +1 -1
  4. package/build/cjs/index.js +1 -1
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/meta.d.ts +1 -1
  7. package/build/cjs/meta.js +1 -1
  8. package/build/es/context.d.ts +1 -1
  9. package/build/es/context.js +1 -1
  10. package/build/es/index.d.ts +1 -1
  11. package/build/es/index.js +1 -1
  12. package/build/es/index.js.map +1 -1
  13. package/build/es/meta.d.ts +1 -1
  14. package/build/es/meta.js +1 -1
  15. package/package.json +11 -9
  16. package/build/cjs/index.typings.d.ts +0 -1
  17. package/build/cjs/index.typings.js +0 -28
  18. package/build/cjs/index.typings.js.map +0 -1
  19. package/build/cjs/src/pro-gallery-v2-gallery.context.d.ts +0 -12
  20. package/build/cjs/src/pro-gallery-v2-gallery.context.js +0 -115
  21. package/build/cjs/src/pro-gallery-v2-gallery.context.js.map +0 -1
  22. package/build/cjs/src/pro-gallery-v2-gallery.http.d.ts +0 -130
  23. package/build/cjs/src/pro-gallery-v2-gallery.http.js +0 -823
  24. package/build/cjs/src/pro-gallery-v2-gallery.http.js.map +0 -1
  25. package/build/cjs/src/pro-gallery-v2-gallery.meta.d.ts +0 -41
  26. package/build/cjs/src/pro-gallery-v2-gallery.meta.js +0 -218
  27. package/build/cjs/src/pro-gallery-v2-gallery.meta.js.map +0 -1
  28. package/build/cjs/src/pro-gallery-v2-gallery.public.d.ts +0 -120
  29. package/build/cjs/src/pro-gallery-v2-gallery.public.js +0 -82
  30. package/build/cjs/src/pro-gallery-v2-gallery.public.js.map +0 -1
  31. package/build/cjs/src/pro-gallery-v2-gallery.types.d.ts +0 -1768
  32. package/build/cjs/src/pro-gallery-v2-gallery.types.js +0 -82
  33. package/build/cjs/src/pro-gallery-v2-gallery.types.js.map +0 -1
  34. package/build/cjs/src/pro-gallery-v2-gallery.universal.d.ts +0 -1398
  35. package/build/cjs/src/pro-gallery-v2-gallery.universal.js +0 -887
  36. package/build/cjs/src/pro-gallery-v2-gallery.universal.js.map +0 -1
  37. package/build/es/index.typings.d.ts +0 -1
  38. package/build/es/index.typings.js +0 -2
  39. package/build/es/index.typings.js.map +0 -1
  40. package/build/es/src/pro-gallery-v2-gallery.context.d.ts +0 -12
  41. package/build/es/src/pro-gallery-v2-gallery.context.js +0 -102
  42. package/build/es/src/pro-gallery-v2-gallery.context.js.map +0 -1
  43. package/build/es/src/pro-gallery-v2-gallery.http.d.ts +0 -130
  44. package/build/es/src/pro-gallery-v2-gallery.http.js +0 -810
  45. package/build/es/src/pro-gallery-v2-gallery.http.js.map +0 -1
  46. package/build/es/src/pro-gallery-v2-gallery.meta.d.ts +0 -41
  47. package/build/es/src/pro-gallery-v2-gallery.meta.js +0 -182
  48. package/build/es/src/pro-gallery-v2-gallery.meta.js.map +0 -1
  49. package/build/es/src/pro-gallery-v2-gallery.public.d.ts +0 -120
  50. package/build/es/src/pro-gallery-v2-gallery.public.js +0 -55
  51. package/build/es/src/pro-gallery-v2-gallery.public.js.map +0 -1
  52. package/build/es/src/pro-gallery-v2-gallery.types.d.ts +0 -1768
  53. package/build/es/src/pro-gallery-v2-gallery.types.js +0 -79
  54. package/build/es/src/pro-gallery-v2-gallery.types.js.map +0 -1
  55. package/build/es/src/pro-gallery-v2-gallery.universal.d.ts +0 -1398
  56. package/build/es/src/pro-gallery-v2-gallery.universal.js +0 -851
  57. package/build/es/src/pro-gallery-v2-gallery.universal.js.map +0 -1
@@ -1,1398 +0,0 @@
1
- import { EventDefinition } from '@wix/sdk-types';
2
- export interface Gallery {
3
- /**
4
- * Gallery ID.
5
- * @readonly
6
- */
7
- _id?: string | null;
8
- /** Gallery name. */
9
- name?: string | null;
10
- /**
11
- * Total number of items in the gallery.
12
- * @readonly
13
- */
14
- totalItems?: number | null;
15
- /** Media items in the gallery. */
16
- items?: Item[];
17
- /**
18
- * Index that determines which position a gallery is displayed on the site. <br />
19
- *
20
- * >**Note:** If you assign the same sort order index to more than one gallery, the function fails.
21
- */
22
- sortOrder?: number | null;
23
- /**
24
- * Date and time the gallery was created.
25
- * @readonly
26
- */
27
- _createdDate?: Date;
28
- }
29
- export interface Item extends ItemMetadataOneOf {
30
- /** Details about the image. */
31
- image?: Image;
32
- /** Details about the video. */
33
- video?: Video;
34
- /** Details about the text file. */
35
- text?: Text;
36
- /**
37
- * Item ID.
38
- * @readonly
39
- */
40
- _id?: string | null;
41
- /**
42
- * Index that determines which position a media item is displayed in the gallery. <br />
43
- *
44
- * Default: [Epoch](https://www.epoch101.com/) timestamp. <br />
45
- *
46
- * >**Note:** If you assign the same sort order index to more than one media item in a gallery, the function fails.
47
- */
48
- sortOrder?: number | null;
49
- /** Item title. */
50
- title?: string | null;
51
- /** Item description. */
52
- description?: string | null;
53
- /** Link from the item. You can link to Wix sites or external URLs. */
54
- link?: Link;
55
- /** @readonly */
56
- type?: Type;
57
- /**
58
- * Date and time the item was created.
59
- * @readonly
60
- */
61
- _createdDate?: Date;
62
- /**
63
- * Date and time the item was last updated.
64
- * @readonly
65
- */
66
- _updatedDate?: Date;
67
- /** Item tags. */
68
- tags?: Tags;
69
- }
70
- /** @oneof */
71
- export interface ItemMetadataOneOf {
72
- /** Details about the image. */
73
- image?: Image;
74
- /** Details about the video. */
75
- video?: Video;
76
- /** Details about the text file. */
77
- text?: Text;
78
- }
79
- export interface Link {
80
- /** Display text of the link. */
81
- text?: string | null;
82
- /** Target URL of the link. */
83
- url?: string | null;
84
- }
85
- export declare enum LinkType {
86
- UNDEFINED = "UNDEFINED",
87
- /** external link */
88
- EXTERNAL = "EXTERNAL",
89
- /** for internal usage using wixLinkData */
90
- INTERNAL = "INTERNAL"
91
- }
92
- /** The link object generated by panels in the editor and used by applications in Wix */
93
- export interface WixLink extends WixLinkLinkOneOf {
94
- /** External link type */
95
- external?: ExternalLink;
96
- /** Page link type */
97
- page?: PageLink;
98
- /** Anchor link type */
99
- anchor?: AnchorLink;
100
- /** Dynamic page link type */
101
- dynamicPage?: DynamicPageLink;
102
- /** Document link type */
103
- document?: DocumentLink;
104
- /** Email link type */
105
- email?: EmailLink;
106
- /** Phone link type */
107
- phone?: PhoneLink;
108
- /** Address link type */
109
- address?: AddressLink;
110
- /** WhatsApp link type */
111
- whatsApp?: WhatsAppLink;
112
- /** TPA link type */
113
- tpaPage?: TpaPageLink;
114
- }
115
- /** @oneof */
116
- export interface WixLinkLinkOneOf {
117
- /** External link type */
118
- external?: ExternalLink;
119
- /** Page link type */
120
- page?: PageLink;
121
- /** Anchor link type */
122
- anchor?: AnchorLink;
123
- /** Dynamic page link type */
124
- dynamicPage?: DynamicPageLink;
125
- /** Document link type */
126
- document?: DocumentLink;
127
- /** Email link type */
128
- email?: EmailLink;
129
- /** Phone link type */
130
- phone?: PhoneLink;
131
- /** Address link type */
132
- address?: AddressLink;
133
- /** WhatsApp link type */
134
- whatsApp?: WhatsAppLink;
135
- /** TPA link type */
136
- tpaPage?: TpaPageLink;
137
- }
138
- export interface ExternalLink {
139
- /** The url of the page */
140
- url?: string;
141
- /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
142
- target?: string | null;
143
- }
144
- export interface PageLink {
145
- /** The page id we want from the site */
146
- pageId?: string;
147
- /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
148
- target?: string | null;
149
- /** rel of link */
150
- rel?: LinkRel[];
151
- }
152
- /**
153
- * The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document.
154
- * Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel
155
- * Following are the accepted 'rel' types by Wix applications.
156
- */
157
- export declare enum LinkRel {
158
- /** default (not implemented) */
159
- unknown_link_rel = "unknown_link_rel",
160
- /** Indicates that the current document's original author or publisher does not endorse the referenced document. */
161
- nofollow = "nofollow",
162
- /** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */
163
- noopener = "noopener",
164
- /** No Referer header will be included. Additionally, has the same effect as noopener. */
165
- noreferrer = "noreferrer",
166
- /** Indicates a link that resulted from advertisements or paid placements. */
167
- sponsored = "sponsored"
168
- }
169
- export interface AnchorLink {
170
- /** The name of the anchor */
171
- anchorName?: string;
172
- /** The data id (from the JSON page) of the anchor that should be used */
173
- anchorDataId?: string;
174
- /** The page id we want from the site */
175
- pageId?: string;
176
- /** rel of link */
177
- rel?: LinkRel[];
178
- }
179
- export interface DynamicPageLink {
180
- /** The router that handles this link */
181
- routerId?: string;
182
- /** The path data we'd like */
183
- innerRoute?: string;
184
- /** The data id (from the JSON page) of the anchor that should be used */
185
- anchorDataId?: string | null;
186
- /** rel of link */
187
- rel?: LinkRel[];
188
- }
189
- export interface DocumentLink {
190
- /** The id of the document */
191
- docId?: string;
192
- /** The name of the document for download purposes */
193
- name?: string | null;
194
- /** If this document can be indexed by scrapers, default is false */
195
- indexable?: boolean;
196
- }
197
- export interface EmailLink {
198
- /** The email we will be sending a message to */
199
- recipient?: string;
200
- /** The subject of the email */
201
- subject?: string | null;
202
- /** The body of the email */
203
- body?: string | null;
204
- }
205
- export interface PhoneLink {
206
- /** The phone number we want to link to */
207
- phoneNumber?: string;
208
- }
209
- export interface AddressLink {
210
- /** An address that we can link to */
211
- address?: string;
212
- }
213
- export interface WhatsAppLink {
214
- /** The whatsApp phone number we want to connect with */
215
- phoneNumber?: string;
216
- }
217
- /** Link to a TPA page */
218
- export interface TpaPageLink {
219
- /** Type of item (e.g. 'wix.stores.sub_pages.product') */
220
- itemTypeIdentifier?: string;
221
- /** Id of linked item */
222
- itemId?: string;
223
- /** Id of linked page */
224
- pageId?: string;
225
- /** Id of app being linked to (AppDefId) */
226
- appDefinitionId?: string;
227
- /** The relativepath of linked page */
228
- path?: string;
229
- /** rel of link */
230
- rel?: LinkRel[];
231
- }
232
- export declare enum Type {
233
- UNDEFINED = "UNDEFINED",
234
- IMAGE = "IMAGE",
235
- VIDEO = "VIDEO",
236
- TEXT = "TEXT"
237
- }
238
- export interface Image {
239
- /** The image's Wix media URL in the following format: `'wix:image://v1/<uri>/<filename>#originWidth=<width>&originHeight=<height>[&watermark=<watermark_manifest_string>]'`. */
240
- imageInfo?: string;
241
- /** Focal point of the image. */
242
- focalPoint?: Point;
243
- /** Set of key-value pairs describing the media in [Exchangeable Image File format](https://en.wikipedia.org/wiki/Exif). */
244
- exif?: Record<string, any> | null;
245
- /**
246
- * Image compression level. <br />
247
- *
248
- * Min: `30` <br />
249
- * Max: `100`
250
- */
251
- quality?: number | null;
252
- /** [Unsharp masking](https://en.wikipedia.org/wiki/Unsharp_masking) values of the image. */
253
- unsharpMasking?: UnsharpMasking;
254
- }
255
- export declare enum ImageType {
256
- UNDEFINED = "UNDEFINED",
257
- WIX_MEDIA = "WIX_MEDIA",
258
- EXTERNAL = "EXTERNAL"
259
- }
260
- export interface Point {
261
- /** X-coordinate of the focal point. */
262
- x?: number;
263
- /** Y-coordinate of the focal point. */
264
- y?: number;
265
- }
266
- export interface UnsharpMasking {
267
- /**
268
- * Unsharp masking amount. Controls the sharpening strength. <br />
269
- *
270
- * Min: `0` <br />
271
- * Max: `5`
272
- */
273
- amount?: number | null;
274
- /** Unsharp masking radius in pixels. Controls the sharpening width. */
275
- radius?: number | null;
276
- /**
277
- * Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply. <br />
278
- *
279
- * Min: `0` <br />
280
- * Max: `1`
281
- */
282
- threshold?: number | null;
283
- }
284
- export interface Video {
285
- type?: VideoType;
286
- /**
287
- * The video's URL. Either a Wix media URL, or a supported https external URL in the following formats:
288
- *
289
- * Wix Media: `'wix:video://v1/6e6ea4_461425d7e7db4d5487a28e00c5ba6244/9e6ea4_461425d7e7db4d5487a28e00c5ba6277#posterUri=9e6ea4_461425d7e7db4d5487a28e00c5ba6277f000.jpg&posterWidth=960&posterHeight=540'`
290
- *
291
- * Vimeo: `'https://vimeo.com/378840916'`
292
- *
293
- * Youtube: `'https://www.youtube.com/results?search_query=uplifting+upbeat+music'`
294
- */
295
- videoInfo?: string;
296
- /** Manually defined video duration in milliseconds. */
297
- durationInMillis?: number | null;
298
- }
299
- export declare enum VideoType {
300
- UNDEFINED = "UNDEFINED",
301
- WIX_MEDIA = "WIX_MEDIA",
302
- YOUTUBE = "YOUTUBE",
303
- VIMEO = "VIMEO"
304
- }
305
- export interface VideoResolution {
306
- /** *Required.** Video URL. */
307
- url?: string;
308
- /** *Required.** Video height. */
309
- height?: number;
310
- /** *Required.** Video width. */
311
- width?: number;
312
- /** *Required.** Video format. For example, `mp4` or `hls`. */
313
- format?: string;
314
- /** Video quality. For example, `480p` or `720p`. */
315
- quality?: string | null;
316
- /** Video filename. */
317
- filename?: string | null;
318
- }
319
- export interface Text {
320
- /** Text in HTML format. */
321
- html?: string | null;
322
- /**
323
- * Set of key-value pairs describing the [CSS style](https://en.wikipedia.org/wiki/CSS) of the text.
324
- *
325
- * __Note:__ The object structure is customizable. See the [List Gallery Items](https://dev.wix.com/api/rest/site-content/pro-gallery/list-gallery-items) code example for supported values.
326
- */
327
- css?: Record<string, any> | null;
328
- /** Reserved for internal use. */
329
- editorHtml?: string | null;
330
- /** Reserved for internal use. */
331
- editorFontId?: string | null;
332
- }
333
- export interface Tags {
334
- /** List of tags assigned to the media item. */
335
- values?: string[];
336
- }
337
- export interface SecondaryMedia extends SecondaryMediaMetadataOneOf {
338
- /** secondary media photo metadata (optional) */
339
- image?: Image;
340
- /** secondary media text metadata (optional) */
341
- text?: Text;
342
- }
343
- /** @oneof */
344
- export interface SecondaryMediaMetadataOneOf {
345
- /** secondary media photo metadata (optional) */
346
- image?: Image;
347
- /** secondary media text metadata (optional) */
348
- text?: Text;
349
- }
350
- export interface InvalidateCache extends InvalidateCacheGetByOneOf {
351
- /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
352
- metaSiteId?: string;
353
- /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
354
- siteId?: string;
355
- /** Invalidate by App */
356
- app?: App;
357
- /** Invalidate by page id */
358
- page?: Page;
359
- /** Invalidate by URI path */
360
- uri?: URI;
361
- /** tell us why you're invalidating the cache. You don't need to add your app name */
362
- reason?: string | null;
363
- /** Is local DS */
364
- localDc?: boolean;
365
- }
366
- /** @oneof */
367
- export interface InvalidateCacheGetByOneOf {
368
- /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */
369
- metaSiteId?: string;
370
- /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */
371
- siteId?: string;
372
- /** Invalidate by App */
373
- app?: App;
374
- /** Invalidate by page id */
375
- page?: Page;
376
- /** Invalidate by URI path */
377
- uri?: URI;
378
- }
379
- export interface App {
380
- /** The AppDefId */
381
- appDefId?: string;
382
- /** The instance Id */
383
- instanceId?: string;
384
- }
385
- export interface Page {
386
- /** the msid the page is on */
387
- metaSiteId?: string;
388
- /** Invalidate by Page ID */
389
- pageId?: string;
390
- }
391
- export interface URI {
392
- /** the msid the URI is on */
393
- metaSiteId?: string;
394
- /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */
395
- uriPath?: string;
396
- }
397
- export interface GalleryPublished {
398
- /**
399
- * id of the gallery that will be published
400
- * @readonly
401
- */
402
- galleryId?: string;
403
- isRc?: boolean;
404
- /** @readonly */
405
- newRevision?: Date;
406
- /** @readonly */
407
- oldRevision?: Date;
408
- }
409
- export interface CleanDeletedGalleriesEvent {
410
- /** @readonly */
411
- instanceId?: string;
412
- /** @readonly */
413
- metaSiteId?: string;
414
- /** @readonly */
415
- htmlSiteRevision?: string;
416
- /** @readonly */
417
- timeSitePublished?: Date;
418
- }
419
- export interface ProgallerypublisherPublishGalleryRequest {
420
- /** id of the gallery that will be published */
421
- galleryId?: string;
422
- }
423
- export interface ProgallerypublisherPublishGalleryResponse {
424
- }
425
- export interface PublishGalleryItemRequest {
426
- /** id of the gallery that will be published */
427
- galleryId?: string;
428
- /** id of the item that will be published */
429
- itemId?: string;
430
- }
431
- export interface PublishGalleryItemResponse {
432
- }
433
- export interface PublishGalleryItemsRequest {
434
- /** id of the gallery that will be published */
435
- galleryId?: string;
436
- /** ids of the items that will be published */
437
- itemIds?: string[];
438
- }
439
- export interface PublishGalleryItemsResponse {
440
- }
441
- export interface Empty {
442
- }
443
- export interface HtmlSitePublished {
444
- /** Application instance ID */
445
- appInstanceId?: string;
446
- /** Application type */
447
- appType?: string;
448
- /** Revision */
449
- revision?: string;
450
- /** MSID */
451
- metaSiteId?: string | null;
452
- /** optional branch id if publish is done from branch */
453
- branchId?: string | null;
454
- /** The site's last transactionId */
455
- lastTransactionId?: string | null;
456
- /** A list of the site's pages */
457
- pages?: EventsPage[];
458
- /** Site's publish date */
459
- publishDate?: string;
460
- }
461
- export interface EventsPage {
462
- /** Page's Id */
463
- _id?: string;
464
- }
465
- export interface HtmlSiteRCPublished {
466
- /** Application instance ID */
467
- appInstanceId?: string;
468
- /** Revision */
469
- revision?: string;
470
- /** Optional branch Id */
471
- branchId?: string | null;
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
- }
549
- export interface UpdateDocumentsEvent extends UpdateDocumentsEventOperationOneOf {
550
- /** insert/update documents */
551
- update?: DocumentUpdateOperation;
552
- /** delete by document ids */
553
- deleteByIds?: DeleteByIdsOperation;
554
- /** delete documents matching filter */
555
- deleteByFilter?: DeleteByFilterOperation;
556
- /** update documents matching filter */
557
- updateByFilter?: UpdateByFilterOperation;
558
- /** update only existing documents */
559
- updateExisting?: UpdateExistingOperation;
560
- /** application which owns documents */
561
- appDefId?: string | null;
562
- /** type of the documents */
563
- documentType?: string | null;
564
- /** language of the documents */
565
- language?: string | null;
566
- /** site documents belong to */
567
- msId?: string | null;
568
- }
569
- /** @oneof */
570
- export interface UpdateDocumentsEventOperationOneOf {
571
- /** insert/update documents */
572
- update?: DocumentUpdateOperation;
573
- /** delete by document ids */
574
- deleteByIds?: DeleteByIdsOperation;
575
- /** delete documents matching filter */
576
- deleteByFilter?: DeleteByFilterOperation;
577
- /** update documents matching filter */
578
- updateByFilter?: UpdateByFilterOperation;
579
- /** update only existing documents */
580
- updateExisting?: UpdateExistingOperation;
581
- }
582
- export interface DocumentUpdateOperation {
583
- /** documents to index or update */
584
- documents?: IndexDocument[];
585
- }
586
- export interface IndexDocument {
587
- /** data bag with non-searchable fields (url, image) */
588
- payload?: DocumentPayload;
589
- /** what type of users should documents be visible to */
590
- exposure?: Enum;
591
- /** document with mandatory fields (id, title, description) and with fields specific to the type of the document */
592
- document?: Record<string, any> | null;
593
- /** what member groups is the document exposed to. Used only with GROUP_PROTECTED exposure */
594
- permittedMemberGroups?: string[];
595
- /** if true SEO is disabled for this document */
596
- seoHidden?: boolean | null;
597
- /** if true the page is a lightbox popup */
598
- isPopup?: boolean | null;
599
- }
600
- export interface DocumentPayload {
601
- /** url of the page representing the document */
602
- url?: string | null;
603
- /** image which represents the document */
604
- documentImage?: DocumentImage;
605
- }
606
- export interface DocumentImage {
607
- /** the name of the image */
608
- name?: string;
609
- /** the width of the image */
610
- width?: number;
611
- /** the height of the image */
612
- height?: number;
613
- }
614
- export declare enum Enum {
615
- /** Default value. Means that permission not set */
616
- UNKNOWN = "UNKNOWN",
617
- /** Protected exposure. Exposed to members and owners */
618
- PROTECTED = "PROTECTED",
619
- /** Private exposure. Exposed to owners */
620
- PRIVATE = "PRIVATE",
621
- /** Public exposure. Visible to everyone */
622
- PUBLIC = "PUBLIC",
623
- /** Used for partial updates, to state that exposure is not changing */
624
- UNCHANGED = "UNCHANGED",
625
- /** Protected to members of permitted groups and owners */
626
- GROUP_PROTECTED = "GROUP_PROTECTED"
627
- }
628
- export interface DeleteByIdsOperation {
629
- /** ids of the documents to delete */
630
- documentIds?: string[];
631
- }
632
- export interface DeleteByFilterOperation {
633
- /** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */
634
- filter?: Record<string, any> | null;
635
- }
636
- export interface UpdateByFilterOperation {
637
- /** documents matching this filter will be updated */
638
- filter?: Record<string, any> | null;
639
- /** partial document to apply */
640
- document?: IndexDocument;
641
- }
642
- export interface UpdateExistingOperation {
643
- /** documents to update */
644
- documents?: IndexDocument[];
645
- }
646
- export interface SearchIndexingNotification {
647
- /** new state of indexing for the site specified in ms_id */
648
- indexState?: SearchIndexingNotificationState;
649
- /** type of the document the notification is targeted for. Applies to all types if not provided */
650
- documentType?: string | null;
651
- /** languaInternalDocumentUpdateByFilterOperationge the notification is targeted for. Applies to all languages if not provided */
652
- language?: string | null;
653
- /** site for which notification is targeted */
654
- msId?: string | null;
655
- }
656
- export declare enum SearchIndexingNotificationState {
657
- /** default state */
658
- Unknown = "Unknown",
659
- /** metasite does not require site search indexing */
660
- Off = "Off",
661
- /** metasite requires site search indexing */
662
- On = "On"
663
- }
664
- export interface ListGalleriesItemsRequest {
665
- /** IDs of the media items to retrieve. */
666
- itemsId?: ItemId[];
667
- }
668
- export interface ItemId {
669
- /** Gallery ID. */
670
- galleryId?: string;
671
- /** Item ID. */
672
- itemId?: string;
673
- }
674
- export interface ListGalleriesItemsResponse {
675
- /** Retrieved media items. */
676
- itemsInGalleries?: ItemsInGallery[];
677
- }
678
- export interface ItemsInGallery {
679
- /** Gallery ID. */
680
- galleryId?: string;
681
- /** Retrieved media items. */
682
- items?: Item[];
683
- }
684
- export interface GalleryItemCreated {
685
- /** Created gallery item. */
686
- item?: Item;
687
- }
688
- export interface GalleryItemUpdated {
689
- /** Updated gallery item. */
690
- updatedItem?: Item;
691
- }
692
- export interface GalleryItemDeleted {
693
- /** ID of the deleted gallery item. */
694
- itemId?: string;
695
- }
696
- export interface ListGalleriesRequest {
697
- /** Number of galleries to list. Defaults to 10. */
698
- itemLimit?: number | null;
699
- /** Number of galleries to skip in the returns. Defaults to 0. */
700
- offset?: number | null;
701
- /** Number of galleries to list. Defaults to 10. */
702
- limit?: number | null;
703
- }
704
- export declare enum State {
705
- UNDEFINED = "UNDEFINED",
706
- /** The gallery in the Editor segment */
707
- SAVED = "SAVED",
708
- /** The gallery in the LiveSite segment */
709
- PUBLISHED = "PUBLISHED"
710
- }
711
- export interface ListGalleriesResponse {
712
- /** Total number of galleries in the site. */
713
- totalGalleries?: number | null;
714
- /** List of galleries. Sorted by `_createdDate`. */
715
- galleries?: Gallery[];
716
- }
717
- export interface GetGalleryRequest extends GetGalleryRequestVersionOneOf {
718
- /** Gallery ID. */
719
- galleryId: string;
720
- /** Number of media items to skip in the returns. Defaults to 0. */
721
- itemOffset?: number | null;
722
- /**
723
- * Maximum number of media items to return. <br />
724
- *
725
- * Min: `1` <br />
726
- * Max: `100` <br />
727
- * Default: `50`
728
- */
729
- itemLimit?: number | null;
730
- }
731
- /** @oneof */
732
- export interface GetGalleryRequestVersionOneOf {
733
- }
734
- export interface GetGalleryResponse {
735
- /** Returned gallery. */
736
- gallery?: Gallery;
737
- }
738
- export interface ListGalleryItemsRequest {
739
- /** Gallery ID. */
740
- galleryId: string;
741
- /** Number of media items to skip in the returns. Defaults to 0. */
742
- itemOffset?: number | null;
743
- /**
744
- * Maximum number of media items to return. <br />
745
- *
746
- * Min: `1` <br />
747
- * Max: `100` <br />
748
- * Default: `50`
749
- */
750
- itemLimit?: number | null;
751
- }
752
- export interface ListGalleryItemsResponse {
753
- /** List of media items in the gallery. */
754
- items?: Item[];
755
- }
756
- export interface GetGalleryItemRequest {
757
- /** Gallery ID. */
758
- galleryId: string;
759
- /** Item ID. */
760
- itemId: string;
761
- }
762
- export interface GetGalleryItemResponse {
763
- /** Returned media item. */
764
- item?: Item;
765
- }
766
- export interface CreateGalleryRequest {
767
- /** Gallery to create. */
768
- gallery?: Gallery;
769
- /** Gallery ID to clone from. */
770
- cloneFromGalleryId?: string | null;
771
- }
772
- export interface CreateGalleryResponse {
773
- /** Created gallery. */
774
- gallery?: Gallery;
775
- }
776
- export interface UpdateGalleryRequest {
777
- /** Gallery to update. */
778
- gallery: Gallery;
779
- }
780
- export interface UpdateGalleryResponse {
781
- /** Updated gallery. */
782
- gallery?: Gallery;
783
- }
784
- export interface DeleteGalleryRequest {
785
- /** ID of the gallery to delete. */
786
- galleryId: string;
787
- }
788
- export interface DeleteGalleryResponse {
789
- /**
790
- * ID of the deleted gallery.
791
- * @readonly
792
- */
793
- galleryId?: string;
794
- }
795
- export interface DeleteGalleryItemsRequest {
796
- /** Gallery ID. */
797
- galleryId?: string;
798
- /** ID of the media item to delete. */
799
- itemsIds?: string[];
800
- }
801
- export interface DeleteGalleryItemsResponse {
802
- /** Gallery that previously included the deleted media item. */
803
- gallery?: Gallery;
804
- }
805
- export interface CreateGalleryItemRequest {
806
- /** Gallery ID. */
807
- galleryId: string;
808
- /** Media item to create. */
809
- item: Item;
810
- }
811
- export interface CreateGalleryItemResponse {
812
- /** Created media item. */
813
- item?: Item;
814
- }
815
- export interface CreateGalleryItemsRequest {
816
- /** Gallery ID. */
817
- galleryId?: string;
818
- /** Media items to create. */
819
- items?: Item[];
820
- }
821
- export interface CreateGalleryItemsResponse {
822
- /** Created media items. */
823
- items?: Item[];
824
- }
825
- export interface UpdateGalleryItemRequest {
826
- /** Gallery ID. */
827
- galleryId: string;
828
- /** The information for the media item being updated. */
829
- item: Item;
830
- }
831
- export interface UpdateGalleryItemResponse {
832
- /** Updated media item. */
833
- item?: Item;
834
- }
835
- export interface DeleteGalleryItemRequest {
836
- /** Gallery ID. */
837
- galleryId: string;
838
- /** ID of the media item to delete. */
839
- itemId: string;
840
- }
841
- export interface DeleteGalleryItemResponse {
842
- /**
843
- * ID of the deleted media item.
844
- * @readonly
845
- */
846
- itemId?: string;
847
- }
848
- export interface PublishGalleryRequest {
849
- /** ID of the gallery to publish. */
850
- galleryId?: string;
851
- }
852
- export interface PublishGalleryResponse {
853
- /** Published gallery. */
854
- gallery?: Gallery;
855
- }
856
- export interface ListGalleriesResponseNonNullableFields {
857
- galleries: {
858
- items: {
859
- image?: {
860
- imageInfo: string;
861
- focalPoint?: {
862
- x: number;
863
- y: number;
864
- };
865
- };
866
- video?: {
867
- type: VideoType;
868
- videoInfo: string;
869
- };
870
- type: Type;
871
- tags?: {
872
- values: string[];
873
- };
874
- }[];
875
- }[];
876
- }
877
- export interface GetGalleryResponseNonNullableFields {
878
- gallery?: {
879
- items: {
880
- image?: {
881
- imageInfo: string;
882
- focalPoint?: {
883
- x: number;
884
- y: number;
885
- };
886
- };
887
- video?: {
888
- type: VideoType;
889
- videoInfo: string;
890
- };
891
- type: Type;
892
- tags?: {
893
- values: string[];
894
- };
895
- }[];
896
- };
897
- }
898
- export interface ListGalleryItemsResponseNonNullableFields {
899
- items: {
900
- image?: {
901
- imageInfo: string;
902
- focalPoint?: {
903
- x: number;
904
- y: number;
905
- };
906
- };
907
- video?: {
908
- type: VideoType;
909
- videoInfo: string;
910
- };
911
- type: Type;
912
- tags?: {
913
- values: string[];
914
- };
915
- }[];
916
- }
917
- export interface GetGalleryItemResponseNonNullableFields {
918
- item?: {
919
- image?: {
920
- imageInfo: string;
921
- focalPoint?: {
922
- x: number;
923
- y: number;
924
- };
925
- };
926
- video?: {
927
- type: VideoType;
928
- videoInfo: string;
929
- };
930
- type: Type;
931
- tags?: {
932
- values: string[];
933
- };
934
- };
935
- }
936
- export interface CreateGalleryResponseNonNullableFields {
937
- gallery?: {
938
- items: {
939
- image?: {
940
- imageInfo: string;
941
- focalPoint?: {
942
- x: number;
943
- y: number;
944
- };
945
- };
946
- video?: {
947
- type: VideoType;
948
- videoInfo: string;
949
- };
950
- type: Type;
951
- tags?: {
952
- values: string[];
953
- };
954
- }[];
955
- };
956
- }
957
- export interface UpdateGalleryResponseNonNullableFields {
958
- gallery?: {
959
- items: {
960
- image?: {
961
- imageInfo: string;
962
- focalPoint?: {
963
- x: number;
964
- y: number;
965
- };
966
- };
967
- video?: {
968
- type: VideoType;
969
- videoInfo: string;
970
- };
971
- type: Type;
972
- tags?: {
973
- values: string[];
974
- };
975
- }[];
976
- };
977
- }
978
- export interface DeleteGalleryResponseNonNullableFields {
979
- galleryId: string;
980
- }
981
- export interface CreateGalleryItemResponseNonNullableFields {
982
- item?: {
983
- image?: {
984
- imageInfo: string;
985
- focalPoint?: {
986
- x: number;
987
- y: number;
988
- };
989
- };
990
- video?: {
991
- type: VideoType;
992
- videoInfo: string;
993
- };
994
- type: Type;
995
- tags?: {
996
- values: string[];
997
- };
998
- };
999
- }
1000
- export interface UpdateGalleryItemResponseNonNullableFields {
1001
- item?: {
1002
- image?: {
1003
- imageInfo: string;
1004
- focalPoint?: {
1005
- x: number;
1006
- y: number;
1007
- };
1008
- };
1009
- video?: {
1010
- type: VideoType;
1011
- videoInfo: string;
1012
- };
1013
- type: Type;
1014
- tags?: {
1015
- values: string[];
1016
- };
1017
- };
1018
- }
1019
- export interface DeleteGalleryItemResponseNonNullableFields {
1020
- itemId: string;
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">;
1028
- /**
1029
- * Retrieves a list of galleries.
1030
- *
1031
- * The `listGalleries()` function returns a Promise that resolves to 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.
1032
- * @public
1033
- * @documentationMaturity preview
1034
- * @param options - Options to use when getting the list of galleries.
1035
- * @permissionScope Manage Galleries
1036
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1037
- * @permissionScope Read Galleries
1038
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
1039
- * @applicableIdentity APP
1040
- * @applicableIdentity MEMBER
1041
- * @applicableIdentity VISITOR
1042
- */
1043
- export declare function listGalleries(options?: ListGalleriesOptions): Promise<ListGalleriesResponse & ListGalleriesResponseNonNullableFields>;
1044
- export interface ListGalleriesOptions {
1045
- /** Number of galleries to list. Defaults to 10. */
1046
- itemLimit?: number | null;
1047
- /** Number of galleries to skip in the returns. Defaults to 0. */
1048
- offset?: number | null;
1049
- /** Number of galleries to list. Defaults to 10. */
1050
- limit?: number | null;
1051
- }
1052
- /**
1053
- * Gets a gallery by ID.
1054
- *
1055
- * The `getGallery()` function returns a Promise that resolves to a gallery whose ID matches the given ID.
1056
- * @param galleryId - Gallery ID.
1057
- * @public
1058
- * @documentationMaturity preview
1059
- * @requiredField galleryId
1060
- * @param options - Options to use when getting the gallery.
1061
- * @permissionScope Manage Galleries
1062
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1063
- * @permissionScope Read Galleries
1064
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
1065
- * @applicableIdentity APP
1066
- * @applicableIdentity MEMBER
1067
- * @applicableIdentity VISITOR
1068
- * @returns Returned gallery.
1069
- */
1070
- export declare function getGallery(galleryId: string, options?: GetGalleryOptions): Promise<Gallery & NonNullable<GetGalleryResponseNonNullableFields>['gallery']>;
1071
- export interface GetGalleryOptions extends GetGalleryRequestVersionOneOf {
1072
- /** Number of media items to skip in the returns. Defaults to 0. */
1073
- itemOffset?: number | null;
1074
- /**
1075
- * Maximum number of media items to return. <br />
1076
- *
1077
- * Min: `1` <br />
1078
- * Max: `100` <br />
1079
- * Default: `50`
1080
- */
1081
- itemLimit?: number | null;
1082
- }
1083
- /**
1084
- * Retrieves a list of media items in a specified gallery.
1085
- *
1086
- * The `listGalleryItems()` function returns a Promise that resolves to a list of up to 100 gallery items. The gallery items are listed by `sortOrder` in descending order.
1087
- * @param galleryId - Gallery ID.
1088
- * @public
1089
- * @documentationMaturity preview
1090
- * @requiredField galleryId
1091
- * @param options - Options to use when getting the list of gallery items.
1092
- * @permissionScope Manage Galleries
1093
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1094
- * @permissionScope Read Galleries
1095
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
1096
- * @applicableIdentity APP
1097
- * @applicableIdentity MEMBER
1098
- * @applicableIdentity VISITOR
1099
- */
1100
- export declare function listGalleryItems(galleryId: string, options?: ListGalleryItemsOptions): Promise<ListGalleryItemsResponse & ListGalleryItemsResponseNonNullableFields>;
1101
- export interface ListGalleryItemsOptions {
1102
- /** Number of media items to skip in the returns. Defaults to 0. */
1103
- itemOffset?: number | null;
1104
- /**
1105
- * Maximum number of media items to return. <br />
1106
- *
1107
- * Min: `1` <br />
1108
- * Max: `100` <br />
1109
- * Default: `50`
1110
- */
1111
- itemLimit?: number | null;
1112
- }
1113
- /**
1114
- * Gets a gallery item by ID.
1115
- *
1116
- * The `getGalleryItem()` function returns a Promise that resolves to a media item in a specified gallery whose ID matches the given ID.
1117
- * @public
1118
- * @documentationMaturity preview
1119
- * @requiredField identifiers
1120
- * @requiredField identifiers.galleryId
1121
- * @requiredField identifiers.itemId
1122
- * @param identifiers - Gallery ID and Item ID.
1123
- * @permissionScope Manage Galleries
1124
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1125
- * @permissionScope Read Galleries
1126
- * @permissionScopeId SCOPE.DC-PROGALLERY.READ-GALLERIES
1127
- * @applicableIdentity APP
1128
- * @applicableIdentity MEMBER
1129
- * @applicableIdentity VISITOR
1130
- * @returns Returned media item.
1131
- */
1132
- export declare function getGalleryItem(identifiers: GetGalleryItemIdentifiers): Promise<Item & NonNullable<GetGalleryItemResponseNonNullableFields>['item']>;
1133
- export interface GetGalleryItemIdentifiers {
1134
- /** Gallery ID. */
1135
- galleryId: string;
1136
- /** Item ID. */
1137
- itemId: string;
1138
- }
1139
- /**
1140
- * Creates a gallery.
1141
- *
1142
- * The `createGallery()` function returns a Promise that resolves to a newly-created gallery after it has successfully been created.
1143
- *
1144
- * 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.
1145
- *
1146
- * 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).
1147
- *
1148
- * <blockquote class="important">
1149
- *
1150
- * __Important:__
1151
- * 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.
1152
- *
1153
- * </blockquote>
1154
- *
1155
- * #### Override permissions
1156
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1157
- * <blockquote class='warning'>
1158
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1159
- * </blockquote>
1160
- * @public
1161
- * @documentationMaturity preview
1162
- * @requiredField options.gallery.items.image.imageInfo
1163
- * @requiredField options.gallery.items.text.html
1164
- * @requiredField options.gallery.items.video.videoInfo
1165
- * @param options - Options to use when creating the gallery.
1166
- * @permissionScope Manage Galleries
1167
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1168
- * @applicableIdentity APP
1169
- * @returns Created gallery.
1170
- */
1171
- export declare function createGallery(options?: CreateGalleryOptions): Promise<Gallery & NonNullable<CreateGalleryResponseNonNullableFields>['gallery']>;
1172
- export interface CreateGalleryOptions {
1173
- /** Gallery to create. */
1174
- gallery?: Gallery;
1175
- /** Gallery ID to clone from. */
1176
- cloneFromGalleryId?: string | null;
1177
- }
1178
- /**
1179
- * Updates a gallery.
1180
- *
1181
- * The `updateGallery()` function returns a Promise that resolves to an updated gallery. Only the fields in the `gallery` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
1182
- *
1183
- * <blockquote class="important">
1184
- *
1185
- * __Important:__
1186
- * 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.
1187
- *
1188
- * </blockquote>
1189
- *
1190
- * #### Override permissions
1191
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1192
- * <blockquote class='warning'>
1193
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1194
- * </blockquote>
1195
- * @public
1196
- * @documentationMaturity preview
1197
- * @requiredField _id
1198
- * @requiredField gallery
1199
- * @requiredField gallery.items.image.imageInfo
1200
- * @requiredField gallery.items.text.html
1201
- * @requiredField gallery.items.video.videoInfo
1202
- * @param _id - ID of the gallery to update.
1203
- * @param gallery - The information for the gallery being updated.
1204
- * @permissionScope Manage Galleries
1205
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1206
- * @applicableIdentity APP
1207
- * @returns Updated gallery.
1208
- */
1209
- export declare function updateGallery(_id: string | null, gallery: UpdateGallery): Promise<Gallery & NonNullable<UpdateGalleryResponseNonNullableFields>['gallery']>;
1210
- export interface UpdateGallery {
1211
- /**
1212
- * Gallery ID.
1213
- * @readonly
1214
- */
1215
- _id?: string | null;
1216
- /** Gallery name. */
1217
- name?: string | null;
1218
- /**
1219
- * Total number of items in the gallery.
1220
- * @readonly
1221
- */
1222
- totalItems?: number | null;
1223
- /** Media items in the gallery. */
1224
- items?: Item[];
1225
- /**
1226
- * Index that determines which position a gallery is displayed on the site. <br />
1227
- *
1228
- * >**Note:** If you assign the same sort order index to more than one gallery, the function fails.
1229
- */
1230
- sortOrder?: number | null;
1231
- /**
1232
- * Date and time the gallery was created.
1233
- * @readonly
1234
- */
1235
- _createdDate?: Date;
1236
- }
1237
- /**
1238
- * Deletes a gallery.
1239
- *
1240
- * The `deleteGallery()` function returns a Promise that resolves to the ID of the deleted gallery. When a gallery is deleted, the deleted gallery is no longer returned when calling the [`listGalleries()`](#listgalleries) function.
1241
- *
1242
- * #### Override permissions
1243
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1244
- * <blockquote class='warning'>
1245
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1246
- * </blockquote>
1247
- * @param galleryId - ID of the gallery to delete.
1248
- * @public
1249
- * @documentationMaturity preview
1250
- * @requiredField galleryId
1251
- * @permissionScope Manage Galleries
1252
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1253
- * @applicableIdentity APP
1254
- */
1255
- export declare function deleteGallery(galleryId: string): Promise<DeleteGalleryResponse & DeleteGalleryResponseNonNullableFields>;
1256
- /**
1257
- * Creates a media item in a specified gallery.
1258
- *
1259
- * The `createGalleryItem()` function returns a Promise that resolves to a newly-created gallery item after it has successfully been created.
1260
- *
1261
- * <blockquote class="important">
1262
- *
1263
- * __Important:__
1264
- * 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.
1265
- *
1266
- * </blockquote>
1267
- *
1268
- * #### Override permissions
1269
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1270
- * <blockquote class='warning'>
1271
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1272
- * </blockquote>
1273
- * @param galleryId - Gallery ID.
1274
- * @param item - Media item to create.
1275
- * @public
1276
- * @documentationMaturity preview
1277
- * @requiredField galleryId
1278
- * @requiredField item
1279
- * @requiredField item.image.imageInfo
1280
- * @requiredField item.text.html
1281
- * @requiredField item.video.videoInfo
1282
- * @permissionScope Manage Galleries
1283
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1284
- * @applicableIdentity APP
1285
- * @returns Created media item.
1286
- */
1287
- export declare function createGalleryItem(galleryId: string, item: Item): Promise<Item & NonNullable<CreateGalleryItemResponseNonNullableFields>['item']>;
1288
- /**
1289
- * Updates a media item in a specified gallery.
1290
- *
1291
- * The `updateGalleryItem()` function returns a Promise that resolves to an updated gallery item. Only the fields in the `item` object parameter can be updated. Specify which fields to update. Unspecified fields remain the same.
1292
- *
1293
- * <blockquote class="important">
1294
- *
1295
- * __Important:__
1296
- * 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.
1297
- *
1298
- * </blockquote>
1299
- *
1300
- * #### Override permissions
1301
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1302
- * <blockquote class='warning'>
1303
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1304
- * </blockquote>
1305
- * @public
1306
- * @documentationMaturity preview
1307
- * @requiredField identifiers
1308
- * @requiredField identifiers.galleryId
1309
- * @requiredField identifiers.itemId
1310
- * @requiredField item
1311
- * @requiredField item.image.imageInfo
1312
- * @requiredField item.text.html
1313
- * @requiredField item.video.videoInfo
1314
- * @param item - The information for the gallery item being updated.
1315
- * @param identifiers - Gallery ID and Item ID.
1316
- * @permissionScope Manage Galleries
1317
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1318
- * @applicableIdentity APP
1319
- * @returns Updated media item.
1320
- */
1321
- export declare function updateGalleryItem(identifiers: UpdateGalleryItemIdentifiers, item: UpdateGalleryItem): Promise<Item & NonNullable<UpdateGalleryItemResponseNonNullableFields>['item']>;
1322
- export interface UpdateGalleryItemIdentifiers {
1323
- /** ID of the gallery containing the item to update. */
1324
- galleryId: string;
1325
- /**
1326
- * ID of the item to update.
1327
- * @readonly
1328
- */
1329
- itemId?: string | null;
1330
- }
1331
- export interface UpdateGalleryItem {
1332
- /** Details about the image. */
1333
- image?: Image;
1334
- /** Details about the video. */
1335
- video?: Video;
1336
- /** Details about the text file. */
1337
- text?: Text;
1338
- /**
1339
- * Item ID.
1340
- * @readonly
1341
- */
1342
- _id?: string | null;
1343
- /**
1344
- * Index that determines which position a media item is displayed in the gallery. <br />
1345
- *
1346
- * Default: [Epoch](https://www.epoch101.com/) timestamp. <br />
1347
- *
1348
- * >**Note:** If you assign the same sort order index to more than one media item in a gallery, the function fails.
1349
- */
1350
- sortOrder?: number | null;
1351
- /** Item title. */
1352
- title?: string | null;
1353
- /** Item description. */
1354
- description?: string | null;
1355
- /** Link from the item. You can link to Wix sites or external URLs. */
1356
- link?: Link;
1357
- /** @readonly */
1358
- type?: Type;
1359
- /**
1360
- * Date and time the item was created.
1361
- * @readonly
1362
- */
1363
- _createdDate?: Date;
1364
- /**
1365
- * Date and time the item was last updated.
1366
- * @readonly
1367
- */
1368
- _updatedDate?: Date;
1369
- /** Item tags. */
1370
- tags?: Tags;
1371
- }
1372
- /**
1373
- * Deletes a media item from a gallery.
1374
- *
1375
- * The `deleteGalleryItem()` function returns a Promise that resolves to the ID of the deleted gallery item. When a gallery item is deleted, the deleted gallery item is no longer returned when calling the [`listGalleryItems()`](#listgalleryitems) function.
1376
- *
1377
- * #### Override permissions
1378
- * This function is restricted and only runs if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.
1379
- * <blockquote class='warning'>
1380
- * <p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
1381
- * </blockquote>
1382
- * @public
1383
- * @documentationMaturity preview
1384
- * @requiredField identifiers
1385
- * @requiredField identifiers.galleryId
1386
- * @requiredField identifiers.itemId
1387
- * @param identifiers - Gallery ID and Item ID.
1388
- * @permissionScope Manage Galleries
1389
- * @permissionScopeId SCOPE.DC-PROGALLERY.MANAGE-GALLERIES
1390
- * @applicableIdentity APP
1391
- */
1392
- export declare function deleteGalleryItem(identifiers: DeleteGalleryItemIdentifiers): Promise<DeleteGalleryItemResponse & DeleteGalleryItemResponseNonNullableFields>;
1393
- export interface DeleteGalleryItemIdentifiers {
1394
- /** Gallery ID. */
1395
- galleryId: string;
1396
- /** ID of the media item to delete. */
1397
- itemId: string;
1398
- }