@wix/auto_sdk_feedback_comments 1.0.0 → 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.
@@ -1 +1,764 @@
1
- export { AccountInfo, ActionEvent, Breakpoint, Comment, CommentLocation, CommentReply, CreateCommentReplyOptions, CreateCommentReplyRequest, CreateCommentReplyResponse, CreateCommentRequest, CreateCommentResponse, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteCommentReplyIdentifiers, DeleteCommentReplyRequest, DeleteCommentReplyResponse, DeleteCommentRequest, DeleteCommentResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetCommentRequest, GetCommentResponse, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Position, QueryCommentsRequest, QueryCommentsResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, Status, StatusWithLiterals, UpdateCommentReplyIdentifiers, UpdateCommentReplyOptions, UpdateCommentReplyRequest, UpdateCommentReplyResponse, UpdateCommentRequest, UpdateCommentResponse, UpdateCommentStatusOptions, UpdateCommentStatusRequest, UpdateCommentStatusResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.js';
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+
3
+ /**
4
+ * A Comment is a note left on a specific location of a site page as part of a feedback session.
5
+ *
6
+ * Site visitors leave comments while reviewing a site; the site owner reads them, triages them by
7
+ * `status`, replies to them, and deletes them.
8
+ */
9
+ interface Comment {
10
+ /**
11
+ * Comment ID.
12
+ * @format GUID
13
+ * @readonly
14
+ */
15
+ _id?: string;
16
+ /**
17
+ * Revision number, which increments by 1 each time the Comment is updated.
18
+ * To prevent conflicting changes,
19
+ * the current revision must be passed when updating the Comment.
20
+ *
21
+ * Ignored when creating a Comment.
22
+ * @readonly
23
+ */
24
+ revision?: string | null;
25
+ /**
26
+ * Date and time the Comment was created.
27
+ * @readonly
28
+ */
29
+ _createdDate?: Date | null;
30
+ /**
31
+ * Date and time the Comment was last updated.
32
+ * @readonly
33
+ */
34
+ _updatedDate?: Date | null;
35
+ /**
36
+ * ID of the feedback session the Comment belongs to.
37
+ * @format GUID
38
+ * @readonly
39
+ */
40
+ feedbackId?: string;
41
+ /**
42
+ * ID of the site the Comment was left on.
43
+ * @format GUID
44
+ * @readonly
45
+ */
46
+ metaSiteId?: string;
47
+ /**
48
+ * ID of the site visitor who left the Comment.
49
+ * @format GUID
50
+ * @readonly
51
+ */
52
+ commenterId?: string;
53
+ /**
54
+ * Text of the Comment.
55
+ * @minLength 2
56
+ * @maxLength 2000
57
+ */
58
+ message?: string;
59
+ /**
60
+ * Triage status of the Comment.
61
+ *
62
+ * Read-only: the site owner changes it with Update Comment Status, and no other flow may set it.
63
+ * @readonly
64
+ */
65
+ status?: StatusWithLiterals;
66
+ /** Where on the page the Comment is anchored. */
67
+ commentLocation?: CommentLocation;
68
+ /**
69
+ * Replies to the Comment, ordered oldest first.
70
+ *
71
+ * A reply is addressed by its index in this list, so indexes shift when a reply is deleted.
72
+ * Pass the Comment's current `revision` when updating or deleting a reply to be sure the index
73
+ * you're addressing is still the one you read.
74
+ * @readonly
75
+ * @maxSize 1000
76
+ */
77
+ replies?: CommentReply[];
78
+ }
79
+ /** Triage status of a comment. */
80
+ declare enum Status {
81
+ /** The comment hasn't been read yet. */
82
+ NEW = "NEW",
83
+ /** The comment has been read but isn't resolved. */
84
+ OPEN = "OPEN",
85
+ /** The comment has been dealt with. */
86
+ RESOLVED = "RESOLVED"
87
+ }
88
+ /** @enumType */
89
+ type StatusWithLiterals = Status | 'NEW' | 'OPEN' | 'RESOLVED';
90
+ /** Where on a site page a Comment is anchored. */
91
+ interface CommentLocation {
92
+ /**
93
+ * ID of the editor page the Comment was left on.
94
+ * @maxLength 100
95
+ */
96
+ pageId?: string;
97
+ /** Horizontal position of the Comment on the page. */
98
+ x?: number;
99
+ /** Vertical position of the Comment on the page. */
100
+ y?: number;
101
+ /** Responsive-design breakpoint the Comment was left at. */
102
+ breakpoint?: Breakpoint;
103
+ /**
104
+ * Inner path of the Wix dynamic page the Comment was left on.
105
+ * @maxLength 2048
106
+ */
107
+ innerPath?: string;
108
+ /** Position of the Comment relative to the element it's attached to. */
109
+ position?: Position;
110
+ }
111
+ /** Responsive-design breakpoint a Comment was left at. */
112
+ interface Breakpoint {
113
+ /**
114
+ * Breakpoint ID.
115
+ * @maxLength 100
116
+ */
117
+ _id?: string;
118
+ /** Lowest viewport width the breakpoint applies to, in pixels. */
119
+ minWidth?: number;
120
+ /** Highest viewport width the breakpoint applies to, in pixels. */
121
+ maxWidth?: number;
122
+ }
123
+ /** Position of a Comment relative to the page element it's attached to. */
124
+ interface Position {
125
+ /**
126
+ * DOM selector of the target element.
127
+ * @maxLength 1024
128
+ */
129
+ selector?: string;
130
+ /** Horizontal offset within the element, as a percentage of its width. */
131
+ offsetXPct?: number;
132
+ /** Vertical offset within the element, as a percentage of its height. */
133
+ offsetYPct?: number;
134
+ /**
135
+ * Inner path of the Wix dynamic page the element is on.
136
+ * @maxLength 2048
137
+ */
138
+ innerPath?: string;
139
+ }
140
+ /** A reply to a Comment. */
141
+ interface CommentReply {
142
+ /**
143
+ * ID of whoever wrote the reply: the site visitor who left the Comment, a user managing the site, or
144
+ * the app that replied on the site's behalf.
145
+ * @format GUID
146
+ * @readonly
147
+ */
148
+ replierId?: string;
149
+ /**
150
+ * Text of the reply.
151
+ * @minLength 1
152
+ * @maxLength 2000
153
+ */
154
+ message?: string;
155
+ /**
156
+ * Date and time the reply was created.
157
+ * @readonly
158
+ */
159
+ _createdDate?: Date | null;
160
+ }
161
+ interface GetCommentRequest {
162
+ /**
163
+ * ID of the Comment to retrieve.
164
+ * @format GUID
165
+ */
166
+ commentId: string;
167
+ }
168
+ interface GetCommentResponse {
169
+ /** The requested Comment. */
170
+ comment?: Comment;
171
+ }
172
+ interface QueryCommentsRequest {
173
+ /** Query options. */
174
+ query?: CursorQuery;
175
+ }
176
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
177
+ /**
178
+ * Cursor paging options.
179
+ *
180
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
181
+ */
182
+ cursorPaging?: CursorPaging;
183
+ /**
184
+ * Filter object.
185
+ *
186
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
187
+ */
188
+ filter?: Record<string, any> | null;
189
+ /**
190
+ * Sort object.
191
+ *
192
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
193
+ * @maxSize 5
194
+ */
195
+ sort?: Sorting[];
196
+ }
197
+ /** @oneof */
198
+ interface CursorQueryPagingMethodOneOf {
199
+ /**
200
+ * Cursor paging options.
201
+ *
202
+ * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
203
+ */
204
+ cursorPaging?: CursorPaging;
205
+ }
206
+ interface Sorting {
207
+ /**
208
+ * Name of the field to sort by.
209
+ * @maxLength 512
210
+ */
211
+ fieldName?: string;
212
+ /** Sort order. */
213
+ order?: SortOrderWithLiterals;
214
+ }
215
+ declare enum SortOrder {
216
+ ASC = "ASC",
217
+ DESC = "DESC"
218
+ }
219
+ /** @enumType */
220
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
221
+ interface CursorPaging {
222
+ /**
223
+ * Maximum number of items to return in the results.
224
+ * @max 100
225
+ */
226
+ limit?: number | null;
227
+ /**
228
+ * Pointer to the next or previous page in the list of results.
229
+ *
230
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
231
+ * Not relevant for the first request.
232
+ * @maxLength 16000
233
+ */
234
+ cursor?: string | null;
235
+ }
236
+ interface QueryCommentsResponse {
237
+ /** The retrieved Comments. */
238
+ comments?: Comment[];
239
+ /** Paging metadata. */
240
+ pagingMetadata?: CursorPagingMetadata;
241
+ }
242
+ interface CursorPagingMetadata {
243
+ /** Number of items returned in current page. */
244
+ count?: number | null;
245
+ /** Cursor strings that point to the next page, previous page, or both. */
246
+ cursors?: Cursors;
247
+ /**
248
+ * Whether there are more pages to retrieve following the current page.
249
+ *
250
+ * + `true`: Another page of results can be retrieved.
251
+ * + `false`: This is the last page.
252
+ */
253
+ hasNext?: boolean | null;
254
+ }
255
+ interface Cursors {
256
+ /**
257
+ * Cursor string pointing to the next page in the list of results.
258
+ * @maxLength 16000
259
+ */
260
+ next?: string | null;
261
+ /**
262
+ * Cursor pointing to the previous page in the list of results.
263
+ * @maxLength 16000
264
+ */
265
+ prev?: string | null;
266
+ }
267
+ interface UpdateCommentStatusRequest {
268
+ /**
269
+ * ID of the Comment to triage.
270
+ * @format GUID
271
+ */
272
+ commentId: string;
273
+ /** Status to set on the Comment. */
274
+ status: StatusWithLiterals;
275
+ /** Current revision of the Comment. */
276
+ revision: string | null;
277
+ }
278
+ interface UpdateCommentStatusResponse {
279
+ /** The updated Comment. */
280
+ comment?: Comment;
281
+ }
282
+ interface DeleteCommentRequest {
283
+ /**
284
+ * ID of the Comment to delete.
285
+ * @format GUID
286
+ */
287
+ commentId: string;
288
+ }
289
+ interface DeleteCommentResponse {
290
+ }
291
+ interface CreateCommentReplyRequest {
292
+ /**
293
+ * ID of the Comment to reply to.
294
+ * @format GUID
295
+ */
296
+ commentId: string;
297
+ /** The reply to add. Only `message` is honored. */
298
+ reply: CommentReply;
299
+ /** Current revision of the Comment. */
300
+ revision: string | null;
301
+ }
302
+ interface CreateCommentReplyResponse {
303
+ /** The Comment, including the new reply. */
304
+ comment?: Comment;
305
+ }
306
+ interface UpdateCommentReplyRequest {
307
+ /**
308
+ * ID of the Comment the reply belongs to.
309
+ * @format GUID
310
+ */
311
+ commentId: string;
312
+ /** Position of the reply in the Comment's `replies` list. */
313
+ replyIndex: number;
314
+ /**
315
+ * New text for the reply.
316
+ * @minLength 1
317
+ * @maxLength 2000
318
+ */
319
+ message: string;
320
+ /** Current revision of the Comment. */
321
+ revision: string | null;
322
+ }
323
+ interface UpdateCommentReplyResponse {
324
+ /** The Comment, including the updated reply. */
325
+ comment?: Comment;
326
+ }
327
+ interface DeleteCommentReplyRequest {
328
+ /**
329
+ * ID of the Comment the reply belongs to.
330
+ * @format GUID
331
+ */
332
+ commentId: string;
333
+ /** Position of the reply in the Comment's `replies` list. */
334
+ replyIndex: number;
335
+ /** Current revision of the Comment. */
336
+ revision: string | null;
337
+ }
338
+ interface DeleteCommentReplyResponse {
339
+ /** The Comment, without the deleted reply. */
340
+ comment?: Comment;
341
+ }
342
+ interface DomainEvent extends DomainEventBodyOneOf {
343
+ createdEvent?: EntityCreatedEvent;
344
+ updatedEvent?: EntityUpdatedEvent;
345
+ deletedEvent?: EntityDeletedEvent;
346
+ actionEvent?: ActionEvent;
347
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
348
+ _id?: string;
349
+ /**
350
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
351
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
352
+ */
353
+ entityFqdn?: string;
354
+ /**
355
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
356
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
357
+ */
358
+ slug?: string;
359
+ /** ID of the entity associated with the event. */
360
+ entityId?: string;
361
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
362
+ eventTime?: Date | null;
363
+ /**
364
+ * Whether the event was triggered as a result of a privacy regulation application
365
+ * (for example, GDPR).
366
+ */
367
+ triggeredByAnonymizeRequest?: boolean | null;
368
+ /** If present, indicates the action that triggered the event. */
369
+ originatedFrom?: string | null;
370
+ /**
371
+ * 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.
372
+ * 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.
373
+ */
374
+ entityEventSequence?: string | null;
375
+ }
376
+ /** @oneof */
377
+ interface DomainEventBodyOneOf {
378
+ createdEvent?: EntityCreatedEvent;
379
+ updatedEvent?: EntityUpdatedEvent;
380
+ deletedEvent?: EntityDeletedEvent;
381
+ actionEvent?: ActionEvent;
382
+ }
383
+ interface EntityCreatedEvent {
384
+ entity?: string;
385
+ }
386
+ interface RestoreInfo {
387
+ deletedDate?: Date | null;
388
+ }
389
+ interface EntityUpdatedEvent {
390
+ /**
391
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
392
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
393
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
394
+ */
395
+ currentEntity?: string;
396
+ }
397
+ interface EntityDeletedEvent {
398
+ /** Entity that was deleted. */
399
+ deletedEntity?: string | null;
400
+ }
401
+ interface ActionEvent {
402
+ body?: string;
403
+ }
404
+ interface MessageEnvelope {
405
+ /**
406
+ * App instance ID.
407
+ * @format GUID
408
+ */
409
+ instanceId?: string | null;
410
+ /**
411
+ * Event type.
412
+ * @maxLength 150
413
+ */
414
+ eventType?: string;
415
+ /** The identification type and identity data. */
416
+ identity?: IdentificationData;
417
+ /** Stringify payload. */
418
+ data?: string;
419
+ /** Details related to the account */
420
+ accountInfo?: AccountInfo;
421
+ }
422
+ interface IdentificationData extends IdentificationDataIdOneOf {
423
+ /**
424
+ * ID of a site visitor that has not logged in to the site.
425
+ * @format GUID
426
+ */
427
+ anonymousVisitorId?: string;
428
+ /**
429
+ * ID of a site visitor that has logged in to the site.
430
+ * @format GUID
431
+ */
432
+ memberId?: string;
433
+ /**
434
+ * ID of a Wix user (site owner, contributor, etc.).
435
+ * @format GUID
436
+ */
437
+ wixUserId?: string;
438
+ /**
439
+ * ID of an app.
440
+ * @format GUID
441
+ */
442
+ appId?: string;
443
+ /** @readonly */
444
+ identityType?: WebhookIdentityTypeWithLiterals;
445
+ }
446
+ /** @oneof */
447
+ interface IdentificationDataIdOneOf {
448
+ /**
449
+ * ID of a site visitor that has not logged in to the site.
450
+ * @format GUID
451
+ */
452
+ anonymousVisitorId?: string;
453
+ /**
454
+ * ID of a site visitor that has logged in to the site.
455
+ * @format GUID
456
+ */
457
+ memberId?: string;
458
+ /**
459
+ * ID of a Wix user (site owner, contributor, etc.).
460
+ * @format GUID
461
+ */
462
+ wixUserId?: string;
463
+ /**
464
+ * ID of an app.
465
+ * @format GUID
466
+ */
467
+ appId?: string;
468
+ }
469
+ declare enum WebhookIdentityType {
470
+ UNKNOWN = "UNKNOWN",
471
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
472
+ MEMBER = "MEMBER",
473
+ WIX_USER = "WIX_USER",
474
+ APP = "APP"
475
+ }
476
+ /** @enumType */
477
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
478
+ interface AccountInfo {
479
+ /**
480
+ * ID of the Wix account associated with the event.
481
+ * @format GUID
482
+ */
483
+ accountId?: string | null;
484
+ /**
485
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
486
+ * @format GUID
487
+ */
488
+ parentAccountId?: string | null;
489
+ /**
490
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
491
+ * @format GUID
492
+ */
493
+ siteId?: string | null;
494
+ }
495
+ interface CreateCommentRequest {
496
+ /**
497
+ * ID of the feedback session to leave the Comment on.
498
+ * @format GUID
499
+ */
500
+ feedbackId?: string;
501
+ /** The Comment to leave. */
502
+ comment?: Comment;
503
+ }
504
+ interface CreateCommentResponse {
505
+ /** The created Comment. */
506
+ comment?: Comment;
507
+ }
508
+ interface UpdateCommentRequest {
509
+ /**
510
+ * The Comment to update, carrying its `id`, its current `revision`, and the new values for the
511
+ * fields named in `field_mask`.
512
+ */
513
+ comment?: Comment;
514
+ }
515
+ interface UpdateCommentResponse {
516
+ /** The updated Comment. */
517
+ comment?: Comment;
518
+ }
519
+ interface BaseEventMetadata {
520
+ /**
521
+ * App instance ID.
522
+ * @format GUID
523
+ */
524
+ instanceId?: string | null;
525
+ /**
526
+ * Event type.
527
+ * @maxLength 150
528
+ */
529
+ eventType?: string;
530
+ /** The identification type and identity data. */
531
+ identity?: IdentificationData;
532
+ /** Details related to the account */
533
+ accountInfo?: AccountInfo;
534
+ }
535
+ interface EventMetadata extends BaseEventMetadata {
536
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
537
+ _id?: string;
538
+ /**
539
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
540
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
541
+ */
542
+ entityFqdn?: string;
543
+ /**
544
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
545
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
546
+ */
547
+ slug?: string;
548
+ /** ID of the entity associated with the event. */
549
+ entityId?: string;
550
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
551
+ eventTime?: Date | null;
552
+ /**
553
+ * Whether the event was triggered as a result of a privacy regulation application
554
+ * (for example, GDPR).
555
+ */
556
+ triggeredByAnonymizeRequest?: boolean | null;
557
+ /** If present, indicates the action that triggered the event. */
558
+ originatedFrom?: string | null;
559
+ /**
560
+ * 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.
561
+ * 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.
562
+ */
563
+ entityEventSequence?: string | null;
564
+ accountInfo?: AccountInfoMetadata;
565
+ }
566
+ interface AccountInfoMetadata {
567
+ /** ID of the Wix account associated with the event */
568
+ accountId: string;
569
+ /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
570
+ siteId?: string;
571
+ /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
572
+ parentAccountId?: string;
573
+ }
574
+ interface CommentCreatedEnvelope {
575
+ entity: Comment;
576
+ metadata: EventMetadata;
577
+ }
578
+ /** @permissionId partners:feedback:v1:comment:read_events
579
+ * @webhook
580
+ * @eventType wix.partners.feedback.v1.comment_created
581
+ * @slug created
582
+ * @documentationMaturity preview
583
+ */
584
+ declare function onCommentCreated(handler: (event: CommentCreatedEnvelope) => void | Promise<void>): void;
585
+ interface CommentDeletedEnvelope {
586
+ entity: Comment;
587
+ metadata: EventMetadata;
588
+ }
589
+ /** @permissionId partners:feedback:v1:comment:read_events
590
+ * @webhook
591
+ * @eventType wix.partners.feedback.v1.comment_deleted
592
+ * @slug deleted
593
+ * @documentationMaturity preview
594
+ */
595
+ declare function onCommentDeleted(handler: (event: CommentDeletedEnvelope) => void | Promise<void>): void;
596
+ interface CommentUpdatedEnvelope {
597
+ entity: Comment;
598
+ metadata: EventMetadata;
599
+ /** @hidden */
600
+ modifiedFields: Record<string, any>;
601
+ }
602
+ /** @permissionId partners:feedback:v1:comment:read_events
603
+ * @webhook
604
+ * @eventType wix.partners.feedback.v1.comment_updated
605
+ * @slug updated
606
+ * @documentationMaturity preview
607
+ */
608
+ declare function onCommentUpdated(handler: (event: CommentUpdatedEnvelope) => void | Promise<void>): void;
609
+ /**
610
+ * Retrieves a Comment.
611
+ * @param commentId - ID of the Comment to retrieve.
612
+ * @public
613
+ * @documentationMaturity preview
614
+ * @requiredField commentId
615
+ * @permissionId partners:feedback:v1:comment:get_comment
616
+ * @applicableIdentity APP
617
+ * @returns The requested Comment.
618
+ * @fqn wix.partners.feedback.v1.Comments.GetComment
619
+ */
620
+ declare function getComment(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>>;
621
+ /**
622
+ * Retrieves a list of Comments, given the provided [paging, filtering, and sorting][1].
623
+ *
624
+ * Up to 1,000 Comments can be returned per request.
625
+ *
626
+ * To learn how to query Comments, see [API Query Language][2].
627
+ *
628
+ * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging
629
+ * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language
630
+ * @param query - Query options.
631
+ * @public
632
+ * @documentationMaturity preview
633
+ * @requiredField query
634
+ * @permissionId partners:feedback:v1:comment:query_comments
635
+ * @applicableIdentity APP
636
+ * @fqn wix.partners.feedback.v1.Comments.QueryComments
637
+ */
638
+ declare function queryComments(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>>;
639
+ /**
640
+ * Updates the triage status of a Comment.
641
+ *
642
+ * This is the only part of a Comment the site owner may change — the text belongs to whoever
643
+ * wrote it.
644
+ *
645
+ * Each time the Comment is updated, `revision` increments by 1. The current `revision` must be
646
+ * passed, which ensures you're working with the latest Comment and prevents unintended
647
+ * overwrites.
648
+ * @param commentId - ID of the Comment to triage.
649
+ * @param status - Status to set on the Comment.
650
+ * @public
651
+ * @documentationMaturity preview
652
+ * @requiredField commentId
653
+ * @requiredField options
654
+ * @requiredField options.revision
655
+ * @requiredField status
656
+ * @permissionId partners:feedback:v1:comment:update_comment_status
657
+ * @applicableIdentity APP
658
+ * @fqn wix.partners.feedback.v1.Comments.UpdateCommentStatus
659
+ */
660
+ declare function updateCommentStatus(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>>;
661
+ interface UpdateCommentStatusOptions {
662
+ /** Current revision of the Comment. */
663
+ revision: string | null;
664
+ }
665
+ /**
666
+ * Deletes a Comment.
667
+ *
668
+ * Deleting a Comment also deletes its replies.
669
+ * @param commentId - ID of the Comment to delete.
670
+ * @public
671
+ * @documentationMaturity preview
672
+ * @requiredField commentId
673
+ * @permissionId partners:feedback:v1:comment:delete_comment
674
+ * @applicableIdentity APP
675
+ * @fqn wix.partners.feedback.v1.Comments.DeleteComment
676
+ */
677
+ declare function deleteComment(commentId: string): Promise<void>;
678
+ /**
679
+ * Adds a reply to a Comment.
680
+ *
681
+ * The reply is attributed to the calling user, or to the calling app when the call carries no
682
+ * user identity.
683
+ * @param commentId - ID of the Comment to reply to.
684
+ * @param reply - The reply to add. Only `message` is honored.
685
+ * @public
686
+ * @documentationMaturity preview
687
+ * @requiredField commentId
688
+ * @requiredField options
689
+ * @requiredField options.revision
690
+ * @requiredField reply
691
+ * @requiredField reply.message
692
+ * @permissionId partners:feedback:v1:comment:create_comment_reply
693
+ * @applicableIdentity APP
694
+ * @fqn wix.partners.feedback.v1.Comments.CreateCommentReply
695
+ */
696
+ declare function createCommentReply(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>>;
697
+ interface CreateCommentReplyOptions {
698
+ /** Current revision of the Comment. */
699
+ revision: string | null;
700
+ }
701
+ /**
702
+ * Updates the text of one of the caller's own replies to a Comment.
703
+ *
704
+ * The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
705
+ * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
706
+ * `revision` is rejected rather than applied to whichever reply now sits at that index.
707
+ * @param message - New text for the reply.
708
+ * @public
709
+ * @documentationMaturity preview
710
+ * @requiredField identifiers
711
+ * @requiredField identifiers.commentId
712
+ * @requiredField identifiers.replyIndex
713
+ * @requiredField message
714
+ * @requiredField options
715
+ * @requiredField options.revision
716
+ * @permissionId partners:feedback:v1:comment:update_comment_reply
717
+ * @applicableIdentity APP
718
+ * @fqn wix.partners.feedback.v1.Comments.UpdateCommentReply
719
+ */
720
+ declare function updateCommentReply(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>>;
721
+ interface UpdateCommentReplyIdentifiers {
722
+ /**
723
+ * ID of the Comment the reply belongs to.
724
+ * @format GUID
725
+ */
726
+ commentId: string;
727
+ /** Position of the reply in the Comment's `replies` list. */
728
+ replyIndex: number;
729
+ }
730
+ interface UpdateCommentReplyOptions {
731
+ /** Current revision of the Comment. */
732
+ revision: string | null;
733
+ }
734
+ /**
735
+ * Deletes a reply to a Comment.
736
+ *
737
+ * The site owner may delete any reply, not only their own, as part of moderating the Comment.
738
+ *
739
+ * The reply is addressed by `reply_index`, its position in the Comment's `replies` list. Because
740
+ * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
741
+ * `revision` is rejected rather than applied to whichever reply now sits at that index.
742
+ * @param revision - Current revision of the Comment.
743
+ * @public
744
+ * @documentationMaturity preview
745
+ * @requiredField identifiers
746
+ * @requiredField identifiers.commentId
747
+ * @requiredField identifiers.replyIndex
748
+ * @requiredField revision
749
+ * @permissionId partners:feedback:v1:comment:delete_comment_reply
750
+ * @applicableIdentity APP
751
+ * @fqn wix.partners.feedback.v1.Comments.DeleteCommentReply
752
+ */
753
+ declare function deleteCommentReply(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>>;
754
+ interface DeleteCommentReplyIdentifiers {
755
+ /**
756
+ * ID of the Comment the reply belongs to.
757
+ * @format GUID
758
+ */
759
+ commentId: string;
760
+ /** Position of the reply in the Comment's `replies` list. */
761
+ replyIndex: number;
762
+ }
763
+
764
+ export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type BaseEventMetadata, type Breakpoint, type Comment, type CommentCreatedEnvelope, type CommentDeletedEnvelope, type CommentLocation, type CommentReply, type CommentUpdatedEnvelope, type CreateCommentReplyOptions, type CreateCommentReplyRequest, type CreateCommentReplyResponse, type CreateCommentRequest, type CreateCommentResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteCommentReplyIdentifiers, type DeleteCommentReplyRequest, type DeleteCommentReplyResponse, type DeleteCommentRequest, type DeleteCommentResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type GetCommentRequest, type GetCommentResponse, type IdentificationData, type IdentificationDataIdOneOf, type MessageEnvelope, type Position, type QueryCommentsRequest, type QueryCommentsResponse, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, Status, type StatusWithLiterals, type UpdateCommentReplyIdentifiers, type UpdateCommentReplyOptions, type UpdateCommentReplyRequest, type UpdateCommentReplyResponse, type UpdateCommentRequest, type UpdateCommentResponse, type UpdateCommentStatusOptions, type UpdateCommentStatusRequest, type UpdateCommentStatusResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createCommentReply, deleteComment, deleteCommentReply, getComment, onCommentCreated, onCommentDeleted, onCommentUpdated, queryComments, updateCommentReply, updateCommentStatus };