@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.
@@ -45,7 +45,7 @@ interface Comment {
45
45
  */
46
46
  metaSiteId?: string;
47
47
  /**
48
- * ID of the Wix user or site visitor who left the Comment.
48
+ * ID of the site visitor who left the Comment.
49
49
  * @format GUID
50
50
  * @readonly
51
51
  */
@@ -146,7 +146,8 @@ interface Position {
146
146
  /** A reply to a Comment. */
147
147
  interface CommentReply {
148
148
  /**
149
- * ID of the Wix user or site visitor who wrote the reply.
149
+ * ID of whoever wrote the reply: the site visitor who left the Comment, a user managing the site, or
150
+ * the app that replied on the site's behalf.
150
151
  * @format GUID
151
152
  * @readonly
152
153
  */
@@ -526,13 +527,104 @@ interface UpdateCommentResponse {
526
527
  /** The updated Comment. */
527
528
  comment?: Comment;
528
529
  }
530
+ interface BaseEventMetadata {
531
+ /**
532
+ * App instance ID.
533
+ * @format GUID
534
+ */
535
+ instanceId?: string | null;
536
+ /**
537
+ * Event type.
538
+ * @maxLength 150
539
+ */
540
+ eventType?: string;
541
+ /** The identification type and identity data. */
542
+ identity?: IdentificationData;
543
+ /** Details related to the account */
544
+ accountInfo?: AccountInfo;
545
+ }
546
+ interface EventMetadata extends BaseEventMetadata {
547
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
548
+ _id?: string;
549
+ /**
550
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
551
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
552
+ */
553
+ entityFqdn?: string;
554
+ /**
555
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
556
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
557
+ */
558
+ slug?: string;
559
+ /** ID of the entity associated with the event. */
560
+ entityId?: string;
561
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
562
+ eventTime?: Date | null;
563
+ /**
564
+ * Whether the event was triggered as a result of a privacy regulation application
565
+ * (for example, GDPR).
566
+ */
567
+ triggeredByAnonymizeRequest?: boolean | null;
568
+ /** If present, indicates the action that triggered the event. */
569
+ originatedFrom?: string | null;
570
+ /**
571
+ * 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.
572
+ * 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.
573
+ */
574
+ entityEventSequence?: string | null;
575
+ accountInfo?: AccountInfoMetadata;
576
+ }
577
+ interface AccountInfoMetadata {
578
+ /** ID of the Wix account associated with the event */
579
+ accountId: string;
580
+ /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */
581
+ siteId?: string;
582
+ /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */
583
+ parentAccountId?: string;
584
+ }
585
+ interface CommentCreatedEnvelope {
586
+ entity: Comment;
587
+ metadata: EventMetadata;
588
+ }
589
+ /** @permissionId partners:feedback:v1:comment:read_events
590
+ * @webhook
591
+ * @eventType wix.partners.feedback.v1.comment_created
592
+ * @slug created
593
+ * @documentationMaturity preview
594
+ */
595
+ declare function onCommentCreated(handler: (event: CommentCreatedEnvelope) => void | Promise<void>): void;
596
+ interface CommentDeletedEnvelope {
597
+ entity: Comment;
598
+ metadata: EventMetadata;
599
+ }
600
+ /** @permissionId partners:feedback:v1:comment:read_events
601
+ * @webhook
602
+ * @eventType wix.partners.feedback.v1.comment_deleted
603
+ * @slug deleted
604
+ * @documentationMaturity preview
605
+ */
606
+ declare function onCommentDeleted(handler: (event: CommentDeletedEnvelope) => void | Promise<void>): void;
607
+ interface CommentUpdatedEnvelope {
608
+ entity: Comment;
609
+ metadata: EventMetadata;
610
+ /** @hidden */
611
+ modifiedFields: Record<string, any>;
612
+ }
613
+ /** @permissionId partners:feedback:v1:comment:read_events
614
+ * @webhook
615
+ * @eventType wix.partners.feedback.v1.comment_updated
616
+ * @slug updated
617
+ * @documentationMaturity preview
618
+ */
619
+ declare function onCommentUpdated(handler: (event: CommentUpdatedEnvelope) => void | Promise<void>): void;
529
620
  /**
530
621
  * Retrieves a Comment.
531
622
  * @param commentId - ID of the Comment to retrieve.
532
- * @internal
623
+ * @public
533
624
  * @documentationMaturity preview
534
625
  * @requiredField commentId
535
626
  * @permissionId partners:feedback:v1:comment:get_comment
627
+ * @applicableIdentity APP
536
628
  * @returns The requested Comment.
537
629
  * @fqn wix.partners.feedback.v1.Comments.GetComment
538
630
  */
@@ -547,10 +639,11 @@ declare function getComment(commentId: string): Promise<NonNullablePaths<Comment
547
639
  * [1]: https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging
548
640
  * [2]: https://dev.wix.com/docs/rest/articles/getting-started/api-query-language
549
641
  * @param query - Query options.
550
- * @internal
642
+ * @public
551
643
  * @documentationMaturity preview
552
644
  * @requiredField query
553
645
  * @permissionId partners:feedback:v1:comment:query_comments
646
+ * @applicableIdentity APP
554
647
  * @fqn wix.partners.feedback.v1.Comments.QueryComments
555
648
  */
556
649
  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>>;
@@ -565,13 +658,14 @@ declare function queryComments(query: CursorQuery): Promise<NonNullablePaths<Que
565
658
  * overwrites.
566
659
  * @param commentId - ID of the Comment to triage.
567
660
  * @param status - Status to set on the Comment.
568
- * @internal
661
+ * @public
569
662
  * @documentationMaturity preview
570
663
  * @requiredField commentId
571
664
  * @requiredField options
572
665
  * @requiredField options.revision
573
666
  * @requiredField status
574
667
  * @permissionId partners:feedback:v1:comment:update_comment_status
668
+ * @applicableIdentity APP
575
669
  * @fqn wix.partners.feedback.v1.Comments.UpdateCommentStatus
576
670
  */
577
671
  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>>;
@@ -584,10 +678,11 @@ interface UpdateCommentStatusOptions {
584
678
  *
585
679
  * Deleting a Comment also deletes its replies.
586
680
  * @param commentId - ID of the Comment to delete.
587
- * @internal
681
+ * @public
588
682
  * @documentationMaturity preview
589
683
  * @requiredField commentId
590
684
  * @permissionId partners:feedback:v1:comment:delete_comment
685
+ * @applicableIdentity APP
591
686
  * @fqn wix.partners.feedback.v1.Comments.DeleteComment
592
687
  */
593
688
  declare function deleteComment(commentId: string): Promise<void>;
@@ -598,7 +693,7 @@ declare function deleteComment(commentId: string): Promise<void>;
598
693
  * user identity.
599
694
  * @param commentId - ID of the Comment to reply to.
600
695
  * @param reply - The reply to add. Only `message` is honored.
601
- * @internal
696
+ * @public
602
697
  * @documentationMaturity preview
603
698
  * @requiredField commentId
604
699
  * @requiredField options
@@ -606,6 +701,7 @@ declare function deleteComment(commentId: string): Promise<void>;
606
701
  * @requiredField reply
607
702
  * @requiredField reply.message
608
703
  * @permissionId partners:feedback:v1:comment:create_comment_reply
704
+ * @applicableIdentity APP
609
705
  * @fqn wix.partners.feedback.v1.Comments.CreateCommentReply
610
706
  */
611
707
  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>>;
@@ -620,7 +716,7 @@ interface CreateCommentReplyOptions {
620
716
  * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
621
717
  * `revision` is rejected rather than applied to whichever reply now sits at that index.
622
718
  * @param message - New text for the reply.
623
- * @internal
719
+ * @public
624
720
  * @documentationMaturity preview
625
721
  * @requiredField identifiers
626
722
  * @requiredField identifiers.commentId
@@ -629,6 +725,7 @@ interface CreateCommentReplyOptions {
629
725
  * @requiredField options
630
726
  * @requiredField options.revision
631
727
  * @permissionId partners:feedback:v1:comment:update_comment_reply
728
+ * @applicableIdentity APP
632
729
  * @fqn wix.partners.feedback.v1.Comments.UpdateCommentReply
633
730
  */
634
731
  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>>;
@@ -654,13 +751,14 @@ interface UpdateCommentReplyOptions {
654
751
  * indexes shift when a reply is deleted, the Comment's current `revision` must be passed; a stale
655
752
  * `revision` is rejected rather than applied to whichever reply now sits at that index.
656
753
  * @param revision - Current revision of the Comment.
657
- * @internal
754
+ * @public
658
755
  * @documentationMaturity preview
659
756
  * @requiredField identifiers
660
757
  * @requiredField identifiers.commentId
661
758
  * @requiredField identifiers.replyIndex
662
759
  * @requiredField revision
663
760
  * @permissionId partners:feedback:v1:comment:delete_comment_reply
761
+ * @applicableIdentity APP
664
762
  * @fqn wix.partners.feedback.v1.Comments.DeleteCommentReply
665
763
  */
666
764
  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>>;
@@ -674,4 +772,4 @@ interface DeleteCommentReplyIdentifiers {
674
772
  replyIndex: number;
675
773
  }
676
774
 
677
- export { type AccountInfo, type ActionEvent, type Breakpoint, type Comment, type CommentLocation, type CommentReply, 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 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, queryComments, updateCommentReply, updateCommentStatus };
775
+ 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 };
@@ -46,7 +46,7 @@ interface Comment {
46
46
  */
47
47
  metaSiteId?: string;
48
48
  /**
49
- * ID of the Wix user or site visitor who left the Comment.
49
+ * ID of the site visitor who left the Comment.
50
50
  * @format GUID
51
51
  * @readonly
52
52
  */
@@ -147,7 +147,8 @@ interface Position {
147
147
  /** A reply to a Comment. */
148
148
  interface CommentReply {
149
149
  /**
150
- * ID of the Wix user or site visitor who wrote the reply.
150
+ * ID of whoever wrote the reply: the site visitor who left the Comment, a user managing the site, or
151
+ * the app that replied on the site's behalf.
151
152
  * @format GUID
152
153
  * @readonly
153
154
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/auto_sdk_feedback_comments",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -50,5 +50,5 @@
50
50
  "fqdn": "wix.partners.feedback.v1.comment"
51
51
  }
52
52
  },
53
- "falconPackageHash": "5bcdb29dc3b3b0a7eecd0bcce3f869e2fb75655ddc40b22c83614389"
53
+ "falconPackageHash": "50d854e74f152b188cb05d5695a80eec09865f0acbe5167623ab6842"
54
54
  }