@wix/auto_sdk_feedback_comments 1.0.1 → 1.0.2
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 +82 -519
- package/build/cjs/index.js +108 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +764 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -1
- package/build/es/index.d.mts +82 -519
- package/build/es/index.mjs +105 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +764 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -1
- package/build/internal/cjs/index.d.ts +13 -18
- package/build/internal/cjs/index.typings.d.ts +98 -8
- package/build/internal/es/index.d.mts +13 -18
- package/build/internal/es/index.typings.d.mts +98 -8
- package/package.json +2 -2
package/build/es/index.d.mts
CHANGED
|
@@ -1,548 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
interface Comment {
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { Comment, CursorQuery, QueryCommentsResponse, StatusWithLiterals, UpdateCommentStatusOptions, UpdateCommentStatusResponse, CommentReply, CreateCommentReplyOptions, CreateCommentReplyResponse, UpdateCommentReplyIdentifiers, UpdateCommentReplyOptions, UpdateCommentReplyResponse, DeleteCommentReplyIdentifiers, DeleteCommentReplyResponse, CommentCreatedEnvelope, CommentDeletedEnvelope, CommentUpdatedEnvelope } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, Breakpoint, CommentLocation, CreateCommentReplyRequest, CreateCommentRequest, CreateCommentResponse, CursorPaging, CursorPagingMetadata, CursorQueryPagingMethodOneOf, Cursors, DeleteCommentReplyRequest, DeleteCommentRequest, DeleteCommentResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetCommentRequest, GetCommentResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Position, QueryCommentsRequest, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Status, UpdateCommentReplyRequest, UpdateCommentRequest, UpdateCommentResponse, UpdateCommentStatusRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
|
|
4
|
+
|
|
5
|
+
declare function getComment$1(httpClient: HttpClient): GetCommentSignature;
|
|
6
|
+
interface GetCommentSignature {
|
|
8
7
|
/**
|
|
9
|
-
* Comment
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
8
|
+
* Retrieves a Comment.
|
|
9
|
+
* @param - ID of the Comment to retrieve.
|
|
10
|
+
* @returns The requested Comment.
|
|
12
11
|
*/
|
|
13
|
-
_id
|
|
12
|
+
(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>>;
|
|
13
|
+
}
|
|
14
|
+
declare function queryComments$1(httpClient: HttpClient): QueryCommentsSignature;
|
|
15
|
+
interface QueryCommentsSignature {
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* To prevent conflicting changes,
|
|
17
|
-
* the current revision must be passed when updating the Comment.
|
|
17
|
+
* Retrieves a list of Comments, given the provided [paging, filtering, and sorting][1].
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* @readonly
|
|
21
|
-
*/
|
|
22
|
-
revision?: string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Date and time the Comment was created.
|
|
25
|
-
* @readonly
|
|
26
|
-
*/
|
|
27
|
-
_createdDate?: Date | null;
|
|
28
|
-
/**
|
|
29
|
-
* Date and time the Comment was last updated.
|
|
30
|
-
* @readonly
|
|
31
|
-
*/
|
|
32
|
-
_updatedDate?: Date | null;
|
|
33
|
-
/**
|
|
34
|
-
* ID of the feedback session the Comment belongs to.
|
|
35
|
-
* @format GUID
|
|
36
|
-
* @readonly
|
|
37
|
-
*/
|
|
38
|
-
feedbackId?: string;
|
|
39
|
-
/**
|
|
40
|
-
* ID of the site the Comment was left on.
|
|
41
|
-
* @format GUID
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
metaSiteId?: string;
|
|
45
|
-
/**
|
|
46
|
-
* ID of the site visitor who left the Comment.
|
|
47
|
-
* @format GUID
|
|
48
|
-
* @readonly
|
|
49
|
-
*/
|
|
50
|
-
commenterId?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Text of the Comment.
|
|
53
|
-
* @minLength 2
|
|
54
|
-
* @maxLength 2000
|
|
55
|
-
*/
|
|
56
|
-
message?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Triage status of the Comment.
|
|
19
|
+
* Up to 1,000 Comments can be returned per request.
|
|
59
20
|
*
|
|
60
|
-
*
|
|
61
|
-
* @readonly
|
|
62
|
-
*/
|
|
63
|
-
status?: StatusWithLiterals;
|
|
64
|
-
/** Where on the page the Comment is anchored. */
|
|
65
|
-
commentLocation?: CommentLocation;
|
|
66
|
-
/**
|
|
67
|
-
* Replies to the Comment, ordered oldest first.
|
|
21
|
+
* To learn how to query Comments, see [API Query Language][2].
|
|
68
22
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @readonly
|
|
73
|
-
* @maxSize 1000
|
|
74
|
-
*/
|
|
75
|
-
replies?: CommentReply[];
|
|
76
|
-
}
|
|
77
|
-
/** Triage status of a comment. */
|
|
78
|
-
declare enum Status {
|
|
79
|
-
/** The comment hasn't been read yet. */
|
|
80
|
-
NEW = "NEW",
|
|
81
|
-
/** The comment has been read but isn't resolved. */
|
|
82
|
-
OPEN = "OPEN",
|
|
83
|
-
/** The comment has been dealt with. */
|
|
84
|
-
RESOLVED = "RESOLVED"
|
|
85
|
-
}
|
|
86
|
-
/** @enumType */
|
|
87
|
-
type StatusWithLiterals = Status | 'NEW' | 'OPEN' | 'RESOLVED';
|
|
88
|
-
/** Where on a site page a Comment is anchored. */
|
|
89
|
-
interface CommentLocation {
|
|
90
|
-
/**
|
|
91
|
-
* ID of the editor page the Comment was left on.
|
|
92
|
-
* @maxLength 100
|
|
93
|
-
*/
|
|
94
|
-
pageId?: string;
|
|
95
|
-
/** Horizontal position of the Comment on the page. */
|
|
96
|
-
x?: number;
|
|
97
|
-
/** Vertical position of the Comment on the page. */
|
|
98
|
-
y?: number;
|
|
99
|
-
/** Responsive-design breakpoint the Comment was left at. */
|
|
100
|
-
breakpoint?: Breakpoint;
|
|
101
|
-
/**
|
|
102
|
-
* Inner path of the Wix dynamic page the Comment was left on.
|
|
103
|
-
* @maxLength 2048
|
|
104
|
-
*/
|
|
105
|
-
innerPath?: string;
|
|
106
|
-
/** Position of the Comment relative to the element it's attached to. */
|
|
107
|
-
position?: Position;
|
|
108
|
-
}
|
|
109
|
-
/** Responsive-design breakpoint a Comment was left at. */
|
|
110
|
-
interface Breakpoint {
|
|
111
|
-
/**
|
|
112
|
-
* Breakpoint ID.
|
|
113
|
-
* @maxLength 100
|
|
114
|
-
*/
|
|
115
|
-
_id?: string;
|
|
116
|
-
/** Lowest viewport width the breakpoint applies to, in pixels. */
|
|
117
|
-
minWidth?: number;
|
|
118
|
-
/** Highest viewport width the breakpoint applies to, in pixels. */
|
|
119
|
-
maxWidth?: number;
|
|
120
|
-
}
|
|
121
|
-
/** Position of a Comment relative to the page element it's attached to. */
|
|
122
|
-
interface Position {
|
|
123
|
-
/**
|
|
124
|
-
* DOM selector of the target element.
|
|
125
|
-
* @maxLength 1024
|
|
126
|
-
*/
|
|
127
|
-
selector?: string;
|
|
128
|
-
/** Horizontal offset within the element, as a percentage of its width. */
|
|
129
|
-
offsetXPct?: number;
|
|
130
|
-
/** Vertical offset within the element, as a percentage of its height. */
|
|
131
|
-
offsetYPct?: number;
|
|
132
|
-
/**
|
|
133
|
-
* Inner path of the Wix dynamic page the element is on.
|
|
134
|
-
* @maxLength 2048
|
|
135
|
-
*/
|
|
136
|
-
innerPath?: string;
|
|
137
|
-
}
|
|
138
|
-
/** A reply to a Comment. */
|
|
139
|
-
interface CommentReply {
|
|
140
|
-
/**
|
|
141
|
-
* ID of whoever wrote the reply: the site visitor who left the Comment, a user managing the site, or
|
|
142
|
-
* the app that replied on the site's behalf.
|
|
143
|
-
* @format GUID
|
|
144
|
-
* @readonly
|
|
145
|
-
*/
|
|
146
|
-
replierId?: string;
|
|
147
|
-
/**
|
|
148
|
-
* Text of the reply.
|
|
149
|
-
* @minLength 1
|
|
150
|
-
* @maxLength 2000
|
|
23
|
+
* [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging
|
|
24
|
+
* [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language
|
|
25
|
+
* @param - Query options.
|
|
151
26
|
*/
|
|
152
|
-
message
|
|
153
|
-
/**
|
|
154
|
-
* Date and time the reply was created.
|
|
155
|
-
* @readonly
|
|
156
|
-
*/
|
|
157
|
-
_createdDate?: Date | null;
|
|
158
|
-
}
|
|
159
|
-
interface GetCommentRequest {
|
|
160
|
-
/**
|
|
161
|
-
* ID of the Comment to retrieve.
|
|
162
|
-
* @format GUID
|
|
163
|
-
*/
|
|
164
|
-
commentId: string;
|
|
27
|
+
(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>>;
|
|
165
28
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
comment?: Comment;
|
|
169
|
-
}
|
|
170
|
-
interface QueryCommentsRequest {
|
|
171
|
-
/** Query options. */
|
|
172
|
-
query?: CursorQuery;
|
|
173
|
-
}
|
|
174
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
29
|
+
declare function updateCommentStatus$1(httpClient: HttpClient): UpdateCommentStatusSignature;
|
|
30
|
+
interface UpdateCommentStatusSignature {
|
|
175
31
|
/**
|
|
176
|
-
*
|
|
32
|
+
* Updates the triage status of a Comment.
|
|
177
33
|
*
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
cursorPaging?: CursorPaging;
|
|
181
|
-
/**
|
|
182
|
-
* Filter object.
|
|
34
|
+
* This is the only part of a Comment the site owner may change — the text belongs to whoever
|
|
35
|
+
* wrote it.
|
|
183
36
|
*
|
|
184
|
-
*
|
|
37
|
+
* Each time the Comment is updated, `revision` increments by 1. The current `revision` must be
|
|
38
|
+
* passed, which ensures you're working with the latest Comment and prevents unintended
|
|
39
|
+
* overwrites.
|
|
40
|
+
* @param - ID of the Comment to triage.
|
|
41
|
+
* @param - Status to set on the Comment.
|
|
185
42
|
*/
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Sort object.
|
|
189
|
-
*
|
|
190
|
-
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
191
|
-
* @maxSize 5
|
|
192
|
-
*/
|
|
193
|
-
sort?: Sorting[];
|
|
43
|
+
(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>>;
|
|
194
44
|
}
|
|
195
|
-
|
|
196
|
-
interface
|
|
45
|
+
declare function deleteComment$1(httpClient: HttpClient): DeleteCommentSignature;
|
|
46
|
+
interface DeleteCommentSignature {
|
|
197
47
|
/**
|
|
198
|
-
*
|
|
48
|
+
* Deletes a Comment.
|
|
199
49
|
*
|
|
200
|
-
*
|
|
50
|
+
* Deleting a Comment also deletes its replies.
|
|
51
|
+
* @param - ID of the Comment to delete.
|
|
201
52
|
*/
|
|
202
|
-
|
|
53
|
+
(commentId: string): Promise<void>;
|
|
203
54
|
}
|
|
204
|
-
|
|
55
|
+
declare function createCommentReply$1(httpClient: HttpClient): CreateCommentReplySignature;
|
|
56
|
+
interface CreateCommentReplySignature {
|
|
205
57
|
/**
|
|
206
|
-
*
|
|
207
|
-
* @maxLength 512
|
|
208
|
-
*/
|
|
209
|
-
fieldName?: string;
|
|
210
|
-
/** Sort order. */
|
|
211
|
-
order?: SortOrderWithLiterals;
|
|
212
|
-
}
|
|
213
|
-
declare enum SortOrder {
|
|
214
|
-
ASC = "ASC",
|
|
215
|
-
DESC = "DESC"
|
|
216
|
-
}
|
|
217
|
-
/** @enumType */
|
|
218
|
-
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
219
|
-
interface CursorPaging {
|
|
220
|
-
/**
|
|
221
|
-
* Maximum number of items to return in the results.
|
|
222
|
-
* @max 100
|
|
223
|
-
*/
|
|
224
|
-
limit?: number | null;
|
|
225
|
-
/**
|
|
226
|
-
* Pointer to the next or previous page in the list of results.
|
|
58
|
+
* Adds a reply to a Comment.
|
|
227
59
|
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* @
|
|
60
|
+
* The reply is attributed to the calling user, or to the calling app when the call carries no
|
|
61
|
+
* user identity.
|
|
62
|
+
* @param - ID of the Comment to reply to.
|
|
63
|
+
* @param - The reply to add. Only `message` is honored.
|
|
231
64
|
*/
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
interface QueryCommentsResponse {
|
|
235
|
-
/** The retrieved Comments. */
|
|
236
|
-
comments?: Comment[];
|
|
237
|
-
/** Paging metadata. */
|
|
238
|
-
pagingMetadata?: CursorPagingMetadata;
|
|
65
|
+
(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>>;
|
|
239
66
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
count?: number | null;
|
|
243
|
-
/** Cursor strings that point to the next page, previous page, or both. */
|
|
244
|
-
cursors?: Cursors;
|
|
67
|
+
declare function updateCommentReply$1(httpClient: HttpClient): UpdateCommentReplySignature;
|
|
68
|
+
interface UpdateCommentReplySignature {
|
|
245
69
|
/**
|
|
246
|
-
*
|
|
70
|
+
* Updates the text of one of the caller's own replies to a Comment.
|
|
247
71
|
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
interface Cursors {
|
|
254
|
-
/**
|
|
255
|
-
* Cursor string pointing to the next page in the list of results.
|
|
256
|
-
* @maxLength 16000
|
|
257
|
-
*/
|
|
258
|
-
next?: string | null;
|
|
259
|
-
/**
|
|
260
|
-
* Cursor pointing to the previous page in the list of results.
|
|
261
|
-
* @maxLength 16000
|
|
262
|
-
*/
|
|
263
|
-
prev?: string | null;
|
|
264
|
-
}
|
|
265
|
-
interface UpdateCommentStatusRequest {
|
|
266
|
-
/**
|
|
267
|
-
* ID of the Comment to triage.
|
|
268
|
-
* @format GUID
|
|
269
|
-
*/
|
|
270
|
-
commentId: string;
|
|
271
|
-
/** Status to set on the Comment. */
|
|
272
|
-
status: StatusWithLiterals;
|
|
273
|
-
/** Current revision of the Comment. */
|
|
274
|
-
revision: string | null;
|
|
275
|
-
}
|
|
276
|
-
interface UpdateCommentStatusResponse {
|
|
277
|
-
/** The updated Comment. */
|
|
278
|
-
comment?: Comment;
|
|
279
|
-
}
|
|
280
|
-
interface DeleteCommentRequest {
|
|
281
|
-
/**
|
|
282
|
-
* ID of the Comment to delete.
|
|
283
|
-
* @format GUID
|
|
284
|
-
*/
|
|
285
|
-
commentId: string;
|
|
286
|
-
}
|
|
287
|
-
interface DeleteCommentResponse {
|
|
288
|
-
}
|
|
289
|
-
interface CreateCommentReplyRequest {
|
|
290
|
-
/**
|
|
291
|
-
* ID of the Comment to reply to.
|
|
292
|
-
* @format GUID
|
|
293
|
-
*/
|
|
294
|
-
commentId: string;
|
|
295
|
-
/** The reply to add. Only `message` is honored. */
|
|
296
|
-
reply: CommentReply;
|
|
297
|
-
/** Current revision of the Comment. */
|
|
298
|
-
revision: string | null;
|
|
299
|
-
}
|
|
300
|
-
interface CreateCommentReplyResponse {
|
|
301
|
-
/** The Comment, including the new reply. */
|
|
302
|
-
comment?: Comment;
|
|
303
|
-
}
|
|
304
|
-
interface UpdateCommentReplyRequest {
|
|
305
|
-
/**
|
|
306
|
-
* ID of the Comment the reply belongs to.
|
|
307
|
-
* @format GUID
|
|
308
|
-
*/
|
|
309
|
-
commentId: string;
|
|
310
|
-
/** Position of the reply in the Comment's `replies` list. */
|
|
311
|
-
replyIndex: number;
|
|
312
|
-
/**
|
|
313
|
-
* New text for the reply.
|
|
314
|
-
* @minLength 1
|
|
315
|
-
* @maxLength 2000
|
|
316
|
-
*/
|
|
317
|
-
message: string;
|
|
318
|
-
/** Current revision of the Comment. */
|
|
319
|
-
revision: string | null;
|
|
320
|
-
}
|
|
321
|
-
interface UpdateCommentReplyResponse {
|
|
322
|
-
/** The Comment, including the updated reply. */
|
|
323
|
-
comment?: Comment;
|
|
324
|
-
}
|
|
325
|
-
interface DeleteCommentReplyRequest {
|
|
326
|
-
/**
|
|
327
|
-
* ID of the Comment the reply belongs to.
|
|
328
|
-
* @format GUID
|
|
329
|
-
*/
|
|
330
|
-
commentId: string;
|
|
331
|
-
/** Position of the reply in the Comment's `replies` list. */
|
|
332
|
-
replyIndex: number;
|
|
333
|
-
/** Current revision of the Comment. */
|
|
334
|
-
revision: string | null;
|
|
335
|
-
}
|
|
336
|
-
interface DeleteCommentReplyResponse {
|
|
337
|
-
/** The Comment, without the deleted reply. */
|
|
338
|
-
comment?: Comment;
|
|
339
|
-
}
|
|
340
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
341
|
-
createdEvent?: EntityCreatedEvent;
|
|
342
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
343
|
-
deletedEvent?: EntityDeletedEvent;
|
|
344
|
-
actionEvent?: ActionEvent;
|
|
345
|
-
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
346
|
-
_id?: string;
|
|
347
|
-
/**
|
|
348
|
-
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
349
|
-
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
350
|
-
*/
|
|
351
|
-
entityFqdn?: string;
|
|
352
|
-
/**
|
|
353
|
-
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
354
|
-
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
355
|
-
*/
|
|
356
|
-
slug?: string;
|
|
357
|
-
/** ID of the entity associated with the event. */
|
|
358
|
-
entityId?: string;
|
|
359
|
-
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
360
|
-
eventTime?: Date | null;
|
|
361
|
-
/**
|
|
362
|
-
* Whether the event was triggered as a result of a privacy regulation application
|
|
363
|
-
* (for example, GDPR).
|
|
364
|
-
*/
|
|
365
|
-
triggeredByAnonymizeRequest?: boolean | null;
|
|
366
|
-
/** If present, indicates the action that triggered the event. */
|
|
367
|
-
originatedFrom?: string | null;
|
|
368
|
-
/**
|
|
369
|
-
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
370
|
-
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
371
|
-
*/
|
|
372
|
-
entityEventSequence?: string | null;
|
|
373
|
-
}
|
|
374
|
-
/** @oneof */
|
|
375
|
-
interface DomainEventBodyOneOf {
|
|
376
|
-
createdEvent?: EntityCreatedEvent;
|
|
377
|
-
updatedEvent?: EntityUpdatedEvent;
|
|
378
|
-
deletedEvent?: EntityDeletedEvent;
|
|
379
|
-
actionEvent?: ActionEvent;
|
|
380
|
-
}
|
|
381
|
-
interface EntityCreatedEvent {
|
|
382
|
-
entity?: string;
|
|
383
|
-
}
|
|
384
|
-
interface RestoreInfo {
|
|
385
|
-
deletedDate?: Date | null;
|
|
386
|
-
}
|
|
387
|
-
interface EntityUpdatedEvent {
|
|
388
|
-
/**
|
|
389
|
-
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
390
|
-
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
391
|
-
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
392
|
-
*/
|
|
393
|
-
currentEntity?: string;
|
|
394
|
-
}
|
|
395
|
-
interface EntityDeletedEvent {
|
|
396
|
-
/** Entity that was deleted. */
|
|
397
|
-
deletedEntity?: string | null;
|
|
398
|
-
}
|
|
399
|
-
interface ActionEvent {
|
|
400
|
-
body?: string;
|
|
401
|
-
}
|
|
402
|
-
interface MessageEnvelope {
|
|
403
|
-
/**
|
|
404
|
-
* App instance ID.
|
|
405
|
-
* @format GUID
|
|
406
|
-
*/
|
|
407
|
-
instanceId?: string | null;
|
|
408
|
-
/**
|
|
409
|
-
* Event type.
|
|
410
|
-
* @maxLength 150
|
|
411
|
-
*/
|
|
412
|
-
eventType?: string;
|
|
413
|
-
/** The identification type and identity data. */
|
|
414
|
-
identity?: IdentificationData;
|
|
415
|
-
/** Stringify payload. */
|
|
416
|
-
data?: string;
|
|
417
|
-
/** Details related to the account */
|
|
418
|
-
accountInfo?: AccountInfo;
|
|
419
|
-
}
|
|
420
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
421
|
-
/**
|
|
422
|
-
* ID of a site visitor that has not logged in to the site.
|
|
423
|
-
* @format GUID
|
|
424
|
-
*/
|
|
425
|
-
anonymousVisitorId?: string;
|
|
426
|
-
/**
|
|
427
|
-
* ID of a site visitor that has logged in to the site.
|
|
428
|
-
* @format GUID
|
|
429
|
-
*/
|
|
430
|
-
memberId?: string;
|
|
431
|
-
/**
|
|
432
|
-
* ID of a Wix user (site owner, contributor, etc.).
|
|
433
|
-
* @format GUID
|
|
434
|
-
*/
|
|
435
|
-
wixUserId?: string;
|
|
436
|
-
/**
|
|
437
|
-
* ID of an app.
|
|
438
|
-
* @format GUID
|
|
72
|
+
* The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
|
|
73
|
+
* indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
|
|
74
|
+
* `revision` is rejected rather than applied to whichever reply now sits at that index.
|
|
75
|
+
* @param - New text for the reply.
|
|
439
76
|
*/
|
|
440
|
-
|
|
441
|
-
/** @readonly */
|
|
442
|
-
identityType?: WebhookIdentityTypeWithLiterals;
|
|
77
|
+
(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>>;
|
|
443
78
|
}
|
|
444
|
-
|
|
445
|
-
interface
|
|
446
|
-
/**
|
|
447
|
-
* ID of a site visitor that has not logged in to the site.
|
|
448
|
-
* @format GUID
|
|
449
|
-
*/
|
|
450
|
-
anonymousVisitorId?: string;
|
|
79
|
+
declare function deleteCommentReply$1(httpClient: HttpClient): DeleteCommentReplySignature;
|
|
80
|
+
interface DeleteCommentReplySignature {
|
|
451
81
|
/**
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
|
|
460
|
-
wixUserId?: string;
|
|
461
|
-
/**
|
|
462
|
-
* ID of an app.
|
|
463
|
-
* @format GUID
|
|
464
|
-
*/
|
|
465
|
-
appId?: string;
|
|
466
|
-
}
|
|
467
|
-
declare enum WebhookIdentityType {
|
|
468
|
-
UNKNOWN = "UNKNOWN",
|
|
469
|
-
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
470
|
-
MEMBER = "MEMBER",
|
|
471
|
-
WIX_USER = "WIX_USER",
|
|
472
|
-
APP = "APP"
|
|
473
|
-
}
|
|
474
|
-
/** @enumType */
|
|
475
|
-
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
476
|
-
interface AccountInfo {
|
|
477
|
-
/**
|
|
478
|
-
* ID of the Wix account associated with the event.
|
|
479
|
-
* @format GUID
|
|
480
|
-
*/
|
|
481
|
-
accountId?: string | null;
|
|
482
|
-
/**
|
|
483
|
-
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
484
|
-
* @format GUID
|
|
485
|
-
*/
|
|
486
|
-
parentAccountId?: string | null;
|
|
487
|
-
/**
|
|
488
|
-
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
489
|
-
* @format GUID
|
|
490
|
-
*/
|
|
491
|
-
siteId?: string | null;
|
|
492
|
-
}
|
|
493
|
-
interface CreateCommentRequest {
|
|
494
|
-
/**
|
|
495
|
-
* ID of the feedback session to leave the Comment on.
|
|
496
|
-
* @format GUID
|
|
497
|
-
*/
|
|
498
|
-
feedbackId?: string;
|
|
499
|
-
/** The Comment to leave. */
|
|
500
|
-
comment?: Comment;
|
|
501
|
-
}
|
|
502
|
-
interface CreateCommentResponse {
|
|
503
|
-
/** The created Comment. */
|
|
504
|
-
comment?: Comment;
|
|
505
|
-
}
|
|
506
|
-
interface UpdateCommentRequest {
|
|
507
|
-
/**
|
|
508
|
-
* The Comment to update, carrying its `id`, its current `revision`, and the new values for the
|
|
509
|
-
* fields named in `field_mask`.
|
|
510
|
-
*/
|
|
511
|
-
comment?: Comment;
|
|
512
|
-
}
|
|
513
|
-
interface UpdateCommentResponse {
|
|
514
|
-
/** The updated Comment. */
|
|
515
|
-
comment?: Comment;
|
|
516
|
-
}
|
|
517
|
-
interface UpdateCommentStatusOptions {
|
|
518
|
-
/** Current revision of the Comment. */
|
|
519
|
-
revision: string | null;
|
|
520
|
-
}
|
|
521
|
-
interface CreateCommentReplyOptions {
|
|
522
|
-
/** Current revision of the Comment. */
|
|
523
|
-
revision: string | null;
|
|
524
|
-
}
|
|
525
|
-
interface UpdateCommentReplyIdentifiers {
|
|
526
|
-
/**
|
|
527
|
-
* ID of the Comment the reply belongs to.
|
|
528
|
-
* @format GUID
|
|
529
|
-
*/
|
|
530
|
-
commentId: string;
|
|
531
|
-
/** Position of the reply in the Comment's `replies` list. */
|
|
532
|
-
replyIndex: number;
|
|
533
|
-
}
|
|
534
|
-
interface UpdateCommentReplyOptions {
|
|
535
|
-
/** Current revision of the Comment. */
|
|
536
|
-
revision: string | null;
|
|
537
|
-
}
|
|
538
|
-
interface DeleteCommentReplyIdentifiers {
|
|
539
|
-
/**
|
|
540
|
-
* ID of the Comment the reply belongs to.
|
|
541
|
-
* @format GUID
|
|
82
|
+
* Deletes a reply to a Comment.
|
|
83
|
+
*
|
|
84
|
+
* The site owner may delete any reply, not only their own, as part of moderating the Comment.
|
|
85
|
+
*
|
|
86
|
+
* The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
|
|
87
|
+
* indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
|
|
88
|
+
* `revision` is rejected rather than applied to whichever reply now sits at that index.
|
|
89
|
+
* @param - Current revision of the Comment.
|
|
542
90
|
*/
|
|
543
|
-
commentId: string
|
|
544
|
-
/** Position of the reply in the Comment's `replies` list. */
|
|
545
|
-
replyIndex: number;
|
|
91
|
+
(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>>;
|
|
546
92
|
}
|
|
93
|
+
declare const onCommentCreated$1: EventDefinition<CommentCreatedEnvelope, "wix.partners.feedback.v1.comment_created">;
|
|
94
|
+
declare const onCommentDeleted$1: EventDefinition<CommentDeletedEnvelope, "wix.partners.feedback.v1.comment_deleted">;
|
|
95
|
+
declare const onCommentUpdated$1: EventDefinition<CommentUpdatedEnvelope, "wix.partners.feedback.v1.comment_updated">;
|
|
96
|
+
|
|
97
|
+
declare const getComment: MaybeContext<BuildRESTFunction<typeof getComment$1> & typeof getComment$1>;
|
|
98
|
+
declare const queryComments: MaybeContext<BuildRESTFunction<typeof queryComments$1> & typeof queryComments$1>;
|
|
99
|
+
declare const updateCommentStatus: MaybeContext<BuildRESTFunction<typeof updateCommentStatus$1> & typeof updateCommentStatus$1>;
|
|
100
|
+
declare const deleteComment: MaybeContext<BuildRESTFunction<typeof deleteComment$1> & typeof deleteComment$1>;
|
|
101
|
+
declare const createCommentReply: MaybeContext<BuildRESTFunction<typeof createCommentReply$1> & typeof createCommentReply$1>;
|
|
102
|
+
declare const updateCommentReply: MaybeContext<BuildRESTFunction<typeof updateCommentReply$1> & typeof updateCommentReply$1>;
|
|
103
|
+
declare const deleteCommentReply: MaybeContext<BuildRESTFunction<typeof deleteCommentReply$1> & typeof deleteCommentReply$1>;
|
|
104
|
+
/** */
|
|
105
|
+
declare const onCommentCreated: BuildEventDefinition<typeof onCommentCreated$1> & typeof onCommentCreated$1;
|
|
106
|
+
/** */
|
|
107
|
+
declare const onCommentDeleted: BuildEventDefinition<typeof onCommentDeleted$1> & typeof onCommentDeleted$1;
|
|
108
|
+
/** */
|
|
109
|
+
declare const onCommentUpdated: BuildEventDefinition<typeof onCommentUpdated$1> & typeof onCommentUpdated$1;
|
|
547
110
|
|
|
548
|
-
export {
|
|
111
|
+
export { Comment, CommentCreatedEnvelope, CommentDeletedEnvelope, CommentReply, CommentUpdatedEnvelope, CreateCommentReplyOptions, CreateCommentReplyResponse, CursorQuery, DeleteCommentReplyIdentifiers, DeleteCommentReplyResponse, QueryCommentsResponse, StatusWithLiterals, UpdateCommentReplyIdentifiers, UpdateCommentReplyOptions, UpdateCommentReplyResponse, UpdateCommentStatusOptions, UpdateCommentStatusResponse, createCommentReply, deleteComment, deleteCommentReply, getComment, onCommentCreated, onCommentDeleted, onCommentUpdated, queryComments, updateCommentReply, updateCommentStatus };
|