@wix/auto_sdk_feedback_comments 1.0.0

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.
@@ -0,0 +1,116 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Comment, CursorQuery, QueryCommentsResponse, StatusWithLiterals, UpdateCommentStatusOptions, UpdateCommentStatusResponse, CommentReply, CreateCommentReplyOptions, CreateCommentReplyResponse, UpdateCommentReplyIdentifiers, UpdateCommentReplyOptions, UpdateCommentReplyResponse, DeleteCommentReplyIdentifiers, DeleteCommentReplyResponse } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, Breakpoint, CommentLocation, CreateCommentReplyRequest, CreateCommentRequest, CreateCommentResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteCommentReplyRequest, DeleteCommentRequest, DeleteCommentResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetCommentRequest, GetCommentResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Position, QueryCommentsRequest, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Status, UpdateCommentReplyRequest, UpdateCommentRequest, UpdateCommentResponse, UpdateCommentStatusRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
+
5
+ /** @internal */
6
+ declare function getComment$1(httpClient: HttpClient): GetCommentSignature;
7
+ interface GetCommentSignature {
8
+ /**
9
+ * Retrieves a Comment.
10
+ * @param - ID of the Comment to retrieve.
11
+ * @returns The requested Comment.
12
+ */
13
+ (commentId: string): Promise<NonNullablePaths<Comment, `_id` | `feedbackId` | `metaSiteId` | `commenterId` | `message` | `status` | `commentLocation.pageId` | `commentLocation.x` | `commentLocation.y` | `commentLocation.breakpoint._id` | `commentLocation.breakpoint.minWidth` | `commentLocation.breakpoint.maxWidth` | `commentLocation.innerPath` | `commentLocation.position.selector` | `commentLocation.position.offsetXPct` | `commentLocation.position.offsetYPct` | `commentLocation.position.innerPath` | `replies` | `replies.${number}.replierId` | `replies.${number}.message`, 2>>;
14
+ }
15
+ /** @internal */
16
+ declare function queryComments$1(httpClient: HttpClient): QueryCommentsSignature;
17
+ interface QueryCommentsSignature {
18
+ /**
19
+ * Retrieves a list of Comments, given the provided [paging, filtering, and sorting][1].
20
+ *
21
+ * Up to 1,000 Comments can be returned per request.
22
+ *
23
+ * To learn how to query Comments, see [API Query Language][2].
24
+ *
25
+ * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging
26
+ * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language
27
+ * @param - Query options.
28
+ */
29
+ (query: CursorQuery): Promise<NonNullablePaths<QueryCommentsResponse, `comments` | `comments.${number}._id` | `comments.${number}.feedbackId` | `comments.${number}.metaSiteId` | `comments.${number}.commenterId` | `comments.${number}.message` | `comments.${number}.status` | `comments.${number}.commentLocation.pageId` | `comments.${number}.commentLocation.x` | `comments.${number}.commentLocation.y` | `comments.${number}.commentLocation.breakpoint._id` | `comments.${number}.commentLocation.breakpoint.minWidth` | `comments.${number}.commentLocation.breakpoint.maxWidth` | `comments.${number}.commentLocation.innerPath` | `comments.${number}.commentLocation.position.selector` | `comments.${number}.commentLocation.position.offsetXPct` | `comments.${number}.commentLocation.position.offsetYPct` | `comments.${number}.commentLocation.position.innerPath`, 4>>;
30
+ }
31
+ /** @internal */
32
+ declare function updateCommentStatus$1(httpClient: HttpClient): UpdateCommentStatusSignature;
33
+ interface UpdateCommentStatusSignature {
34
+ /**
35
+ * Updates the triage status of a Comment.
36
+ *
37
+ * This is the only part of a Comment the site owner may change — the text belongs to whoever
38
+ * wrote it.
39
+ *
40
+ * Each time the Comment is updated, `revision` increments by 1. The current `revision` must be
41
+ * passed, which ensures you're working with the latest Comment and prevents unintended
42
+ * overwrites.
43
+ * @param - ID of the Comment to triage.
44
+ * @param - Status to set on the Comment.
45
+ */
46
+ (commentId: string, status: StatusWithLiterals, options: NonNullablePaths<UpdateCommentStatusOptions, `revision`, 0>): Promise<NonNullablePaths<UpdateCommentStatusResponse, `comment._id` | `comment.feedbackId` | `comment.metaSiteId` | `comment.commenterId` | `comment.message` | `comment.status` | `comment.commentLocation.pageId` | `comment.commentLocation.x` | `comment.commentLocation.y` | `comment.commentLocation.breakpoint._id` | `comment.commentLocation.breakpoint.minWidth` | `comment.commentLocation.breakpoint.maxWidth` | `comment.commentLocation.innerPath` | `comment.commentLocation.position.selector` | `comment.commentLocation.position.offsetXPct` | `comment.commentLocation.position.offsetYPct` | `comment.commentLocation.position.innerPath` | `comment.replies` | `comment.replies.${number}.replierId` | `comment.replies.${number}.message`, 3>>;
47
+ }
48
+ /** @internal */
49
+ declare function deleteComment$1(httpClient: HttpClient): DeleteCommentSignature;
50
+ interface DeleteCommentSignature {
51
+ /**
52
+ * Deletes a Comment.
53
+ *
54
+ * Deleting a Comment also deletes its replies.
55
+ * @param - ID of the Comment to delete.
56
+ */
57
+ (commentId: string): Promise<void>;
58
+ }
59
+ /** @internal */
60
+ declare function createCommentReply$1(httpClient: HttpClient): CreateCommentReplySignature;
61
+ interface CreateCommentReplySignature {
62
+ /**
63
+ * Adds a reply to a Comment.
64
+ *
65
+ * The reply is attributed to the calling user, or to the calling app when the call carries no
66
+ * user identity.
67
+ * @param - ID of the Comment to reply to.
68
+ * @param - The reply to add. Only `message` is honored.
69
+ */
70
+ (commentId: string, reply: NonNullablePaths<CommentReply, `message`, 0>, options: NonNullablePaths<CreateCommentReplyOptions, `revision`, 0>): Promise<NonNullablePaths<CreateCommentReplyResponse, `comment._id` | `comment.feedbackId` | `comment.metaSiteId` | `comment.commenterId` | `comment.message` | `comment.status` | `comment.commentLocation.pageId` | `comment.commentLocation.x` | `comment.commentLocation.y` | `comment.commentLocation.breakpoint._id` | `comment.commentLocation.breakpoint.minWidth` | `comment.commentLocation.breakpoint.maxWidth` | `comment.commentLocation.innerPath` | `comment.commentLocation.position.selector` | `comment.commentLocation.position.offsetXPct` | `comment.commentLocation.position.offsetYPct` | `comment.commentLocation.position.innerPath` | `comment.replies` | `comment.replies.${number}.replierId` | `comment.replies.${number}.message`, 3>>;
71
+ }
72
+ /** @internal */
73
+ declare function updateCommentReply$1(httpClient: HttpClient): UpdateCommentReplySignature;
74
+ interface UpdateCommentReplySignature {
75
+ /**
76
+ * Updates the text of one of the caller's own replies to a Comment.
77
+ *
78
+ * The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
79
+ * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
80
+ * `revision` is rejected rather than applied to whichever reply now sits at that index.
81
+ * @param - New text for the reply.
82
+ */
83
+ (identifiers: NonNullablePaths<UpdateCommentReplyIdentifiers, `commentId` | `replyIndex`, 0>, message: string, options: NonNullablePaths<UpdateCommentReplyOptions, `revision`, 0>): Promise<NonNullablePaths<UpdateCommentReplyResponse, `comment._id` | `comment.feedbackId` | `comment.metaSiteId` | `comment.commenterId` | `comment.message` | `comment.status` | `comment.commentLocation.pageId` | `comment.commentLocation.x` | `comment.commentLocation.y` | `comment.commentLocation.breakpoint._id` | `comment.commentLocation.breakpoint.minWidth` | `comment.commentLocation.breakpoint.maxWidth` | `comment.commentLocation.innerPath` | `comment.commentLocation.position.selector` | `comment.commentLocation.position.offsetXPct` | `comment.commentLocation.position.offsetYPct` | `comment.commentLocation.position.innerPath` | `comment.replies` | `comment.replies.${number}.replierId` | `comment.replies.${number}.message`, 3>>;
84
+ }
85
+ /** @internal */
86
+ declare function deleteCommentReply$1(httpClient: HttpClient): DeleteCommentReplySignature;
87
+ interface DeleteCommentReplySignature {
88
+ /**
89
+ * Deletes a reply to a Comment.
90
+ *
91
+ * The site owner may delete any reply, not only their own, as part of moderating the Comment.
92
+ *
93
+ * The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
94
+ * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
95
+ * `revision` is rejected rather than applied to whichever reply now sits at that index.
96
+ * @param - Current revision of the Comment.
97
+ */
98
+ (identifiers: NonNullablePaths<DeleteCommentReplyIdentifiers, `commentId` | `replyIndex`, 0>, revision: string): Promise<NonNullablePaths<DeleteCommentReplyResponse, `comment._id` | `comment.feedbackId` | `comment.metaSiteId` | `comment.commenterId` | `comment.message` | `comment.status` | `comment.commentLocation.pageId` | `comment.commentLocation.x` | `comment.commentLocation.y` | `comment.commentLocation.breakpoint._id` | `comment.commentLocation.breakpoint.minWidth` | `comment.commentLocation.breakpoint.maxWidth` | `comment.commentLocation.innerPath` | `comment.commentLocation.position.selector` | `comment.commentLocation.position.offsetXPct` | `comment.commentLocation.position.offsetYPct` | `comment.commentLocation.position.innerPath` | `comment.replies` | `comment.replies.${number}.replierId` | `comment.replies.${number}.message`, 3>>;
99
+ }
100
+
101
+ /** @internal */
102
+ declare const getComment: MaybeContext<BuildRESTFunction<typeof getComment$1> & typeof getComment$1>;
103
+ /** @internal */
104
+ declare const queryComments: MaybeContext<BuildRESTFunction<typeof queryComments$1> & typeof queryComments$1>;
105
+ /** @internal */
106
+ declare const updateCommentStatus: MaybeContext<BuildRESTFunction<typeof updateCommentStatus$1> & typeof updateCommentStatus$1>;
107
+ /** @internal */
108
+ declare const deleteComment: MaybeContext<BuildRESTFunction<typeof deleteComment$1> & typeof deleteComment$1>;
109
+ /** @internal */
110
+ declare const createCommentReply: MaybeContext<BuildRESTFunction<typeof createCommentReply$1> & typeof createCommentReply$1>;
111
+ /** @internal */
112
+ declare const updateCommentReply: MaybeContext<BuildRESTFunction<typeof updateCommentReply$1> & typeof updateCommentReply$1>;
113
+ /** @internal */
114
+ declare const deleteCommentReply: MaybeContext<BuildRESTFunction<typeof deleteCommentReply$1> & typeof deleteCommentReply$1>;
115
+
116
+ export { Comment, CommentReply, CreateCommentReplyOptions, CreateCommentReplyResponse, CursorQuery, DeleteCommentReplyIdentifiers, DeleteCommentReplyResponse, QueryCommentsResponse, StatusWithLiterals, UpdateCommentReplyIdentifiers, UpdateCommentReplyOptions, UpdateCommentReplyResponse, UpdateCommentStatusOptions, UpdateCommentStatusResponse, createCommentReply, deleteComment, deleteCommentReply, getComment, queryComments, updateCommentReply, updateCommentStatus };