@wix/auto_sdk_comments_comments 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/build/cjs/index.d.ts +56 -21
  2. package/build/cjs/index.js +69 -18
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +669 -19
  5. package/build/cjs/index.typings.js +3890 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +222 -19
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/es/index.d.mts +56 -21
  10. package/build/es/index.mjs +62 -18
  11. package/build/es/index.mjs.map +1 -1
  12. package/build/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +669 -19
  13. package/build/es/index.typings.mjs +3805 -0
  14. package/build/es/index.typings.mjs.map +1 -0
  15. package/build/es/meta.d.mts +222 -19
  16. package/build/es/meta.mjs.map +1 -1
  17. package/build/internal/cjs/index.d.ts +56 -21
  18. package/build/internal/cjs/index.js +69 -18
  19. package/build/internal/cjs/index.js.map +1 -1
  20. package/build/internal/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +669 -19
  21. package/build/internal/cjs/index.typings.js +3890 -0
  22. package/build/internal/cjs/index.typings.js.map +1 -0
  23. package/build/internal/cjs/meta.d.ts +222 -19
  24. package/build/internal/cjs/meta.js.map +1 -1
  25. package/build/internal/es/index.d.mts +56 -21
  26. package/build/internal/es/index.mjs +62 -18
  27. package/build/internal/es/index.mjs.map +1 -1
  28. package/build/internal/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +669 -19
  29. package/build/internal/es/index.typings.mjs +3805 -0
  30. package/build/internal/es/index.typings.mjs.map +1 -0
  31. package/build/internal/es/meta.d.mts +222 -19
  32. package/build/internal/es/meta.mjs.map +1 -1
  33. package/package.json +4 -3
@@ -1,3 +1,5 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
1
3
  /**
2
4
  * A comment is a user-generated message in response to a specific resource. It allows site visitors
3
5
  * to share feedback or engage in discussions around different types of resources, including blog posts, forum threads,
@@ -308,7 +310,7 @@ interface ButtonData {
308
310
  /** Styling for the button's container. */
309
311
  containerData?: PluginContainerData;
310
312
  /** The button type. */
311
- type?: TypeWithLiterals;
313
+ type?: ButtonDataTypeWithLiterals;
312
314
  /** Styling for the button. */
313
315
  styles?: Styles;
314
316
  /** The text to display on the button. */
@@ -416,14 +418,14 @@ interface Height {
416
418
  /** A custom height value in pixels. */
417
419
  custom?: string | null;
418
420
  }
419
- declare enum Type {
421
+ declare enum ButtonDataType {
420
422
  /** Regular link button */
421
423
  LINK = "LINK",
422
424
  /** Triggers custom action that is defined in plugin configuration by the consumer */
423
425
  ACTION = "ACTION"
424
426
  }
425
427
  /** @enumType */
426
- type TypeWithLiterals = Type | 'LINK' | 'ACTION';
428
+ type ButtonDataTypeWithLiterals = ButtonDataType | 'LINK' | 'ACTION';
427
429
  interface Styles {
428
430
  /**
429
431
  * Deprecated: Use `borderWidth` and `borderRadius` instead.
@@ -556,7 +558,7 @@ interface DividerData {
556
558
  /** Divider width. */
557
559
  width?: WidthWithLiterals;
558
560
  /** Divider alignment. */
559
- alignment?: AlignmentWithLiterals;
561
+ alignment?: DividerDataAlignmentWithLiterals;
560
562
  }
561
563
  declare enum LineStyle {
562
564
  /** Single Line */
@@ -580,7 +582,7 @@ declare enum Width {
580
582
  }
581
583
  /** @enumType */
582
584
  type WidthWithLiterals = Width | 'LARGE' | 'MEDIUM' | 'SMALL';
583
- declare enum Alignment {
585
+ declare enum DividerDataAlignment {
584
586
  /** Center alignment */
585
587
  CENTER = "CENTER",
586
588
  /** Left alignment */
@@ -589,7 +591,7 @@ declare enum Alignment {
589
591
  RIGHT = "RIGHT"
590
592
  }
591
593
  /** @enumType */
592
- type AlignmentWithLiterals = Alignment | 'CENTER' | 'LEFT' | 'RIGHT';
594
+ type DividerDataAlignmentWithLiterals = DividerDataAlignment | 'CENTER' | 'LEFT' | 'RIGHT';
593
595
  interface FileData {
594
596
  /** Styling for the file's container. */
595
597
  containerData?: PluginContainerData;
@@ -714,7 +716,7 @@ interface ItemDataOneOf {
714
716
  }
715
717
  interface GalleryOptions {
716
718
  /** Gallery layout. */
717
- layout?: Layout;
719
+ layout?: GalleryOptionsLayout;
718
720
  /** Styling for gallery items. */
719
721
  item?: ItemStyle;
720
722
  /** Styling for gallery thumbnail images. */
@@ -774,7 +776,7 @@ declare enum ThumbnailsAlignment {
774
776
  }
775
777
  /** @enumType */
776
778
  type ThumbnailsAlignmentWithLiterals = ThumbnailsAlignment | 'TOP' | 'RIGHT' | 'BOTTOM' | 'LEFT' | 'NONE';
777
- interface Layout {
779
+ interface GalleryOptionsLayout {
778
780
  /** Gallery layout type. */
779
781
  type?: LayoutTypeWithLiterals;
780
782
  /** Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. */
@@ -936,7 +938,7 @@ interface LinkPreviewData {
936
938
  /** Styling for the link preview. */
937
939
  styles?: LinkPreviewDataStyles;
938
940
  }
939
- declare enum Position {
941
+ declare enum StylesPosition {
940
942
  /** Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) */
941
943
  START = "START",
942
944
  /** Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) */
@@ -947,7 +949,7 @@ declare enum Position {
947
949
  HIDDEN = "HIDDEN"
948
950
  }
949
951
  /** @enumType */
950
- type PositionWithLiterals = Position | 'START' | 'END' | 'TOP' | 'HIDDEN';
952
+ type StylesPositionWithLiterals = StylesPosition | 'START' | 'END' | 'TOP' | 'HIDDEN';
951
953
  interface LinkPreviewDataStyles {
952
954
  /**
953
955
  * Background color as a hexadecimal value.
@@ -979,7 +981,7 @@ interface LinkPreviewDataStyles {
979
981
  */
980
982
  borderColor?: string | null;
981
983
  /** Position of thumbnail. Defaults to `START`. */
982
- thumbnailPosition?: PositionWithLiterals;
984
+ thumbnailPosition?: StylesPositionWithLiterals;
983
985
  }
984
986
  interface MapData {
985
987
  /** Styling for the map's container. */
@@ -1333,6 +1335,32 @@ interface AppEmbedData extends AppEmbedDataAppDataOneOf {
1333
1335
  url?: string | null;
1334
1336
  /** An image for the embedded content. */
1335
1337
  image?: Media;
1338
+ /** Whether to hide the image. */
1339
+ hideImage?: boolean | null;
1340
+ /** Whether to hide the title. */
1341
+ hideTitle?: boolean | null;
1342
+ /** Whether to hide the price. */
1343
+ hidePrice?: boolean | null;
1344
+ /** Whether to hide the description (Event and Booking). */
1345
+ hideDescription?: boolean | null;
1346
+ /** Whether to hide the date and time (Event). */
1347
+ hideDateTime?: boolean | null;
1348
+ /** Whether to hide the location (Event). */
1349
+ hideLocation?: boolean | null;
1350
+ /** Whether to hide the duration (Booking). */
1351
+ hideDuration?: boolean | null;
1352
+ /** Whether to hide the button. */
1353
+ hideButton?: boolean | null;
1354
+ /** Whether to hide the ribbon. */
1355
+ hideRibbon?: boolean | null;
1356
+ /** Button styling options. */
1357
+ buttonStyles?: ButtonStyles;
1358
+ /** Image styling options. */
1359
+ imageStyles?: ImageStyles;
1360
+ /** Ribbon styling options. */
1361
+ ribbonStyles?: RibbonStyles;
1362
+ /** Card styling options. */
1363
+ cardStyles?: CardStyles;
1336
1364
  }
1337
1365
  /** @oneof */
1338
1366
  interface AppEmbedDataAppDataOneOf {
@@ -1341,6 +1369,66 @@ interface AppEmbedDataAppDataOneOf {
1341
1369
  /** Data for embedded Wix Events content. */
1342
1370
  eventData?: EventData;
1343
1371
  }
1372
+ declare enum Position {
1373
+ /** Image positioned at the start (left in LTR layouts, right in RTL layouts) */
1374
+ START = "START",
1375
+ /** Image positioned at the end (right in LTR layouts, left in RTL layouts) */
1376
+ END = "END",
1377
+ /** Image positioned at the top */
1378
+ TOP = "TOP"
1379
+ }
1380
+ /** @enumType */
1381
+ type PositionWithLiterals = Position | 'START' | 'END' | 'TOP';
1382
+ declare enum AspectRatio {
1383
+ /** 1:1 aspect ratio */
1384
+ SQUARE = "SQUARE",
1385
+ /** 16:9 aspect ratio */
1386
+ RECTANGLE = "RECTANGLE"
1387
+ }
1388
+ /** @enumType */
1389
+ type AspectRatioWithLiterals = AspectRatio | 'SQUARE' | 'RECTANGLE';
1390
+ declare enum Resizing {
1391
+ /** Fill the container, may crop the image */
1392
+ FILL = "FILL",
1393
+ /** Fit the image within the container */
1394
+ FIT = "FIT"
1395
+ }
1396
+ /** @enumType */
1397
+ type ResizingWithLiterals = Resizing | 'FILL' | 'FIT';
1398
+ declare enum Placement {
1399
+ /** Ribbon placed on the image */
1400
+ IMAGE = "IMAGE",
1401
+ /** Ribbon placed on the product information */
1402
+ PRODUCT_INFO = "PRODUCT_INFO"
1403
+ }
1404
+ /** @enumType */
1405
+ type PlacementWithLiterals = Placement | 'IMAGE' | 'PRODUCT_INFO';
1406
+ declare enum Type {
1407
+ /** Card with visible border and background */
1408
+ CONTAINED = "CONTAINED",
1409
+ /** Card without visible border */
1410
+ FRAMELESS = "FRAMELESS"
1411
+ }
1412
+ /** @enumType */
1413
+ type TypeWithLiterals = Type | 'CONTAINED' | 'FRAMELESS';
1414
+ declare enum Alignment {
1415
+ /** Content aligned to start (left in LTR layouts, right in RTL layouts) */
1416
+ START = "START",
1417
+ /** Content centered */
1418
+ CENTER = "CENTER",
1419
+ /** Content aligned to end (right in LTR layouts, left in RTL layouts) */
1420
+ END = "END"
1421
+ }
1422
+ /** @enumType */
1423
+ type AlignmentWithLiterals = Alignment | 'START' | 'CENTER' | 'END';
1424
+ declare enum Layout {
1425
+ /** Elements stacked vertically */
1426
+ STACKED = "STACKED",
1427
+ /** Elements arranged horizontally */
1428
+ SIDE_BY_SIDE = "SIDE_BY_SIDE"
1429
+ }
1430
+ /** @enumType */
1431
+ type LayoutWithLiterals = Layout | 'STACKED' | 'SIDE_BY_SIDE';
1344
1432
  declare enum AppType {
1345
1433
  PRODUCT = "PRODUCT",
1346
1434
  EVENT = "EVENT",
@@ -1358,6 +1446,122 @@ interface EventData {
1358
1446
  /** Event location. */
1359
1447
  location?: string | null;
1360
1448
  }
1449
+ interface ButtonStyles {
1450
+ /** Text to display on the button. */
1451
+ buttonText?: string | null;
1452
+ /** Border width in pixels. */
1453
+ borderWidth?: number | null;
1454
+ /** Border radius in pixels. */
1455
+ borderRadius?: number | null;
1456
+ /**
1457
+ * Border color as a hexadecimal value.
1458
+ * @format COLOR_HEX
1459
+ */
1460
+ borderColor?: string | null;
1461
+ /**
1462
+ * Text color as a hexadecimal value.
1463
+ * @format COLOR_HEX
1464
+ */
1465
+ textColor?: string | null;
1466
+ /**
1467
+ * Background color as a hexadecimal value.
1468
+ * @format COLOR_HEX
1469
+ */
1470
+ backgroundColor?: string | null;
1471
+ /**
1472
+ * Border color as a hexadecimal value (hover state).
1473
+ * @format COLOR_HEX
1474
+ */
1475
+ borderColorHover?: string | null;
1476
+ /**
1477
+ * Text color as a hexadecimal value (hover state).
1478
+ * @format COLOR_HEX
1479
+ */
1480
+ textColorHover?: string | null;
1481
+ /**
1482
+ * Background color as a hexadecimal value (hover state).
1483
+ * @format COLOR_HEX
1484
+ */
1485
+ backgroundColorHover?: string | null;
1486
+ /** Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. */
1487
+ buttonSize?: string | null;
1488
+ }
1489
+ interface ImageStyles {
1490
+ /** Whether to hide the image. */
1491
+ hideImage?: boolean | null;
1492
+ /** Position of image. Defaults to `START`. */
1493
+ imagePosition?: PositionWithLiterals;
1494
+ /** Aspect ratio for the image. Defaults to `SQUARE`. */
1495
+ aspectRatio?: AspectRatioWithLiterals;
1496
+ /** How the image should be resized. Defaults to `FILL`. */
1497
+ resizing?: ResizingWithLiterals;
1498
+ /**
1499
+ * Image border color as a hexadecimal value.
1500
+ * @format COLOR_HEX
1501
+ */
1502
+ borderColor?: string | null;
1503
+ /** Image border width in pixels. */
1504
+ borderWidth?: number | null;
1505
+ /** Image border radius in pixels. */
1506
+ borderRadius?: number | null;
1507
+ }
1508
+ interface RibbonStyles {
1509
+ /** Text to display on the ribbon. */
1510
+ ribbonText?: string | null;
1511
+ /**
1512
+ * Ribbon background color as a hexadecimal value.
1513
+ * @format COLOR_HEX
1514
+ */
1515
+ backgroundColor?: string | null;
1516
+ /**
1517
+ * Ribbon text color as a hexadecimal value.
1518
+ * @format COLOR_HEX
1519
+ */
1520
+ textColor?: string | null;
1521
+ /**
1522
+ * Ribbon border color as a hexadecimal value.
1523
+ * @format COLOR_HEX
1524
+ */
1525
+ borderColor?: string | null;
1526
+ /** Ribbon border width in pixels. */
1527
+ borderWidth?: number | null;
1528
+ /** Ribbon border radius in pixels. */
1529
+ borderRadius?: number | null;
1530
+ /** Placement of the ribbon. Defaults to `IMAGE`. */
1531
+ ribbonPlacement?: PlacementWithLiterals;
1532
+ }
1533
+ interface CardStyles {
1534
+ /**
1535
+ * Card background color as a hexadecimal value.
1536
+ * @format COLOR_HEX
1537
+ */
1538
+ backgroundColor?: string | null;
1539
+ /**
1540
+ * Card border color as a hexadecimal value.
1541
+ * @format COLOR_HEX
1542
+ */
1543
+ borderColor?: string | null;
1544
+ /** Card border width in pixels. */
1545
+ borderWidth?: number | null;
1546
+ /** Card border radius in pixels. */
1547
+ borderRadius?: number | null;
1548
+ /** Card type. Defaults to `CONTAINED`. */
1549
+ type?: TypeWithLiterals;
1550
+ /** Content alignment. Defaults to `START`. */
1551
+ alignment?: AlignmentWithLiterals;
1552
+ /** Layout for title and price. Defaults to `STACKED`. */
1553
+ titlePriceLayout?: LayoutWithLiterals;
1554
+ /**
1555
+ * Title text color as a hexadecimal value.
1556
+ * @format COLOR_HEX
1557
+ */
1558
+ titleColor?: string | null;
1559
+ /**
1560
+ * Text color as a hexadecimal value.
1561
+ * @format COLOR_HEX
1562
+ */
1563
+ textColor?: string | null;
1564
+ }
1361
1565
  interface VideoData {
1362
1566
  /** Styling for the video's container. */
1363
1567
  containerData?: PluginContainerData;
@@ -1530,6 +1734,8 @@ declare enum NullValue {
1530
1734
  /** Null value. */
1531
1735
  NULL_VALUE = "NULL_VALUE"
1532
1736
  }
1737
+ /** @enumType */
1738
+ type NullValueWithLiterals = NullValue | 'NULL_VALUE';
1533
1739
  /**
1534
1740
  * `ListValue` is a wrapper around a repeated field of values.
1535
1741
  *
@@ -2128,13 +2334,13 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
2128
2334
  /**
2129
2335
  * Filter object.
2130
2336
  *
2131
- * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
2337
+ * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
2132
2338
  */
2133
2339
  filter?: Record<string, any> | null;
2134
2340
  /**
2135
2341
  * Sort object.
2136
2342
  *
2137
- * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
2343
+ * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
2138
2344
  * @maxSize 5
2139
2345
  */
2140
2346
  sort?: Sorting[];
@@ -2427,7 +2633,7 @@ interface BulkPublishCommentResponse {
2427
2633
  /**
2428
2634
  * Job ID.
2429
2635
  *
2430
- * Pass this ID to Get Async Job to retrieve job details and metadata.
2636
+ * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
2431
2637
  * @format GUID
2432
2638
  */
2433
2639
  jobId?: string;
@@ -2445,7 +2651,7 @@ interface BulkHideCommentResponse {
2445
2651
  /**
2446
2652
  * Job ID.
2447
2653
  *
2448
- * Pass this ID to Get Async Job to retrieve job details and metadata.
2654
+ * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
2449
2655
  * @format GUID
2450
2656
  */
2451
2657
  jobId?: string;
@@ -2463,7 +2669,7 @@ interface BulkDeleteCommentResponse {
2463
2669
  /**
2464
2670
  * Job ID.
2465
2671
  *
2466
- * Pass this ID to Get Async Job to retrieve job details and metadata.
2672
+ * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
2467
2673
  * @format GUID
2468
2674
  */
2469
2675
  jobId?: string;
@@ -2483,7 +2689,7 @@ interface BulkModerateDraftContentResponse {
2483
2689
  /**
2484
2690
  * Job ID.
2485
2691
  *
2486
- * Pass this ID to Get Async Job to retrieve job details and metadata.
2692
+ * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
2487
2693
  * @format GUID
2488
2694
  */
2489
2695
  jobId?: string;
@@ -2515,7 +2721,7 @@ interface BulkMoveCommentByFilterResponse {
2515
2721
  /**
2516
2722
  * Job ID.
2517
2723
  *
2518
- * Pass this ID to Get Async Job to retrieve job details and metadata.
2724
+ * Pass this ID to Get Async Job, in the Async Jobs API, to retrieve job details and metadata.
2519
2725
  * @format GUID
2520
2726
  */
2521
2727
  jobId?: string;
@@ -2658,6 +2864,21 @@ declare enum WebhookIdentityType {
2658
2864
  }
2659
2865
  /** @enumType */
2660
2866
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
2867
+ type CreateCommentApplicationErrors = {
2868
+ code?: 'INVALID_CAPTCHA';
2869
+ description?: string;
2870
+ data?: Record<string, any>;
2871
+ };
2872
+ type UpdateCommentApplicationErrors = {
2873
+ code?: 'INVALID_CAPTCHA';
2874
+ description?: string;
2875
+ data?: Record<string, any>;
2876
+ };
2877
+ type CountCommentsApplicationErrors = {
2878
+ code?: 'TOO_MANY_TO_COUNT';
2879
+ description?: string;
2880
+ data?: Record<string, any>;
2881
+ };
2661
2882
  interface BaseEventMetadata {
2662
2883
  /**
2663
2884
  * App instance ID.
@@ -2706,38 +2927,232 @@ interface CommentContentChangedEnvelope {
2706
2927
  data: CommentContentChanged;
2707
2928
  metadata: EventMetadata;
2708
2929
  }
2930
+ /**
2931
+ * Triggered when comment content is updated.
2932
+ * @permissionScope Read Comments
2933
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
2934
+ * @permissionScope Manage Blog
2935
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
2936
+ * @permissionScope Manage Comments
2937
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
2938
+ * @permissionId WIX_COMMENTS.COMMENT_READ
2939
+ * @webhook
2940
+ * @eventType wix.comments.v2.comment_comment_content_changed
2941
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
2942
+ * @slug comment_content_changed
2943
+ */
2944
+ declare function onCommentContentChanged(handler: (event: CommentContentChangedEnvelope) => void | Promise<void>): void;
2709
2945
  interface CommentHiddenEnvelope {
2710
2946
  data: CommentHidden;
2711
2947
  metadata: EventMetadata;
2712
2948
  }
2949
+ /**
2950
+ * Triggered when a comment is hidden.
2951
+ * @permissionScope Read Comments
2952
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
2953
+ * @permissionScope Manage Blog
2954
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
2955
+ * @permissionScope Manage Comments
2956
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
2957
+ * @permissionId WIX_COMMENTS.COMMENT_READ
2958
+ * @webhook
2959
+ * @eventType wix.comments.v2.comment_comment_hidden
2960
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
2961
+ * @slug comment_hidden
2962
+ * @documentationMaturity preview
2963
+ */
2964
+ declare function onCommentHidden(handler: (event: CommentHiddenEnvelope) => void | Promise<void>): void;
2713
2965
  interface CommentMarkedEnvelope {
2714
2966
  data: CommentMarked;
2715
2967
  metadata: EventMetadata;
2716
2968
  }
2969
+ /**
2970
+ * Triggered when a comment is marked.
2971
+ * @permissionScope Read Comments
2972
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
2973
+ * @permissionScope Manage Blog
2974
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
2975
+ * @permissionScope Manage Comments
2976
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
2977
+ * @permissionId WIX_COMMENTS.COMMENT_READ
2978
+ * @webhook
2979
+ * @eventType wix.comments.v2.comment_comment_marked
2980
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
2981
+ * @slug comment_marked
2982
+ */
2983
+ declare function onCommentMarked(handler: (event: CommentMarkedEnvelope) => void | Promise<void>): void;
2717
2984
  interface CommentMovedEnvelope {
2718
2985
  data: CommentMoved;
2719
2986
  metadata: EventMetadata;
2720
2987
  }
2988
+ /**
2989
+ * Triggered when a comment is moved.
2990
+ * @permissionScope Read Comments
2991
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
2992
+ * @permissionScope Manage Blog
2993
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
2994
+ * @permissionScope Manage Comments
2995
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
2996
+ * @permissionId WIX_COMMENTS.COMMENT_READ
2997
+ * @webhook
2998
+ * @eventType wix.comments.v2.comment_comment_moved
2999
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3000
+ * @slug comment_moved
3001
+ * @documentationMaturity preview
3002
+ */
3003
+ declare function onCommentMoved(handler: (event: CommentMovedEnvelope) => void | Promise<void>): void;
2721
3004
  interface CommentPublishedEnvelope {
2722
3005
  data: CommentPublished;
2723
3006
  metadata: EventMetadata;
2724
3007
  }
3008
+ /**
3009
+ * Triggered when a comment is published.
3010
+ * @permissionScope Read Comments
3011
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
3012
+ * @permissionScope Manage Blog
3013
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3014
+ * @permissionScope Manage Comments
3015
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
3016
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3017
+ * @webhook
3018
+ * @eventType wix.comments.v2.comment_comment_published
3019
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3020
+ * @slug comment_published
3021
+ * @documentationMaturity preview
3022
+ */
3023
+ declare function onCommentPublished(handler: (event: CommentPublishedEnvelope) => void | Promise<void>): void;
2725
3024
  interface CommentUnmarkedEnvelope {
2726
3025
  data: CommentUnmarked;
2727
3026
  metadata: EventMetadata;
2728
3027
  }
3028
+ /**
3029
+ * Triggered when a comment is unmarked.
3030
+ * @permissionScope Read Comments
3031
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
3032
+ * @permissionScope Manage Blog
3033
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3034
+ * @permissionScope Manage Comments
3035
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
3036
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3037
+ * @webhook
3038
+ * @eventType wix.comments.v2.comment_comment_unmarked
3039
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3040
+ * @slug comment_unmarked
3041
+ */
3042
+ declare function onCommentUnmarked(handler: (event: CommentUnmarkedEnvelope) => void | Promise<void>): void;
2729
3043
  interface CommentCreatedEnvelope {
2730
3044
  entity: Comment;
2731
3045
  metadata: EventMetadata;
2732
3046
  }
3047
+ /**
3048
+ * Triggered when a comment is created.
3049
+ * @permissionScope Read Comments
3050
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
3051
+ * @permissionScope Manage Blog
3052
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3053
+ * @permissionScope Manage Comments
3054
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
3055
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3056
+ * @webhook
3057
+ * @eventType wix.comments.v2.comment_created
3058
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3059
+ * @slug created
3060
+ */
3061
+ declare function onCommentCreated(handler: (event: CommentCreatedEnvelope) => void | Promise<void>): void;
2733
3062
  interface CommentResourceCommentCountChangedEnvelope {
2734
3063
  data: ResourceCommentCountChanged;
2735
3064
  metadata: EventMetadata;
2736
3065
  }
3066
+ /**
3067
+ * Triggered when the total number of comments has changed in a resource.
3068
+ * @permissionScope Read Comments
3069
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
3070
+ * @permissionScope Manage Blog
3071
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3072
+ * @permissionScope Manage Comments
3073
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
3074
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3075
+ * @webhook
3076
+ * @eventType wix.comments.v2.comment_resource_comment_count_changed
3077
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3078
+ * @slug resource_comment_count_changed
3079
+ */
3080
+ declare function onCommentResourceCommentCountChanged(handler: (event: CommentResourceCommentCountChangedEnvelope) => void | Promise<void>): void;
2737
3081
  interface CommentUpdatedEnvelope {
2738
3082
  entity: Comment;
2739
3083
  metadata: EventMetadata;
2740
3084
  }
3085
+ /**
3086
+ * Triggered when a comment is updated.
3087
+ * @permissionScope Read Comments
3088
+ * @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
3089
+ * @permissionScope Manage Blog
3090
+ * @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
3091
+ * @permissionScope Manage Comments
3092
+ * @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
3093
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3094
+ * @webhook
3095
+ * @eventType wix.comments.v2.comment_updated
3096
+ * @serviceIdentifier wix.comments.ng.v1.CommentsNg
3097
+ * @slug updated
3098
+ */
3099
+ declare function onCommentUpdated(handler: (event: CommentUpdatedEnvelope) => void | Promise<void>): void;
3100
+ type CommentNonNullablePaths = `content.mentions` | `content.attachments` | `parentComment.status` | `replyCount` | `voteSummary.netVoteCount` | `voteSummary.upvoteCount` | `voteSummary.downvoteCount` | `status` | `reactionSummary.total` | `marked`;
3101
+ /**
3102
+ * Creates a new comment and publishes it.
3103
+ *
3104
+ * The `appId`, `contextId`, and `resourceId` are all required and associate the created comment with the specific
3105
+ * resource it responds to. See **Integrations** in the Comments introduction for a list of integrated scopes for these fields.
3106
+ *
3107
+ * If the created comment is a direct response to another comment, the `commentId` of the parent comment should be passed
3108
+ * as `parentComment.id` in this comment's request. See **Terminology** in the Comments introduction for additional information on parent comments and replies.
3109
+ * @param comment - Comment to create.
3110
+ * @public
3111
+ * @requiredField comment
3112
+ * @requiredField comment.appId
3113
+ * @requiredField comment.content
3114
+ * @requiredField comment.contextId
3115
+ * @requiredField comment.resourceId
3116
+ * @permissionId WIX_COMMENTS.COMMENT_CREATE
3117
+ * @permissionId WIX_COMMENTS.COMMENT_OVERRIDE_AUTHOR
3118
+ * @permissionId WIX_COMMENTS.COMMENT_OVERRIDE_COMMENT_DATE
3119
+ * @applicableIdentity APP
3120
+ * @returns Created comment.
3121
+ * @fqn wix.comments.ng.v1.CommentsNg.CreateComment
3122
+ */
3123
+ declare function createComment(comment: NonNullablePaths<Comment, `appId` | `content` | `contextId` | `resourceId`>): Promise<NonNullablePaths<Comment, CommentNonNullablePaths> & {
3124
+ __applicationErrorsType?: CreateCommentApplicationErrors;
3125
+ }>;
3126
+ /**
3127
+ * Retrieves a comment.
3128
+ * @param commentId - ID of the comment to retrieve.
3129
+ * @public
3130
+ * @requiredField commentId
3131
+ * @permissionId WIX_COMMENTS.COMMENT_READ
3132
+ * @applicableIdentity APP
3133
+ * @returns Retrieved comment.
3134
+ * @fqn wix.comments.ng.v1.CommentsNg.GetComment
3135
+ */
3136
+ declare function getComment(commentId: string): Promise<NonNullablePaths<Comment, CommentNonNullablePaths>>;
3137
+ /**
3138
+ * Updates a comment.
3139
+ *
3140
+ * Each time the comment is updated, `revision` increments by 1. The current `revision` must be
3141
+ * passed when updating the comment. This ensures you're working with the latest comment and
3142
+ * prevents unintended overwrites.
3143
+ * @param _id - Comment ID.
3144
+ * @public
3145
+ * @requiredField _id
3146
+ * @requiredField comment
3147
+ * @requiredField comment.revision
3148
+ * @permissionId WIX_COMMENTS.COMMENT_UPDATE
3149
+ * @applicableIdentity APP
3150
+ * @returns Updated comment.
3151
+ * @fqn wix.comments.ng.v1.CommentsNg.UpdateComment
3152
+ */
3153
+ declare function updateComment(_id: string, comment: NonNullablePaths<UpdateComment, `revision`>): Promise<NonNullablePaths<Comment, CommentNonNullablePaths> & {
3154
+ __applicationErrorsType?: UpdateCommentApplicationErrors;
3155
+ }>;
2741
3156
  interface UpdateComment {
2742
3157
  /**
2743
3158
  * Comment ID.
@@ -2841,10 +3256,70 @@ interface UpdateComment {
2841
3256
  */
2842
3257
  contentEdited?: boolean | null;
2843
3258
  }
3259
+ /**
3260
+ * Deletes a comment.
3261
+ *
3262
+ * This method deletes the `content` of the comment and sets its `status` to `DELETED`.
3263
+ * @param commentId - ID of the comment to delete.
3264
+ * @public
3265
+ * @requiredField commentId
3266
+ * @permissionId WIX_COMMENTS.COMMENT_DELETE
3267
+ * @applicableIdentity APP
3268
+ * @fqn wix.comments.ng.v1.CommentsNg.DeleteComment
3269
+ */
3270
+ declare function deleteComment(commentId: string): Promise<void>;
3271
+ /**
3272
+ * Moderates the draft content of a comment.
3273
+ *
3274
+ * - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
3275
+ *
3276
+ * - `REJECT`: Handles the draft content based on the current comment status:
3277
+ * - If the comment `status` is `PUBLISHED`, clears `draftContent`.
3278
+ * - If the comment `status` is `PENDING`, keeps `draftContent` unchanged and changes `status` to `HIDDEN`.
3279
+ *
3280
+ * To moderate multiple comments, call Bulk Moderate Draft Content.
3281
+ * @param commentId - ID of the comment to moderate.
3282
+ * @param revision - Revision number, which increments by `1` each time the comment is updated.
3283
+ *
3284
+ * To prevent conflicting changes, the current `revision` must be passed when updating the comment.
3285
+ * @public
3286
+ * @documentationMaturity preview
3287
+ * @requiredField commentId
3288
+ * @requiredField revision
3289
+ * @permissionId WIX_COMMENTS.COMMENT_MODERATE_DRAFT_CONTENT
3290
+ * @applicableIdentity APP
3291
+ * @fqn wix.comments.ng.v1.CommentsNg.ModerateDraftContent
3292
+ */
3293
+ declare function moderateDraftContent(commentId: string, revision: string, options?: ModerateDraftContentOptions): Promise<NonNullablePaths<ModerateDraftContentResponse, {
3294
+ [P in CommentNonNullablePaths]: `comment.${P}`;
3295
+ }[CommentNonNullablePaths]>>;
2844
3296
  interface ModerateDraftContentOptions {
2845
3297
  /** Draft content action. */
2846
3298
  draftContentAction?: ActionWithLiterals;
2847
3299
  }
3300
+ /**
3301
+ * Creates a query to retrieve a list of comments.
3302
+ *
3303
+ * The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
3304
+ *
3305
+ * The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
3306
+ *
3307
+ * You can refine the query by chaining `CommentsQueryBuilder` functions onto the query. `CommentsQueryBuilder` functions enable you to sort, filter, and control the results that `queryComments()` returns.
3308
+ *
3309
+ * `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
3310
+ * + `ascending("_id")`
3311
+ *
3312
+ * The functions that are chained to `queryComments()` are applied in the order they are called. For example, if you apply `ascending("voteSummary.netVoteCount")` and then `ascending("replyCount")`, the results are sorted first by the `"voteSummary.netVoteCount"`, and then, if there are multiple results with the same `"voteSummary.netVoteCount"`, the items are sorted by `"replyCount"`.
3313
+ *
3314
+ * The following `CommentsQueryBuilder` functions are supported for the `queryComments()` function. For a full description of the comment object, see the object returned for the [`items`](#commentsqueryresult/items) property in [`CommentsQueryResult`](#commentsqueryresult).
3315
+ * @public
3316
+ * @requiredField appId
3317
+ * @param appId - App ID to query comments for.
3318
+ * @permissionId WIX_COMMENTS.COMMENT_QUERY
3319
+ * @applicableIdentity APP
3320
+ * @fqn wix.comments.ng.v1.CommentsNg.QueryComments
3321
+ */
3322
+ declare function queryComments(appId: string): CommentsQueryBuilder;
2848
3323
  interface QueryCursorResult {
2849
3324
  cursors: Cursors;
2850
3325
  hasNext: () => boolean;
@@ -2902,10 +3377,92 @@ interface CommentsQueryBuilder {
2902
3377
  skipTo: (cursor: string) => CommentsQueryBuilder;
2903
3378
  find: () => Promise<CommentsQueryResult>;
2904
3379
  }
3380
+ /**
3381
+ * Sets `marked` to `TRUE` to mark a comment.
3382
+ *
3383
+ * Call Query Comments to filter for marked comments to then apply customization to.
3384
+ * See Sample Flows for an example.
3385
+ * @param commentId - ID of the comment to mark.
3386
+ * @public
3387
+ * @requiredField commentId
3388
+ * @permissionId WIX_COMMENTS.COMMENT_MARK
3389
+ * @applicableIdentity APP
3390
+ * @fqn wix.comments.ng.v1.CommentsNg.MarkComment
3391
+ */
3392
+ declare function markComment(commentId: string): Promise<NonNullablePaths<MarkCommentResponse, {
3393
+ [P in CommentNonNullablePaths]: `comment.${P}`;
3394
+ }[CommentNonNullablePaths]>>;
3395
+ /**
3396
+ * Sets `marked` to `FALSE` to unmark a comment.
3397
+ * @param commentId - ID of the comment to unmark.
3398
+ * @public
3399
+ * @requiredField commentId
3400
+ * @permissionId WIX_COMMENTS.COMMENT_MARK
3401
+ * @applicableIdentity APP
3402
+ * @fqn wix.comments.ng.v1.CommentsNg.UnmarkComment
3403
+ */
3404
+ declare function unmarkComment(commentId: string): Promise<NonNullablePaths<UnmarkCommentResponse, {
3405
+ [P in CommentNonNullablePaths]: `comment.${P}`;
3406
+ }[CommentNonNullablePaths]>>;
3407
+ /**
3408
+ * Hides a comment in a widget. The comment status becomes `HIDDEN`.
3409
+ * @param commentId - ID of the comment to hide.
3410
+ * @public
3411
+ * @documentationMaturity preview
3412
+ * @requiredField commentId
3413
+ * @permissionId WIX_COMMENTS.COMMENT_HIDE
3414
+ * @applicableIdentity APP
3415
+ * @fqn wix.comments.ng.v1.CommentsNg.HideComment
3416
+ */
3417
+ declare function hideComment(commentId: string): Promise<NonNullablePaths<HideCommentResponse, {
3418
+ [P in CommentNonNullablePaths]: `comment.${P}`;
3419
+ }[CommentNonNullablePaths]>>;
3420
+ /**
3421
+ * Publishes a comment with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
3422
+ *
3423
+ * To publish a new comment, call Create Comment.
3424
+ * @param commentId - ID of the comment to publish.
3425
+ * @public
3426
+ * @documentationMaturity preview
3427
+ * @requiredField commentId
3428
+ * @permissionId WIX_COMMENTS.COMMENT_PUBLISH
3429
+ * @applicableIdentity APP
3430
+ * @fqn wix.comments.ng.v1.CommentsNg.PublishComment
3431
+ */
3432
+ declare function publishComment(commentId: string): Promise<NonNullablePaths<PublishCommentResponse, {
3433
+ [P in CommentNonNullablePaths]: `comment.${P}`;
3434
+ }[CommentNonNullablePaths]>>;
3435
+ /**
3436
+ * Counts comments, given the specified filtering. Comments with the `HIDDEN` status are not included in the response.
3437
+ * @param appId - App ID to count the comments of.
3438
+ * @public
3439
+ * @requiredField appId
3440
+ * @permissionId WIX_COMMENTS.COMMENT_COUNT
3441
+ * @applicableIdentity APP
3442
+ * @fqn wix.comments.ng.v1.CommentsNg.CountComments
3443
+ */
3444
+ declare function countComments(appId: string, options?: CountCommentsOptions): Promise<NonNullablePaths<CountCommentsResponse, `count`> & {
3445
+ __applicationErrorsType?: CountCommentsApplicationErrors;
3446
+ }>;
2905
3447
  interface CountCommentsOptions {
2906
3448
  /** Filter to identify the comments that need to be counted. */
2907
3449
  filter?: Record<string, any> | null;
2908
3450
  }
3451
+ /**
3452
+ * Lists published comments and replies from a specified resource, such as a blog post.
3453
+ * @param appId - ID of the app from which the comments are listed.
3454
+ * @public
3455
+ * @documentationMaturity preview
3456
+ * @requiredField appId
3457
+ * @requiredField options.contextId
3458
+ * @requiredField options.resourceId
3459
+ * @permissionId WIX_COMMENTS.COMMENT_LIST
3460
+ * @applicableIdentity APP
3461
+ * @fqn wix.comments.ng.v1.CommentsNg.ListCommentsByResource
3462
+ */
3463
+ declare function listCommentsByResource(appId: string, options?: NonNullablePaths<ListCommentsByResourceOptions, `contextId` | `resourceId`>): Promise<NonNullablePaths<ListCommentsByResourceResponse, {
3464
+ [P in CommentNonNullablePaths]: `comments.${number}.${P}`;
3465
+ }[CommentNonNullablePaths]>>;
2909
3466
  interface ListCommentsByResourceOptions {
2910
3467
  /**
2911
3468
  * ID of the specific context the comment is in response to.
@@ -2933,6 +3490,23 @@ interface ListCommentsByResourceOptions {
2933
3490
  /** Cursor paging. */
2934
3491
  cursorPaging?: ListCommentsByResourceCursorPaging;
2935
3492
  }
3493
+ /**
3494
+ * Returns a thread of a comment or a reply.
3495
+ *
3496
+ * If you request a comment thread, the method returns a single comment with cursors. With cursors (`pagingMetadata.cursors.next` or `pagingMetadata.cursors.prev`) you can load replies by calling the List Comments by Resource method.
3497
+ *
3498
+ * If you request a reply thread, the method returns a reply with its parent comment. With cursors (`pagingMetadata.cursors.next` or `pagingMetadata.cursors.prev`) you can load replies by calling the List Comments by Resource method.
3499
+ * @param commentId - Comment ID.
3500
+ * @public
3501
+ * @documentationMaturity preview
3502
+ * @requiredField commentId
3503
+ * @permissionId WIX_COMMENTS.COMMENT_THREAD
3504
+ * @applicableIdentity APP
3505
+ * @fqn wix.comments.ng.v1.CommentsNg.GetCommentThread
3506
+ */
3507
+ declare function getCommentThread(commentId: string, options?: GetCommentThreadOptions): Promise<NonNullablePaths<GetCommentThreadResponse, {
3508
+ [P in CommentNonNullablePaths]: `comments.${number}.${P}`;
3509
+ }[CommentNonNullablePaths]>>;
2936
3510
  interface GetCommentThreadOptions {
2937
3511
  /**
2938
3512
  * App ID.
@@ -2946,24 +3520,100 @@ interface GetCommentThreadOptions {
2946
3520
  /** Reply sorting. */
2947
3521
  replySort?: ReplySort;
2948
3522
  }
3523
+ /**
3524
+ * Publishes multiple comments with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
3525
+ * @param appId - ID of the app where to publish the comment.
3526
+ * @public
3527
+ * @documentationMaturity preview
3528
+ * @requiredField appId
3529
+ * @requiredField options
3530
+ * @requiredField options.filter
3531
+ * @permissionId WIX_COMMENTS.BULK_COMMENT_PUBLISH
3532
+ * @applicableIdentity APP
3533
+ * @fqn wix.comments.ng.v1.CommentsNg.BulkPublishComment
3534
+ */
3535
+ declare function bulkPublishComment(appId: string, options: NonNullablePaths<BulkPublishCommentOptions, `filter`>): Promise<NonNullablePaths<BulkPublishCommentResponse, `jobId`>>;
2949
3536
  interface BulkPublishCommentOptions {
2950
3537
  /** Filter to identify the comments that need to be published. Each key corresponds to an option name, and its values correspond to the choices for this option. For example, {`"resourceId"`: `"64ad407e0bf87891bba7de3a"`, `"parentComment.id"`: `"726cb137-a9c3-408b-9cc2-2b64c6be8a95"`}. */
2951
3538
  filter: Record<string, any> | null;
2952
3539
  }
3540
+ /**
3541
+ * Hides multiple comments. The comment status becomes `HIDDEN`.
3542
+ * @param appId - ID of the app where to hide the comments.
3543
+ * @public
3544
+ * @documentationMaturity preview
3545
+ * @requiredField appId
3546
+ * @requiredField options
3547
+ * @requiredField options.filter
3548
+ * @permissionId WIX_COMMENTS.BULK_COMMENT_HIDE
3549
+ * @applicableIdentity APP
3550
+ * @fqn wix.comments.ng.v1.CommentsNg.BulkHideComment
3551
+ */
3552
+ declare function bulkHideComment(appId: string, options: NonNullablePaths<BulkHideCommentOptions, `filter`>): Promise<NonNullablePaths<BulkHideCommentResponse, `jobId`>>;
2953
3553
  interface BulkHideCommentOptions {
2954
3554
  /** Filter to identify the comments that need to be hidden. Each key corresponds to an option name, and its values correspond to the choices for this option. For example, {`"resourceId"`: `"64ad407e0bf87891bba7de3a"`, `"parentComment.id"`: `"726cb137-a9c3-408b-9cc2-2b64c6be8a95"`}. */
2955
3555
  filter: Record<string, any> | null;
2956
3556
  }
3557
+ /**
3558
+ * Deletes multiple comments.
3559
+ * @param appId - ID of the app where to delete the comments.
3560
+ * @public
3561
+ * @documentationMaturity preview
3562
+ * @requiredField appId
3563
+ * @requiredField options
3564
+ * @requiredField options.filter
3565
+ * @permissionId WIX_COMMENTS.BULK_COMMENT_DELETE
3566
+ * @applicableIdentity APP
3567
+ * @fqn wix.comments.ng.v1.CommentsNg.BulkDeleteComment
3568
+ */
3569
+ declare function bulkDeleteComment(appId: string, options: NonNullablePaths<BulkDeleteCommentOptions, `filter`>): Promise<NonNullablePaths<BulkDeleteCommentResponse, `jobId`>>;
2957
3570
  interface BulkDeleteCommentOptions {
2958
3571
  /** Filter to identify the comments that need to be deleted. Each key corresponds to an option name, and its values correspond to the choices for this option. For example, {`"resourceId"`: `"64ad407e0bf87891bba7de3a"`, `"parentComment.id"`: `"726cb137-a9c3-408b-9cc2-2b64c6be8a95"`}. */
2959
3572
  filter: Record<string, any> | null;
2960
3573
  }
3574
+ /**
3575
+ * Moderates the draft content of multiple comments that match the specified filter.
3576
+ *
3577
+ * The same action, `APPROVE` or `REJECT`, applies to all comments that match the filter.
3578
+ * - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
3579
+ *
3580
+ * - `REJECT`: Handles the draft content based on the current comment status:
3581
+ * - If the comment `status` is `PUBLISHED`, clears `draftContent`.
3582
+ * - If the comment `status` is `PENDING`, keeps `draftContent` unchanged and changes `status` to `HIDDEN`.
3583
+ *
3584
+ * To moderate a single comment, call Moderate Draft Content.
3585
+ * @param appId - ID of the app where to moderate the comments.
3586
+ * @public
3587
+ * @documentationMaturity preview
3588
+ * @requiredField appId
3589
+ * @requiredField options
3590
+ * @requiredField options.draftContentAction
3591
+ * @requiredField options.filter
3592
+ * @permissionId WIX_COMMENTS.BULK_COMMENT_MODERATE_DRAFT_CONTENT
3593
+ * @applicableIdentity APP
3594
+ * @fqn wix.comments.ng.v1.CommentsNg.BulkModerateDraftContent
3595
+ */
3596
+ declare function bulkModerateDraftContent(appId: string, options: NonNullablePaths<BulkModerateDraftContentOptions, `draftContentAction` | `filter`>): Promise<NonNullablePaths<BulkModerateDraftContentResponse, `jobId`>>;
2961
3597
  interface BulkModerateDraftContentOptions {
2962
3598
  /** Filter to identify the comment content that needs to be moderated. Each key corresponds to an option name, and its values correspond to the choices for this option. For example, {`"resourceId"`: `"64ad407e0bf87891bba7de3a"`, `"parentComment.id"`: `"726cb137-a9c3-408b-9cc2-2b64c6be8a95"`}. */
2963
3599
  filter: Record<string, any> | null;
2964
3600
  /** Action to do regarding draft content */
2965
3601
  draftContentAction: ActionWithLiterals;
2966
3602
  }
3603
+ /**
3604
+ * Moves multiple comments to another resource.
3605
+ * @param appId - ID of the app from which to move the comments.
3606
+ * @public
3607
+ * @documentationMaturity preview
3608
+ * @requiredField appId
3609
+ * @requiredField options.destination.contextId
3610
+ * @requiredField options.destination.resourceId
3611
+ * @requiredField options.filter
3612
+ * @permissionId WIX_COMMENTS.BULK_COMMENT_MOVE
3613
+ * @applicableIdentity APP
3614
+ * @fqn wix.comments.ng.v1.CommentsNg.BulkMoveCommentByFilter
3615
+ */
3616
+ declare function bulkMoveCommentByFilter(appId: string, options?: NonNullablePaths<BulkMoveCommentByFilterOptions, `destination.contextId` | `destination.resourceId` | `filter`>): Promise<NonNullablePaths<BulkMoveCommentByFilterResponse, `jobId`>>;
2967
3617
  interface BulkMoveCommentByFilterOptions {
2968
3618
  /** Filter to identify the comments that need to be moved. Each key corresponds to an option name, and its values correspond to the choices for this option. For example, {`"resourceId"`: `"64ad407e0bf87891bba7de3a"`, `"parentComment.id"`: `"726cb137-a9c3-408b-9cc2-2b64c6be8a95"`}. */
2969
3619
  filter: Record<string, any> | null;
@@ -2971,4 +3621,4 @@ interface BulkMoveCommentByFilterOptions {
2971
3621
  destination?: Destination;
2972
3622
  }
2973
3623
 
2974
- export { VoteRole as $, PluginContainerDataAlignment as A, type BulkPublishCommentOptions as B, type Comment as C, Target as D, TextAlignment as E, LineStyle as F, type GetCommentThreadOptions as G, type HideCommentResponse as H, Width as I, Alignment as J, LayoutType as K, type ListCommentsByResourceOptions as L, type ModerateDraftContentOptions as M, NodeType as N, Orientation as O, type PublishCommentResponse as P, Crop as Q, ThumbnailsAlignment as R, GIFType as S, Type as T, type UpdateComment as U, ViewMode as V, WidthType as W, Source as X, Position as Y, MapType as Z, ViewRole as _, type ModerateDraftContentResponse as a, type ParagraphData as a$, PollLayoutType as a0, PollLayoutDirection as a1, BackgroundType as a2, DecorationType as a3, FontType as a4, AppType as a5, InitialExpandedItems as a6, Direction as a7, VerticalAlignment as a8, NullValue as a9, type DividerData as aA, type FileData as aB, type FileSource as aC, type FileSourceDataOneOf as aD, type PDFSettings as aE, type GalleryData as aF, type Media as aG, type Image as aH, type Video as aI, type Item as aJ, type ItemDataOneOf as aK, type GalleryOptions as aL, type Layout as aM, type ItemStyle as aN, type Thumbnails as aO, type GIFData as aP, type GIF as aQ, type HeadingData as aR, type HTMLData as aS, type HTMLDataDataOneOf as aT, type ImageData as aU, type StylesBorder as aV, type ImageDataStyles as aW, type LinkPreviewData as aX, type LinkPreviewDataStyles as aY, type MapData as aZ, type MapSettings as a_, Status as aa, VersioningMode as ab, Action as ac, SortOrder as ad, Order as ae, ReplySortOrder as af, WebhookIdentityType as ag, type CommentContent as ah, type RichContent as ai, type Node as aj, type NodeDataOneOf as ak, type NodeStyle as al, type ButtonData as am, type Border as an, type Colors as ao, type PluginContainerData as ap, type PluginContainerDataWidth as aq, type PluginContainerDataWidthDataOneOf as ar, type Spoiler as as, type Height as at, type Styles as au, type Link as av, type LinkDataOneOf as aw, type Rel as ax, type CodeBlockData as ay, type TextStyle as az, type CommentsQueryBuilder as b, type DeleteByIdsOperation as b$, type PollData as b0, type Permissions as b1, type Option as b2, type Settings as b3, type PollLayout as b4, type OptionLayout as b5, type Gradient as b6, type Background as b7, type BackgroundBackgroundOneOf as b8, type PollDesign as b9, type BorderColors as bA, type ListValue as bB, type AudioData as bC, type OrderedListData as bD, type BulletedListData as bE, type BlockquoteData as bF, type CaptionData as bG, type LayoutCellData as bH, type Metadata as bI, type DocumentStyle as bJ, type TextNodeStyle as bK, type Mention as bL, type MentionIdentityOneOf as bM, type Attachment as bN, type AttachmentMediaOneOf as bO, type VideoResolution as bP, type ContentAuthor as bQ, type ContentAuthorAuthorOneOf as bR, type CommentAuthor as bS, type CommentAuthorIdentityOneOf as bT, type ParentComment as bU, type VoteSummary as bV, type CommentReactionSummary as bW, type UpdateInternalDocumentsEvent as bX, type UpdateInternalDocumentsEventOperationOneOf as bY, type InternalDocument as bZ, type InternalDocumentUpdateOperation as b_, type OptionDesign as ba, type Poll as bb, type PollDataLayout as bc, type Design as bd, type TextData as be, type Decoration as bf, type DecorationDataOneOf as bg, type AnchorData as bh, type ColorData as bi, type LinkData as bj, type MentionData as bk, type FontSizeData as bl, type SpoilerData as bm, type AppEmbedData as bn, type AppEmbedDataAppDataOneOf as bo, type BookingData as bp, type EventData as bq, type VideoData as br, type PlaybackOptions as bs, type EmbedData as bt, type Oembed as bu, type CollapsibleListData as bv, type TableData as bw, type Dimensions as bx, type TableCellData as by, type CellStyle as bz, type MarkCommentResponse as c, type DeleteByFilterOperation as c0, type InternalDocumentUpdateByFilterOperation as c1, type InternalUpdateExistingOperation as c2, type VersionedDocumentUpdateOperation as c3, type VersionedDeleteByIdsOperation as c4, type VersionedDocumentId as c5, type CommentModerated as c6, type CreateCommentRequest as c7, type ContactDetails as c8, type CreateCommentResponse as c9, type CountCommentsRequest as cA, type ListCommentsByResourceRequest as cB, type CommentSort as cC, type ReplySort as cD, type ListCommentsByResourceCursorPaging as cE, type RepliesListResponse as cF, type GetCommentThreadRequest as cG, type BulkPublishCommentRequest as cH, type BulkHideCommentRequest as cI, type BulkDeleteCommentRequest as cJ, type BulkModerateDraftContentRequest as cK, type BulkMoveCommentByFilterRequest as cL, type Destination as cM, type CommentMoved as cN, type DomainEvent as cO, type DomainEventBodyOneOf as cP, type EntityCreatedEvent as cQ, type RestoreInfo as cR, type EntityUpdatedEvent as cS, type EntityDeletedEvent as cT, type ActionEvent as cU, type MessageEnvelope as cV, type IdentificationData as cW, type IdentificationDataIdOneOf as cX, type BaseEventMetadata as cY, type EventMetadata as cZ, type CommentsQueryResult as c_, type ResourceCommentCountChanged as ca, type GetCommentRequest as cb, type GetCommentResponse as cc, type UpdateCommentRequest as cd, type UpdateCommentResponse as ce, type CommentContentChanged as cf, type DeleteCommentRequest as cg, type DeleteCommentResponse as ch, type CommentDeleted as ci, type ModerateDraftContentRequest as cj, type CommentPublished as ck, type CommentHidden as cl, type QueryCommentsRequest as cm, type CursorQuery as cn, type CursorQueryPagingMethodOneOf as co, type Sorting as cp, type CursorPaging as cq, type QueryCommentsResponse as cr, type CursorPagingMetadata as cs, type Cursors as ct, type MarkCommentRequest as cu, type CommentMarked as cv, type UnmarkCommentRequest as cw, type CommentUnmarked as cx, type HideCommentRequest as cy, type PublishCommentRequest as cz, type UnmarkCommentResponse as d, type CountCommentsOptions as e, type CountCommentsResponse as f, type ListCommentsByResourceResponse as g, type GetCommentThreadResponse as h, type BulkPublishCommentResponse as i, type BulkHideCommentOptions as j, type BulkHideCommentResponse as k, type BulkDeleteCommentOptions as l, type BulkDeleteCommentResponse as m, type BulkModerateDraftContentOptions as n, type BulkModerateDraftContentResponse as o, type BulkMoveCommentByFilterOptions as p, type BulkMoveCommentByFilterResponse as q, type CommentContentChangedEnvelope as r, type CommentHiddenEnvelope as s, type CommentMarkedEnvelope as t, type CommentMovedEnvelope as u, type CommentPublishedEnvelope as v, type CommentUnmarkedEnvelope as w, type CommentCreatedEnvelope as x, type CommentResourceCommentCountChangedEnvelope as y, type CommentUpdatedEnvelope as z };
3624
+ export { Action, type ActionEvent, type ActionWithLiterals, Alignment, type AlignmentWithLiterals, type AnchorData, type AppEmbedData, type AppEmbedDataAppDataOneOf, AppType, type AppTypeWithLiterals, AspectRatio, type AspectRatioWithLiterals, type Attachment, type AttachmentMediaOneOf, type AudioData, type Background, type BackgroundBackgroundOneOf, BackgroundType, type BackgroundTypeWithLiterals, type BaseEventMetadata, type BlockquoteData, type BookingData, type Border, type BorderColors, type BulkDeleteCommentOptions, type BulkDeleteCommentRequest, type BulkDeleteCommentResponse, type BulkHideCommentOptions, type BulkHideCommentRequest, type BulkHideCommentResponse, type BulkModerateDraftContentOptions, type BulkModerateDraftContentRequest, type BulkModerateDraftContentResponse, type BulkMoveCommentByFilterOptions, type BulkMoveCommentByFilterRequest, type BulkMoveCommentByFilterResponse, type BulkPublishCommentOptions, type BulkPublishCommentRequest, type BulkPublishCommentResponse, type BulletedListData, type ButtonData, ButtonDataType, type ButtonDataTypeWithLiterals, type ButtonStyles, type CaptionData, type CardStyles, type CellStyle, type CodeBlockData, type CollapsibleListData, type ColorData, type Colors, type Comment, type CommentAuthor, type CommentAuthorIdentityOneOf, type CommentContent, type CommentContentChanged, type CommentContentChangedEnvelope, type CommentCreatedEnvelope, type CommentDeleted, type CommentHidden, type CommentHiddenEnvelope, type CommentMarked, type CommentMarkedEnvelope, type CommentModerated, type CommentMoved, type CommentMovedEnvelope, type CommentPublished, type CommentPublishedEnvelope, type CommentReactionSummary, type CommentResourceCommentCountChangedEnvelope, type CommentSort, type CommentUnmarked, type CommentUnmarkedEnvelope, type CommentUpdatedEnvelope, type CommentsQueryBuilder, type CommentsQueryResult, type ContactDetails, type ContentAuthor, type ContentAuthorAuthorOneOf, type CountCommentsApplicationErrors, type CountCommentsOptions, type CountCommentsRequest, type CountCommentsResponse, type CreateCommentApplicationErrors, type CreateCommentRequest, type CreateCommentResponse, Crop, type CropWithLiterals, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type Decoration, type DecorationDataOneOf, DecorationType, type DecorationTypeWithLiterals, type DeleteByFilterOperation, type DeleteByIdsOperation, type DeleteCommentRequest, type DeleteCommentResponse, type Design, type Destination, type Dimensions, Direction, type DirectionWithLiterals, type DividerData, DividerDataAlignment, type DividerDataAlignmentWithLiterals, type DocumentStyle, type DomainEvent, type DomainEventBodyOneOf, type EmbedData, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventData, type EventMetadata, type FileData, type FileSource, type FileSourceDataOneOf, type FontSizeData, FontType, type FontTypeWithLiterals, type GIF, type GIFData, GIFType, type GIFTypeWithLiterals, type GalleryData, type GalleryOptions, type GalleryOptionsLayout, type GetCommentRequest, type GetCommentResponse, type GetCommentThreadOptions, type GetCommentThreadRequest, type GetCommentThreadResponse, type Gradient, type HTMLData, type HTMLDataDataOneOf, type HeadingData, type Height, type HideCommentRequest, type HideCommentResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ImageData, type ImageDataStyles, type ImageStyles, InitialExpandedItems, type InitialExpandedItemsWithLiterals, type InternalDocument, type InternalDocumentUpdateByFilterOperation, type InternalDocumentUpdateOperation, type InternalUpdateExistingOperation, type Item, type ItemDataOneOf, type ItemStyle, Layout, type LayoutCellData, LayoutType, type LayoutTypeWithLiterals, type LayoutWithLiterals, LineStyle, type LineStyleWithLiterals, type Link, type LinkData, type LinkDataOneOf, type LinkPreviewData, type LinkPreviewDataStyles, type ListCommentsByResourceCursorPaging, type ListCommentsByResourceOptions, type ListCommentsByResourceRequest, type ListCommentsByResourceResponse, type ListValue, type MapData, type MapSettings, MapType, type MapTypeWithLiterals, type MarkCommentRequest, type MarkCommentResponse, type Media, type Mention, type MentionData, type MentionIdentityOneOf, type MessageEnvelope, type Metadata, type ModerateDraftContentOptions, type ModerateDraftContentRequest, type ModerateDraftContentResponse, type Node, type NodeDataOneOf, type NodeStyle, NodeType, type NodeTypeWithLiterals, NullValue, type NullValueWithLiterals, type Oembed, type Option, type OptionDesign, type OptionLayout, Order, type OrderWithLiterals, type OrderedListData, Orientation, type OrientationWithLiterals, type PDFSettings, type ParagraphData, type ParentComment, type Permissions, Placement, type PlacementWithLiterals, type PlaybackOptions, type PluginContainerData, PluginContainerDataAlignment, type PluginContainerDataAlignmentWithLiterals, type PluginContainerDataWidth, type PluginContainerDataWidthDataOneOf, type Poll, type PollData, type PollDataLayout, type PollDesign, type PollLayout, PollLayoutDirection, type PollLayoutDirectionWithLiterals, PollLayoutType, type PollLayoutTypeWithLiterals, Position, type PositionWithLiterals, type PublishCommentRequest, type PublishCommentResponse, type QueryCommentsRequest, type QueryCommentsResponse, type Rel, type RepliesListResponse, type ReplySort, ReplySortOrder, type ReplySortOrderWithLiterals, Resizing, type ResizingWithLiterals, type ResourceCommentCountChanged, type RestoreInfo, type RibbonStyles, type RichContent, type Settings, SortOrder, type SortOrderWithLiterals, type Sorting, Source, type SourceWithLiterals, type Spoiler, type SpoilerData, Status, type StatusWithLiterals, type Styles, type StylesBorder, StylesPosition, type StylesPositionWithLiterals, type TableCellData, type TableData, Target, type TargetWithLiterals, TextAlignment, type TextAlignmentWithLiterals, type TextData, type TextNodeStyle, type TextStyle, type Thumbnails, ThumbnailsAlignment, type ThumbnailsAlignmentWithLiterals, Type, type TypeWithLiterals, type UnmarkCommentRequest, type UnmarkCommentResponse, type UpdateComment, type UpdateCommentApplicationErrors, type UpdateCommentRequest, type UpdateCommentResponse, type UpdateInternalDocumentsEvent, type UpdateInternalDocumentsEventOperationOneOf, type VersionedDeleteByIdsOperation, type VersionedDocumentId, type VersionedDocumentUpdateOperation, VersioningMode, type VersioningModeWithLiterals, VerticalAlignment, type VerticalAlignmentWithLiterals, type Video, type VideoData, type VideoResolution, ViewMode, type ViewModeWithLiterals, ViewRole, type ViewRoleWithLiterals, VoteRole, type VoteRoleWithLiterals, type VoteSummary, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, Width, WidthType, type WidthTypeWithLiterals, type WidthWithLiterals, bulkDeleteComment, bulkHideComment, bulkModerateDraftContent, bulkMoveCommentByFilter, bulkPublishComment, countComments, createComment, deleteComment, getComment, getCommentThread, hideComment, listCommentsByResource, markComment, moderateDraftContent, onCommentContentChanged, onCommentCreated, onCommentHidden, onCommentMarked, onCommentMoved, onCommentPublished, onCommentResourceCommentCountChanged, onCommentUnmarked, onCommentUpdated, publishComment, queryComments, unmarkComment, updateComment };