import type { ChallengeVerificationMessageType, DecryptedChallengeAnswer, DecryptedChallengeRequestMessageTypeWithCommunityAuthor } from "../../../../pubsub-messages/types.js"; import type { Challenge, ChallengeFile, ChallengeFileFactoryInput, ChallengeResult, CommunityChallenge, CommunityChallengeSetting } from "../../../../community/types.js"; import { LocalCommunity } from "../local-community.js"; type PendingChallenge = Challenge & { index: number; }; type DeferredChallenge = { index: number; communityChallenge: CommunityChallenge; }; export type GetChallengeAnswers = (challenges: Omit[]) => Promise; export type ChallengeResultAggregate = { aggregatedComment?: Record; aggregatedCommentUpdate?: Record; aggregatedReason?: string; }; type ChallengeVerificationSuccess = { challengeSuccess: true; pendingApprovalSuccess: boolean; } & Omit; type ChallengeVerificationPending = { pendingChallenges: PendingChallenge[]; pendingApprovalSuccess: boolean; deferredChallenges?: DeferredChallenge[]; partialResults?: (Challenge | ChallengeResult | undefined)[]; communityChallenges?: CommunityChallenge[]; }; type ChallengeVerificationFailure = { challengeSuccess: false; challengeErrors: NonNullable; } & Pick; export type PKCWithSettingsChallenges = { settings?: { challenges?: Record; }; }; declare const pkcJsChallenges: Record; declare const getPendingChallengesOrChallengeVerification: ({ challengeRequestMessage, community }: { challengeRequestMessage: DecryptedChallengeRequestMessageTypeWithCommunityAuthor; community: LocalCommunity; }) => Promise; declare const getChallengeVerificationFromChallengeAnswers: ({ pendingChallenges, challengeAnswers, community, challengeRequestMessage, deferredChallenges, partialResults, communityChallenges }: { pendingChallenges: PendingChallenge[]; challengeAnswers: DecryptedChallengeAnswer["challengeAnswers"]; community: LocalCommunity; challengeRequestMessage?: DecryptedChallengeRequestMessageTypeWithCommunityAuthor; deferredChallenges?: DeferredChallenge[]; partialResults?: (Challenge | ChallengeResult | undefined)[]; communityChallenges?: CommunityChallenge[]; }) => Promise; export type GetChallengeVerificationResult = Pick & { pendingApproval?: boolean; } & ChallengeResultAggregate; declare const getChallengeVerification: ({ challengeRequestMessage, community, getChallengeAnswers }: { challengeRequestMessage: DecryptedChallengeRequestMessageTypeWithCommunityAuthor; community: LocalCommunity; getChallengeAnswers: GetChallengeAnswers; }) => Promise; declare const loadChallengeFileFromCommunityChallengeSettings: ({ communityChallengeSettings, pkc }: { communityChallengeSettings: CommunityChallengeSetting; pkc?: PKCWithSettingsChallenges; }) => Promise; declare const getCommunityChallengeFromCommunityChallengeSettings: ({ communityChallengeSettings, pkc }: { communityChallengeSettings: CommunityChallengeSetting; pkc?: PKCWithSettingsChallenges; }) => Promise<{ communityChallenge: CommunityChallenge; }>; export { pkcJsChallenges, getPendingChallengesOrChallengeVerification, getChallengeVerificationFromChallengeAnswers, getChallengeVerification, getCommunityChallengeFromCommunityChallengeSettings, loadChallengeFileFromCommunityChallengeSettings };