@wix/auto_sdk_comments_votes 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +60 -0
- package/build/cjs/index.js +529 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +898 -0
- package/build/cjs/index.typings.js +413 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +610 -0
- package/build/cjs/meta.js +304 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +60 -0
- package/build/es/index.mjs +494 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +898 -0
- package/build/es/index.typings.mjs +380 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +610 -0
- package/build/es/meta.mjs +270 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +60 -0
- package/build/internal/cjs/index.typings.d.ts +938 -0
- package/build/internal/cjs/meta.d.ts +678 -0
- package/build/internal/es/index.d.mts +60 -0
- package/build/internal/es/index.typings.d.mts +938 -0
- package/build/internal/es/meta.d.mts +678 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
|
+
import { UpvoteOptions, UpvoteResponse, UpvoteApplicationErrors, DownvoteOptions, DownvoteResponse, DownvoteApplicationErrors, RemoveVoteOptions, RemoveVoteResponse, RemoveVoteApplicationErrors, VoteContextResourceVoteChangeEnvelope, VoteCastEnvelope, VoteDeletedEnvelope, VoteQuery, QueryVotesOptions, typedQueryVotes, VotesQueryBuilder } from './index.typings.mjs';
|
|
3
|
+
export { AccountInfo, AccountInfoMetadata, ActionEvent, AddressLocation, BaseEventMetadata, CommonQueryWithEntityContext, ContextData, ContextResourceVoteChange, CursorPaging, Cursors, DomainEvent, DomainEventBodyOneOf, DownvoteRequest, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetResourceVoteSummaryRequest, GetResourceVoteSummaryResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, IdentityTypeWithLiterals, ImportVote, ImportVoteRequest, MessageEnvelope, Paging, PagingMetadataV2, QueryV2, QueryV2PagingMethodOneOf, QueryVotesApplicationErrors, QueryVotesRequest, QueryVotesResponse, RemoveVoteRequest, ResourceVoteSummary, RestoreInfo, SocialIdentity, SortOrder, SortOrderWithLiterals, Sorting, Type, TypeWithLiterals, UpdateVoteRequest, UpdateVoteResponse, UpvoteRequest, Vote, VoteCast, VoteContext, VoteDeleted, VoteQuerySpec, VotesQueryResult, WebhookIdentityType, WebhookIdentityTypeWithLiterals, utils } from './index.typings.mjs';
|
|
4
|
+
|
|
5
|
+
declare function upvote$1(httpClient: HttpClient): UpvoteSignature;
|
|
6
|
+
interface UpvoteSignature {
|
|
7
|
+
/**
|
|
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.
|
|
12
|
+
*/
|
|
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> & {
|
|
14
|
+
__applicationErrorsType?: UpvoteApplicationErrors;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
declare function downvote$1(httpClient: HttpClient): DownvoteSignature;
|
|
18
|
+
interface DownvoteSignature {
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
24
|
+
*/
|
|
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> & {
|
|
26
|
+
__applicationErrorsType?: DownvoteApplicationErrors;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
declare function removeVote$1(httpClient: HttpClient): RemoveVoteSignature;
|
|
30
|
+
interface RemoveVoteSignature {
|
|
31
|
+
/**
|
|
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
|
+
*/
|
|
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> & {
|
|
38
|
+
__applicationErrorsType?: RemoveVoteApplicationErrors;
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
41
|
+
declare const onVoteContextResourceVoteChange$1: EventDefinition<VoteContextResourceVoteChangeEnvelope, "wix.comments.v1.vote_context_resource_vote_change">;
|
|
42
|
+
declare const onVoteCast$1: EventDefinition<VoteCastEnvelope, "wix.comments.v1.vote_vote_cast">;
|
|
43
|
+
declare const onVoteDeleted$1: EventDefinition<VoteDeletedEnvelope, "wix.comments.v1.vote_vote_deleted">;
|
|
44
|
+
|
|
45
|
+
declare function customQueryVotes(httpClient: HttpClient): {
|
|
46
|
+
(query: VoteQuery, options?: QueryVotesOptions): ReturnType<typeof typedQueryVotes>;
|
|
47
|
+
(options?: QueryVotesOptions): VotesQueryBuilder;
|
|
48
|
+
};
|
|
49
|
+
declare const upvote: MaybeContext<BuildRESTFunction<typeof upvote$1> & typeof upvote$1>;
|
|
50
|
+
declare const downvote: MaybeContext<BuildRESTFunction<typeof downvote$1> & typeof downvote$1>;
|
|
51
|
+
declare const removeVote: MaybeContext<BuildRESTFunction<typeof removeVote$1> & typeof removeVote$1>;
|
|
52
|
+
declare const queryVotes: MaybeContext<BuildRESTFunction<typeof customQueryVotes> & typeof customQueryVotes>;
|
|
53
|
+
/** */
|
|
54
|
+
declare const onVoteContextResourceVoteChange: BuildEventDefinition<typeof onVoteContextResourceVoteChange$1> & typeof onVoteContextResourceVoteChange$1;
|
|
55
|
+
/** */
|
|
56
|
+
declare const onVoteCast: BuildEventDefinition<typeof onVoteCast$1> & typeof onVoteCast$1;
|
|
57
|
+
/** */
|
|
58
|
+
declare const onVoteDeleted: BuildEventDefinition<typeof onVoteDeleted$1> & typeof onVoteDeleted$1;
|
|
59
|
+
|
|
60
|
+
export { DownvoteApplicationErrors, DownvoteOptions, DownvoteResponse, QueryVotesOptions, RemoveVoteApplicationErrors, RemoveVoteOptions, RemoveVoteResponse, UpvoteApplicationErrors, UpvoteOptions, UpvoteResponse, VoteCastEnvelope, VoteContextResourceVoteChangeEnvelope, VoteDeletedEnvelope, VoteQuery, VotesQueryBuilder, downvote, onVoteCast, onVoteContextResourceVoteChange, onVoteDeleted, queryVotes, removeVote, upvote };
|