@wix/auto_sdk_comments_comments 1.0.16 → 1.0.17
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/{internal/cjs/src/comments-v2-comment-comments.universal.d.ts → comments-v2-comment-comments.universal-kzUoSqmO.d.mts} +315 -774
- package/build/{es/src/comments-v2-comment-comments.universal.d.ts → comments-v2-comment-comments.universal-kzUoSqmO.d.ts} +315 -774
- package/build/index.d.mts +257 -0
- package/build/index.d.ts +257 -0
- package/build/index.js +5269 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +5182 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/comments-v2-comment-comments.universal.d.ts → comments-v2-comment-comments.universal-kzUoSqmO.d.mts} +315 -774
- package/build/{cjs/src/comments-v2-comment-comments.universal.d.ts → internal/comments-v2-comment-comments.universal-kzUoSqmO.d.ts} +315 -774
- package/build/internal/index.d.mts +257 -0
- package/build/internal/index.d.ts +257 -0
- package/build/internal/index.js +5269 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +5182 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/comments-v2-comment-comments.types.d.ts → internal/meta.d.mts} +274 -590
- package/build/internal/{cjs/src/comments-v2-comment-comments.types.d.ts → meta.d.ts} +274 -590
- package/build/internal/meta.js +2832 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +2788 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/comments-v2-comment-comments.types.d.ts → meta.d.mts} +274 -590
- package/build/{internal/es/src/comments-v2-comment-comments.types.d.ts → meta.d.ts} +274 -590
- package/build/meta.js +2832 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +2788 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +12 -11
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.context.d.ts +0 -68
- package/build/cjs/src/comments-v2-comment-comments.context.js +0 -109
- package/build/cjs/src/comments-v2-comment-comments.context.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.http.d.ts +0 -90
- package/build/cjs/src/comments-v2-comment-comments.http.js +0 -2533
- package/build/cjs/src/comments-v2-comment-comments.http.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.meta.d.ts +0 -48
- package/build/cjs/src/comments-v2-comment-comments.meta.js +0 -370
- package/build/cjs/src/comments-v2-comment-comments.meta.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.public.d.ts +0 -202
- package/build/cjs/src/comments-v2-comment-comments.public.js +0 -1341
- package/build/cjs/src/comments-v2-comment-comments.public.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.types.js +0 -386
- package/build/cjs/src/comments-v2-comment-comments.types.js.map +0 -1
- package/build/cjs/src/comments-v2-comment-comments.universal.js +0 -1606
- package/build/cjs/src/comments-v2-comment-comments.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/comments-v2-comment-comments.context.d.ts +0 -68
- package/build/es/src/comments-v2-comment-comments.context.js +0 -68
- package/build/es/src/comments-v2-comment-comments.context.js.map +0 -1
- package/build/es/src/comments-v2-comment-comments.http.d.ts +0 -90
- package/build/es/src/comments-v2-comment-comments.http.js +0 -2512
- package/build/es/src/comments-v2-comment-comments.http.js.map +0 -1
- package/build/es/src/comments-v2-comment-comments.meta.d.ts +0 -48
- package/build/es/src/comments-v2-comment-comments.meta.js +0 -326
- package/build/es/src/comments-v2-comment-comments.meta.js.map +0 -1
- package/build/es/src/comments-v2-comment-comments.public.d.ts +0 -202
- package/build/es/src/comments-v2-comment-comments.public.js +0 -1282
- package/build/es/src/comments-v2-comment-comments.public.js.map +0 -1
- package/build/es/src/comments-v2-comment-comments.types.js +0 -383
- package/build/es/src/comments-v2-comment-comments.types.js.map +0 -1
- package/build/es/src/comments-v2-comment-comments.universal.js +0 -1561
- package/build/es/src/comments-v2-comment-comments.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.context.d.ts +0 -68
- package/build/internal/cjs/src/comments-v2-comment-comments.context.js +0 -109
- package/build/internal/cjs/src/comments-v2-comment-comments.context.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.http.d.ts +0 -90
- package/build/internal/cjs/src/comments-v2-comment-comments.http.js +0 -2533
- package/build/internal/cjs/src/comments-v2-comment-comments.http.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.meta.d.ts +0 -48
- package/build/internal/cjs/src/comments-v2-comment-comments.meta.js +0 -370
- package/build/internal/cjs/src/comments-v2-comment-comments.meta.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.public.d.ts +0 -202
- package/build/internal/cjs/src/comments-v2-comment-comments.public.js +0 -1341
- package/build/internal/cjs/src/comments-v2-comment-comments.public.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.types.js +0 -386
- package/build/internal/cjs/src/comments-v2-comment-comments.types.js.map +0 -1
- package/build/internal/cjs/src/comments-v2-comment-comments.universal.js +0 -1606
- package/build/internal/cjs/src/comments-v2-comment-comments.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.context.d.ts +0 -68
- package/build/internal/es/src/comments-v2-comment-comments.context.js +0 -68
- package/build/internal/es/src/comments-v2-comment-comments.context.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.http.d.ts +0 -90
- package/build/internal/es/src/comments-v2-comment-comments.http.js +0 -2512
- package/build/internal/es/src/comments-v2-comment-comments.http.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.meta.d.ts +0 -48
- package/build/internal/es/src/comments-v2-comment-comments.meta.js +0 -326
- package/build/internal/es/src/comments-v2-comment-comments.meta.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.public.d.ts +0 -202
- package/build/internal/es/src/comments-v2-comment-comments.public.js +0 -1282
- package/build/internal/es/src/comments-v2-comment-comments.public.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.types.js +0 -383
- package/build/internal/es/src/comments-v2-comment-comments.types.js.map +0 -1
- package/build/internal/es/src/comments-v2-comment-comments.universal.js +0 -1561
- package/build/internal/es/src/comments-v2-comment-comments.universal.js.map +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { C as Comment, U as UpdateComment, M as ModerateDraftContentOptions, a as ModerateDraftContentResponse, b as CommentsQueryBuilder, c as MarkCommentResponse, d as UnmarkCommentResponse, H as HideCommentResponse, P as PublishCommentResponse, e as CountCommentsOptions, f as CountCommentsResponse, L as ListCommentsByResourceOptions, g as ListCommentsByResourceResponse, G as GetCommentThreadOptions, h as GetCommentThreadResponse, B as BulkPublishCommentOptions, i as BulkPublishCommentResponse, j as BulkHideCommentOptions, k as BulkHideCommentResponse, l as BulkDeleteCommentOptions, m as BulkDeleteCommentResponse, n as BulkModerateDraftContentOptions, o as BulkModerateDraftContentResponse, p as BulkMoveCommentByFilterOptions, q as BulkMoveCommentByFilterResponse, r as CommentContentChangedEnvelope, s as CommentHiddenEnvelope, t as CommentMarkedEnvelope, u as CommentMovedEnvelope, v as CommentPublishedEnvelope, w as CommentUnmarkedEnvelope, x as CommentCreatedEnvelope, y as CommentResourceCommentCountChangedEnvelope, z as CommentUpdatedEnvelope } from './comments-v2-comment-comments.universal-kzUoSqmO.mjs';
|
|
3
|
+
export { ac as Action, cU as ActionEvent, J as Alignment, bh as AnchorData, bn as AppEmbedData, bo as AppEmbedDataAppDataOneOf, a5 as AppType, bN as Attachment, bO as AttachmentMediaOneOf, bC as AudioData, b7 as Background, b8 as BackgroundBackgroundOneOf, a2 as BackgroundType, cY as BaseEventMetadata, bF as BlockquoteData, bp as BookingData, an as Border, bA as BorderColors, cJ as BulkDeleteCommentRequest, cI as BulkHideCommentRequest, cK as BulkModerateDraftContentRequest, cL as BulkMoveCommentByFilterRequest, cH as BulkPublishCommentRequest, bE as BulletedListData, am as ButtonData, bG as CaptionData, bz as CellStyle, ay as CodeBlockData, bv as CollapsibleListData, bi as ColorData, ao as Colors, bS as CommentAuthor, bT as CommentAuthorIdentityOneOf, ah as CommentContent, cf as CommentContentChanged, ci as CommentDeleted, cl as CommentHidden, cv as CommentMarked, c6 as CommentModerated, cN as CommentMoved, ck as CommentPublished, bW as CommentReactionSummary, cC as CommentSort, cx as CommentUnmarked, c_ as CommentsQueryResult, c8 as ContactDetails, bQ as ContentAuthor, bR as ContentAuthorAuthorOneOf, cA as CountCommentsRequest, c7 as CreateCommentRequest, c9 as CreateCommentResponse, Q as Crop, cq as CursorPaging, cs as CursorPagingMetadata, cn as CursorQuery, co as CursorQueryPagingMethodOneOf, ct as Cursors, bf as Decoration, bg as DecorationDataOneOf, a3 as DecorationType, c0 as DeleteByFilterOperation, b$ as DeleteByIdsOperation, cg as DeleteCommentRequest, ch as DeleteCommentResponse, bd as Design, cM as Destination, bx as Dimensions, a7 as Direction, aA as DividerData, bJ as DocumentStyle, cO as DomainEvent, cP as DomainEventBodyOneOf, bt as EmbedData, cQ as EntityCreatedEvent, cT as EntityDeletedEvent, cS as EntityUpdatedEvent, bq as EventData, cZ as EventMetadata, aB as FileData, aC as FileSource, aD as FileSourceDataOneOf, bl as FontSizeData, a4 as FontType, aQ as GIF, aP as GIFData, S as GIFType, aF as GalleryData, aL as GalleryOptions, cb as GetCommentRequest, cc as GetCommentResponse, cG as GetCommentThreadRequest, b6 as Gradient, aS as HTMLData, aT as HTMLDataDataOneOf, aR as HeadingData, at as Height, cy as HideCommentRequest, cW as IdentificationData, cX as IdentificationDataIdOneOf, aH as Image, aU as ImageData, aW as ImageDataStyles, a6 as InitialExpandedItems, bZ as InternalDocument, c1 as InternalDocumentUpdateByFilterOperation, b_ as InternalDocumentUpdateOperation, c2 as InternalUpdateExistingOperation, aJ as Item, aK as ItemDataOneOf, aN as ItemStyle, aM as Layout, bH as LayoutCellData, K as LayoutType, F as LineStyle, av as Link, bj as LinkData, aw as LinkDataOneOf, aX as LinkPreviewData, aY as LinkPreviewDataStyles, cE as ListCommentsByResourceCursorPaging, cB as ListCommentsByResourceRequest, bB as ListValue, aZ as MapData, a_ as MapSettings, Z as MapType, cu as MarkCommentRequest, aG as Media, bL as Mention, bk as MentionData, bM as MentionIdentityOneOf, cV as MessageEnvelope, bI as Metadata, cj as ModerateDraftContentRequest, aj as Node, ak as NodeDataOneOf, al as NodeStyle, N as NodeType, a9 as NullValue, bu as Oembed, b2 as Option, ba as OptionDesign, b5 as OptionLayout, ae as Order, bD as OrderedListData, O as Orientation, aE as PDFSettings, a$ as ParagraphData, bU as ParentComment, b1 as Permissions, bs as PlaybackOptions, ap as PluginContainerData, A as PluginContainerDataAlignment, aq as PluginContainerDataWidth, ar as PluginContainerDataWidthDataOneOf, bb as Poll, b0 as PollData, bc as PollDataLayout, b9 as PollDesign, b4 as PollLayout, a1 as PollLayoutDirection, a0 as PollLayoutType, Y as Position, cz as PublishCommentRequest, cm as QueryCommentsRequest, cr as QueryCommentsResponse, ax as Rel, cF as RepliesListResponse, cD as ReplySort, af as ReplySortOrder, ca as ResourceCommentCountChanged, cR as RestoreInfo, ai as RichContent, b3 as Settings, ad as SortOrder, cp as Sorting, X as Source, as as Spoiler, bm as SpoilerData, aa as Status, au as Styles, aV as StylesBorder, by as TableCellData, bw as TableData, D as Target, E as TextAlignment, be as TextData, bK as TextNodeStyle, az as TextStyle, aO as Thumbnails, R as ThumbnailsAlignment, T as Type, cw as UnmarkCommentRequest, cd as UpdateCommentRequest, ce as UpdateCommentResponse, bX as UpdateInternalDocumentsEvent, bY as UpdateInternalDocumentsEventOperationOneOf, c4 as VersionedDeleteByIdsOperation, c5 as VersionedDocumentId, c3 as VersionedDocumentUpdateOperation, ab as VersioningMode, a8 as VerticalAlignment, aI as Video, br as VideoData, bP as VideoResolution, V as ViewMode, _ as ViewRole, $ as VoteRole, bV as VoteSummary, ag as WebhookIdentityType, I as Width, W as WidthType } from './comments-v2-comment-comments.universal-kzUoSqmO.mjs';
|
|
4
|
+
|
|
5
|
+
declare function createComment$1(httpClient: HttpClient): CreateCommentSignature;
|
|
6
|
+
interface CreateCommentSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new comment and publishes it.
|
|
9
|
+
*
|
|
10
|
+
* The `appId`, `contextId`, and `resourceId` are all required and associate the created comment with the specific
|
|
11
|
+
* resource it responds to. See **Integrations** in the Comments introduction for a list of integrated scopes for these fields.
|
|
12
|
+
*
|
|
13
|
+
* If the created comment is a direct response to another comment, the `commentId` of the parent comment should be passed
|
|
14
|
+
* as `parentComment.id` in this comment's request. See **Terminology** in the Comments introduction for additional information on parent comments and replies.
|
|
15
|
+
* @param - Comment to create.
|
|
16
|
+
* @returns Created comment.
|
|
17
|
+
*/
|
|
18
|
+
(comment: Comment): Promise<Comment>;
|
|
19
|
+
}
|
|
20
|
+
declare function getComment$1(httpClient: HttpClient): GetCommentSignature;
|
|
21
|
+
interface GetCommentSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a comment.
|
|
24
|
+
* @param - ID of the comment to retrieve.
|
|
25
|
+
* @returns Retrieved comment.
|
|
26
|
+
*/
|
|
27
|
+
(commentId: string): Promise<Comment>;
|
|
28
|
+
}
|
|
29
|
+
declare function updateComment$1(httpClient: HttpClient): UpdateCommentSignature;
|
|
30
|
+
interface UpdateCommentSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Updates a comment.
|
|
33
|
+
*
|
|
34
|
+
* Each time the comment is updated, `revision` increments by 1. The current `revision` must be
|
|
35
|
+
* passed when updating the comment. This ensures you're working with the latest comment and
|
|
36
|
+
* prevents unintended overwrites.
|
|
37
|
+
* @param - Comment ID.
|
|
38
|
+
* @returns Updated comment.
|
|
39
|
+
*/
|
|
40
|
+
(_id: string, comment: UpdateComment): Promise<Comment>;
|
|
41
|
+
}
|
|
42
|
+
declare function deleteComment$1(httpClient: HttpClient): DeleteCommentSignature;
|
|
43
|
+
interface DeleteCommentSignature {
|
|
44
|
+
/**
|
|
45
|
+
* Deletes a comment.
|
|
46
|
+
*
|
|
47
|
+
* This method deletes the `content` of the comment and sets its `status` to `DELETED`.
|
|
48
|
+
* @param - ID of the comment to delete.
|
|
49
|
+
*/
|
|
50
|
+
(commentId: string): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
declare function moderateDraftContent$1(httpClient: HttpClient): ModerateDraftContentSignature;
|
|
53
|
+
interface ModerateDraftContentSignature {
|
|
54
|
+
/**
|
|
55
|
+
* Moderates the draft content of a comment.
|
|
56
|
+
*
|
|
57
|
+
* - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
|
|
58
|
+
* - `REJECT`: Clears `draftContent` if comment `status` is `PUBLISHED` or, if comment `status` is `PENDING` it will keep `draftContent` the same and change `status` to `HIDDEN`.
|
|
59
|
+
* @param - ID of the comment to moderate.
|
|
60
|
+
* @param - Revision number, which increments by `1` each time the comment is updated.
|
|
61
|
+
*
|
|
62
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the comment.
|
|
63
|
+
*/
|
|
64
|
+
(commentId: string, revision: string, options?: ModerateDraftContentOptions | undefined): Promise<ModerateDraftContentResponse>;
|
|
65
|
+
}
|
|
66
|
+
declare function queryComments$1(httpClient: HttpClient): QueryCommentsSignature;
|
|
67
|
+
interface QueryCommentsSignature {
|
|
68
|
+
/**
|
|
69
|
+
* Creates a query to retrieve a list of comments.
|
|
70
|
+
*
|
|
71
|
+
* The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
|
|
72
|
+
*
|
|
73
|
+
* The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
|
|
74
|
+
*
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
|
|
78
|
+
* + `ascending("_id")`
|
|
79
|
+
*
|
|
80
|
+
* 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"`.
|
|
81
|
+
*
|
|
82
|
+
* 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).
|
|
83
|
+
* @param - App ID to query comments for.
|
|
84
|
+
*/
|
|
85
|
+
(appId: string): CommentsQueryBuilder;
|
|
86
|
+
}
|
|
87
|
+
declare function markComment$1(httpClient: HttpClient): MarkCommentSignature;
|
|
88
|
+
interface MarkCommentSignature {
|
|
89
|
+
/**
|
|
90
|
+
* Sets `marked` to `TRUE` to mark a comment.
|
|
91
|
+
*
|
|
92
|
+
* Call Query Comments to filter for marked comments to then apply customization to.
|
|
93
|
+
* See Sample Flows for an example.
|
|
94
|
+
* @param - ID of the comment to mark.
|
|
95
|
+
*/
|
|
96
|
+
(commentId: string): Promise<MarkCommentResponse>;
|
|
97
|
+
}
|
|
98
|
+
declare function unmarkComment$1(httpClient: HttpClient): UnmarkCommentSignature;
|
|
99
|
+
interface UnmarkCommentSignature {
|
|
100
|
+
/**
|
|
101
|
+
* Sets `marked` to `FALSE` to unmark a comment.
|
|
102
|
+
* @param - ID of the comment to unmark.
|
|
103
|
+
*/
|
|
104
|
+
(commentId: string): Promise<UnmarkCommentResponse>;
|
|
105
|
+
}
|
|
106
|
+
declare function hideComment$1(httpClient: HttpClient): HideCommentSignature;
|
|
107
|
+
interface HideCommentSignature {
|
|
108
|
+
/**
|
|
109
|
+
* Hides a comment in a widget. The comment status becomes `HIDDEN`.
|
|
110
|
+
* @param - ID of the comment to hide.
|
|
111
|
+
*/
|
|
112
|
+
(commentId: string): Promise<HideCommentResponse>;
|
|
113
|
+
}
|
|
114
|
+
declare function publishComment$1(httpClient: HttpClient): PublishCommentSignature;
|
|
115
|
+
interface PublishCommentSignature {
|
|
116
|
+
/**
|
|
117
|
+
* Publishes a comment with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
118
|
+
*
|
|
119
|
+
* To publish a new comment, call Create Comment.
|
|
120
|
+
* @param - ID of the comment to publish.
|
|
121
|
+
*/
|
|
122
|
+
(commentId: string): Promise<PublishCommentResponse>;
|
|
123
|
+
}
|
|
124
|
+
declare function countComments$1(httpClient: HttpClient): CountCommentsSignature;
|
|
125
|
+
interface CountCommentsSignature {
|
|
126
|
+
/**
|
|
127
|
+
* Counts comments, given the specified filtering. Comments with the `HIDDEN` status are not included in the response.
|
|
128
|
+
* @param - App ID to count the comments of.
|
|
129
|
+
*/
|
|
130
|
+
(appId: string, options?: CountCommentsOptions | undefined): Promise<CountCommentsResponse>;
|
|
131
|
+
}
|
|
132
|
+
declare function listCommentsByResource$1(httpClient: HttpClient): ListCommentsByResourceSignature;
|
|
133
|
+
interface ListCommentsByResourceSignature {
|
|
134
|
+
/**
|
|
135
|
+
* Lists published comments and replies from a specified resource, such as a blog post.
|
|
136
|
+
* @param - ID of the app from which the comments are listed.
|
|
137
|
+
*/
|
|
138
|
+
(appId: string, options?: ListCommentsByResourceOptions | undefined): Promise<ListCommentsByResourceResponse>;
|
|
139
|
+
}
|
|
140
|
+
declare function getCommentThread$1(httpClient: HttpClient): GetCommentThreadSignature;
|
|
141
|
+
interface GetCommentThreadSignature {
|
|
142
|
+
/**
|
|
143
|
+
* Returns a thread of a comment or a reply.
|
|
144
|
+
*
|
|
145
|
+
* 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.
|
|
146
|
+
*
|
|
147
|
+
* 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.
|
|
148
|
+
* @param - Comment ID.
|
|
149
|
+
*/
|
|
150
|
+
(commentId: string, options?: GetCommentThreadOptions | undefined): Promise<GetCommentThreadResponse>;
|
|
151
|
+
}
|
|
152
|
+
declare function bulkPublishComment$1(httpClient: HttpClient): BulkPublishCommentSignature;
|
|
153
|
+
interface BulkPublishCommentSignature {
|
|
154
|
+
/**
|
|
155
|
+
* Publishes multiple comments with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
156
|
+
* @param - ID of the app where to publish the comment.
|
|
157
|
+
*/
|
|
158
|
+
(appId: string, options: BulkPublishCommentOptions): Promise<BulkPublishCommentResponse>;
|
|
159
|
+
}
|
|
160
|
+
declare function bulkHideComment$1(httpClient: HttpClient): BulkHideCommentSignature;
|
|
161
|
+
interface BulkHideCommentSignature {
|
|
162
|
+
/**
|
|
163
|
+
* Hides multiple comments. The comment status becomes `HIDDEN`.
|
|
164
|
+
* @param - ID of the app where to hide the comments.
|
|
165
|
+
*/
|
|
166
|
+
(appId: string, options: BulkHideCommentOptions): Promise<BulkHideCommentResponse>;
|
|
167
|
+
}
|
|
168
|
+
declare function bulkDeleteComment$1(httpClient: HttpClient): BulkDeleteCommentSignature;
|
|
169
|
+
interface BulkDeleteCommentSignature {
|
|
170
|
+
/**
|
|
171
|
+
* Deletes multiple comments.
|
|
172
|
+
* @param - ID of the app where to delete the comments.
|
|
173
|
+
*/
|
|
174
|
+
(appId: string, options: BulkDeleteCommentOptions): Promise<BulkDeleteCommentResponse>;
|
|
175
|
+
}
|
|
176
|
+
declare function bulkModerateDraftContent$1(httpClient: HttpClient): BulkModerateDraftContentSignature;
|
|
177
|
+
interface BulkModerateDraftContentSignature {
|
|
178
|
+
/**
|
|
179
|
+
* Moderates the draft content of multiple comments.
|
|
180
|
+
* @param - ID of the app where to moderate the comments.
|
|
181
|
+
*/
|
|
182
|
+
(appId: string, options: BulkModerateDraftContentOptions): Promise<BulkModerateDraftContentResponse>;
|
|
183
|
+
}
|
|
184
|
+
declare function bulkMoveCommentByFilter$1(httpClient: HttpClient): BulkMoveCommentByFilterSignature;
|
|
185
|
+
interface BulkMoveCommentByFilterSignature {
|
|
186
|
+
/**
|
|
187
|
+
* Moves multiple comments to another resource.
|
|
188
|
+
* @param - ID of the app from which to move the comments.
|
|
189
|
+
*/
|
|
190
|
+
(appId: string, options?: BulkMoveCommentByFilterOptions | undefined): Promise<BulkMoveCommentByFilterResponse>;
|
|
191
|
+
}
|
|
192
|
+
declare const onCommentContentChanged$1: EventDefinition<CommentContentChangedEnvelope, "wix.comments.v2.comment_comment_content_changed">;
|
|
193
|
+
declare const onCommentHidden$1: EventDefinition<CommentHiddenEnvelope, "wix.comments.v2.comment_comment_hidden">;
|
|
194
|
+
declare const onCommentMarked$1: EventDefinition<CommentMarkedEnvelope, "wix.comments.v2.comment_comment_marked">;
|
|
195
|
+
declare const onCommentMoved$1: EventDefinition<CommentMovedEnvelope, "wix.comments.v2.comment_comment_moved">;
|
|
196
|
+
declare const onCommentPublished$1: EventDefinition<CommentPublishedEnvelope, "wix.comments.v2.comment_comment_published">;
|
|
197
|
+
declare const onCommentUnmarked$1: EventDefinition<CommentUnmarkedEnvelope, "wix.comments.v2.comment_comment_unmarked">;
|
|
198
|
+
declare const onCommentCreated$1: EventDefinition<CommentCreatedEnvelope, "wix.comments.v2.comment_created">;
|
|
199
|
+
declare const onCommentResourceCommentCountChanged$1: EventDefinition<CommentResourceCommentCountChangedEnvelope, "wix.comments.v2.comment_resource_comment_count_changed">;
|
|
200
|
+
declare const onCommentUpdated$1: EventDefinition<CommentUpdatedEnvelope, "wix.comments.v2.comment_updated">;
|
|
201
|
+
|
|
202
|
+
declare const createComment: MaybeContext<BuildRESTFunction<typeof createComment$1> & typeof createComment$1>;
|
|
203
|
+
declare const getComment: MaybeContext<BuildRESTFunction<typeof getComment$1> & typeof getComment$1>;
|
|
204
|
+
declare const updateComment: MaybeContext<BuildRESTFunction<typeof updateComment$1> & typeof updateComment$1>;
|
|
205
|
+
declare const deleteComment: MaybeContext<BuildRESTFunction<typeof deleteComment$1> & typeof deleteComment$1>;
|
|
206
|
+
declare const moderateDraftContent: MaybeContext<BuildRESTFunction<typeof moderateDraftContent$1> & typeof moderateDraftContent$1>;
|
|
207
|
+
declare const queryComments: MaybeContext<BuildRESTFunction<typeof queryComments$1> & typeof queryComments$1>;
|
|
208
|
+
declare const markComment: MaybeContext<BuildRESTFunction<typeof markComment$1> & typeof markComment$1>;
|
|
209
|
+
declare const unmarkComment: MaybeContext<BuildRESTFunction<typeof unmarkComment$1> & typeof unmarkComment$1>;
|
|
210
|
+
declare const hideComment: MaybeContext<BuildRESTFunction<typeof hideComment$1> & typeof hideComment$1>;
|
|
211
|
+
declare const publishComment: MaybeContext<BuildRESTFunction<typeof publishComment$1> & typeof publishComment$1>;
|
|
212
|
+
declare const countComments: MaybeContext<BuildRESTFunction<typeof countComments$1> & typeof countComments$1>;
|
|
213
|
+
declare const listCommentsByResource: MaybeContext<BuildRESTFunction<typeof listCommentsByResource$1> & typeof listCommentsByResource$1>;
|
|
214
|
+
declare const getCommentThread: MaybeContext<BuildRESTFunction<typeof getCommentThread$1> & typeof getCommentThread$1>;
|
|
215
|
+
declare const bulkPublishComment: MaybeContext<BuildRESTFunction<typeof bulkPublishComment$1> & typeof bulkPublishComment$1>;
|
|
216
|
+
declare const bulkHideComment: MaybeContext<BuildRESTFunction<typeof bulkHideComment$1> & typeof bulkHideComment$1>;
|
|
217
|
+
declare const bulkDeleteComment: MaybeContext<BuildRESTFunction<typeof bulkDeleteComment$1> & typeof bulkDeleteComment$1>;
|
|
218
|
+
declare const bulkModerateDraftContent: MaybeContext<BuildRESTFunction<typeof bulkModerateDraftContent$1> & typeof bulkModerateDraftContent$1>;
|
|
219
|
+
declare const bulkMoveCommentByFilter: MaybeContext<BuildRESTFunction<typeof bulkMoveCommentByFilter$1> & typeof bulkMoveCommentByFilter$1>;
|
|
220
|
+
/**
|
|
221
|
+
* Triggered when comment content is updated.
|
|
222
|
+
*/
|
|
223
|
+
declare const onCommentContentChanged: BuildEventDefinition<typeof onCommentContentChanged$1>;
|
|
224
|
+
/**
|
|
225
|
+
* Triggered when a comment is hidden.
|
|
226
|
+
*/
|
|
227
|
+
declare const onCommentHidden: BuildEventDefinition<typeof onCommentHidden$1>;
|
|
228
|
+
/**
|
|
229
|
+
* Triggered when a comment is marked.
|
|
230
|
+
*/
|
|
231
|
+
declare const onCommentMarked: BuildEventDefinition<typeof onCommentMarked$1>;
|
|
232
|
+
/**
|
|
233
|
+
* Triggered when a comment is moved.
|
|
234
|
+
*/
|
|
235
|
+
declare const onCommentMoved: BuildEventDefinition<typeof onCommentMoved$1>;
|
|
236
|
+
/**
|
|
237
|
+
* Triggered when a comment is published.
|
|
238
|
+
*/
|
|
239
|
+
declare const onCommentPublished: BuildEventDefinition<typeof onCommentPublished$1>;
|
|
240
|
+
/**
|
|
241
|
+
* Triggered when a comment is unmarked.
|
|
242
|
+
*/
|
|
243
|
+
declare const onCommentUnmarked: BuildEventDefinition<typeof onCommentUnmarked$1>;
|
|
244
|
+
/**
|
|
245
|
+
* Triggered when a comment is created.
|
|
246
|
+
*/
|
|
247
|
+
declare const onCommentCreated: BuildEventDefinition<typeof onCommentCreated$1>;
|
|
248
|
+
/**
|
|
249
|
+
* Triggered when the total number of comments has changed in a resource.
|
|
250
|
+
*/
|
|
251
|
+
declare const onCommentResourceCommentCountChanged: BuildEventDefinition<typeof onCommentResourceCommentCountChanged$1>;
|
|
252
|
+
/**
|
|
253
|
+
* Triggered when a comment is updated.
|
|
254
|
+
*/
|
|
255
|
+
declare const onCommentUpdated: BuildEventDefinition<typeof onCommentUpdated$1>;
|
|
256
|
+
|
|
257
|
+
export { BulkDeleteCommentOptions, BulkDeleteCommentResponse, BulkHideCommentOptions, BulkHideCommentResponse, BulkModerateDraftContentOptions, BulkModerateDraftContentResponse, BulkMoveCommentByFilterOptions, BulkMoveCommentByFilterResponse, BulkPublishCommentOptions, BulkPublishCommentResponse, Comment, CommentContentChangedEnvelope, CommentCreatedEnvelope, CommentHiddenEnvelope, CommentMarkedEnvelope, CommentMovedEnvelope, CommentPublishedEnvelope, CommentResourceCommentCountChangedEnvelope, CommentUnmarkedEnvelope, CommentUpdatedEnvelope, CommentsQueryBuilder, CountCommentsOptions, CountCommentsResponse, GetCommentThreadOptions, GetCommentThreadResponse, HideCommentResponse, ListCommentsByResourceOptions, ListCommentsByResourceResponse, MarkCommentResponse, ModerateDraftContentOptions, ModerateDraftContentResponse, PublishCommentResponse, UnmarkCommentResponse, UpdateComment, 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 };
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { HttpClient, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { C as Comment, U as UpdateComment, M as ModerateDraftContentOptions, a as ModerateDraftContentResponse, b as CommentsQueryBuilder, c as MarkCommentResponse, d as UnmarkCommentResponse, H as HideCommentResponse, P as PublishCommentResponse, e as CountCommentsOptions, f as CountCommentsResponse, L as ListCommentsByResourceOptions, g as ListCommentsByResourceResponse, G as GetCommentThreadOptions, h as GetCommentThreadResponse, B as BulkPublishCommentOptions, i as BulkPublishCommentResponse, j as BulkHideCommentOptions, k as BulkHideCommentResponse, l as BulkDeleteCommentOptions, m as BulkDeleteCommentResponse, n as BulkModerateDraftContentOptions, o as BulkModerateDraftContentResponse, p as BulkMoveCommentByFilterOptions, q as BulkMoveCommentByFilterResponse, r as CommentContentChangedEnvelope, s as CommentHiddenEnvelope, t as CommentMarkedEnvelope, u as CommentMovedEnvelope, v as CommentPublishedEnvelope, w as CommentUnmarkedEnvelope, x as CommentCreatedEnvelope, y as CommentResourceCommentCountChangedEnvelope, z as CommentUpdatedEnvelope } from './comments-v2-comment-comments.universal-kzUoSqmO.js';
|
|
3
|
+
export { ac as Action, cU as ActionEvent, J as Alignment, bh as AnchorData, bn as AppEmbedData, bo as AppEmbedDataAppDataOneOf, a5 as AppType, bN as Attachment, bO as AttachmentMediaOneOf, bC as AudioData, b7 as Background, b8 as BackgroundBackgroundOneOf, a2 as BackgroundType, cY as BaseEventMetadata, bF as BlockquoteData, bp as BookingData, an as Border, bA as BorderColors, cJ as BulkDeleteCommentRequest, cI as BulkHideCommentRequest, cK as BulkModerateDraftContentRequest, cL as BulkMoveCommentByFilterRequest, cH as BulkPublishCommentRequest, bE as BulletedListData, am as ButtonData, bG as CaptionData, bz as CellStyle, ay as CodeBlockData, bv as CollapsibleListData, bi as ColorData, ao as Colors, bS as CommentAuthor, bT as CommentAuthorIdentityOneOf, ah as CommentContent, cf as CommentContentChanged, ci as CommentDeleted, cl as CommentHidden, cv as CommentMarked, c6 as CommentModerated, cN as CommentMoved, ck as CommentPublished, bW as CommentReactionSummary, cC as CommentSort, cx as CommentUnmarked, c_ as CommentsQueryResult, c8 as ContactDetails, bQ as ContentAuthor, bR as ContentAuthorAuthorOneOf, cA as CountCommentsRequest, c7 as CreateCommentRequest, c9 as CreateCommentResponse, Q as Crop, cq as CursorPaging, cs as CursorPagingMetadata, cn as CursorQuery, co as CursorQueryPagingMethodOneOf, ct as Cursors, bf as Decoration, bg as DecorationDataOneOf, a3 as DecorationType, c0 as DeleteByFilterOperation, b$ as DeleteByIdsOperation, cg as DeleteCommentRequest, ch as DeleteCommentResponse, bd as Design, cM as Destination, bx as Dimensions, a7 as Direction, aA as DividerData, bJ as DocumentStyle, cO as DomainEvent, cP as DomainEventBodyOneOf, bt as EmbedData, cQ as EntityCreatedEvent, cT as EntityDeletedEvent, cS as EntityUpdatedEvent, bq as EventData, cZ as EventMetadata, aB as FileData, aC as FileSource, aD as FileSourceDataOneOf, bl as FontSizeData, a4 as FontType, aQ as GIF, aP as GIFData, S as GIFType, aF as GalleryData, aL as GalleryOptions, cb as GetCommentRequest, cc as GetCommentResponse, cG as GetCommentThreadRequest, b6 as Gradient, aS as HTMLData, aT as HTMLDataDataOneOf, aR as HeadingData, at as Height, cy as HideCommentRequest, cW as IdentificationData, cX as IdentificationDataIdOneOf, aH as Image, aU as ImageData, aW as ImageDataStyles, a6 as InitialExpandedItems, bZ as InternalDocument, c1 as InternalDocumentUpdateByFilterOperation, b_ as InternalDocumentUpdateOperation, c2 as InternalUpdateExistingOperation, aJ as Item, aK as ItemDataOneOf, aN as ItemStyle, aM as Layout, bH as LayoutCellData, K as LayoutType, F as LineStyle, av as Link, bj as LinkData, aw as LinkDataOneOf, aX as LinkPreviewData, aY as LinkPreviewDataStyles, cE as ListCommentsByResourceCursorPaging, cB as ListCommentsByResourceRequest, bB as ListValue, aZ as MapData, a_ as MapSettings, Z as MapType, cu as MarkCommentRequest, aG as Media, bL as Mention, bk as MentionData, bM as MentionIdentityOneOf, cV as MessageEnvelope, bI as Metadata, cj as ModerateDraftContentRequest, aj as Node, ak as NodeDataOneOf, al as NodeStyle, N as NodeType, a9 as NullValue, bu as Oembed, b2 as Option, ba as OptionDesign, b5 as OptionLayout, ae as Order, bD as OrderedListData, O as Orientation, aE as PDFSettings, a$ as ParagraphData, bU as ParentComment, b1 as Permissions, bs as PlaybackOptions, ap as PluginContainerData, A as PluginContainerDataAlignment, aq as PluginContainerDataWidth, ar as PluginContainerDataWidthDataOneOf, bb as Poll, b0 as PollData, bc as PollDataLayout, b9 as PollDesign, b4 as PollLayout, a1 as PollLayoutDirection, a0 as PollLayoutType, Y as Position, cz as PublishCommentRequest, cm as QueryCommentsRequest, cr as QueryCommentsResponse, ax as Rel, cF as RepliesListResponse, cD as ReplySort, af as ReplySortOrder, ca as ResourceCommentCountChanged, cR as RestoreInfo, ai as RichContent, b3 as Settings, ad as SortOrder, cp as Sorting, X as Source, as as Spoiler, bm as SpoilerData, aa as Status, au as Styles, aV as StylesBorder, by as TableCellData, bw as TableData, D as Target, E as TextAlignment, be as TextData, bK as TextNodeStyle, az as TextStyle, aO as Thumbnails, R as ThumbnailsAlignment, T as Type, cw as UnmarkCommentRequest, cd as UpdateCommentRequest, ce as UpdateCommentResponse, bX as UpdateInternalDocumentsEvent, bY as UpdateInternalDocumentsEventOperationOneOf, c4 as VersionedDeleteByIdsOperation, c5 as VersionedDocumentId, c3 as VersionedDocumentUpdateOperation, ab as VersioningMode, a8 as VerticalAlignment, aI as Video, br as VideoData, bP as VideoResolution, V as ViewMode, _ as ViewRole, $ as VoteRole, bV as VoteSummary, ag as WebhookIdentityType, I as Width, W as WidthType } from './comments-v2-comment-comments.universal-kzUoSqmO.js';
|
|
4
|
+
|
|
5
|
+
declare function createComment$1(httpClient: HttpClient): CreateCommentSignature;
|
|
6
|
+
interface CreateCommentSignature {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new comment and publishes it.
|
|
9
|
+
*
|
|
10
|
+
* The `appId`, `contextId`, and `resourceId` are all required and associate the created comment with the specific
|
|
11
|
+
* resource it responds to. See **Integrations** in the Comments introduction for a list of integrated scopes for these fields.
|
|
12
|
+
*
|
|
13
|
+
* If the created comment is a direct response to another comment, the `commentId` of the parent comment should be passed
|
|
14
|
+
* as `parentComment.id` in this comment's request. See **Terminology** in the Comments introduction for additional information on parent comments and replies.
|
|
15
|
+
* @param - Comment to create.
|
|
16
|
+
* @returns Created comment.
|
|
17
|
+
*/
|
|
18
|
+
(comment: Comment): Promise<Comment>;
|
|
19
|
+
}
|
|
20
|
+
declare function getComment$1(httpClient: HttpClient): GetCommentSignature;
|
|
21
|
+
interface GetCommentSignature {
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a comment.
|
|
24
|
+
* @param - ID of the comment to retrieve.
|
|
25
|
+
* @returns Retrieved comment.
|
|
26
|
+
*/
|
|
27
|
+
(commentId: string): Promise<Comment>;
|
|
28
|
+
}
|
|
29
|
+
declare function updateComment$1(httpClient: HttpClient): UpdateCommentSignature;
|
|
30
|
+
interface UpdateCommentSignature {
|
|
31
|
+
/**
|
|
32
|
+
* Updates a comment.
|
|
33
|
+
*
|
|
34
|
+
* Each time the comment is updated, `revision` increments by 1. The current `revision` must be
|
|
35
|
+
* passed when updating the comment. This ensures you're working with the latest comment and
|
|
36
|
+
* prevents unintended overwrites.
|
|
37
|
+
* @param - Comment ID.
|
|
38
|
+
* @returns Updated comment.
|
|
39
|
+
*/
|
|
40
|
+
(_id: string, comment: UpdateComment): Promise<Comment>;
|
|
41
|
+
}
|
|
42
|
+
declare function deleteComment$1(httpClient: HttpClient): DeleteCommentSignature;
|
|
43
|
+
interface DeleteCommentSignature {
|
|
44
|
+
/**
|
|
45
|
+
* Deletes a comment.
|
|
46
|
+
*
|
|
47
|
+
* This method deletes the `content` of the comment and sets its `status` to `DELETED`.
|
|
48
|
+
* @param - ID of the comment to delete.
|
|
49
|
+
*/
|
|
50
|
+
(commentId: string): Promise<void>;
|
|
51
|
+
}
|
|
52
|
+
declare function moderateDraftContent$1(httpClient: HttpClient): ModerateDraftContentSignature;
|
|
53
|
+
interface ModerateDraftContentSignature {
|
|
54
|
+
/**
|
|
55
|
+
* Moderates the draft content of a comment.
|
|
56
|
+
*
|
|
57
|
+
* - `APPROVE`: Moves `draftContent` to `content` and updates the comment `status` to `PUBLISHED`.
|
|
58
|
+
* - `REJECT`: Clears `draftContent` if comment `status` is `PUBLISHED` or, if comment `status` is `PENDING` it will keep `draftContent` the same and change `status` to `HIDDEN`.
|
|
59
|
+
* @param - ID of the comment to moderate.
|
|
60
|
+
* @param - Revision number, which increments by `1` each time the comment is updated.
|
|
61
|
+
*
|
|
62
|
+
* To prevent conflicting changes, the current `revision` must be passed when updating the comment.
|
|
63
|
+
*/
|
|
64
|
+
(commentId: string, revision: string, options?: ModerateDraftContentOptions | undefined): Promise<ModerateDraftContentResponse>;
|
|
65
|
+
}
|
|
66
|
+
declare function queryComments$1(httpClient: HttpClient): QueryCommentsSignature;
|
|
67
|
+
interface QueryCommentsSignature {
|
|
68
|
+
/**
|
|
69
|
+
* Creates a query to retrieve a list of comments.
|
|
70
|
+
*
|
|
71
|
+
* The `queryComments()` function builds a query to retrieve a list of comments and returns a [`CommentsQueryBuilder`](#commentsquerybuilder) object.
|
|
72
|
+
*
|
|
73
|
+
* The returned object contains the query definition, which is typically used to run the query using the [`find()`](#commentsquerybuilder/find) function.
|
|
74
|
+
*
|
|
75
|
+
* 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.
|
|
76
|
+
*
|
|
77
|
+
* `queryComments()` runs with the following `CommentsQueryBuilder` default that you can override:
|
|
78
|
+
* + `ascending("_id")`
|
|
79
|
+
*
|
|
80
|
+
* 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"`.
|
|
81
|
+
*
|
|
82
|
+
* 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).
|
|
83
|
+
* @param - App ID to query comments for.
|
|
84
|
+
*/
|
|
85
|
+
(appId: string): CommentsQueryBuilder;
|
|
86
|
+
}
|
|
87
|
+
declare function markComment$1(httpClient: HttpClient): MarkCommentSignature;
|
|
88
|
+
interface MarkCommentSignature {
|
|
89
|
+
/**
|
|
90
|
+
* Sets `marked` to `TRUE` to mark a comment.
|
|
91
|
+
*
|
|
92
|
+
* Call Query Comments to filter for marked comments to then apply customization to.
|
|
93
|
+
* See Sample Flows for an example.
|
|
94
|
+
* @param - ID of the comment to mark.
|
|
95
|
+
*/
|
|
96
|
+
(commentId: string): Promise<MarkCommentResponse>;
|
|
97
|
+
}
|
|
98
|
+
declare function unmarkComment$1(httpClient: HttpClient): UnmarkCommentSignature;
|
|
99
|
+
interface UnmarkCommentSignature {
|
|
100
|
+
/**
|
|
101
|
+
* Sets `marked` to `FALSE` to unmark a comment.
|
|
102
|
+
* @param - ID of the comment to unmark.
|
|
103
|
+
*/
|
|
104
|
+
(commentId: string): Promise<UnmarkCommentResponse>;
|
|
105
|
+
}
|
|
106
|
+
declare function hideComment$1(httpClient: HttpClient): HideCommentSignature;
|
|
107
|
+
interface HideCommentSignature {
|
|
108
|
+
/**
|
|
109
|
+
* Hides a comment in a widget. The comment status becomes `HIDDEN`.
|
|
110
|
+
* @param - ID of the comment to hide.
|
|
111
|
+
*/
|
|
112
|
+
(commentId: string): Promise<HideCommentResponse>;
|
|
113
|
+
}
|
|
114
|
+
declare function publishComment$1(httpClient: HttpClient): PublishCommentSignature;
|
|
115
|
+
interface PublishCommentSignature {
|
|
116
|
+
/**
|
|
117
|
+
* Publishes a comment with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
118
|
+
*
|
|
119
|
+
* To publish a new comment, call Create Comment.
|
|
120
|
+
* @param - ID of the comment to publish.
|
|
121
|
+
*/
|
|
122
|
+
(commentId: string): Promise<PublishCommentResponse>;
|
|
123
|
+
}
|
|
124
|
+
declare function countComments$1(httpClient: HttpClient): CountCommentsSignature;
|
|
125
|
+
interface CountCommentsSignature {
|
|
126
|
+
/**
|
|
127
|
+
* Counts comments, given the specified filtering. Comments with the `HIDDEN` status are not included in the response.
|
|
128
|
+
* @param - App ID to count the comments of.
|
|
129
|
+
*/
|
|
130
|
+
(appId: string, options?: CountCommentsOptions | undefined): Promise<CountCommentsResponse>;
|
|
131
|
+
}
|
|
132
|
+
declare function listCommentsByResource$1(httpClient: HttpClient): ListCommentsByResourceSignature;
|
|
133
|
+
interface ListCommentsByResourceSignature {
|
|
134
|
+
/**
|
|
135
|
+
* Lists published comments and replies from a specified resource, such as a blog post.
|
|
136
|
+
* @param - ID of the app from which the comments are listed.
|
|
137
|
+
*/
|
|
138
|
+
(appId: string, options?: ListCommentsByResourceOptions | undefined): Promise<ListCommentsByResourceResponse>;
|
|
139
|
+
}
|
|
140
|
+
declare function getCommentThread$1(httpClient: HttpClient): GetCommentThreadSignature;
|
|
141
|
+
interface GetCommentThreadSignature {
|
|
142
|
+
/**
|
|
143
|
+
* Returns a thread of a comment or a reply.
|
|
144
|
+
*
|
|
145
|
+
* 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.
|
|
146
|
+
*
|
|
147
|
+
* 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.
|
|
148
|
+
* @param - Comment ID.
|
|
149
|
+
*/
|
|
150
|
+
(commentId: string, options?: GetCommentThreadOptions | undefined): Promise<GetCommentThreadResponse>;
|
|
151
|
+
}
|
|
152
|
+
declare function bulkPublishComment$1(httpClient: HttpClient): BulkPublishCommentSignature;
|
|
153
|
+
interface BulkPublishCommentSignature {
|
|
154
|
+
/**
|
|
155
|
+
* Publishes multiple comments with the `HIDDEN` status. The comment status becomes `PUBLISHED`.
|
|
156
|
+
* @param - ID of the app where to publish the comment.
|
|
157
|
+
*/
|
|
158
|
+
(appId: string, options: BulkPublishCommentOptions): Promise<BulkPublishCommentResponse>;
|
|
159
|
+
}
|
|
160
|
+
declare function bulkHideComment$1(httpClient: HttpClient): BulkHideCommentSignature;
|
|
161
|
+
interface BulkHideCommentSignature {
|
|
162
|
+
/**
|
|
163
|
+
* Hides multiple comments. The comment status becomes `HIDDEN`.
|
|
164
|
+
* @param - ID of the app where to hide the comments.
|
|
165
|
+
*/
|
|
166
|
+
(appId: string, options: BulkHideCommentOptions): Promise<BulkHideCommentResponse>;
|
|
167
|
+
}
|
|
168
|
+
declare function bulkDeleteComment$1(httpClient: HttpClient): BulkDeleteCommentSignature;
|
|
169
|
+
interface BulkDeleteCommentSignature {
|
|
170
|
+
/**
|
|
171
|
+
* Deletes multiple comments.
|
|
172
|
+
* @param - ID of the app where to delete the comments.
|
|
173
|
+
*/
|
|
174
|
+
(appId: string, options: BulkDeleteCommentOptions): Promise<BulkDeleteCommentResponse>;
|
|
175
|
+
}
|
|
176
|
+
declare function bulkModerateDraftContent$1(httpClient: HttpClient): BulkModerateDraftContentSignature;
|
|
177
|
+
interface BulkModerateDraftContentSignature {
|
|
178
|
+
/**
|
|
179
|
+
* Moderates the draft content of multiple comments.
|
|
180
|
+
* @param - ID of the app where to moderate the comments.
|
|
181
|
+
*/
|
|
182
|
+
(appId: string, options: BulkModerateDraftContentOptions): Promise<BulkModerateDraftContentResponse>;
|
|
183
|
+
}
|
|
184
|
+
declare function bulkMoveCommentByFilter$1(httpClient: HttpClient): BulkMoveCommentByFilterSignature;
|
|
185
|
+
interface BulkMoveCommentByFilterSignature {
|
|
186
|
+
/**
|
|
187
|
+
* Moves multiple comments to another resource.
|
|
188
|
+
* @param - ID of the app from which to move the comments.
|
|
189
|
+
*/
|
|
190
|
+
(appId: string, options?: BulkMoveCommentByFilterOptions | undefined): Promise<BulkMoveCommentByFilterResponse>;
|
|
191
|
+
}
|
|
192
|
+
declare const onCommentContentChanged$1: EventDefinition<CommentContentChangedEnvelope, "wix.comments.v2.comment_comment_content_changed">;
|
|
193
|
+
declare const onCommentHidden$1: EventDefinition<CommentHiddenEnvelope, "wix.comments.v2.comment_comment_hidden">;
|
|
194
|
+
declare const onCommentMarked$1: EventDefinition<CommentMarkedEnvelope, "wix.comments.v2.comment_comment_marked">;
|
|
195
|
+
declare const onCommentMoved$1: EventDefinition<CommentMovedEnvelope, "wix.comments.v2.comment_comment_moved">;
|
|
196
|
+
declare const onCommentPublished$1: EventDefinition<CommentPublishedEnvelope, "wix.comments.v2.comment_comment_published">;
|
|
197
|
+
declare const onCommentUnmarked$1: EventDefinition<CommentUnmarkedEnvelope, "wix.comments.v2.comment_comment_unmarked">;
|
|
198
|
+
declare const onCommentCreated$1: EventDefinition<CommentCreatedEnvelope, "wix.comments.v2.comment_created">;
|
|
199
|
+
declare const onCommentResourceCommentCountChanged$1: EventDefinition<CommentResourceCommentCountChangedEnvelope, "wix.comments.v2.comment_resource_comment_count_changed">;
|
|
200
|
+
declare const onCommentUpdated$1: EventDefinition<CommentUpdatedEnvelope, "wix.comments.v2.comment_updated">;
|
|
201
|
+
|
|
202
|
+
declare const createComment: MaybeContext<BuildRESTFunction<typeof createComment$1> & typeof createComment$1>;
|
|
203
|
+
declare const getComment: MaybeContext<BuildRESTFunction<typeof getComment$1> & typeof getComment$1>;
|
|
204
|
+
declare const updateComment: MaybeContext<BuildRESTFunction<typeof updateComment$1> & typeof updateComment$1>;
|
|
205
|
+
declare const deleteComment: MaybeContext<BuildRESTFunction<typeof deleteComment$1> & typeof deleteComment$1>;
|
|
206
|
+
declare const moderateDraftContent: MaybeContext<BuildRESTFunction<typeof moderateDraftContent$1> & typeof moderateDraftContent$1>;
|
|
207
|
+
declare const queryComments: MaybeContext<BuildRESTFunction<typeof queryComments$1> & typeof queryComments$1>;
|
|
208
|
+
declare const markComment: MaybeContext<BuildRESTFunction<typeof markComment$1> & typeof markComment$1>;
|
|
209
|
+
declare const unmarkComment: MaybeContext<BuildRESTFunction<typeof unmarkComment$1> & typeof unmarkComment$1>;
|
|
210
|
+
declare const hideComment: MaybeContext<BuildRESTFunction<typeof hideComment$1> & typeof hideComment$1>;
|
|
211
|
+
declare const publishComment: MaybeContext<BuildRESTFunction<typeof publishComment$1> & typeof publishComment$1>;
|
|
212
|
+
declare const countComments: MaybeContext<BuildRESTFunction<typeof countComments$1> & typeof countComments$1>;
|
|
213
|
+
declare const listCommentsByResource: MaybeContext<BuildRESTFunction<typeof listCommentsByResource$1> & typeof listCommentsByResource$1>;
|
|
214
|
+
declare const getCommentThread: MaybeContext<BuildRESTFunction<typeof getCommentThread$1> & typeof getCommentThread$1>;
|
|
215
|
+
declare const bulkPublishComment: MaybeContext<BuildRESTFunction<typeof bulkPublishComment$1> & typeof bulkPublishComment$1>;
|
|
216
|
+
declare const bulkHideComment: MaybeContext<BuildRESTFunction<typeof bulkHideComment$1> & typeof bulkHideComment$1>;
|
|
217
|
+
declare const bulkDeleteComment: MaybeContext<BuildRESTFunction<typeof bulkDeleteComment$1> & typeof bulkDeleteComment$1>;
|
|
218
|
+
declare const bulkModerateDraftContent: MaybeContext<BuildRESTFunction<typeof bulkModerateDraftContent$1> & typeof bulkModerateDraftContent$1>;
|
|
219
|
+
declare const bulkMoveCommentByFilter: MaybeContext<BuildRESTFunction<typeof bulkMoveCommentByFilter$1> & typeof bulkMoveCommentByFilter$1>;
|
|
220
|
+
/**
|
|
221
|
+
* Triggered when comment content is updated.
|
|
222
|
+
*/
|
|
223
|
+
declare const onCommentContentChanged: BuildEventDefinition<typeof onCommentContentChanged$1>;
|
|
224
|
+
/**
|
|
225
|
+
* Triggered when a comment is hidden.
|
|
226
|
+
*/
|
|
227
|
+
declare const onCommentHidden: BuildEventDefinition<typeof onCommentHidden$1>;
|
|
228
|
+
/**
|
|
229
|
+
* Triggered when a comment is marked.
|
|
230
|
+
*/
|
|
231
|
+
declare const onCommentMarked: BuildEventDefinition<typeof onCommentMarked$1>;
|
|
232
|
+
/**
|
|
233
|
+
* Triggered when a comment is moved.
|
|
234
|
+
*/
|
|
235
|
+
declare const onCommentMoved: BuildEventDefinition<typeof onCommentMoved$1>;
|
|
236
|
+
/**
|
|
237
|
+
* Triggered when a comment is published.
|
|
238
|
+
*/
|
|
239
|
+
declare const onCommentPublished: BuildEventDefinition<typeof onCommentPublished$1>;
|
|
240
|
+
/**
|
|
241
|
+
* Triggered when a comment is unmarked.
|
|
242
|
+
*/
|
|
243
|
+
declare const onCommentUnmarked: BuildEventDefinition<typeof onCommentUnmarked$1>;
|
|
244
|
+
/**
|
|
245
|
+
* Triggered when a comment is created.
|
|
246
|
+
*/
|
|
247
|
+
declare const onCommentCreated: BuildEventDefinition<typeof onCommentCreated$1>;
|
|
248
|
+
/**
|
|
249
|
+
* Triggered when the total number of comments has changed in a resource.
|
|
250
|
+
*/
|
|
251
|
+
declare const onCommentResourceCommentCountChanged: BuildEventDefinition<typeof onCommentResourceCommentCountChanged$1>;
|
|
252
|
+
/**
|
|
253
|
+
* Triggered when a comment is updated.
|
|
254
|
+
*/
|
|
255
|
+
declare const onCommentUpdated: BuildEventDefinition<typeof onCommentUpdated$1>;
|
|
256
|
+
|
|
257
|
+
export { BulkDeleteCommentOptions, BulkDeleteCommentResponse, BulkHideCommentOptions, BulkHideCommentResponse, BulkModerateDraftContentOptions, BulkModerateDraftContentResponse, BulkMoveCommentByFilterOptions, BulkMoveCommentByFilterResponse, BulkPublishCommentOptions, BulkPublishCommentResponse, Comment, CommentContentChangedEnvelope, CommentCreatedEnvelope, CommentHiddenEnvelope, CommentMarkedEnvelope, CommentMovedEnvelope, CommentPublishedEnvelope, CommentResourceCommentCountChangedEnvelope, CommentUnmarkedEnvelope, CommentUpdatedEnvelope, CommentsQueryBuilder, CountCommentsOptions, CountCommentsResponse, GetCommentThreadOptions, GetCommentThreadResponse, HideCommentResponse, ListCommentsByResourceOptions, ListCommentsByResourceResponse, MarkCommentResponse, ModerateDraftContentOptions, ModerateDraftContentResponse, PublishCommentResponse, UnmarkCommentResponse, UpdateComment, 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 };
|