@wix/auto_sdk_comments_votes 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.
- package/build/cjs/index.d.ts +28 -16
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +106 -77
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +45 -42
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +28 -16
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +106 -77
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +45 -42
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +28 -16
- package/build/internal/cjs/index.typings.d.ts +106 -77
- package/build/internal/cjs/meta.d.ts +45 -42
- package/build/internal/es/index.d.mts +28 -16
- package/build/internal/es/index.typings.d.mts +106 -77
- package/build/internal/es/meta.d.mts +45 -42
- package/package.json +2 -2
|
@@ -4,53 +4,56 @@ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
|
|
|
4
4
|
/** An upvote or downvote cast by one identity on a resource in an app context. */
|
|
5
5
|
interface Vote {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* ID of the resource receiving the vote. For comments, this is the comment ID.
|
|
8
8
|
* @maxLength 128
|
|
9
9
|
*/
|
|
10
10
|
resourceId?: string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Entity type receiving the vote. For comments, this is `wix.comments.v2.comment`.
|
|
13
13
|
* @maxLength 300
|
|
14
14
|
*/
|
|
15
15
|
resourceFqdn?: string;
|
|
16
16
|
/**
|
|
17
|
-
* Vote ID
|
|
17
|
+
* Vote ID.
|
|
18
18
|
* @format GUID
|
|
19
19
|
* @readonly
|
|
20
20
|
*/
|
|
21
21
|
voteId?: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Vote type.
|
|
24
24
|
* @readonly
|
|
25
25
|
*/
|
|
26
26
|
type?: TypeWithLiterals;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Identity that cast the vote.
|
|
29
29
|
* @readonly
|
|
30
30
|
*/
|
|
31
31
|
createdBy?: SocialIdentity;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Date and time the vote was created.
|
|
34
34
|
* @readonly
|
|
35
35
|
*/
|
|
36
36
|
_createdDate?: Date | null;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Date and time the vote was updated.
|
|
39
39
|
* @readonly
|
|
40
40
|
*/
|
|
41
41
|
_updatedDate?: Date | null;
|
|
42
|
-
/**
|
|
42
|
+
/** App and context containing the resource. */
|
|
43
43
|
context?: VoteContext;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Revision number, which increments when the vote is updated.
|
|
46
46
|
* @readonly
|
|
47
47
|
*/
|
|
48
48
|
revision?: string;
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
50
|
+
/** Vote type. */
|
|
51
51
|
declare enum Type {
|
|
52
|
+
/** Unknown vote type. */
|
|
52
53
|
UNKNOWN = "UNKNOWN",
|
|
54
|
+
/** Vote in favor of the resource. */
|
|
53
55
|
UPVOTE = "UPVOTE",
|
|
56
|
+
/** Vote against the resource. */
|
|
54
57
|
DOWNVOTE = "DOWNVOTE"
|
|
55
58
|
}
|
|
56
59
|
/** @enumType */
|
|
@@ -72,20 +75,20 @@ declare enum IdentityType {
|
|
|
72
75
|
type IdentityTypeWithLiterals = IdentityType | 'ANONYMOUS' | 'MEMBER' | 'USER' | 'SERVICE' | 'MEMBER_GROUP';
|
|
73
76
|
interface VoteContext {
|
|
74
77
|
/**
|
|
75
|
-
*
|
|
78
|
+
* ID of the context containing the resource.
|
|
76
79
|
* @maxLength 128
|
|
77
80
|
*/
|
|
78
81
|
contextId?: string;
|
|
79
|
-
/**
|
|
82
|
+
/** Type used by the app to identify the context. */
|
|
80
83
|
contextType?: string | null;
|
|
81
84
|
/**
|
|
82
|
-
*
|
|
85
|
+
* ID of the app that owns the context.
|
|
83
86
|
* @format GUID
|
|
84
87
|
* @readonly
|
|
85
88
|
*/
|
|
86
89
|
appDefId?: string;
|
|
87
90
|
/**
|
|
88
|
-
*
|
|
91
|
+
* Site ID.
|
|
89
92
|
* @format GUID
|
|
90
93
|
* @readonly
|
|
91
94
|
*/
|
|
@@ -93,27 +96,27 @@ interface VoteContext {
|
|
|
93
96
|
}
|
|
94
97
|
interface UpvoteRequest {
|
|
95
98
|
/**
|
|
96
|
-
* context token
|
|
99
|
+
* Legacy context token. Use `contextData` instead.
|
|
97
100
|
* @deprecated
|
|
98
101
|
* @replacedBy context_data
|
|
99
102
|
*/
|
|
100
103
|
contextToken?: string;
|
|
101
104
|
/**
|
|
102
|
-
* resource
|
|
105
|
+
* ID of the resource receiving the vote. For a comment, specify the comment ID.
|
|
103
106
|
* @maxLength 128
|
|
104
107
|
*/
|
|
105
108
|
resourceId: string;
|
|
106
109
|
/**
|
|
107
|
-
*
|
|
110
|
+
* Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.
|
|
108
111
|
* @maxLength 300
|
|
109
112
|
*/
|
|
110
113
|
resourceFqdn: string;
|
|
111
|
-
/** context
|
|
114
|
+
/** App and context containing the resource. */
|
|
112
115
|
contextData?: ContextData;
|
|
113
116
|
}
|
|
114
117
|
/**
|
|
115
118
|
* Identifies the app and context containing the resource.
|
|
116
|
-
* When provided, contextData takes precedence over the deprecated contextToken
|
|
119
|
+
* When provided, `contextData` takes precedence over the deprecated `contextToken`.
|
|
117
120
|
*/
|
|
118
121
|
interface ContextData {
|
|
119
122
|
/**
|
|
@@ -130,55 +133,55 @@ interface ContextData {
|
|
|
130
133
|
contextType?: string | null;
|
|
131
134
|
}
|
|
132
135
|
interface UpvoteResponse {
|
|
133
|
-
/**
|
|
136
|
+
/** Vote cast or updated. */
|
|
134
137
|
vote?: Vote;
|
|
135
138
|
}
|
|
136
139
|
interface ContextResourceVoteChange {
|
|
137
140
|
/**
|
|
138
|
-
*
|
|
141
|
+
* ID of the resource receiving the vote.
|
|
139
142
|
* @maxLength 128
|
|
140
143
|
*/
|
|
141
144
|
resourceId?: string;
|
|
142
145
|
/**
|
|
143
|
-
*
|
|
146
|
+
* Entity type receiving the vote. For comments, this is `wix.comments.v2.comment`.
|
|
144
147
|
* @maxLength 300
|
|
145
148
|
*/
|
|
146
149
|
resourceFqdn?: string;
|
|
147
|
-
/**
|
|
150
|
+
/** Net score: upvote count minus downvote count. */
|
|
148
151
|
score?: number;
|
|
149
|
-
/**
|
|
152
|
+
/** Number of upvotes. */
|
|
150
153
|
upvoteCount?: number;
|
|
151
|
-
/**
|
|
154
|
+
/** Number of downvotes. */
|
|
152
155
|
downvoteCount?: number;
|
|
153
|
-
/**
|
|
156
|
+
/** App and context containing the resource. */
|
|
154
157
|
context?: VoteContext;
|
|
155
158
|
}
|
|
156
159
|
interface VoteCast {
|
|
157
|
-
/** Vote */
|
|
160
|
+
/** Vote associated with the event. */
|
|
158
161
|
vote?: Vote;
|
|
159
162
|
}
|
|
160
163
|
interface DownvoteRequest {
|
|
161
164
|
/**
|
|
162
|
-
* context token
|
|
165
|
+
* Legacy context token. Use `contextData` instead.
|
|
163
166
|
* @deprecated
|
|
164
167
|
* @replacedBy context_data
|
|
165
168
|
*/
|
|
166
169
|
contextToken?: string;
|
|
167
170
|
/**
|
|
168
|
-
* resource
|
|
171
|
+
* ID of the resource receiving the vote. For a comment, specify the comment ID.
|
|
169
172
|
* @maxLength 128
|
|
170
173
|
*/
|
|
171
174
|
resourceId: string;
|
|
172
175
|
/**
|
|
173
|
-
*
|
|
176
|
+
* Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.
|
|
174
177
|
* @maxLength 300
|
|
175
178
|
*/
|
|
176
179
|
resourceFqdn: string;
|
|
177
|
-
/** context
|
|
180
|
+
/** App and context containing the resource. */
|
|
178
181
|
contextData?: ContextData;
|
|
179
182
|
}
|
|
180
183
|
interface DownvoteResponse {
|
|
181
|
-
/**
|
|
184
|
+
/** Vote cast or updated. */
|
|
182
185
|
vote?: Vote;
|
|
183
186
|
}
|
|
184
187
|
interface UpdateVoteRequest {
|
|
@@ -196,34 +199,34 @@ interface UpdateVoteResponse {
|
|
|
196
199
|
}
|
|
197
200
|
interface RemoveVoteRequest {
|
|
198
201
|
/**
|
|
199
|
-
* context token
|
|
202
|
+
* Legacy context token. Use `contextData` instead.
|
|
200
203
|
* @deprecated
|
|
201
204
|
* @replacedBy context_data
|
|
202
205
|
*/
|
|
203
206
|
contextToken?: string;
|
|
204
|
-
/**
|
|
207
|
+
/** ID of the vote to remove. */
|
|
205
208
|
voteId: string;
|
|
206
|
-
/** context
|
|
209
|
+
/** App and context containing the resource. */
|
|
207
210
|
contextData?: ContextData;
|
|
208
211
|
}
|
|
209
212
|
interface RemoveVoteResponse {
|
|
210
|
-
/** removed
|
|
213
|
+
/** Vote removed. */
|
|
211
214
|
vote?: Vote;
|
|
212
215
|
}
|
|
213
216
|
interface VoteDeleted {
|
|
214
|
-
/** Vote */
|
|
217
|
+
/** Vote associated with the event. */
|
|
215
218
|
vote?: Vote;
|
|
216
219
|
}
|
|
217
220
|
interface QueryVotesRequest {
|
|
218
221
|
/**
|
|
219
|
-
* context token
|
|
222
|
+
* Legacy context token. Use `contextData` instead.
|
|
220
223
|
* @deprecated
|
|
221
224
|
* @replacedBy context_data
|
|
222
225
|
*/
|
|
223
226
|
contextToken?: string;
|
|
224
|
-
/**
|
|
227
|
+
/** Query options. Filter by `resourceId`. Field projection and fieldsets aren't supported. */
|
|
225
228
|
query?: QueryV2;
|
|
226
|
-
/** context
|
|
229
|
+
/** App and context containing the resource. */
|
|
227
230
|
contextData?: ContextData;
|
|
228
231
|
}
|
|
229
232
|
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
@@ -317,9 +320,9 @@ interface CursorPaging {
|
|
|
317
320
|
cursor?: string | null;
|
|
318
321
|
}
|
|
319
322
|
interface QueryVotesResponse {
|
|
320
|
-
/** matching
|
|
323
|
+
/** Votes matching the query. */
|
|
321
324
|
votes?: Vote[];
|
|
322
|
-
/**
|
|
325
|
+
/** Paging metadata containing cursors for retrieving additional results. */
|
|
323
326
|
paging?: PagingMetadataV2;
|
|
324
327
|
}
|
|
325
328
|
interface PagingMetadataV2 {
|
|
@@ -672,7 +675,9 @@ interface VoteContextResourceVoteChangeEnvelope {
|
|
|
672
675
|
data: ContextResourceVoteChange;
|
|
673
676
|
metadata: EventMetadata;
|
|
674
677
|
}
|
|
675
|
-
/**
|
|
678
|
+
/**
|
|
679
|
+
* Triggered when a vote changes the totals for a resource.
|
|
680
|
+
* @webhook
|
|
676
681
|
* @eventType wix.comments.v1.vote_context_resource_vote_change
|
|
677
682
|
* @serviceIdentifier com.wixpress.comments.Votes
|
|
678
683
|
* @slug context_resource_vote_change
|
|
@@ -683,7 +688,9 @@ interface VoteCastEnvelope {
|
|
|
683
688
|
data: VoteCast;
|
|
684
689
|
metadata: EventMetadata;
|
|
685
690
|
}
|
|
686
|
-
/**
|
|
691
|
+
/**
|
|
692
|
+
* Triggered when an upvote or downvote is cast, including changes to an existing vote.
|
|
693
|
+
* @webhook
|
|
687
694
|
* @eventType wix.comments.v1.vote_vote_cast
|
|
688
695
|
* @serviceIdentifier com.wixpress.comments.Votes
|
|
689
696
|
* @slug vote_cast
|
|
@@ -694,7 +701,9 @@ interface VoteDeletedEnvelope {
|
|
|
694
701
|
data: VoteDeleted;
|
|
695
702
|
metadata: EventMetadata;
|
|
696
703
|
}
|
|
697
|
-
/**
|
|
704
|
+
/**
|
|
705
|
+
* Triggered when a vote is removed.
|
|
706
|
+
* @webhook
|
|
698
707
|
* @eventType wix.comments.v1.vote_vote_deleted
|
|
699
708
|
* @serviceIdentifier com.wixpress.comments.Votes
|
|
700
709
|
* @slug vote_deleted
|
|
@@ -703,115 +712,135 @@ interface VoteDeletedEnvelope {
|
|
|
703
712
|
declare function onVoteDeleted(handler: (event: VoteDeletedEnvelope) => void | Promise<void>): void;
|
|
704
713
|
/**
|
|
705
714
|
* Casts an upvote on a resource for the current identity.
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
715
|
+
*
|
|
716
|
+
* Changes the current identity's existing downvote to an upvote.
|
|
717
|
+
* Repeating the same vote doesn't remove it. To clear a vote, call
|
|
718
|
+
* [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).
|
|
719
|
+
* Specify the resource's app and context in `contextData`. Voting must be enabled for that context.
|
|
709
720
|
* @public
|
|
710
721
|
* @documentationMaturity preview
|
|
711
722
|
* @requiredField options.resourceFqdn
|
|
712
723
|
* @requiredField options.resourceId
|
|
724
|
+
* @permissionId comments:v1:vote:upvote
|
|
713
725
|
* @fqn com.wixpress.comments.Votes.Upvote
|
|
714
726
|
*/
|
|
715
|
-
declare function upvote(options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`,
|
|
727
|
+
declare function upvote(options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 0>): Promise<NonNullablePaths<UpvoteResponse, `vote.resourceId` | `vote.resourceFqdn` | `vote.voteId` | `vote.type` | `vote.createdBy.identityId` | `vote.createdBy.identityType` | `vote.context.contextId` | `vote.context.appDefId` | `vote.context.metaSiteId` | `vote.revision`, 2> & {
|
|
716
728
|
__applicationErrorsType?: UpvoteApplicationErrors;
|
|
717
729
|
}>;
|
|
718
730
|
interface UpvoteOptions {
|
|
719
731
|
/**
|
|
720
|
-
* context token
|
|
732
|
+
* Legacy context token. Use `contextData` instead.
|
|
721
733
|
* @deprecated
|
|
722
734
|
* @replacedBy context_data
|
|
723
735
|
*/
|
|
724
736
|
contextToken?: string;
|
|
725
737
|
/**
|
|
726
|
-
* resource
|
|
738
|
+
* ID of the resource receiving the vote. For a comment, specify the comment ID.
|
|
727
739
|
* @maxLength 128
|
|
728
740
|
*/
|
|
729
741
|
resourceId: string;
|
|
730
742
|
/**
|
|
731
|
-
*
|
|
743
|
+
* Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.
|
|
732
744
|
* @maxLength 300
|
|
733
745
|
*/
|
|
734
746
|
resourceFqdn: string;
|
|
735
|
-
/** context
|
|
747
|
+
/** App and context containing the resource. */
|
|
736
748
|
contextData?: ContextData;
|
|
737
749
|
}
|
|
738
750
|
/**
|
|
739
751
|
* Casts a downvote on a resource for the current identity.
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
752
|
+
*
|
|
753
|
+
* Changes the current identity's existing upvote to a downvote.
|
|
754
|
+
* Repeating the same vote doesn't remove it. To clear a vote, call
|
|
755
|
+
* [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).
|
|
756
|
+
* Specify the resource's app and context in `contextData`. Voting must be enabled for that context.
|
|
743
757
|
* @public
|
|
744
758
|
* @documentationMaturity preview
|
|
745
759
|
* @requiredField options.resourceFqdn
|
|
746
760
|
* @requiredField options.resourceId
|
|
761
|
+
* @permissionId comments:v1:vote:downvote
|
|
747
762
|
* @fqn com.wixpress.comments.Votes.Downvote
|
|
748
763
|
*/
|
|
749
|
-
declare function downvote(options?: NonNullablePaths<DownvoteOptions, `resourceFqdn` | `resourceId`,
|
|
764
|
+
declare function downvote(options?: NonNullablePaths<DownvoteOptions, `resourceFqdn` | `resourceId`, 0>): Promise<NonNullablePaths<DownvoteResponse, `vote.resourceId` | `vote.resourceFqdn` | `vote.voteId` | `vote.type` | `vote.createdBy.identityId` | `vote.createdBy.identityType` | `vote.context.contextId` | `vote.context.appDefId` | `vote.context.metaSiteId` | `vote.revision`, 2> & {
|
|
750
765
|
__applicationErrorsType?: DownvoteApplicationErrors;
|
|
751
766
|
}>;
|
|
752
767
|
interface DownvoteOptions {
|
|
753
768
|
/**
|
|
754
|
-
* context token
|
|
769
|
+
* Legacy context token. Use `contextData` instead.
|
|
755
770
|
* @deprecated
|
|
756
771
|
* @replacedBy context_data
|
|
757
772
|
*/
|
|
758
773
|
contextToken?: string;
|
|
759
774
|
/**
|
|
760
|
-
* resource
|
|
775
|
+
* ID of the resource receiving the vote. For a comment, specify the comment ID.
|
|
761
776
|
* @maxLength 128
|
|
762
777
|
*/
|
|
763
778
|
resourceId: string;
|
|
764
779
|
/**
|
|
765
|
-
*
|
|
780
|
+
* Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.
|
|
766
781
|
* @maxLength 300
|
|
767
782
|
*/
|
|
768
783
|
resourceFqdn: string;
|
|
769
|
-
/** context
|
|
784
|
+
/** App and context containing the resource. */
|
|
770
785
|
contextData?: ContextData;
|
|
771
786
|
}
|
|
772
787
|
/**
|
|
773
|
-
* Removes the current identity's vote
|
|
774
|
-
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
788
|
+
* Removes the current identity's vote and returns the removed vote.
|
|
789
|
+
*
|
|
790
|
+
* Specify the `voteId` returned by a vote response or
|
|
791
|
+
* [Query Votes](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/query-votes) and the same `contextData` used to cast the vote.
|
|
792
|
+
* A repeated removal fails when the vote no longer exists.
|
|
793
|
+
* @param voteId - ID of the vote to remove.
|
|
777
794
|
* @public
|
|
778
795
|
* @documentationMaturity preview
|
|
779
796
|
* @requiredField voteId
|
|
797
|
+
* @permissionId comments:v1:vote:remove_vote
|
|
780
798
|
* @fqn com.wixpress.comments.Votes.RemoveVote
|
|
781
799
|
*/
|
|
782
|
-
declare function removeVote(voteId: string, options?: RemoveVoteOptions): Promise<NonNullablePaths<RemoveVoteResponse, `vote.resourceId` | `vote.resourceFqdn` | `vote.voteId` | `vote.type` | `vote.createdBy.identityId` | `vote.createdBy.identityType` | `vote.context.contextId` | `vote.context.appDefId` | `vote.context.metaSiteId` | `vote.revision`,
|
|
800
|
+
declare function removeVote(voteId: string, options?: RemoveVoteOptions): Promise<NonNullablePaths<RemoveVoteResponse, `vote.resourceId` | `vote.resourceFqdn` | `vote.voteId` | `vote.type` | `vote.createdBy.identityId` | `vote.createdBy.identityType` | `vote.context.contextId` | `vote.context.appDefId` | `vote.context.metaSiteId` | `vote.revision`, 2> & {
|
|
783
801
|
__applicationErrorsType?: RemoveVoteApplicationErrors;
|
|
784
802
|
}>;
|
|
785
803
|
interface RemoveVoteOptions {
|
|
786
804
|
/**
|
|
787
|
-
* context token
|
|
805
|
+
* Legacy context token. Use `contextData` instead.
|
|
788
806
|
* @deprecated
|
|
789
807
|
* @replacedBy context_data
|
|
790
808
|
*/
|
|
791
809
|
contextToken?: string;
|
|
792
|
-
/** context
|
|
810
|
+
/** App and context containing the resource. */
|
|
793
811
|
contextData?: ContextData;
|
|
794
812
|
}
|
|
795
813
|
/**
|
|
796
|
-
* Retrieves votes
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
*
|
|
814
|
+
* Retrieves a list of votes, given the provided paging and filtering.
|
|
815
|
+
*
|
|
816
|
+
* Visitor and member callers receive their own votes in the specified app and context.
|
|
817
|
+
* Authorized application callers can retrieve votes from multiple identities in that context.
|
|
818
|
+
* Filter by `resourceId`, using `$in` to retrieve votes for multiple comment IDs.
|
|
819
|
+
* Results don't include comments without a matching vote.
|
|
820
|
+
*
|
|
821
|
+
* Specify `query.cursorPaging.limit` to control the page size. To retrieve the next page,
|
|
822
|
+
* set `query.cursorPaging.cursor` to the returned `paging.cursors.next` and keep the same context.
|
|
823
|
+
* Offset paging and field projection aren't supported. Don't depend on a particular result order.
|
|
824
|
+
*
|
|
825
|
+
* To learn about working with Query methods, see
|
|
826
|
+
* [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and
|
|
827
|
+
* [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).
|
|
828
|
+
* Retain the permission checked by RequestContextResolver for app identities.
|
|
802
829
|
* @public
|
|
803
830
|
* @documentationMaturity preview
|
|
831
|
+
* @permissionId WIX_COMMENTS.VOTE_QUERY
|
|
832
|
+
* @applicableIdentity APP
|
|
804
833
|
* @fqn com.wixpress.comments.Votes.QueryVotes
|
|
805
834
|
*/
|
|
806
835
|
declare function queryVotes(options?: QueryVotesOptions): VotesQueryBuilder;
|
|
807
836
|
interface QueryVotesOptions {
|
|
808
837
|
/**
|
|
809
|
-
* context token
|
|
838
|
+
* Legacy context token. Use `contextData` instead.
|
|
810
839
|
* @deprecated
|
|
811
840
|
* @replacedBy context_data
|
|
812
841
|
*/
|
|
813
842
|
contextToken?: string | undefined;
|
|
814
|
-
/** context
|
|
843
|
+
/** App and context containing the resource. */
|
|
815
844
|
contextData?: ContextData | undefined;
|
|
816
845
|
}
|
|
817
846
|
interface QueryCursorResult {
|
|
@@ -856,7 +885,7 @@ interface VotesQueryBuilder {
|
|
|
856
885
|
* @fqn com.wixpress.comments.Votes.QueryVotes
|
|
857
886
|
* @requiredField query
|
|
858
887
|
*/
|
|
859
|
-
declare function typedQueryVotes(query: VoteQuery, options?: QueryVotesOptions): Promise<NonNullablePaths<QueryVotesResponse, `votes` | `votes.${number}.resourceId` | `votes.${number}.resourceFqdn` | `votes.${number}.voteId` | `votes.${number}.type` | `votes.${number}.createdBy.identityId` | `votes.${number}.createdBy.identityType` | `votes.${number}.context.contextId` | `votes.${number}.context.appDefId` | `votes.${number}.context.metaSiteId` | `votes.${number}.revision`,
|
|
888
|
+
declare function typedQueryVotes(query: VoteQuery, options?: QueryVotesOptions): Promise<NonNullablePaths<QueryVotesResponse, `votes` | `votes.${number}.resourceId` | `votes.${number}.resourceFqdn` | `votes.${number}.voteId` | `votes.${number}.type` | `votes.${number}.createdBy.identityId` | `votes.${number}.createdBy.identityType` | `votes.${number}.context.contextId` | `votes.${number}.context.appDefId` | `votes.${number}.context.metaSiteId` | `votes.${number}.revision`, 3> & {
|
|
860
889
|
__applicationErrorsType?: QueryVotesApplicationErrors;
|
|
861
890
|
}>;
|
|
862
891
|
interface VoteQuerySpec extends QuerySpec {
|