@wix/auto_sdk_comments_comments 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +56 -21
- package/build/cjs/index.js +69 -18
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +656 -19
- package/build/cjs/index.typings.js +3890 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +222 -19
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +56 -21
- package/build/es/index.mjs +62 -18
- package/build/es/index.mjs.map +1 -1
- package/build/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +656 -19
- package/build/es/index.typings.mjs +3805 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +222 -19
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +56 -21
- package/build/internal/cjs/index.js +69 -18
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts} +656 -19
- package/build/internal/cjs/index.typings.js +3890 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +222 -19
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +56 -21
- package/build/internal/es/index.mjs +62 -18
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/{comments-v2-comment-comments.universal-BVp9019z.d.mts → index.typings.d.mts} +656 -19
- package/build/internal/es/index.typings.mjs +3805 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +222 -19
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +4 -3
package/build/cjs/{comments-v2-comment-comments.universal-BVp9019z.d.ts → index.typings.d.ts}
RENAMED
|
@@ -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?:
|
|
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
|
|
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
|
|
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?:
|
|
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
|
|
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
|
|
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?:
|
|
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
|
|
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
|
|
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
|
|
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?:
|
|
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
|
|
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
|
|
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,229 @@ 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
|
+
*/
|
|
2963
|
+
declare function onCommentHidden(handler: (event: CommentHiddenEnvelope) => void | Promise<void>): void;
|
|
2713
2964
|
interface CommentMarkedEnvelope {
|
|
2714
2965
|
data: CommentMarked;
|
|
2715
2966
|
metadata: EventMetadata;
|
|
2716
2967
|
}
|
|
2968
|
+
/**
|
|
2969
|
+
* Triggered when a comment is marked.
|
|
2970
|
+
* @permissionScope Read Comments
|
|
2971
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
2972
|
+
* @permissionScope Manage Blog
|
|
2973
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
2974
|
+
* @permissionScope Manage Comments
|
|
2975
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
2976
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
2977
|
+
* @webhook
|
|
2978
|
+
* @eventType wix.comments.v2.comment_comment_marked
|
|
2979
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
2980
|
+
* @slug comment_marked
|
|
2981
|
+
*/
|
|
2982
|
+
declare function onCommentMarked(handler: (event: CommentMarkedEnvelope) => void | Promise<void>): void;
|
|
2717
2983
|
interface CommentMovedEnvelope {
|
|
2718
2984
|
data: CommentMoved;
|
|
2719
2985
|
metadata: EventMetadata;
|
|
2720
2986
|
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Triggered when a comment is moved.
|
|
2989
|
+
* @permissionScope Read Comments
|
|
2990
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
2991
|
+
* @permissionScope Manage Blog
|
|
2992
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
2993
|
+
* @permissionScope Manage Comments
|
|
2994
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
2995
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
2996
|
+
* @webhook
|
|
2997
|
+
* @eventType wix.comments.v2.comment_comment_moved
|
|
2998
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
2999
|
+
* @slug comment_moved
|
|
3000
|
+
*/
|
|
3001
|
+
declare function onCommentMoved(handler: (event: CommentMovedEnvelope) => void | Promise<void>): void;
|
|
2721
3002
|
interface CommentPublishedEnvelope {
|
|
2722
3003
|
data: CommentPublished;
|
|
2723
3004
|
metadata: EventMetadata;
|
|
2724
3005
|
}
|
|
3006
|
+
/**
|
|
3007
|
+
* Triggered when a comment is published.
|
|
3008
|
+
* @permissionScope Read Comments
|
|
3009
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
3010
|
+
* @permissionScope Manage Blog
|
|
3011
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
3012
|
+
* @permissionScope Manage Comments
|
|
3013
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
3014
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3015
|
+
* @webhook
|
|
3016
|
+
* @eventType wix.comments.v2.comment_comment_published
|
|
3017
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
3018
|
+
* @slug comment_published
|
|
3019
|
+
*/
|
|
3020
|
+
declare function onCommentPublished(handler: (event: CommentPublishedEnvelope) => void | Promise<void>): void;
|
|
2725
3021
|
interface CommentUnmarkedEnvelope {
|
|
2726
3022
|
data: CommentUnmarked;
|
|
2727
3023
|
metadata: EventMetadata;
|
|
2728
3024
|
}
|
|
3025
|
+
/**
|
|
3026
|
+
* Triggered when a comment is unmarked.
|
|
3027
|
+
* @permissionScope Read Comments
|
|
3028
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
3029
|
+
* @permissionScope Manage Blog
|
|
3030
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
3031
|
+
* @permissionScope Manage Comments
|
|
3032
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
3033
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3034
|
+
* @webhook
|
|
3035
|
+
* @eventType wix.comments.v2.comment_comment_unmarked
|
|
3036
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
3037
|
+
* @slug comment_unmarked
|
|
3038
|
+
*/
|
|
3039
|
+
declare function onCommentUnmarked(handler: (event: CommentUnmarkedEnvelope) => void | Promise<void>): void;
|
|
2729
3040
|
interface CommentCreatedEnvelope {
|
|
2730
3041
|
entity: Comment;
|
|
2731
3042
|
metadata: EventMetadata;
|
|
2732
3043
|
}
|
|
3044
|
+
/**
|
|
3045
|
+
* Triggered when a comment is created.
|
|
3046
|
+
* @permissionScope Read Comments
|
|
3047
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
3048
|
+
* @permissionScope Manage Blog
|
|
3049
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
3050
|
+
* @permissionScope Manage Comments
|
|
3051
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
3052
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3053
|
+
* @webhook
|
|
3054
|
+
* @eventType wix.comments.v2.comment_created
|
|
3055
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
3056
|
+
* @slug created
|
|
3057
|
+
*/
|
|
3058
|
+
declare function onCommentCreated(handler: (event: CommentCreatedEnvelope) => void | Promise<void>): void;
|
|
2733
3059
|
interface CommentResourceCommentCountChangedEnvelope {
|
|
2734
3060
|
data: ResourceCommentCountChanged;
|
|
2735
3061
|
metadata: EventMetadata;
|
|
2736
3062
|
}
|
|
3063
|
+
/**
|
|
3064
|
+
* Triggered when the total number of comments has changed in a resource.
|
|
3065
|
+
* @permissionScope Read Comments
|
|
3066
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
3067
|
+
* @permissionScope Manage Blog
|
|
3068
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
3069
|
+
* @permissionScope Manage Comments
|
|
3070
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
3071
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3072
|
+
* @webhook
|
|
3073
|
+
* @eventType wix.comments.v2.comment_resource_comment_count_changed
|
|
3074
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
3075
|
+
* @slug resource_comment_count_changed
|
|
3076
|
+
*/
|
|
3077
|
+
declare function onCommentResourceCommentCountChanged(handler: (event: CommentResourceCommentCountChangedEnvelope) => void | Promise<void>): void;
|
|
2737
3078
|
interface CommentUpdatedEnvelope {
|
|
2738
3079
|
entity: Comment;
|
|
2739
3080
|
metadata: EventMetadata;
|
|
2740
3081
|
}
|
|
3082
|
+
/**
|
|
3083
|
+
* Triggered when a comment is updated.
|
|
3084
|
+
* @permissionScope Read Comments
|
|
3085
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.READ.COMMENTS
|
|
3086
|
+
* @permissionScope Manage Blog
|
|
3087
|
+
* @permissionScopeId SCOPE.BLOG.MANAGE-BLOG
|
|
3088
|
+
* @permissionScope Manage Comments
|
|
3089
|
+
* @permissionScopeId SCOPE.DC_COMMENTS.MANAGE.COMMENTS
|
|
3090
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3091
|
+
* @webhook
|
|
3092
|
+
* @eventType wix.comments.v2.comment_updated
|
|
3093
|
+
* @serviceIdentifier wix.comments.ng.v1.CommentsNg
|
|
3094
|
+
* @slug updated
|
|
3095
|
+
*/
|
|
3096
|
+
declare function onCommentUpdated(handler: (event: CommentUpdatedEnvelope) => void | Promise<void>): void;
|
|
3097
|
+
type CommentNonNullablePaths = `content.mentions` | `content.attachments` | `parentComment.status` | `replyCount` | `voteSummary.netVoteCount` | `voteSummary.upvoteCount` | `voteSummary.downvoteCount` | `status` | `reactionSummary.total` | `marked`;
|
|
3098
|
+
/**
|
|
3099
|
+
* Creates a new comment and publishes it.
|
|
3100
|
+
*
|
|
3101
|
+
* The `appId`, `contextId`, and `resourceId` are all required and associate the created comment with the specific
|
|
3102
|
+
* resource it responds to. See **Integrations** in the Comments introduction for a list of integrated scopes for these fields.
|
|
3103
|
+
*
|
|
3104
|
+
* If the created comment is a direct response to another comment, the `commentId` of the parent comment should be passed
|
|
3105
|
+
* as `parentComment.id` in this comment's request. See **Terminology** in the Comments introduction for additional information on parent comments and replies.
|
|
3106
|
+
* @param comment - Comment to create.
|
|
3107
|
+
* @public
|
|
3108
|
+
* @requiredField comment
|
|
3109
|
+
* @requiredField comment.appId
|
|
3110
|
+
* @requiredField comment.content
|
|
3111
|
+
* @requiredField comment.contextId
|
|
3112
|
+
* @requiredField comment.resourceId
|
|
3113
|
+
* @permissionId WIX_COMMENTS.COMMENT_CREATE
|
|
3114
|
+
* @permissionId WIX_COMMENTS.COMMENT_OVERRIDE_AUTHOR
|
|
3115
|
+
* @permissionId WIX_COMMENTS.COMMENT_OVERRIDE_COMMENT_DATE
|
|
3116
|
+
* @applicableIdentity APP
|
|
3117
|
+
* @returns Created comment.
|
|
3118
|
+
* @fqn wix.comments.ng.v1.CommentsNg.CreateComment
|
|
3119
|
+
*/
|
|
3120
|
+
declare function createComment(comment: NonNullablePaths<Comment, `appId` | `content` | `contextId` | `resourceId`>): Promise<NonNullablePaths<Comment, CommentNonNullablePaths> & {
|
|
3121
|
+
__applicationErrorsType?: CreateCommentApplicationErrors;
|
|
3122
|
+
}>;
|
|
3123
|
+
/**
|
|
3124
|
+
* Retrieves a comment.
|
|
3125
|
+
* @param commentId - ID of the comment to retrieve.
|
|
3126
|
+
* @public
|
|
3127
|
+
* @requiredField commentId
|
|
3128
|
+
* @permissionId WIX_COMMENTS.COMMENT_READ
|
|
3129
|
+
* @applicableIdentity APP
|
|
3130
|
+
* @returns Retrieved comment.
|
|
3131
|
+
* @fqn wix.comments.ng.v1.CommentsNg.GetComment
|
|
3132
|
+
*/
|
|
3133
|
+
declare function getComment(commentId: string): Promise<NonNullablePaths<Comment, CommentNonNullablePaths>>;
|
|
3134
|
+
/**
|
|
3135
|
+
* Updates a comment.
|
|
3136
|
+
*
|
|
3137
|
+
* Each time the comment is updated, `revision` increments by 1. The current `revision` must be
|
|
3138
|
+
* passed when updating the comment. This ensures you're working with the latest comment and
|
|
3139
|
+
* prevents unintended overwrites.
|
|
3140
|
+
* @param _id - Comment ID.
|
|
3141
|
+
* @public
|
|
3142
|
+
* @requiredField _id
|
|
3143
|
+
* @requiredField comment
|
|
3144
|
+
* @requiredField comment.revision
|
|
3145
|
+
* @permissionId WIX_COMMENTS.COMMENT_UPDATE
|
|
3146
|
+
* @applicableIdentity APP
|
|
3147
|
+
* @returns Updated comment.
|
|
3148
|
+
* @fqn wix.comments.ng.v1.CommentsNg.UpdateComment
|
|
3149
|
+
*/
|
|
3150
|
+
declare function updateComment(_id: string, comment: NonNullablePaths<UpdateComment, `revision`>): Promise<NonNullablePaths<Comment, CommentNonNullablePaths> & {
|
|
3151
|
+
__applicationErrorsType?: UpdateCommentApplicationErrors;
|
|
3152
|
+
}>;
|
|
2741
3153
|
interface UpdateComment {
|
|
2742
3154
|
/**
|
|
2743
3155
|
* Comment ID.
|
|
@@ -2841,10 +3253,69 @@ interface UpdateComment {
|
|
|
2841
3253
|
*/
|
|
2842
3254
|
contentEdited?: boolean | null;
|
|
2843
3255
|
}
|
|
3256
|
+
/**
|
|
3257
|
+
* Deletes a comment.
|
|
3258
|
+
*
|
|
3259
|
+
* This method deletes the `content` of the comment and sets its `status` to `DELETED`.
|
|
3260
|
+
* @param commentId - ID of the comment to delete.
|
|
3261
|
+
* @public
|
|
3262
|
+
* @requiredField commentId
|
|
3263
|
+
* @permissionId WIX_COMMENTS.COMMENT_DELETE
|
|
3264
|
+
* @applicableIdentity APP
|
|
3265
|
+
* @fqn wix.comments.ng.v1.CommentsNg.DeleteComment
|
|
3266
|
+
*/
|
|
3267
|
+
declare function deleteComment(commentId: string): Promise<void>;
|
|
3268
|
+
/**
|
|
3269
|
+
* Moderates the draft content of a comment.
|
|
3270
|
+
*
|
|
3271
|
+
* - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
|
|
3272
|
+
*
|
|
3273
|
+
* - `REJECT`: Handles the draft content based on the current comment status:
|
|
3274
|
+
* - If the comment `status` is `PUBLISHED`, clears `draftContent`.
|
|
3275
|
+
* - If the comment `status` is `PENDING`, keeps `draftContent` unchanged and changes `status` to `HIDDEN`.
|
|
3276
|
+
*
|
|
3277
|
+
* To moderate multiple comments, call Bulk Moderate Draft Content.
|
|
3278
|
+
* @param commentId - ID of the comment to moderate.
|
|
3279
|
+
* @param revision - Revision number, which increments by `1` each time the comment is updated.
|
|
3280
|
+
*
|
|
3281
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the comment.
|
|
3282
|
+
* @public
|
|
3283
|
+
* @requiredField commentId
|
|
3284
|
+
* @requiredField revision
|
|
3285
|
+
* @permissionId WIX_COMMENTS.COMMENT_MODERATE_DRAFT_CONTENT
|
|
3286
|
+
* @applicableIdentity APP
|
|
3287
|
+
* @fqn wix.comments.ng.v1.CommentsNg.ModerateDraftContent
|
|
3288
|
+
*/
|
|
3289
|
+
declare function moderateDraftContent(commentId: string, revision: string, options?: ModerateDraftContentOptions): Promise<NonNullablePaths<ModerateDraftContentResponse, {
|
|
3290
|
+
[P in CommentNonNullablePaths]: `comment.${P}`;
|
|
3291
|
+
}[CommentNonNullablePaths]>>;
|
|
2844
3292
|
interface ModerateDraftContentOptions {
|
|
2845
3293
|
/** Draft content action. */
|
|
2846
3294
|
draftContentAction?: ActionWithLiterals;
|
|
2847
3295
|
}
|
|
3296
|
+
/**
|
|
3297
|
+
* Creates a query to retrieve a list of comments.
|
|
3298
|
+
*
|
|
3299
|
+
* The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
|
|
3300
|
+
*
|
|
3301
|
+
* The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
|
|
3302
|
+
*
|
|
3303
|
+
* 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.
|
|
3304
|
+
*
|
|
3305
|
+
* `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
|
|
3306
|
+
* + `ascending("_id")`
|
|
3307
|
+
*
|
|
3308
|
+
* 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"`.
|
|
3309
|
+
*
|
|
3310
|
+
* 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).
|
|
3311
|
+
* @public
|
|
3312
|
+
* @requiredField appId
|
|
3313
|
+
* @param appId - App ID to query comments for.
|
|
3314
|
+
* @permissionId WIX_COMMENTS.COMMENT_QUERY
|
|
3315
|
+
* @applicableIdentity APP
|
|
3316
|
+
* @fqn wix.comments.ng.v1.CommentsNg.QueryComments
|
|
3317
|
+
*/
|
|
3318
|
+
declare function queryComments(appId: string): CommentsQueryBuilder;
|
|
2848
3319
|
interface QueryCursorResult {
|
|
2849
3320
|
cursors: Cursors;
|
|
2850
3321
|
hasNext: () => boolean;
|
|
@@ -2902,10 +3373,89 @@ interface CommentsQueryBuilder {
|
|
|
2902
3373
|
skipTo: (cursor: string) => CommentsQueryBuilder;
|
|
2903
3374
|
find: () => Promise<CommentsQueryResult>;
|
|
2904
3375
|
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Sets `marked` to `TRUE` to mark a comment.
|
|
3378
|
+
*
|
|
3379
|
+
* Call Query Comments to filter for marked comments to then apply customization to.
|
|
3380
|
+
* See Sample Flows for an example.
|
|
3381
|
+
* @param commentId - ID of the comment to mark.
|
|
3382
|
+
* @public
|
|
3383
|
+
* @requiredField commentId
|
|
3384
|
+
* @permissionId WIX_COMMENTS.COMMENT_MARK
|
|
3385
|
+
* @applicableIdentity APP
|
|
3386
|
+
* @fqn wix.comments.ng.v1.CommentsNg.MarkComment
|
|
3387
|
+
*/
|
|
3388
|
+
declare function markComment(commentId: string): Promise<NonNullablePaths<MarkCommentResponse, {
|
|
3389
|
+
[P in CommentNonNullablePaths]: `comment.${P}`;
|
|
3390
|
+
}[CommentNonNullablePaths]>>;
|
|
3391
|
+
/**
|
|
3392
|
+
* Sets `marked` to `FALSE` to unmark a comment.
|
|
3393
|
+
* @param commentId - ID of the comment to unmark.
|
|
3394
|
+
* @public
|
|
3395
|
+
* @requiredField commentId
|
|
3396
|
+
* @permissionId WIX_COMMENTS.COMMENT_MARK
|
|
3397
|
+
* @applicableIdentity APP
|
|
3398
|
+
* @fqn wix.comments.ng.v1.CommentsNg.UnmarkComment
|
|
3399
|
+
*/
|
|
3400
|
+
declare function unmarkComment(commentId: string): Promise<NonNullablePaths<UnmarkCommentResponse, {
|
|
3401
|
+
[P in CommentNonNullablePaths]: `comment.${P}`;
|
|
3402
|
+
}[CommentNonNullablePaths]>>;
|
|
3403
|
+
/**
|
|
3404
|
+
* Hides a comment in a widget. The comment status becomes `HIDDEN`.
|
|
3405
|
+
* @param commentId - ID of the comment to hide.
|
|
3406
|
+
* @public
|
|
3407
|
+
* @requiredField commentId
|
|
3408
|
+
* @permissionId WIX_COMMENTS.COMMENT_HIDE
|
|
3409
|
+
* @applicableIdentity APP
|
|
3410
|
+
* @fqn wix.comments.ng.v1.CommentsNg.HideComment
|
|
3411
|
+
*/
|
|
3412
|
+
declare function hideComment(commentId: string): Promise<NonNullablePaths<HideCommentResponse, {
|
|
3413
|
+
[P in CommentNonNullablePaths]: `comment.${P}`;
|
|
3414
|
+
}[CommentNonNullablePaths]>>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Publishes a comment with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
3417
|
+
*
|
|
3418
|
+
* To publish a new comment, call Create Comment.
|
|
3419
|
+
* @param commentId - ID of the comment to publish.
|
|
3420
|
+
* @public
|
|
3421
|
+
* @requiredField commentId
|
|
3422
|
+
* @permissionId WIX_COMMENTS.COMMENT_PUBLISH
|
|
3423
|
+
* @applicableIdentity APP
|
|
3424
|
+
* @fqn wix.comments.ng.v1.CommentsNg.PublishComment
|
|
3425
|
+
*/
|
|
3426
|
+
declare function publishComment(commentId: string): Promise<NonNullablePaths<PublishCommentResponse, {
|
|
3427
|
+
[P in CommentNonNullablePaths]: `comment.${P}`;
|
|
3428
|
+
}[CommentNonNullablePaths]>>;
|
|
3429
|
+
/**
|
|
3430
|
+
* Counts comments, given the specified filtering. Comments with the `HIDDEN` status are not included in the response.
|
|
3431
|
+
* @param appId - App ID to count the comments of.
|
|
3432
|
+
* @public
|
|
3433
|
+
* @requiredField appId
|
|
3434
|
+
* @permissionId WIX_COMMENTS.COMMENT_COUNT
|
|
3435
|
+
* @applicableIdentity APP
|
|
3436
|
+
* @fqn wix.comments.ng.v1.CommentsNg.CountComments
|
|
3437
|
+
*/
|
|
3438
|
+
declare function countComments(appId: string, options?: CountCommentsOptions): Promise<NonNullablePaths<CountCommentsResponse, `count`> & {
|
|
3439
|
+
__applicationErrorsType?: CountCommentsApplicationErrors;
|
|
3440
|
+
}>;
|
|
2905
3441
|
interface CountCommentsOptions {
|
|
2906
3442
|
/** Filter to identify the comments that need to be counted. */
|
|
2907
3443
|
filter?: Record<string, any> | null;
|
|
2908
3444
|
}
|
|
3445
|
+
/**
|
|
3446
|
+
* Lists published comments and replies from a specified resource, such as a blog post.
|
|
3447
|
+
* @param appId - ID of the app from which the comments are listed.
|
|
3448
|
+
* @public
|
|
3449
|
+
* @requiredField appId
|
|
3450
|
+
* @requiredField options.contextId
|
|
3451
|
+
* @requiredField options.resourceId
|
|
3452
|
+
* @permissionId WIX_COMMENTS.COMMENT_LIST
|
|
3453
|
+
* @applicableIdentity APP
|
|
3454
|
+
* @fqn wix.comments.ng.v1.CommentsNg.ListCommentsByResource
|
|
3455
|
+
*/
|
|
3456
|
+
declare function listCommentsByResource(appId: string, options?: NonNullablePaths<ListCommentsByResourceOptions, `contextId` | `resourceId`>): Promise<NonNullablePaths<ListCommentsByResourceResponse, {
|
|
3457
|
+
[P in CommentNonNullablePaths]: `comments.${number}.${P}`;
|
|
3458
|
+
}[CommentNonNullablePaths]>>;
|
|
2909
3459
|
interface ListCommentsByResourceOptions {
|
|
2910
3460
|
/**
|
|
2911
3461
|
* ID of the specific context the comment is in response to.
|
|
@@ -2933,6 +3483,22 @@ interface ListCommentsByResourceOptions {
|
|
|
2933
3483
|
/** Cursor paging. */
|
|
2934
3484
|
cursorPaging?: ListCommentsByResourceCursorPaging;
|
|
2935
3485
|
}
|
|
3486
|
+
/**
|
|
3487
|
+
* Returns a thread of a comment or a reply.
|
|
3488
|
+
*
|
|
3489
|
+
* 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.
|
|
3490
|
+
*
|
|
3491
|
+
* 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.
|
|
3492
|
+
* @param commentId - Comment ID.
|
|
3493
|
+
* @public
|
|
3494
|
+
* @requiredField commentId
|
|
3495
|
+
* @permissionId WIX_COMMENTS.COMMENT_THREAD
|
|
3496
|
+
* @applicableIdentity APP
|
|
3497
|
+
* @fqn wix.comments.ng.v1.CommentsNg.GetCommentThread
|
|
3498
|
+
*/
|
|
3499
|
+
declare function getCommentThread(commentId: string, options?: GetCommentThreadOptions): Promise<NonNullablePaths<GetCommentThreadResponse, {
|
|
3500
|
+
[P in CommentNonNullablePaths]: `comments.${number}.${P}`;
|
|
3501
|
+
}[CommentNonNullablePaths]>>;
|
|
2936
3502
|
interface GetCommentThreadOptions {
|
|
2937
3503
|
/**
|
|
2938
3504
|
* App ID.
|
|
@@ -2946,24 +3512,95 @@ interface GetCommentThreadOptions {
|
|
|
2946
3512
|
/** Reply sorting. */
|
|
2947
3513
|
replySort?: ReplySort;
|
|
2948
3514
|
}
|
|
3515
|
+
/**
|
|
3516
|
+
* Publishes multiple comments with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
3517
|
+
* @param appId - ID of the app where to publish the comment.
|
|
3518
|
+
* @public
|
|
3519
|
+
* @requiredField appId
|
|
3520
|
+
* @requiredField options
|
|
3521
|
+
* @requiredField options.filter
|
|
3522
|
+
* @permissionId WIX_COMMENTS.BULK_COMMENT_PUBLISH
|
|
3523
|
+
* @applicableIdentity APP
|
|
3524
|
+
* @fqn wix.comments.ng.v1.CommentsNg.BulkPublishComment
|
|
3525
|
+
*/
|
|
3526
|
+
declare function bulkPublishComment(appId: string, options: NonNullablePaths<BulkPublishCommentOptions, `filter`>): Promise<NonNullablePaths<BulkPublishCommentResponse, `jobId`>>;
|
|
2949
3527
|
interface BulkPublishCommentOptions {
|
|
2950
3528
|
/** 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
3529
|
filter: Record<string, any> | null;
|
|
2952
3530
|
}
|
|
3531
|
+
/**
|
|
3532
|
+
* Hides multiple comments. The comment status becomes `HIDDEN`.
|
|
3533
|
+
* @param appId - ID of the app where to hide the comments.
|
|
3534
|
+
* @public
|
|
3535
|
+
* @requiredField appId
|
|
3536
|
+
* @requiredField options
|
|
3537
|
+
* @requiredField options.filter
|
|
3538
|
+
* @permissionId WIX_COMMENTS.BULK_COMMENT_HIDE
|
|
3539
|
+
* @applicableIdentity APP
|
|
3540
|
+
* @fqn wix.comments.ng.v1.CommentsNg.BulkHideComment
|
|
3541
|
+
*/
|
|
3542
|
+
declare function bulkHideComment(appId: string, options: NonNullablePaths<BulkHideCommentOptions, `filter`>): Promise<NonNullablePaths<BulkHideCommentResponse, `jobId`>>;
|
|
2953
3543
|
interface BulkHideCommentOptions {
|
|
2954
3544
|
/** 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
3545
|
filter: Record<string, any> | null;
|
|
2956
3546
|
}
|
|
3547
|
+
/**
|
|
3548
|
+
* Deletes multiple comments.
|
|
3549
|
+
* @param appId - ID of the app where to delete the comments.
|
|
3550
|
+
* @public
|
|
3551
|
+
* @requiredField appId
|
|
3552
|
+
* @requiredField options
|
|
3553
|
+
* @requiredField options.filter
|
|
3554
|
+
* @permissionId WIX_COMMENTS.BULK_COMMENT_DELETE
|
|
3555
|
+
* @applicableIdentity APP
|
|
3556
|
+
* @fqn wix.comments.ng.v1.CommentsNg.BulkDeleteComment
|
|
3557
|
+
*/
|
|
3558
|
+
declare function bulkDeleteComment(appId: string, options: NonNullablePaths<BulkDeleteCommentOptions, `filter`>): Promise<NonNullablePaths<BulkDeleteCommentResponse, `jobId`>>;
|
|
2957
3559
|
interface BulkDeleteCommentOptions {
|
|
2958
3560
|
/** 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
3561
|
filter: Record<string, any> | null;
|
|
2960
3562
|
}
|
|
3563
|
+
/**
|
|
3564
|
+
* Moderates the draft content of multiple comments that match the specified filter.
|
|
3565
|
+
*
|
|
3566
|
+
* The same action, `APPROVE` or `REJECT`, applies to all comments that match the filter.
|
|
3567
|
+
* - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
|
|
3568
|
+
*
|
|
3569
|
+
* - `REJECT`: Handles the draft content based on the current comment status:
|
|
3570
|
+
* - If the comment `status` is `PUBLISHED`, clears `draftContent`.
|
|
3571
|
+
* - If the comment `status` is `PENDING`, keeps `draftContent` unchanged and changes `status` to `HIDDEN`.
|
|
3572
|
+
*
|
|
3573
|
+
* To moderate a single comment, call Moderate Draft Content.
|
|
3574
|
+
* @param appId - ID of the app where to moderate the comments.
|
|
3575
|
+
* @public
|
|
3576
|
+
* @requiredField appId
|
|
3577
|
+
* @requiredField options
|
|
3578
|
+
* @requiredField options.draftContentAction
|
|
3579
|
+
* @requiredField options.filter
|
|
3580
|
+
* @permissionId WIX_COMMENTS.BULK_COMMENT_MODERATE_DRAFT_CONTENT
|
|
3581
|
+
* @applicableIdentity APP
|
|
3582
|
+
* @fqn wix.comments.ng.v1.CommentsNg.BulkModerateDraftContent
|
|
3583
|
+
*/
|
|
3584
|
+
declare function bulkModerateDraftContent(appId: string, options: NonNullablePaths<BulkModerateDraftContentOptions, `draftContentAction` | `filter`>): Promise<NonNullablePaths<BulkModerateDraftContentResponse, `jobId`>>;
|
|
2961
3585
|
interface BulkModerateDraftContentOptions {
|
|
2962
3586
|
/** 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
3587
|
filter: Record<string, any> | null;
|
|
2964
3588
|
/** Action to do regarding draft content */
|
|
2965
3589
|
draftContentAction: ActionWithLiterals;
|
|
2966
3590
|
}
|
|
3591
|
+
/**
|
|
3592
|
+
* Moves multiple comments to another resource.
|
|
3593
|
+
* @param appId - ID of the app from which to move the comments.
|
|
3594
|
+
* @public
|
|
3595
|
+
* @requiredField appId
|
|
3596
|
+
* @requiredField options.destination.contextId
|
|
3597
|
+
* @requiredField options.destination.resourceId
|
|
3598
|
+
* @requiredField options.filter
|
|
3599
|
+
* @permissionId WIX_COMMENTS.BULK_COMMENT_MOVE
|
|
3600
|
+
* @applicableIdentity APP
|
|
3601
|
+
* @fqn wix.comments.ng.v1.CommentsNg.BulkMoveCommentByFilter
|
|
3602
|
+
*/
|
|
3603
|
+
declare function bulkMoveCommentByFilter(appId: string, options?: NonNullablePaths<BulkMoveCommentByFilterOptions, `destination.contextId` | `destination.resourceId` | `filter`>): Promise<NonNullablePaths<BulkMoveCommentByFilterResponse, `jobId`>>;
|
|
2967
3604
|
interface BulkMoveCommentByFilterOptions {
|
|
2968
3605
|
/** 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
3606
|
filter: Record<string, any> | null;
|
|
@@ -2971,4 +3608,4 @@ interface BulkMoveCommentByFilterOptions {
|
|
|
2971
3608
|
destination?: Destination;
|
|
2972
3609
|
}
|
|
2973
3610
|
|
|
2974
|
-
export {
|
|
3611
|
+
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 };
|