@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.
@@ -6,11 +6,13 @@ declare function upvote$1(httpClient: HttpClient): UpvoteSignature;
6
6
  interface UpvoteSignature {
7
7
  /**
8
8
  * Casts an upvote on a resource for the current identity.
9
- * Changes an existing downvote to an upvote. Repeating an upvote does not remove it.
10
- * Provide contextData for the app and context. Context voting permissions apply.
11
- * Authorization is enforced by the service for the current identity and context.
9
+ *
10
+ * Changes the current identity's existing downvote to an upvote.
11
+ * Repeating the same vote doesn't remove it. To clear a vote, call
12
+ * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).
13
+ * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.
12
14
  */
13
- (options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 2>): 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`, 4> & {
15
+ (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> & {
14
16
  __applicationErrorsType?: UpvoteApplicationErrors;
15
17
  }>;
16
18
  }
@@ -18,23 +20,27 @@ declare function downvote$1(httpClient: HttpClient): DownvoteSignature;
18
20
  interface DownvoteSignature {
19
21
  /**
20
22
  * Casts a downvote on a resource for the current identity.
21
- * Changes an existing upvote to a downvote. Use RemoveVote to clear a vote.
22
- * Provide contextData for the app and context. Context voting permissions apply.
23
- * Authorization is enforced by the service for the current identity and context.
23
+ *
24
+ * Changes the current identity's existing upvote to a downvote.
25
+ * Repeating the same vote doesn't remove it. To clear a vote, call
26
+ * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).
27
+ * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.
24
28
  */
25
- (options?: NonNullablePaths<DownvoteOptions, `resourceFqdn` | `resourceId`, 2>): 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`, 4> & {
29
+ (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> & {
26
30
  __applicationErrorsType?: DownvoteApplicationErrors;
27
31
  }>;
28
32
  }
29
33
  declare function removeVote$1(httpClient: HttpClient): RemoveVoteSignature;
30
34
  interface RemoveVoteSignature {
31
35
  /**
32
- * Removes the current identity's vote in the specified context and returns it.
33
- * Obtain voteId from a vote response or QueryVotes. A repeated removal can fail.
34
- * Authorization is enforced by the service for the current identity and context.
35
- * @param - id of the vote which will be deleted
36
+ * Removes the current identity's vote and returns the removed vote.
37
+ *
38
+ * Specify the `voteId` returned by a vote response or
39
+ * [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.
40
+ * A repeated removal fails when the vote no longer exists.
41
+ * @param - ID of the vote to remove.
36
42
  */
37
- (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`, 4> & {
43
+ (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> & {
38
44
  __applicationErrorsType?: RemoveVoteApplicationErrors;
39
45
  }>;
40
46
  }
@@ -50,11 +56,17 @@ declare const upvote: MaybeContext<BuildRESTFunction<typeof upvote$1> & typeof u
50
56
  declare const downvote: MaybeContext<BuildRESTFunction<typeof downvote$1> & typeof downvote$1>;
51
57
  declare const removeVote: MaybeContext<BuildRESTFunction<typeof removeVote$1> & typeof removeVote$1>;
52
58
  declare const queryVotes: MaybeContext<BuildRESTFunction<typeof customQueryVotes> & typeof customQueryVotes>;
53
- /** */
59
+ /**
60
+ * Triggered when a vote changes the totals for a resource.
61
+ */
54
62
  declare const onVoteContextResourceVoteChange: BuildEventDefinition<typeof onVoteContextResourceVoteChange$1> & typeof onVoteContextResourceVoteChange$1;
55
- /** */
63
+ /**
64
+ * Triggered when an upvote or downvote is cast, including changes to an existing vote.
65
+ */
56
66
  declare const onVoteCast: BuildEventDefinition<typeof onVoteCast$1> & typeof onVoteCast$1;
57
- /** */
67
+ /**
68
+ * Triggered when a vote is removed.
69
+ */
58
70
  declare const onVoteDeleted: BuildEventDefinition<typeof onVoteDeleted$1> & typeof onVoteDeleted$1;
59
71
 
60
72
  export { DownvoteApplicationErrors, DownvoteOptions, DownvoteResponse, QueryVotesOptions, RemoveVoteApplicationErrors, RemoveVoteOptions, RemoveVoteResponse, UpvoteApplicationErrors, UpvoteOptions, UpvoteResponse, VoteCastEnvelope, VoteContextResourceVoteChangeEnvelope, VoteDeletedEnvelope, VoteQuery, VotesQueryBuilder, downvote, onVoteCast, onVoteContextResourceVoteChange, onVoteDeleted, queryVotes, removeVote, upvote };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/comments-v1-vote-votes.public.ts","../../src/comments-v1-vote-votes.universal.ts","../../src/comments-v1-vote-votes.http.ts","../../src/comments-v1-vote-votes.context.ts"],"sourcesContent":["export * from './src/comments-v1-vote-votes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n DownvoteApplicationErrors,\n DownvoteOptions,\n DownvoteResponse,\n QueryVotesApplicationErrors,\n QueryVotesOptions,\n QueryVotesResponse,\n RemoveVoteApplicationErrors,\n RemoveVoteOptions,\n RemoveVoteResponse,\n UpvoteApplicationErrors,\n UpvoteOptions,\n UpvoteResponse,\n VoteCastEnvelope,\n VoteContextResourceVoteChangeEnvelope,\n VoteDeletedEnvelope,\n VoteQuery,\n VotesQueryBuilder,\n downvote as universalDownvote,\n queryVotes as universalQueryVotes,\n removeVote as universalRemoveVote,\n typedQueryVotes as universalTypedQueryVotes,\n upvote as universalUpvote,\n} from './comments-v1-vote-votes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/comments' };\n\nexport function upvote(httpClient: HttpClient): UpvoteSignature {\n return (\n options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 2>\n ) =>\n universalUpvote(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpvoteSignature {\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 */\n (\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}\n\nexport function downvote(httpClient: HttpClient): DownvoteSignature {\n return (\n options?: NonNullablePaths<\n DownvoteOptions,\n `resourceFqdn` | `resourceId`,\n 2\n >\n ) =>\n universalDownvote(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DownvoteSignature {\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 */\n (\n options?: NonNullablePaths<\n DownvoteOptions,\n `resourceFqdn` | `resourceId`,\n 2\n >\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}\n\nexport function removeVote(httpClient: HttpClient): RemoveVoteSignature {\n return (voteId: string, options?: RemoveVoteOptions) =>\n universalRemoveVote(\n voteId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveVoteSignature {\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 - id of the vote which will be deleted\n */\n (voteId: string, options?: RemoveVoteOptions): 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}\n\nexport function queryVotes(httpClient: HttpClient): QueryVotesSignature {\n return (options?: QueryVotesOptions) =>\n universalQueryVotes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryVotesSignature {\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 */\n (options?: QueryVotesOptions): VotesQueryBuilder;\n}\n\nexport function typedQueryVotes(\n httpClient: HttpClient\n): TypedQueryVotesSignature {\n return (query: VoteQuery, options?: QueryVotesOptions) =>\n universalTypedQueryVotes(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryVotesSignature {\n /** */\n (query: VoteQuery, options?: QueryVotesOptions): 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}\n\nexport const onVoteContextResourceVoteChange = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_context_resource_vote_change',\n true,\n (event: VoteContextResourceVoteChangeEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<VoteContextResourceVoteChangeEnvelope>();\nexport const onVoteCast = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_vote_cast',\n true,\n (event: VoteCastEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.vote.createdDate' },\n { path: 'data.vote.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<VoteCastEnvelope>();\nexport const onVoteDeleted = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_vote_deleted',\n true,\n (event: VoteDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.vote.createdDate' },\n { path: 'data.vote.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<VoteDeletedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n AddressLocation,\n BaseEventMetadata,\n ContextData,\n ContextResourceVoteChange,\n CursorPaging,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n DownvoteOptions,\n DownvoteRequest,\n DownvoteResponse,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetResourceVoteSummaryRequest,\n GetResourceVoteSummaryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ImportVote,\n ImportVoteRequest,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n QueryV2,\n QueryV2PagingMethodOneOf,\n QueryVotesOptions,\n QueryVotesRequest,\n QueryVotesResponse,\n RemoveVoteOptions,\n RemoveVoteRequest,\n RemoveVoteResponse,\n ResourceVoteSummary,\n RestoreInfo,\n SocialIdentity,\n SortOrder,\n Sorting,\n Type,\n UpdateVoteRequest,\n UpdateVoteResponse,\n UpvoteOptions,\n UpvoteRequest,\n UpvoteResponse,\n Vote,\n VoteCast,\n VoteCastEnvelope,\n VoteContext,\n VoteContextResourceVoteChangeEnvelope,\n VoteDeleted,\n VoteDeletedEnvelope,\n VoteQuerySpec,\n VotesQueryBuilder,\n VotesQueryResult,\n WebhookIdentityType,\n utils,\n} from './comments-v1-vote-votes.universal.js';\n","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","import {\n upvote as publicUpvote,\n downvote as publicDownvote,\n removeVote as publicRemoveVote,\n queryVotes as publicQueryVotes,\n typedQueryVotes as publicTypedQueryVotes,\n} from './comments-v1-vote-votes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n QueryVotesOptions,\n VoteQuery,\n VotesQueryBuilder,\n typedQueryVotes as universalTypedQueryVotes,\n} from './comments-v1-vote-votes.universal.js';\nimport { onVoteContextResourceVoteChange as publicOnVoteContextResourceVoteChange } from './comments-v1-vote-votes.public.js';\nimport { onVoteCast as publicOnVoteCast } from './comments-v1-vote-votes.public.js';\nimport { onVoteDeleted as publicOnVoteDeleted } from './comments-v1-vote-votes.public.js';\n\nfunction customQueryVotes(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryVotesOptions) =>\n publicQueryVotes(httpClient)(options),\n typedQueryFunction: (query: VoteQuery, options?: QueryVotesOptions) =>\n publicTypedQueryVotes(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: VoteQuery,\n options?: QueryVotesOptions\n ): ReturnType<typeof universalTypedQueryVotes>;\n function overloadedQuery(options?: QueryVotesOptions): VotesQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: VoteQuery | QueryVotesOptions,\n options?: QueryVotesOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const upvote: MaybeContext<\n BuildRESTFunction<typeof publicUpvote> & typeof publicUpvote\n> = /*#__PURE__*/ createRESTModule(publicUpvote);\nexport const downvote: MaybeContext<\n BuildRESTFunction<typeof publicDownvote> & typeof publicDownvote\n> = /*#__PURE__*/ createRESTModule(publicDownvote);\nexport const removeVote: MaybeContext<\n BuildRESTFunction<typeof publicRemoveVote> & typeof publicRemoveVote\n> = /*#__PURE__*/ createRESTModule(publicRemoveVote);\nexport const queryVotes: MaybeContext<\n BuildRESTFunction<typeof customQueryVotes> & typeof customQueryVotes\n> = /*#__PURE__*/ createRESTModule(customQueryVotes);\n/** */\nexport const onVoteContextResourceVoteChange: BuildEventDefinition<\n typeof publicOnVoteContextResourceVoteChange\n> &\n typeof publicOnVoteContextResourceVoteChange =\n /*#__PURE__*/ createEventModule(publicOnVoteContextResourceVoteChange);\n/** */\nexport const onVoteCast: BuildEventDefinition<typeof publicOnVoteCast> &\n typeof publicOnVoteCast = /*#__PURE__*/ createEventModule(publicOnVoteCast);\n/** */\nexport const onVoteDeleted: BuildEventDefinition<typeof publicOnVoteDeleted> &\n typeof publicOnVoteDeleted =\n /*#__PURE__*/ createEventModule(publicOnVoteDeleted);\n\nexport {\n Type,\n IdentityType,\n SortOrder,\n WebhookIdentityType,\n} from './comments-v1-vote-votes.universal.js';\nexport {\n Vote,\n SocialIdentity,\n VoteContext,\n UpvoteRequest,\n ContextData,\n UpvoteResponse,\n ContextResourceVoteChange,\n VoteCast,\n DownvoteRequest,\n DownvoteResponse,\n UpdateVoteRequest,\n UpdateVoteResponse,\n RemoveVoteRequest,\n RemoveVoteResponse,\n VoteDeleted,\n QueryVotesRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n AddressLocation,\n Paging,\n CursorPaging,\n QueryVotesResponse,\n PagingMetadataV2,\n Cursors,\n GetResourceVoteSummaryRequest,\n GetResourceVoteSummaryResponse,\n ResourceVoteSummary,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n ImportVoteRequest,\n ImportVote,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n VoteContextResourceVoteChangeEnvelope,\n VoteCastEnvelope,\n VoteDeletedEnvelope,\n UpvoteOptions,\n DownvoteOptions,\n RemoveVoteOptions,\n QueryVotesOptions,\n VotesQueryResult,\n VotesQueryBuilder,\n VoteQuerySpec,\n} from './comments-v1-vote-votes.universal.js';\nexport { utils } from './comments-v1-vote-votes.universal.js';\nexport {\n TypeWithLiterals,\n IdentityTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpvoteApplicationErrors,\n DownvoteApplicationErrors,\n RemoveVoteApplicationErrors,\n QueryVotesApplicationErrors,\n CommonQueryWithEntityContext,\n VoteQuery,\n} from './comments-v1-vote-votes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,uCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA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AAM,wBAAwB;AAAA,UAChC,EAAE,MAAM,qBAAqB;AAAA,QAC/B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAuB;;;AG3PvB,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAW1C,SAAS,iBAAiB,YAAwB;AAChD,QAAM,SAAuB,0EAA0B;AAAA,IACrD,sBAAsB,CAAC,YACrBC,YAAiB,UAAU,EAAE,OAAO;AAAA,IACtC,oBAAoB,CAAC,OAAkB,YACrCC,iBAAsB,UAAU,EAAE,OAAO,OAAO;AAAA,IAClD,qBAAqB;AAAA,EACvB,CAAC;AAOD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,UAEK,2DAAiBA,OAAY;AACxC,IAAMC,YAEK,2DAAiBA,SAAc;AAC1C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMJ,cAEK,2DAAiB,gBAAgB;AAE5C,IAAMK,mCAIG,uEAAkB,+BAAqC;AAEhE,IAAMC,cAC6B,uEAAkB,UAAgB;AAErE,IAAMC,iBAEG,uEAAkB,aAAmB;","names":["downvote","onVoteCast","onVoteContextResourceVoteChange","onVoteDeleted","queryVotes","removeVote","upvote","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","Type","IdentityType","SortOrder","WebhookIdentityType","upvote","sdkTransformError","downvote","removeVote","queryVotes","upvote","downvote","removeVote","queryVotes","typedQueryVotes","import_rest_modules","queryVotes","typedQueryVotes","upvote","downvote","removeVote","onVoteContextResourceVoteChange","onVoteCast","onVoteDeleted"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/comments-v1-vote-votes.public.ts","../../src/comments-v1-vote-votes.universal.ts","../../src/comments-v1-vote-votes.http.ts","../../src/comments-v1-vote-votes.context.ts"],"sourcesContent":["export * from './src/comments-v1-vote-votes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n DownvoteApplicationErrors,\n DownvoteOptions,\n DownvoteResponse,\n QueryVotesApplicationErrors,\n QueryVotesOptions,\n QueryVotesResponse,\n RemoveVoteApplicationErrors,\n RemoveVoteOptions,\n RemoveVoteResponse,\n UpvoteApplicationErrors,\n UpvoteOptions,\n UpvoteResponse,\n VoteCastEnvelope,\n VoteContextResourceVoteChangeEnvelope,\n VoteDeletedEnvelope,\n VoteQuery,\n VotesQueryBuilder,\n downvote as universalDownvote,\n queryVotes as universalQueryVotes,\n removeVote as universalRemoveVote,\n typedQueryVotes as universalTypedQueryVotes,\n upvote as universalUpvote,\n} from './comments-v1-vote-votes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/comments' };\n\nexport function upvote(httpClient: HttpClient): UpvoteSignature {\n return (\n options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 0>\n ) =>\n universalUpvote(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpvoteSignature {\n /**\n * Casts an upvote on a resource for the current identity.\n *\n * Changes the current identity's existing downvote to an upvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.\n */\n (\n options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 0>\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 2\n > & {\n __applicationErrorsType?: UpvoteApplicationErrors;\n }\n >;\n}\n\nexport function downvote(httpClient: HttpClient): DownvoteSignature {\n return (\n options?: NonNullablePaths<\n DownvoteOptions,\n `resourceFqdn` | `resourceId`,\n 0\n >\n ) =>\n universalDownvote(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DownvoteSignature {\n /**\n * Casts a downvote on a resource for the current identity.\n *\n * Changes the current identity's existing upvote to a downvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.\n */\n (\n options?: NonNullablePaths<\n DownvoteOptions,\n `resourceFqdn` | `resourceId`,\n 0\n >\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 2\n > & {\n __applicationErrorsType?: DownvoteApplicationErrors;\n }\n >;\n}\n\nexport function removeVote(httpClient: HttpClient): RemoveVoteSignature {\n return (voteId: string, options?: RemoveVoteOptions) =>\n universalRemoveVote(\n voteId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveVoteSignature {\n /**\n * Removes the current identity's vote and returns the removed vote.\n *\n * Specify the `voteId` returned by a vote response or\n * [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.\n * A repeated removal fails when the vote no longer exists.\n * @param - ID of the vote to remove.\n */\n (voteId: string, options?: RemoveVoteOptions): 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 2\n > & {\n __applicationErrorsType?: RemoveVoteApplicationErrors;\n }\n >;\n}\n\nexport function queryVotes(httpClient: HttpClient): QueryVotesSignature {\n return (options?: QueryVotesOptions) =>\n universalQueryVotes(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryVotesSignature {\n /**\n * Retrieves a list of votes, given the provided paging and filtering.\n *\n * Visitor and member callers receive their own votes in the specified app and context.\n * Authorized application callers can retrieve votes from multiple identities in that context.\n * Filter by `resourceId`, using `$in` to retrieve votes for multiple comment IDs.\n * Results don't include comments without a matching vote.\n *\n * Specify `query.cursorPaging.limit` to control the page size. To retrieve the next page,\n * set `query.cursorPaging.cursor` to the returned `paging.cursors.next` and keep the same context.\n * Offset paging and field projection aren't supported. Don't depend on a particular result order.\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and\n * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * Retain the permission checked by RequestContextResolver for app identities.\n */\n (options?: QueryVotesOptions): VotesQueryBuilder;\n}\n\nexport function typedQueryVotes(\n httpClient: HttpClient\n): TypedQueryVotesSignature {\n return (query: VoteQuery, options?: QueryVotesOptions) =>\n universalTypedQueryVotes(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryVotesSignature {\n /** */\n (query: VoteQuery, options?: QueryVotesOptions): 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 3\n > & {\n __applicationErrorsType?: QueryVotesApplicationErrors;\n }\n >;\n}\n\nexport const onVoteContextResourceVoteChange = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_context_resource_vote_change',\n true,\n (event: VoteContextResourceVoteChangeEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<VoteContextResourceVoteChangeEnvelope>();\nexport const onVoteCast = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_vote_cast',\n true,\n (event: VoteCastEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.vote.createdDate' },\n { path: 'data.vote.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<VoteCastEnvelope>();\nexport const onVoteDeleted = /*#__PURE__*/ EventDefinition(\n 'wix.comments.v1.vote_vote_deleted',\n true,\n (event: VoteDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.vote.createdDate' },\n { path: 'data.vote.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<VoteDeletedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n AddressLocation,\n BaseEventMetadata,\n ContextData,\n ContextResourceVoteChange,\n CursorPaging,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n DownvoteOptions,\n DownvoteRequest,\n DownvoteResponse,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetResourceVoteSummaryRequest,\n GetResourceVoteSummaryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ImportVote,\n ImportVoteRequest,\n MessageEnvelope,\n Paging,\n PagingMetadataV2,\n QueryV2,\n QueryV2PagingMethodOneOf,\n QueryVotesOptions,\n QueryVotesRequest,\n QueryVotesResponse,\n RemoveVoteOptions,\n RemoveVoteRequest,\n RemoveVoteResponse,\n ResourceVoteSummary,\n RestoreInfo,\n SocialIdentity,\n SortOrder,\n Sorting,\n Type,\n UpdateVoteRequest,\n UpdateVoteResponse,\n UpvoteOptions,\n UpvoteRequest,\n UpvoteResponse,\n Vote,\n VoteCast,\n VoteCastEnvelope,\n VoteContext,\n VoteContextResourceVoteChangeEnvelope,\n VoteDeleted,\n VoteDeletedEnvelope,\n VoteQuerySpec,\n VotesQueryBuilder,\n VotesQueryResult,\n WebhookIdentityType,\n utils,\n} from './comments-v1-vote-votes.universal.js';\n","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 * ID of the resource receiving the vote. For comments, this is the comment ID.\n * @maxLength 128\n */\n resourceId?: string;\n /**\n * Entity type receiving the vote. For comments, this is `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn?: string;\n /**\n * Vote ID.\n * @format GUID\n * @readonly\n */\n voteId?: string;\n /**\n * Vote type.\n * @readonly\n */\n type?: TypeWithLiterals;\n /**\n * Identity that cast the vote.\n * @readonly\n */\n createdBy?: SocialIdentity;\n /**\n * Date and time the vote was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the vote was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** App and context containing the resource. */\n context?: VoteContext;\n /**\n * Revision number, which increments when the vote is updated.\n * @readonly\n */\n revision?: string;\n}\n\n/** Vote type. */\nexport enum Type {\n /** Unknown vote type. */\n UNKNOWN = 'UNKNOWN',\n /** Vote in favor of the resource. */\n UPVOTE = 'UPVOTE',\n /** Vote against the resource. */\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 * ID of the context containing the resource.\n * @maxLength 128\n */\n contextId?: string;\n /** Type used by the app to identify the context. */\n contextType?: string | null;\n /**\n * ID of the app that owns the context.\n * @format GUID\n * @readonly\n */\n appDefId?: string;\n /**\n * Site ID.\n * @format GUID\n * @readonly\n */\n metaSiteId?: string;\n}\n\nexport interface UpvoteRequest {\n /**\n * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * ID of the resource receiving the vote. For a comment, specify the comment ID.\n * @maxLength 128\n */\n resourceId: string;\n /**\n * Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn: string;\n /** App and context containing the resource. */\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 /** Vote cast or updated. */\n vote?: Vote;\n}\n\nexport interface ContextResourceVoteChange {\n /**\n * ID of the resource receiving the vote.\n * @maxLength 128\n */\n resourceId?: string;\n /**\n * Entity type receiving the vote. For comments, this is `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn?: string;\n /** Net score: upvote count minus downvote count. */\n score?: number;\n /** Number of upvotes. */\n upvoteCount?: number;\n /** Number of downvotes. */\n downvoteCount?: number;\n /** App and context containing the resource. */\n context?: VoteContext;\n}\n\nexport interface VoteCast {\n /** Vote associated with the event. */\n vote?: Vote;\n}\n\nexport interface DownvoteRequest {\n /**\n * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * ID of the resource receiving the vote. For a comment, specify the comment ID.\n * @maxLength 128\n */\n resourceId: string;\n /**\n * Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn: string;\n /** App and context containing the resource. */\n contextData?: ContextData;\n}\n\nexport interface DownvoteResponse {\n /** Vote cast or updated. */\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 * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** ID of the vote to remove. */\n voteId: string;\n /** App and context containing the resource. */\n contextData?: ContextData;\n}\n\nexport interface RemoveVoteResponse {\n /** Vote removed. */\n vote?: Vote;\n}\n\nexport interface VoteDeleted {\n /** Vote associated with the event. */\n vote?: Vote;\n}\n\nexport interface QueryVotesRequest {\n /**\n * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** Query options. Filter by `resourceId`. Field projection and fieldsets aren't supported. */\n query?: QueryV2;\n /** App and context containing the resource. */\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 /** Votes matching the query. */\n votes?: Vote[];\n /** Paging metadata containing cursors for retrieving additional results. */\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/**\n * Triggered when a vote changes the totals for a resource.\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/**\n * Triggered when an upvote or downvote is cast, including changes to an existing vote.\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/**\n * Triggered when a vote is removed.\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 *\n * Changes the current identity's existing downvote to an upvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.\n * @public\n * @documentationMaturity preview\n * @requiredField options.resourceFqdn\n * @requiredField options.resourceId\n * @permissionId comments:v1:vote:upvote\n * @fqn com.wixpress.comments.Votes.Upvote\n */\nexport async function upvote(\n options?: NonNullablePaths<UpvoteOptions, `resourceFqdn` | `resourceId`, 0>\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 2\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 * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * ID of the resource receiving the vote. For a comment, specify the comment ID.\n * @maxLength 128\n */\n resourceId: string;\n /**\n * Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn: string;\n /** App and context containing the resource. */\n contextData?: ContextData;\n}\n\n/**\n * Casts a downvote on a resource for the current identity.\n *\n * Changes the current identity's existing upvote to a downvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that context.\n * @public\n * @documentationMaturity preview\n * @requiredField options.resourceFqdn\n * @requiredField options.resourceId\n * @permissionId comments:v1:vote:downvote\n * @fqn com.wixpress.comments.Votes.Downvote\n */\nexport async function downvote(\n options?: NonNullablePaths<DownvoteOptions, `resourceFqdn` | `resourceId`, 0>\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 2\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 * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /**\n * ID of the resource receiving the vote. For a comment, specify the comment ID.\n * @maxLength 128\n */\n resourceId: string;\n /**\n * Entity type receiving the vote. For comments, specify `wix.comments.v2.comment`.\n * @maxLength 300\n */\n resourceFqdn: string;\n /** App and context containing the resource. */\n contextData?: ContextData;\n}\n\n/**\n * Removes the current identity's vote and returns the removed vote.\n *\n * Specify the `voteId` returned by a vote response or\n * [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.\n * A repeated removal fails when the vote no longer exists.\n * @param voteId - ID of the vote to remove.\n * @public\n * @documentationMaturity preview\n * @requiredField voteId\n * @permissionId comments:v1:vote:remove_vote\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 2\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 * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string;\n /** App and context containing the resource. */\n contextData?: ContextData;\n}\n\n/**\n * Retrieves a list of votes, given the provided paging and filtering.\n *\n * Visitor and member callers receive their own votes in the specified app and context.\n * Authorized application callers can retrieve votes from multiple identities in that context.\n * Filter by `resourceId`, using `$in` to retrieve votes for multiple comment IDs.\n * Results don't include comments without a matching vote.\n *\n * Specify `query.cursorPaging.limit` to control the page size. To retrieve the next page,\n * set `query.cursorPaging.cursor` to the returned `paging.cursors.next` and keep the same context.\n * Offset paging and field projection aren't supported. Don't depend on a particular result order.\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and\n * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * Retain the permission checked by RequestContextResolver for app identities.\n * @public\n * @documentationMaturity preview\n * @permissionId WIX_COMMENTS.VOTE_QUERY\n * @applicableIdentity APP\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 * Legacy context token. Use `contextData` instead.\n * @deprecated\n * @replacedBy context_data\n */\n contextToken?: string | undefined;\n /** App and context containing the resource. */\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 3\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 *\n * Changes the current identity's existing downvote to an upvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that 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 *\n * Changes the current identity's existing upvote to a downvote.\n * Repeating the same vote doesn't remove it. To clear a vote, call\n * [Remove Vote](https://dev.wix.com/docs/api-reference/crm/community/feedback-moderation/comments/vote-v1/remove-vote).\n * Specify the resource's app and context in `contextData`. Voting must be enabled for that 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 and returns the removed vote.\n *\n * Specify the `voteId` returned by a vote response or\n * [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.\n * A repeated removal fails when the vote no longer exists.\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 a list of votes, given the provided paging and filtering.\n *\n * Visitor and member callers receive their own votes in the specified app and context.\n * Authorized application callers can retrieve votes from multiple identities in that context.\n * Filter by `resourceId`, using `$in` to retrieve votes for multiple comment IDs.\n * Results don't include comments without a matching vote.\n *\n * Specify `query.cursorPaging.limit` to control the page size. To retrieve the next page,\n * set `query.cursorPaging.cursor` to the returned `paging.cursors.next` and keep the same context.\n * Offset paging and field projection aren't supported. Don't depend on a particular result order.\n *\n * To learn about working with Query methods, see\n * [API Query Language](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language) and\n * [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * Retain the permission checked by RequestContextResolver for app identities.\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","import {\n upvote as publicUpvote,\n downvote as publicDownvote,\n removeVote as publicRemoveVote,\n queryVotes as publicQueryVotes,\n typedQueryVotes as publicTypedQueryVotes,\n} from './comments-v1-vote-votes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n QueryVotesOptions,\n VoteQuery,\n VotesQueryBuilder,\n typedQueryVotes as universalTypedQueryVotes,\n} from './comments-v1-vote-votes.universal.js';\nimport { onVoteContextResourceVoteChange as publicOnVoteContextResourceVoteChange } from './comments-v1-vote-votes.public.js';\nimport { onVoteCast as publicOnVoteCast } from './comments-v1-vote-votes.public.js';\nimport { onVoteDeleted as publicOnVoteDeleted } from './comments-v1-vote-votes.public.js';\n\nfunction customQueryVotes(httpClient: HttpClient) {\n const router = /*#__PURE__*/ createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryVotesOptions) =>\n publicQueryVotes(httpClient)(options),\n typedQueryFunction: (query: VoteQuery, options?: QueryVotesOptions) =>\n publicTypedQueryVotes(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: VoteQuery,\n options?: QueryVotesOptions\n ): ReturnType<typeof universalTypedQueryVotes>;\n function overloadedQuery(options?: QueryVotesOptions): VotesQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: VoteQuery | QueryVotesOptions,\n options?: QueryVotesOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const upvote: MaybeContext<\n BuildRESTFunction<typeof publicUpvote> & typeof publicUpvote\n> = /*#__PURE__*/ createRESTModule(publicUpvote);\nexport const downvote: MaybeContext<\n BuildRESTFunction<typeof publicDownvote> & typeof publicDownvote\n> = /*#__PURE__*/ createRESTModule(publicDownvote);\nexport const removeVote: MaybeContext<\n BuildRESTFunction<typeof publicRemoveVote> & typeof publicRemoveVote\n> = /*#__PURE__*/ createRESTModule(publicRemoveVote);\nexport const queryVotes: MaybeContext<\n BuildRESTFunction<typeof customQueryVotes> & typeof customQueryVotes\n> = /*#__PURE__*/ createRESTModule(customQueryVotes);\n/**\n * Triggered when a vote changes the totals for a resource.\n */\nexport const onVoteContextResourceVoteChange: BuildEventDefinition<\n typeof publicOnVoteContextResourceVoteChange\n> &\n typeof publicOnVoteContextResourceVoteChange =\n /*#__PURE__*/ createEventModule(publicOnVoteContextResourceVoteChange);\n/**\n * Triggered when an upvote or downvote is cast, including changes to an existing vote.\n */\nexport const onVoteCast: BuildEventDefinition<typeof publicOnVoteCast> &\n typeof publicOnVoteCast = /*#__PURE__*/ createEventModule(publicOnVoteCast);\n/**\n * Triggered when a vote is removed.\n */\nexport const onVoteDeleted: BuildEventDefinition<typeof publicOnVoteDeleted> &\n typeof publicOnVoteDeleted =\n /*#__PURE__*/ createEventModule(publicOnVoteDeleted);\n\nexport {\n Type,\n IdentityType,\n SortOrder,\n WebhookIdentityType,\n} from './comments-v1-vote-votes.universal.js';\nexport {\n Vote,\n SocialIdentity,\n VoteContext,\n UpvoteRequest,\n ContextData,\n UpvoteResponse,\n ContextResourceVoteChange,\n VoteCast,\n DownvoteRequest,\n DownvoteResponse,\n UpdateVoteRequest,\n UpdateVoteResponse,\n RemoveVoteRequest,\n RemoveVoteResponse,\n VoteDeleted,\n QueryVotesRequest,\n QueryV2,\n QueryV2PagingMethodOneOf,\n Sorting,\n AddressLocation,\n Paging,\n CursorPaging,\n QueryVotesResponse,\n PagingMetadataV2,\n Cursors,\n GetResourceVoteSummaryRequest,\n GetResourceVoteSummaryResponse,\n ResourceVoteSummary,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n ImportVoteRequest,\n ImportVote,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n VoteContextResourceVoteChangeEnvelope,\n VoteCastEnvelope,\n VoteDeletedEnvelope,\n UpvoteOptions,\n DownvoteOptions,\n RemoveVoteOptions,\n QueryVotesOptions,\n VotesQueryResult,\n VotesQueryBuilder,\n VoteQuerySpec,\n} from './comments-v1-vote-votes.universal.js';\nexport { utils } from './comments-v1-vote-votes.universal.js';\nexport {\n TypeWithLiterals,\n IdentityTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpvoteApplicationErrors,\n DownvoteApplicationErrors,\n RemoveVoteApplicationErrors,\n QueryVotesApplicationErrors,\n CommonQueryWithEntityContext,\n VoteQuery,\n} from './comments-v1-vote-votes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAAA;AAAA,EAAA,kBAAAC;AAAA,EAAA,uCAAAC;AAAA,EAAA,qBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,mBAA6C;AAC7C,uBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;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;A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AA0B;AAAA,IACrD,sBAAsB,CAAC,YACrBC,YAAiB,UAAU,EAAE,OAAO;AAAA,IACtC,oBAAoB,CAAC,OAAkB,YACrCC,iBAAsB,UAAU,EAAE,OAAO,OAAO;AAAA,IAClD,qBAAqB;AAAA,EACvB,CAAC;AAOD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,UAEK,2DAAiBA,OAAY;AACxC,IAAMC,YAEK,2DAAiBA,SAAc;AAC1C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMJ,cAEK,2DAAiB,gBAAgB;AAI5C,IAAMK,mCAIG,uEAAkB,+BAAqC;AAIhE,IAAMC,cAC6B,uEAAkB,UAAgB;AAIrE,IAAMC,iBAEG,uEAAkB,aAAmB;","names":["downvote","onVoteCast","onVoteContextResourceVoteChange","onVoteDeleted","queryVotes","removeVote","upvote","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_rest_modules","payload","import_transform_paths","Type","IdentityType","SortOrder","WebhookIdentityType","upvote","sdkTransformError","downvote","removeVote","queryVotes","upvote","downvote","removeVote","queryVotes","typedQueryVotes","import_rest_modules","queryVotes","typedQueryVotes","upvote","downvote","removeVote","onVoteContextResourceVoteChange","onVoteCast","onVoteDeleted"]}