@wix/auto_sdk_comments_votes 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,380 @@
1
+ // src/comments-v1-vote-votes.universal.ts
2
+ import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
3
+ import { queryBuilder } from "@wix/sdk-runtime/query-builder";
4
+ import {
5
+ renameKeysFromSDKRequestToRESTRequest,
6
+ renameKeysFromRESTResponseToSDKResponse
7
+ } from "@wix/sdk-runtime/rename-all-nested-keys";
8
+
9
+ // src/comments-v1-vote-votes.http.ts
10
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
11
+ import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
12
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
13
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
14
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
15
+ function resolveComWixpressCommentsVotesUrl(opts) {
16
+ const domainToMappings = {
17
+ "api._api_base_domain_": [
18
+ {
19
+ srcPath: "/votes",
20
+ destPath: ""
21
+ }
22
+ ],
23
+ _: [
24
+ {
25
+ srcPath: "/_api/votes",
26
+ destPath: "/v1/votes"
27
+ }
28
+ ],
29
+ "www.wixapis.com": [
30
+ {
31
+ srcPath: "/v1/votes",
32
+ destPath: "/v1/votes"
33
+ }
34
+ ],
35
+ "www._base_domain_": [
36
+ {
37
+ srcPath: "/_api/votes",
38
+ destPath: "/v1/votes"
39
+ }
40
+ ]
41
+ };
42
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
43
+ }
44
+ var PACKAGE_NAME = "@wix/auto_sdk_comments_votes";
45
+ function upvote(payload) {
46
+ function __upvote({ host }) {
47
+ const metadata = {
48
+ entityFqdn: "wix.comments.v1.vote",
49
+ method: "POST",
50
+ methodFqn: "com.wixpress.comments.Votes.Upvote",
51
+ packageName: PACKAGE_NAME,
52
+ migrationOptions: {
53
+ optInTransformResponse: true
54
+ },
55
+ url: resolveComWixpressCommentsVotesUrl({
56
+ protoPath: "/v1/votes/upvote",
57
+ data: payload,
58
+ host
59
+ }),
60
+ data: payload,
61
+ transformResponse: (payload2) => transformPaths(payload2, [
62
+ {
63
+ transformFn: transformRESTTimestampToSDKTimestamp,
64
+ paths: [{ path: "vote.createdDate" }, { path: "vote.updatedDate" }]
65
+ }
66
+ ])
67
+ };
68
+ return metadata;
69
+ }
70
+ return __upvote;
71
+ }
72
+ function downvote(payload) {
73
+ function __downvote({ host }) {
74
+ const metadata = {
75
+ entityFqdn: "wix.comments.v1.vote",
76
+ method: "POST",
77
+ methodFqn: "com.wixpress.comments.Votes.Downvote",
78
+ packageName: PACKAGE_NAME,
79
+ migrationOptions: {
80
+ optInTransformResponse: true
81
+ },
82
+ url: resolveComWixpressCommentsVotesUrl({
83
+ protoPath: "/v1/votes/downvote",
84
+ data: payload,
85
+ host
86
+ }),
87
+ data: payload,
88
+ transformResponse: (payload2) => transformPaths(payload2, [
89
+ {
90
+ transformFn: transformRESTTimestampToSDKTimestamp,
91
+ paths: [{ path: "vote.createdDate" }, { path: "vote.updatedDate" }]
92
+ }
93
+ ])
94
+ };
95
+ return metadata;
96
+ }
97
+ return __downvote;
98
+ }
99
+ function removeVote(payload) {
100
+ function __removeVote({ host }) {
101
+ const metadata = {
102
+ entityFqdn: "wix.comments.v1.vote",
103
+ method: "DELETE",
104
+ methodFqn: "com.wixpress.comments.Votes.RemoveVote",
105
+ packageName: PACKAGE_NAME,
106
+ migrationOptions: {
107
+ optInTransformResponse: true
108
+ },
109
+ url: resolveComWixpressCommentsVotesUrl({
110
+ protoPath: "/v1/votes/{voteId}",
111
+ data: payload,
112
+ host
113
+ }),
114
+ params: toURLSearchParams(payload),
115
+ transformResponse: (payload2) => transformPaths(payload2, [
116
+ {
117
+ transformFn: transformRESTTimestampToSDKTimestamp,
118
+ paths: [{ path: "vote.createdDate" }, { path: "vote.updatedDate" }]
119
+ }
120
+ ])
121
+ };
122
+ return metadata;
123
+ }
124
+ return __removeVote;
125
+ }
126
+ function queryVotes(payload) {
127
+ function __queryVotes({ host }) {
128
+ const serializedData = transformPaths(payload, [
129
+ {
130
+ transformFn: transformSDKFloatToRESTFloat,
131
+ paths: [
132
+ { path: "query.sort.origin.latitude" },
133
+ { path: "query.sort.origin.longitude" }
134
+ ]
135
+ }
136
+ ]);
137
+ const metadata = {
138
+ entityFqdn: "wix.comments.v1.vote",
139
+ method: "POST",
140
+ methodFqn: "com.wixpress.comments.Votes.QueryVotes",
141
+ packageName: PACKAGE_NAME,
142
+ migrationOptions: {
143
+ optInTransformResponse: true
144
+ },
145
+ url: resolveComWixpressCommentsVotesUrl({
146
+ protoPath: "/v1/votes",
147
+ data: serializedData,
148
+ host
149
+ }),
150
+ data: serializedData,
151
+ transformResponse: (payload2) => transformPaths(payload2, [
152
+ {
153
+ transformFn: transformRESTTimestampToSDKTimestamp,
154
+ paths: [
155
+ { path: "votes.createdDate" },
156
+ { path: "votes.updatedDate" }
157
+ ]
158
+ }
159
+ ])
160
+ };
161
+ return metadata;
162
+ }
163
+ return __queryVotes;
164
+ }
165
+
166
+ // src/comments-v1-vote-votes.universal.ts
167
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
168
+ import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
169
+ var Type = /* @__PURE__ */ ((Type2) => {
170
+ Type2["UNKNOWN"] = "UNKNOWN";
171
+ Type2["UPVOTE"] = "UPVOTE";
172
+ Type2["DOWNVOTE"] = "DOWNVOTE";
173
+ return Type2;
174
+ })(Type || {});
175
+ var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
176
+ IdentityType2["ANONYMOUS"] = "ANONYMOUS";
177
+ IdentityType2["MEMBER"] = "MEMBER";
178
+ IdentityType2["USER"] = "USER";
179
+ IdentityType2["SERVICE"] = "SERVICE";
180
+ IdentityType2["MEMBER_GROUP"] = "MEMBER_GROUP";
181
+ return IdentityType2;
182
+ })(IdentityType || {});
183
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
184
+ SortOrder2["ASC"] = "ASC";
185
+ SortOrder2["DESC"] = "DESC";
186
+ return SortOrder2;
187
+ })(SortOrder || {});
188
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
189
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
190
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
191
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
192
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
193
+ WebhookIdentityType2["APP"] = "APP";
194
+ return WebhookIdentityType2;
195
+ })(WebhookIdentityType || {});
196
+ async function upvote2(options) {
197
+ const { httpClient, sideEffects } = arguments[1];
198
+ const payload = renameKeysFromSDKRequestToRESTRequest({
199
+ contextToken: options?.contextToken,
200
+ resourceId: options?.resourceId,
201
+ resourceFqdn: options?.resourceFqdn,
202
+ contextData: options?.contextData
203
+ });
204
+ const reqOpts = upvote(payload);
205
+ sideEffects?.onSiteCall?.();
206
+ try {
207
+ const result = await httpClient.request(reqOpts);
208
+ sideEffects?.onSuccess?.(result);
209
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
210
+ } catch (err) {
211
+ const transformedError = sdkTransformError(
212
+ err,
213
+ {
214
+ spreadPathsToArguments: {},
215
+ explicitPathsToArguments: {
216
+ contextToken: "$[0].contextToken",
217
+ resourceId: "$[0].resourceId",
218
+ resourceFqdn: "$[0].resourceFqdn",
219
+ contextData: "$[0].contextData"
220
+ },
221
+ singleArgumentUnchanged: false
222
+ },
223
+ ["options"]
224
+ );
225
+ sideEffects?.onError?.(err);
226
+ throw transformedError;
227
+ }
228
+ }
229
+ async function downvote2(options) {
230
+ const { httpClient, sideEffects } = arguments[1];
231
+ const payload = renameKeysFromSDKRequestToRESTRequest({
232
+ contextToken: options?.contextToken,
233
+ resourceId: options?.resourceId,
234
+ resourceFqdn: options?.resourceFqdn,
235
+ contextData: options?.contextData
236
+ });
237
+ const reqOpts = downvote(payload);
238
+ sideEffects?.onSiteCall?.();
239
+ try {
240
+ const result = await httpClient.request(reqOpts);
241
+ sideEffects?.onSuccess?.(result);
242
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
243
+ } catch (err) {
244
+ const transformedError = sdkTransformError(
245
+ err,
246
+ {
247
+ spreadPathsToArguments: {},
248
+ explicitPathsToArguments: {
249
+ contextToken: "$[0].contextToken",
250
+ resourceId: "$[0].resourceId",
251
+ resourceFqdn: "$[0].resourceFqdn",
252
+ contextData: "$[0].contextData"
253
+ },
254
+ singleArgumentUnchanged: false
255
+ },
256
+ ["options"]
257
+ );
258
+ sideEffects?.onError?.(err);
259
+ throw transformedError;
260
+ }
261
+ }
262
+ async function removeVote2(voteId, options) {
263
+ const { httpClient, sideEffects } = arguments[2];
264
+ const payload = renameKeysFromSDKRequestToRESTRequest({
265
+ voteId,
266
+ contextToken: options?.contextToken,
267
+ contextData: options?.contextData
268
+ });
269
+ const reqOpts = removeVote(payload);
270
+ sideEffects?.onSiteCall?.();
271
+ try {
272
+ const result = await httpClient.request(reqOpts);
273
+ sideEffects?.onSuccess?.(result);
274
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
275
+ } catch (err) {
276
+ const transformedError = sdkTransformError(
277
+ err,
278
+ {
279
+ spreadPathsToArguments: {},
280
+ explicitPathsToArguments: {
281
+ voteId: "$[0]",
282
+ contextToken: "$[1].contextToken",
283
+ contextData: "$[1].contextData"
284
+ },
285
+ singleArgumentUnchanged: false
286
+ },
287
+ ["voteId", "options"]
288
+ );
289
+ sideEffects?.onError?.(err);
290
+ throw transformedError;
291
+ }
292
+ }
293
+ function queryVotes2(options) {
294
+ const { httpClient, sideEffects } = arguments[1];
295
+ return queryBuilder({
296
+ func: async (payload) => {
297
+ const reqOpts = queryVotes({
298
+ ...payload,
299
+ ...options ?? {}
300
+ });
301
+ sideEffects?.onSiteCall?.();
302
+ try {
303
+ const result = await httpClient.request(reqOpts);
304
+ sideEffects?.onSuccess?.(result);
305
+ return result;
306
+ } catch (err) {
307
+ sideEffects?.onError?.(err);
308
+ throw err;
309
+ }
310
+ },
311
+ requestTransformer: (query) => {
312
+ const args = [query, options];
313
+ return renameKeysFromSDKRequestToRESTRequest({
314
+ ...args?.[1],
315
+ query: args?.[0]
316
+ });
317
+ },
318
+ responseTransformer: ({ data }) => {
319
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
320
+ transformPaths2(data, [])
321
+ );
322
+ return {
323
+ items: transformedData?.votes,
324
+ pagingMetadata: transformedData?.paging
325
+ };
326
+ },
327
+ errorTransformer: (err) => {
328
+ const transformedError = sdkTransformError(err, {
329
+ spreadPathsToArguments: {},
330
+ explicitPathsToArguments: { query: "$[0]" },
331
+ singleArgumentUnchanged: false
332
+ });
333
+ throw transformedError;
334
+ },
335
+ pagingMethod: "CURSOR",
336
+ transformationPaths: {}
337
+ });
338
+ }
339
+ async function typedQueryVotes(query, options) {
340
+ const { httpClient, sideEffects } = arguments[2];
341
+ const payload = renameKeysFromSDKRequestToRESTRequest({
342
+ query,
343
+ ...options
344
+ });
345
+ const reqOpts = queryVotes(payload);
346
+ sideEffects?.onSiteCall?.();
347
+ try {
348
+ const result = await httpClient.request(reqOpts);
349
+ sideEffects?.onSuccess?.(result);
350
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
351
+ } catch (err) {
352
+ const transformedError = sdkTransformError(
353
+ err,
354
+ {
355
+ spreadPathsToArguments: {},
356
+ explicitPathsToArguments: { query: "$[0]" },
357
+ singleArgumentUnchanged: false
358
+ },
359
+ ["query", "options"]
360
+ );
361
+ sideEffects?.onError?.(err);
362
+ throw transformedError;
363
+ }
364
+ }
365
+ var utils = {
366
+ query: /* @__PURE__ */ createQueryUtils()
367
+ };
368
+ export {
369
+ IdentityType,
370
+ SortOrder,
371
+ Type,
372
+ WebhookIdentityType,
373
+ downvote2 as downvote,
374
+ queryVotes2 as queryVotes,
375
+ removeVote2 as removeVote,
376
+ typedQueryVotes,
377
+ upvote2 as upvote,
378
+ utils
379
+ };
380
+ //# sourceMappingURL=index.typings.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/comments-v1-vote-votes.universal.ts","../../src/comments-v1-vote-votes.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCommentsV1Vote from './comments-v1-vote-votes.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/** An upvote or downvote cast by one identity on a resource in an app context. */\nexport interface Vote {\n /**\n * Vote resource ID\n * @maxLength 128\n */\n resourceId?: string;\n /**\n * Resource fully qualified domain name\n * @maxLength 300\n */\n resourceFqdn?: string;\n /**\n * Vote ID\n * @format GUID\n * @readonly\n */\n voteId?: string;\n /**\n * Type of vote\n * @readonly\n */\n type?: TypeWithLiterals;\n /**\n * Vote author\n * @readonly\n */\n createdBy?: SocialIdentity;\n /**\n * Vote created date\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Vote updated date\n * @readonly\n */\n _updatedDate?: Date | null;\n /** Vote context, defining where the vote belongs to */\n context?: VoteContext;\n /**\n * Vote revision\n * @readonly\n */\n revision?: string;\n}\n\n/** Type of vote */\nexport enum Type {\n UNKNOWN = 'UNKNOWN',\n UPVOTE = 'UPVOTE',\n DOWNVOTE = 'DOWNVOTE',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN' | 'UPVOTE' | 'DOWNVOTE';\n\nexport interface SocialIdentity {\n /** @format GUID */\n identityId?: string;\n identityType?: IdentityTypeWithLiterals;\n}\n\nexport enum IdentityType {\n ANONYMOUS = 'ANONYMOUS',\n MEMBER = 'MEMBER',\n USER = 'USER',\n SERVICE = 'SERVICE',\n /** indicates everyone who is a member of a group */\n MEMBER_GROUP = 'MEMBER_GROUP',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'ANONYMOUS'\n | 'MEMBER'\n | 'USER'\n | 'SERVICE'\n | 'MEMBER_GROUP';\n\nexport interface VoteContext {\n /**\n * Context ID\n * @maxLength 128\n */\n contextId?: string;\n /** Context type */\n contextType?: string | null;\n /**\n * Vote app ID\n * @format GUID\n * @readonly\n */\n appDefId?: string;\n /**\n * MetaSite ID\n * @format GUID\n * @readonly\n */\n metaSiteId?: string;\n}\n\nexport interface UpvoteRequest {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * resource identifier for vote be cast on\n * @maxLength 128\n */\n resourceId: string;\n /**\n * resource name\n * @maxLength 300\n */\n resourceFqdn: string;\n /** context data */\n contextData?: ContextData;\n}\n\n/**\n * Identifies the app and context containing the resource.\n * When provided, contextData takes precedence over the deprecated contextToken.\n */\nexport interface ContextData {\n /**\n * ID of the app that owns the context.\n * @format GUID\n */\n appDefId?: string;\n /**\n * ID of the context containing the resource.\n * @maxLength 128\n */\n contextId?: string;\n /** Optional type used by the app to resolve its context. */\n contextType?: string | null;\n}\n\nexport interface UpvoteResponse {\n /** created vote */\n vote?: Vote;\n}\n\nexport interface ContextResourceVoteChange {\n /**\n * Resource ID\n * @maxLength 128\n */\n resourceId?: string;\n /**\n * Resource fully qualified domain name\n * @maxLength 300\n */\n resourceFqdn?: string;\n /** Score of votes */\n score?: number;\n /** Upvote count */\n upvoteCount?: number;\n /** Downvote count */\n downvoteCount?: number;\n /** Vote context */\n context?: VoteContext;\n}\n\nexport interface VoteCast {\n /** Vote */\n vote?: Vote;\n}\n\nexport interface DownvoteRequest {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * resource identifier for vote be cast on\n * @maxLength 128\n */\n resourceId: string;\n /**\n * resource name\n * @maxLength 300\n */\n resourceFqdn: string;\n /** context data */\n contextData?: ContextData;\n}\n\nexport interface DownvoteResponse {\n /** created vote */\n vote?: Vote;\n}\n\nexport interface UpdateVoteRequest {\n /** vote to be updated, may be partial and include only VoteId and the field to change */\n vote?: Vote;\n /**\n * explicit list of fields to update\n * @internal\n */\n fieldMask?: string[];\n}\n\nexport interface UpdateVoteResponse {\n /** updated vote */\n vote?: Vote;\n}\n\nexport interface RemoveVoteRequest {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** id of the vote which will be deleted */\n voteId: string;\n /** context data */\n contextData?: ContextData;\n}\n\nexport interface RemoveVoteResponse {\n /** removed vote */\n vote?: Vote;\n}\n\nexport interface VoteDeleted {\n /** Vote */\n vote?: Vote;\n}\n\nexport interface QueryVotesRequest {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** query request. Filter supports only \"resourceId\" field. Fields and Fieldset are not supported */\n query?: QueryV2;\n /** context data */\n contextData?: ContextData;\n}\n\nexport interface QueryV2 extends QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).\n */\n sort?: Sorting[];\n /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */\n fields?: string[];\n /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */\n fieldsets?: string[];\n}\n\n/** @oneof */\nexport interface QueryV2PagingMethodOneOf {\n /** Paging options to limit and offset the number of items. */\n paging?: Paging;\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n /**\n * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n *\n * If multiple filters are provided, they are combined with AND operator.\n *\n * Example:\n * Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n * { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] }\n * @internal\n * @maxSize 10\n */\n selectItemsBy?: Record<string, any>[] | null;\n /**\n * Origin point for geo-distance sorting on a GEO field\n * results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).\n */\n origin?: AddressLocation;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface AddressLocation {\n /** Address latitude. */\n latitude?: number | null;\n /** Address longitude. */\n longitude?: number | null;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryVotesResponse {\n /** matching votes */\n votes?: Vote[];\n /** paging metadata. Only contains cursors */\n paging?: PagingMetadataV2;\n}\n\nexport interface PagingMetadataV2 {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n * @internal\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface GetResourceVoteSummaryRequest {\n /** appDef ID */\n appDefId?: string;\n /** context ID */\n contextId?: string;\n /** resource ID */\n resourceId?: string;\n}\n\nexport interface GetResourceVoteSummaryResponse {\n /** Resource vote summary */\n summary?: ResourceVoteSummary;\n}\n\nexport interface ResourceVoteSummary {\n /** vote context */\n context?: VoteContext;\n /** resource ID */\n resourceId?: string;\n /** vote score */\n score?: number;\n /** upvote count */\n upvoteCount?: number;\n /** downvote count */\n downvoteCount?: number;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface Empty {}\n\nexport interface ImportVoteRequest {\n /** metaSite ID */\n metaSiteId?: string;\n /** vote to import */\n vote?: ImportVote;\n}\n\nexport interface ImportVote {\n /**\n * Resource ID\n * @maxLength 128\n */\n resourceId?: string;\n /**\n * Resource fully qualified domain name\n * @maxLength 300\n */\n resourceFqdn?: string;\n /**\n * Vote ID\n * @format GUID\n */\n voteId?: string;\n /** Type of vote */\n type?: TypeWithLiterals;\n /** Vote author */\n createdBy?: SocialIdentity;\n /** Vote creation date */\n _createdDate?: Date | null;\n /** Vote update date */\n _updatedDate?: Date | null;\n /** Vote context */\n context?: VoteContext;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpvoteApplicationErrors =\n | {\n code?: 'MISSING_METASITE_CONTEXT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PERMISSION_DENIED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DownvoteApplicationErrors =\n | {\n code?: 'MISSING_METASITE_CONTEXT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PERMISSION_DENIED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type RemoveVoteApplicationErrors =\n | {\n code?: 'MISSING_METASITE_CONTEXT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PERMISSION_DENIED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'VOTE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type QueryVotesApplicationErrors =\n | {\n code?: 'MISSING_METASITE_CONTEXT';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'PERMISSION_DENIED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FILTER_FIELDS';\n description?: string;\n data?: Record<string, any>;\n };\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface VoteContextResourceVoteChangeEnvelope {\n data: ContextResourceVoteChange;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.comments.v1.vote_context_resource_vote_change\n * @serviceIdentifier com.wixpress.comments.Votes\n * @slug context_resource_vote_change\n * @documentationMaturity preview\n */\nexport declare function onVoteContextResourceVoteChange(\n handler: (\n event: VoteContextResourceVoteChangeEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface VoteCastEnvelope {\n data: VoteCast;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.comments.v1.vote_vote_cast\n * @serviceIdentifier com.wixpress.comments.Votes\n * @slug vote_cast\n * @documentationMaturity preview\n */\nexport declare function onVoteCast(\n handler: (event: VoteCastEnvelope) => void | Promise<void>\n): void;\n\nexport interface VoteDeletedEnvelope {\n data: VoteDeleted;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.comments.v1.vote_vote_deleted\n * @serviceIdentifier com.wixpress.comments.Votes\n * @slug vote_deleted\n * @documentationMaturity preview\n */\nexport declare function onVoteDeleted(\n handler: (event: VoteDeletedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Casts an upvote on a resource for the current identity.\n * Changes an existing downvote to an upvote. Repeating an upvote does not remove it.\n * Provide contextData for the app and context. Context voting permissions apply.\n * Authorization is enforced by the service for the current identity and context.\n * @public\n * @documentationMaturity preview\n * @requiredField options.resourceFqdn\n * @requiredField options.resourceId\n * @fqn com.wixpress.comments.Votes.Upvote\n */\nexport async function upvote(\n options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 2>\n): Promise<\n NonNullablePaths<\n UpvoteResponse,\n | `vote.resourceId`\n | `vote.resourceFqdn`\n | `vote.voteId`\n | `vote.type`\n | `vote.createdBy.identityId`\n | `vote.createdBy.identityType`\n | `vote.context.contextId`\n | `vote.context.appDefId`\n | `vote.context.metaSiteId`\n | `vote.revision`,\n 4\n > & {\n __applicationErrorsType?: UpvoteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contextToken: options?.contextToken,\n resourceId: options?.resourceId,\n resourceFqdn: options?.resourceFqdn,\n contextData: options?.contextData,\n });\n\n const reqOpts = ambassadorWixCommentsV1Vote.upvote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contextToken: '$[0].contextToken',\n resourceId: '$[0].resourceId',\n resourceFqdn: '$[0].resourceFqdn',\n contextData: '$[0].contextData',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpvoteOptions {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * resource identifier for vote be cast on\n * @maxLength 128\n */\n resourceId: string;\n /**\n * resource name\n * @maxLength 300\n */\n resourceFqdn: string;\n /** context data */\n contextData?: ContextData;\n}\n\n/**\n * Casts a downvote on a resource for the current identity.\n * Changes an existing upvote to a downvote. Use RemoveVote to clear a vote.\n * Provide contextData for the app and context. Context voting permissions apply.\n * Authorization is enforced by the service for the current identity and context.\n * @public\n * @documentationMaturity preview\n * @requiredField options.resourceFqdn\n * @requiredField options.resourceId\n * @fqn com.wixpress.comments.Votes.Downvote\n */\nexport async function downvote(\n options?: NonNullablePaths<DownvoteOptions, `resourceFqdn` | `resourceId`, 2>\n): Promise<\n NonNullablePaths<\n DownvoteResponse,\n | `vote.resourceId`\n | `vote.resourceFqdn`\n | `vote.voteId`\n | `vote.type`\n | `vote.createdBy.identityId`\n | `vote.createdBy.identityType`\n | `vote.context.contextId`\n | `vote.context.appDefId`\n | `vote.context.metaSiteId`\n | `vote.revision`,\n 4\n > & {\n __applicationErrorsType?: DownvoteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contextToken: options?.contextToken,\n resourceId: options?.resourceId,\n resourceFqdn: options?.resourceFqdn,\n contextData: options?.contextData,\n });\n\n const reqOpts = ambassadorWixCommentsV1Vote.downvote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contextToken: '$[0].contextToken',\n resourceId: '$[0].resourceId',\n resourceFqdn: '$[0].resourceFqdn',\n contextData: '$[0].contextData',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface DownvoteOptions {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * resource identifier for vote be cast on\n * @maxLength 128\n */\n resourceId: string;\n /**\n * resource name\n * @maxLength 300\n */\n resourceFqdn: string;\n /** context data */\n contextData?: ContextData;\n}\n\n/**\n * Removes the current identity's vote in the specified context and returns it.\n * Obtain voteId from a vote response or QueryVotes. A repeated removal can fail.\n * Authorization is enforced by the service for the current identity and context.\n * @param voteId - id of the vote which will be deleted\n * @public\n * @documentationMaturity preview\n * @requiredField voteId\n * @fqn com.wixpress.comments.Votes.RemoveVote\n */\nexport async function removeVote(\n voteId: string,\n options?: RemoveVoteOptions\n): Promise<\n NonNullablePaths<\n RemoveVoteResponse,\n | `vote.resourceId`\n | `vote.resourceFqdn`\n | `vote.voteId`\n | `vote.type`\n | `vote.createdBy.identityId`\n | `vote.createdBy.identityType`\n | `vote.context.contextId`\n | `vote.context.appDefId`\n | `vote.context.metaSiteId`\n | `vote.revision`,\n 4\n > & {\n __applicationErrorsType?: RemoveVoteApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n voteId: voteId,\n contextToken: options?.contextToken,\n contextData: options?.contextData,\n });\n\n const reqOpts = ambassadorWixCommentsV1Vote.removeVote(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n voteId: '$[0]',\n contextToken: '$[1].contextToken',\n contextData: '$[1].contextData',\n },\n singleArgumentUnchanged: false,\n },\n ['voteId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveVoteOptions {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** context data */\n contextData?: ContextData;\n}\n\n/**\n * Retrieves votes in the specified app and context.\n * Visitor and member callers receive only their own votes. Application callers\n * can query all votes only when granted WIX_COMMENTS.VOTE_QUERY.\n * Filter on resourceId, including $in for a batch of comment IDs.\n * Continue with query.cursorPaging.cursor from paging.cursors.next.\n * Authorization is enforced by the service for the current identity and context.\n * @public\n * @documentationMaturity preview\n * @fqn com.wixpress.comments.Votes.QueryVotes\n */\nexport function queryVotes(options?: QueryVotesOptions): VotesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Vote, 'CURSOR', QueryVotesRequest, QueryVotesResponse>({\n func: async (payload: QueryVotesRequest) => {\n const reqOpts = ambassadorWixCommentsV1Vote.queryVotes({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryVotesRequest['query']) => {\n const args = [query, options] as [\n QueryVotesRequest['query'],\n QueryVotesOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryVotesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.votes,\n pagingMetadata: transformedData?.paging,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryVotesOptions {\n /**\n * context token to be passed\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string | undefined;\n /** context data */\n contextData?: ContextData | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface VotesQueryResult extends QueryCursorResult {\n items: Vote[];\n query: VotesQueryBuilder;\n next: () => Promise<VotesQueryResult>;\n prev: () => Promise<VotesQueryResult>;\n}\n\nexport interface VotesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (propertyName: 'resourceId', value: any) => VotesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (propertyName: 'resourceId', value: any) => VotesQueryBuilder;\n /** @documentationMaturity preview */\n in: (propertyName: 'resourceId', value: any) => VotesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => VotesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => VotesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<VotesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn com.wixpress.comments.Votes.QueryVotes\n * @requiredField query\n */\nexport async function typedQueryVotes(\n query: VoteQuery,\n options?: QueryVotesOptions\n): Promise<\n NonNullablePaths<\n QueryVotesResponse,\n | `votes`\n | `votes.${number}.resourceId`\n | `votes.${number}.resourceFqdn`\n | `votes.${number}.voteId`\n | `votes.${number}.type`\n | `votes.${number}.createdBy.identityId`\n | `votes.${number}.createdBy.identityType`\n | `votes.${number}.context.contextId`\n | `votes.${number}.context.appDefId`\n | `votes.${number}.context.metaSiteId`\n | `votes.${number}.revision`,\n 5\n > & {\n __applicationErrorsType?: QueryVotesApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixCommentsV1Vote.queryVotes(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface VoteQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['resourceId'];\n operators: ['$eq', '$in', '$ne'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Vote, VoteQuerySpec>;\nexport type VoteQuery = {\n /** \n Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. \n */\n cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n /** \n When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by\n a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.\n\n If multiple filters are provided, they are combined with AND operator.\n\n Example:\n Given we have document like {\"id\": \"1\", \"nestedField\": [{\"price\": 10, \"region\": \"EU\"}, {\"price\": 20, \"region\": \"US\"}]}\n and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be\n { fieldName: \"nestedField.price\", \"select_items_by\": [{\"nestedField.region\": \"US\"}] } \n @internal: undefined,\n @maxSize: 10 \n */\n selectItemsBy?:\n | NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['selectItemsBy']\n | null;\n /** \n Origin point for geo-distance sorting on a GEO field\n results are ordered by distance from this point (ASC = nearest first, DESC = farthest first). \n */\n origin?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['origin'];\n }[];\n};\n\nexport const utils = {\n query: /*#__PURE__*/ createQueryUtils<Vote, VoteQuerySpec, VoteQuery>(),\n};\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCommentsVotesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/votes',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/votes',\n destPath: '/v1/votes',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/v1/votes',\n destPath: '/v1/votes',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/votes',\n destPath: '/v1/votes',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_comments_votes';\n\n/**\n * Casts an upvote on a resource for the current identity.\n * Changes an existing downvote to an upvote. Repeating an upvote does not remove it.\n * Provide contextData for the app and context. Context voting permissions apply.\n * Authorization is enforced by the service for the current identity and context.\n */\nexport function upvote(payload: object): RequestOptionsFactory<any> {\n function __upvote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.v1.vote',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.comments.Votes.Upvote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCommentsVotesUrl({\n protoPath: '/v1/votes/upvote',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'vote.createdDate' }, { path: 'vote.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __upvote;\n}\n\n/**\n * Casts a downvote on a resource for the current identity.\n * Changes an existing upvote to a downvote. Use RemoveVote to clear a vote.\n * Provide contextData for the app and context. Context voting permissions apply.\n * Authorization is enforced by the service for the current identity and context.\n */\nexport function downvote(payload: object): RequestOptionsFactory<any> {\n function __downvote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.v1.vote',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.comments.Votes.Downvote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCommentsVotesUrl({\n protoPath: '/v1/votes/downvote',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'vote.createdDate' }, { path: 'vote.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __downvote;\n}\n\n/**\n * Removes the current identity's vote in the specified context and returns it.\n * Obtain voteId from a vote response or QueryVotes. A repeated removal can fail.\n * Authorization is enforced by the service for the current identity and context.\n */\nexport function removeVote(payload: object): RequestOptionsFactory<any> {\n function __removeVote({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.v1.vote',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.comments.Votes.RemoveVote',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCommentsVotesUrl({\n protoPath: '/v1/votes/{voteId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'vote.createdDate' }, { path: 'vote.updatedDate' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __removeVote;\n}\n\n/**\n * Retrieves votes in the specified app and context.\n * Visitor and member callers receive only their own votes. Application callers\n * can query all votes only when granted WIX_COMMENTS.VOTE_QUERY.\n * Filter on resourceId, including $in for a batch of comment IDs.\n * Continue with query.cursorPaging.cursor from paging.cursors.next.\n * Authorization is enforced by the service for the current identity and context.\n */\nexport function queryVotes(payload: object): RequestOptionsFactory<any> {\n function __queryVotes({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'query.sort.origin.latitude' },\n { path: 'query.sort.origin.longitude' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.comments.v1.vote',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.comments.Votes.QueryVotes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCommentsVotesUrl({\n protoPath: '/v1/votes',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'votes.createdDate' },\n { path: 'votes.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryVotes;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,mCACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAQd,SAAS,OAAO,SAA6C;AAClE,WAAS,SAAS,EAAE,KAAK,GAAQ;AAC/B,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAA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,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,OAAO,OAAO;AAAA,QAC1C,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS,SAAS;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAwFO,IAAM,QAAQ;AAAA,EACnB,OAAqB,iCAAiD;AACxE;","names":["payload","transformPaths","Type","IdentityType","SortOrder","WebhookIdentityType","upvote","downvote","removeVote","queryVotes"]}