@elevora/react
Version:
Official SDK for Elevora's public API
1,988 lines (1,820 loc) • 108 kB
text/typescript
import React, { ReactNode } from 'react';
import * as _tanstack_react_query from '@tanstack/react-query';
import { RefetchOptions, QueryObserverResult, UseQueryOptions, DataTag, QueryKey, DefinedInitialDataOptions, DefinedUseQueryResult, UndefinedInitialDataOptions, UseQueryResult, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
import { AxiosRequestConfig } from 'axios';
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type AuthControllerGetTwitterUrlParams = {
campaignSlug: string;
callbackUrl: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type AuthControllerHandleTelegramAuth200 = {
[key: string]: unknown;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type AuthControllerHandleTelegramAuthParams = {
campaignSlug: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type AuthControllerVerifyTokenParams = {
token: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestCustomDataContractInteractionChain = typeof QuestCustomDataContractInteractionChain[keyof typeof QuestCustomDataContractInteractionChain];
declare const QuestCustomDataContractInteractionChain: {
readonly ETHEREUM: "ETHEREUM";
readonly POLYGON: "POLYGON";
readonly BSC: "BSC";
readonly BLAST: "BLAST";
readonly BASE: "BASE";
readonly OPTIMISM: "OPTIMISM";
readonly ARBITRUM: "ARBITRUM";
readonly ZKSYNC: "ZKSYNC";
readonly SEPOLIA: "SEPOLIA";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataContractInteraction {
chain: QuestCustomDataContractInteractionChain;
/** @maxLength 42 */
contractAddress: string;
/** @maxLength 200 */
eventName: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataDailyReward {
/** @minimum 0 */
basePoints: number;
/** @minimum 1 */
maxMultiplier: number;
/** @minimum 0 */
multiplierStep: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataImageUpload {
/** @maxLength 200 */
description: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestCustomDataInstagramAction = typeof QuestCustomDataInstagramAction[keyof typeof QuestCustomDataInstagramAction];
declare const QuestCustomDataInstagramAction: {
readonly FOLLOW: "FOLLOW";
readonly LIKE: "LIKE";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataInstagram {
action: QuestCustomDataInstagramAction;
/**
* @minLength 2
* @maxLength 200
*/
link: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PoolAnswer {
/** @maxLength 200 */
text: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataPool {
answers: PoolAnswer[];
/** @maxLength 500 */
question: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataPushNotifications {
[key: string]: unknown;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuizAnswer {
isCorrect: boolean;
/** @maxLength 200 */
text: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataQuiz {
answers: QuizAnswer[];
multipleCorrectAnswers: boolean;
/** @maxLength 500 */
question: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataTelegram {
requireAccountLink: boolean;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataVisitWebsite {
link: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type TokenRequirementChain = typeof TokenRequirementChain[keyof typeof TokenRequirementChain];
declare const TokenRequirementChain: {
readonly ETHEREUM: "ETHEREUM";
readonly POLYGON: "POLYGON";
readonly BSC: "BSC";
readonly BLAST: "BLAST";
readonly BASE: "BASE";
readonly OPTIMISM: "OPTIMISM";
readonly ARBITRUM: "ARBITRUM";
readonly ZKSYNC: "ZKSYNC";
readonly SEPOLIA: "SEPOLIA";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type TokenRequirementTokenType = typeof TokenRequirementTokenType[keyof typeof TokenRequirementTokenType];
declare const TokenRequirementTokenType: {
readonly ERC20: "ERC20";
readonly ERC721: "ERC721";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type TokenRequirementType = typeof TokenRequirementType[keyof typeof TokenRequirementType];
declare const TokenRequirementType: {};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface TokenRequirement {
chain: TokenRequirementChain;
description?: string;
errorMessage?: string;
minAmount: number;
name?: string;
stakingContracts?: string[];
stakingOnly?: boolean;
tokenAddress?: string;
tokenType: TokenRequirementTokenType;
type: TokenRequirementType;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestCustomDataXAction = typeof QuestCustomDataXAction[keyof typeof QuestCustomDataXAction];
declare const QuestCustomDataXAction: {
readonly FOLLOW: "FOLLOW";
readonly LIKE: "LIKE";
readonly RETWEET: "RETWEET";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestCustomDataX {
action: QuestCustomDataXAction;
/**
* @minLength 2
* @maxLength 200
*/
link: string;
requireAccountLink?: boolean;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestSettings {
contract_interaction?: QuestCustomDataContractInteraction;
daily_reward?: QuestCustomDataDailyReward;
image_upload?: QuestCustomDataImageUpload;
instagram?: QuestCustomDataInstagram;
pool?: QuestCustomDataPool;
push_notifications?: QuestCustomDataPushNotifications;
quiz?: QuestCustomDataQuiz;
telegram?: QuestCustomDataTelegram;
visit_website?: QuestCustomDataVisitWebsite;
web_holding?: TokenRequirement;
x?: QuestCustomDataX;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestStatus = typeof QuestStatus[keyof typeof QuestStatus];
declare const QuestStatus: {
readonly ACTIVE: "ACTIVE";
readonly PAUSED: "PAUSED";
readonly ARCHIVED: "ARCHIVED";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestType = typeof QuestType[keyof typeof QuestType];
declare const QuestType: {
readonly INSTAGRAM: "INSTAGRAM";
readonly X: "X";
readonly VERIFY_EMAIL: "VERIFY_EMAIL";
readonly VISIT_WEBSITE: "VISIT_WEBSITE";
readonly DAILY_REWARD: "DAILY_REWARD";
readonly SUBSCRIBE_TO_NEWSLETTER: "SUBSCRIBE_TO_NEWSLETTER";
readonly TELEGRAM: "TELEGRAM";
readonly QUIZ: "QUIZ";
readonly POOL: "POOL";
readonly WEB_HOLDING: "WEB_HOLDING";
readonly NFT_HOLDING: "NFT_HOLDING";
readonly UPLOAD_IMAGE: "UPLOAD_IMAGE";
readonly CONTRACT_INTERACTION: "CONTRACT_INTERACTION";
readonly PUSH_NOTIFICATIONS: "PUSH_NOTIFICATIONS";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Quest {
campaign: Campaign;
completedBy: LeadEntry[];
/** Creation timestamp */
createdAt: string;
/** @maxLength 500 */
description: string;
endAt?: string;
/** Unique identifier */
id: number;
name: string;
points: number;
settings: QuestSettings;
startAt?: string;
status: QuestStatus;
type: QuestType;
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface LeadEntry {
campaign: Campaign;
completedQuests: Quest[];
/** Creation timestamp */
createdAt: string;
dailyRewardStreak: number;
/** Unique identifier */
id: number;
inviteCode?: string;
invitedBy: LeadEntry;
invitedLeads: LeadEntry[];
isOffboarded: boolean;
lastDailyRewardClaim?: string;
lastMultiplierCalculation?: string;
lastMultiplierFactor: number;
name?: string;
points: number;
/** Last update timestamp */
updatedAt: string;
user: User;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadCategory = typeof MediaUploadCategory[keyof typeof MediaUploadCategory];
declare const MediaUploadCategory: {
readonly organization: "organization";
readonly campaign: "campaign";
readonly quest: "quest";
readonly user: "user";
readonly content_battle: "content_battle";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadEntityId = {
[key: string]: unknown;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadType = typeof MediaUploadType[keyof typeof MediaUploadType];
declare const MediaUploadType: {
readonly organization_logo: "organization_logo";
readonly campaign_image: "campaign_image";
readonly content_battle_image: "content_battle_image";
readonly quest_submission: "quest_submission";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MediaUpload {
category: MediaUploadCategory;
createdAt: string;
entityId: MediaUploadEntityId;
id: number;
key: string;
type: MediaUploadType;
url: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Organization {
campaigns: Campaign[];
id: string;
mediaUploads: MediaUpload[];
usersData: UserDataEntity[];
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface TelegramInfoDto {
auth_date?: string;
first_name: string;
id: string;
photo_url?: string;
username?: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Web3InfoDto {
/** @pattern /^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/ */
BTC_address?: string;
/** @pattern /^0x[a-fA-F0-9]{40}$/ */
EVM_address: string;
/** @pattern /^[1-9A-HJ-NP-Za-km-z]{32,44}$/ */
SOL_address?: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface UserDataEntity {
/** Creation timestamp */
createdAt: string;
/** Unique identifier */
id: number;
newsletterEmail?: string;
org: Organization;
telegramId?: string;
telegramInfo?: TelegramInfoDto;
twitterHandle?: string;
twitterId?: string;
/** Last update timestamp */
updatedAt: string;
user: User;
web3Info?: Web3InfoDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface User {
/** Creation timestamp */
createdAt: string;
email: string;
entries: LeadEntry[];
evmAddress: string;
/** Unique identifier */
id: number;
isEmailVerified: boolean;
/** Last update timestamp */
updatedAt: string;
userData: UserDataEntity[];
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleRound {
contentBattle: ContentBattle;
contents: ContentBattleContent[];
/** Creation timestamp */
createdAt: string;
/** Unique identifier */
id: number;
/** Last update timestamp */
updatedAt: string;
voter: User;
voteTime?: string;
winner: ContentBattleContent;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type ContentBattleContentStatus = typeof ContentBattleContentStatus[keyof typeof ContentBattleContentStatus];
declare const ContentBattleContentStatus: {
readonly ACTIVE: "ACTIVE";
readonly QUARANTINED: "QUARANTINED";
readonly REMOVED: "REMOVED";
readonly REPLACED: "REPLACED";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleContent {
consecutiveLosses: number;
contentBattle: ContentBattle;
contentBattleRounds: ContentBattleRound[];
contentBattleRoundWinners: ContentBattleRound[];
/** Creation timestamp */
createdAt: string;
elo: number;
/** Unique identifier */
id: number;
mediaUpload: MediaUpload;
status: ContentBattleContentStatus;
totalBattles: number;
/** Last update timestamp */
updatedAt: string;
user: User;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type ContentBattleStatus = typeof ContentBattleStatus[keyof typeof ContentBattleStatus];
declare const ContentBattleStatus: {
readonly ACTIVE: "ACTIVE";
readonly ENDED: "ENDED";
readonly PAUSED: "PAUSED";
readonly ARCHIVED: "ARCHIVED";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattle {
campaign: Campaign;
contents: ContentBattleContent[];
/** Creation timestamp */
createdAt: string;
endDate: string;
/** Unique identifier */
id: number;
minBattlesPerContent: number;
name: string;
rounds: ContentBattleRound[];
startDate: string;
status: ContentBattleStatus;
/** Last update timestamp */
updatedAt: string;
votingPointsReward: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type CampaignLoginTypesItem = typeof CampaignLoginTypesItem[keyof typeof CampaignLoginTypesItem];
declare const CampaignLoginTypesItem: {
readonly email: "email";
readonly web3: "web3";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type RequirementsOperator = typeof RequirementsOperator[keyof typeof RequirementsOperator];
declare const RequirementsOperator: {
readonly AND: "AND";
readonly OR: "OR";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type RequirementsRequirementsItem = {
[key: string]: unknown;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Requirements {
errorMessage?: string;
operator?: RequirementsOperator;
requirements: RequirementsRequirementsItem[];
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MultiplierTier {
/** Creation timestamp */
createdAt: string;
description: string;
/** Unique identifier */
id: number;
multiplier: Multiplier;
multiplier_value: number;
name: string;
requirements?: Requirements;
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Multiplier {
baseMultiplier: number;
campaign: Campaign;
/** Creation timestamp */
createdAt: string;
description: string;
/** Unique identifier */
id: number;
name: string;
tiers: MultiplierTier[];
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PrizeDto {
description: string;
quantity: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PublicSettingsDto {
/** @maxLength 20 */
backgroundColor: string;
/** @maxLength 20 */
buttonText: string;
/** @maxLength 500 */
description: string;
/** @maxLength 50 */
facebookUsername: string;
/** @maxLength 20 */
fontColor: string;
/** @maxLength 30 */
instagramUsername: string;
/** @maxLength 50 */
linkedinUsername: string;
/** @maxLength 100 */
ogDescription: string;
/** @maxLength 100 */
ogTitle: string;
/** @maxLength 20 */
primaryColor: string;
/** @maxLength 500 */
successTitle: string;
/** @maxLength 100 */
title: string;
/** @maxLength 20 */
twitterUsername: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ReferralSettingsDto {
enabled: boolean;
/**
* @minimum 0
* @maximum 10
*/
max: number;
/**
* @minimum 0
* @maximum 100
*/
reward: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type CampaignResetPointsPeriod = typeof CampaignResetPointsPeriod[keyof typeof CampaignResetPointsPeriod];
declare const CampaignResetPointsPeriod: {
readonly daily: "daily";
readonly weekly: "weekly";
readonly monthly: "monthly";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type CampaignState = typeof CampaignState[keyof typeof CampaignState];
declare const CampaignState: {
readonly draft: "draft";
readonly started: "started";
readonly ended: "ended";
readonly stopped: "stopped";
readonly archived: "archived";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type CampaignType = typeof CampaignType[keyof typeof CampaignType];
declare const CampaignType: {
readonly waitlist: "waitlist";
readonly giveaway: "giveaway";
readonly loyalty: "loyalty";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Campaign {
askForLeadName: boolean;
contentBattles: ContentBattle[];
/** Creation timestamp */
createdAt: string;
createdBy: string;
endDate?: string;
/** Unique identifier */
id: number;
lastPointsReset?: string;
leads: LeadEntry[];
loginTypes: CampaignLoginTypesItem[];
multiplier?: Multiplier;
name: string;
organization: Organization;
prizes: PrizeDto[];
publicSettings: PublicSettingsDto;
quests: Quest[];
referralSettings: ReferralSettingsDto;
resetPointsPeriod?: CampaignResetPointsPeriod;
slug: string;
startDate?: string;
state: CampaignState;
type: CampaignType;
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadDtoCategory = typeof MediaUploadDtoCategory[keyof typeof MediaUploadDtoCategory];
declare const MediaUploadDtoCategory: {
readonly organization: "organization";
readonly campaign: "campaign";
readonly quest: "quest";
readonly user: "user";
readonly content_battle: "content_battle";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadDtoEntityId = {
[key: string]: unknown;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type MediaUploadDtoType = typeof MediaUploadDtoType[keyof typeof MediaUploadDtoType];
declare const MediaUploadDtoType: {
readonly organization_logo: "organization_logo";
readonly campaign_image: "campaign_image";
readonly content_battle_image: "content_battle_image";
readonly quest_submission: "quest_submission";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MediaUploadDto {
category: MediaUploadDtoCategory;
createdAt: string;
entityId: MediaUploadDtoEntityId;
id: number;
key: string;
type: MediaUploadDtoType;
url: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type ContentBattleContentDtoStatus = typeof ContentBattleContentDtoStatus[keyof typeof ContentBattleContentDtoStatus];
declare const ContentBattleContentDtoStatus: {
readonly ACTIVE: "ACTIVE";
readonly QUARANTINED: "QUARANTINED";
readonly REMOVED: "REMOVED";
readonly REPLACED: "REPLACED";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleContentDto {
consecutiveLosses: number;
contentBattle: ContentBattle;
contentBattleRounds: ContentBattleRound[];
contentBattleRoundWinners: ContentBattleRound[];
/** Creation timestamp */
createdAt: string;
elo: number;
/** Unique identifier */
id: number;
mediaUpload: MediaUploadDto;
status: ContentBattleContentDtoStatus;
totalBattles: number;
/** Last update timestamp */
updatedAt: string;
user: User;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type ContentBattlePublicControllerSubmitEntryBody = {
file?: Blob;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleRoundContentDto {
id: number;
mediaUpload: MediaUploadDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleRoundDto {
contentBattle: ContentBattle;
contents: ContentBattleRoundContentDto[];
/** Creation timestamp */
createdAt: string;
id: number;
/** Last update timestamp */
updatedAt: string;
voter: User;
voteTime?: string;
winner: ContentBattleContent;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ContentBattleVoteDto {
winnerId: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface CreateLeadEntryDto {
/** @maxLength 8 */
inviteCode?: string;
/** @maxLength 100 */
name?: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface CreateMultiplierDto {
/** @minimum 0 */
baseMultiplier: number;
/** @maxLength 200 */
description?: string;
/** @maxLength 50 */
name: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface GetCallbackUrlDto {
url: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type GetCurrentRoundResponseDtoError = typeof GetCurrentRoundResponseDtoError[keyof typeof GetCurrentRoundResponseDtoError];
declare const GetCurrentRoundResponseDtoError: {
readonly not_enough_content: "not_enough_content";
readonly last_vote_too_recent: "last_vote_too_recent";
readonly create_round_error: "create_round_error";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
/**
* @nullable
*/
type GetCurrentRoundResponseDtoRound = ContentBattleRoundDto | null;
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface GetCurrentRoundResponseDto {
error?: GetCurrentRoundResponseDtoError;
/** @nullable */
round?: GetCurrentRoundResponseDtoRound;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface KeysDto {
auth: string;
p256dh: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface UserPublicDto {
/** Creation timestamp */
createdAt: string;
email: string;
entries: LeadEntry[];
evmAddress?: string;
/** Unique identifier */
id: number;
isEmailVerified: boolean;
/** Last update timestamp */
updatedAt: string;
userData: UserDataEntity[];
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface LeadEntryPublicDto {
dailyRewardStreak: number;
id: number;
inviteCode?: string;
lastDailyRewardClaim?: string;
lastMultiplierFactor?: number;
name?: string;
points: number;
user?: UserPublicDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type LeadPublicControllerSignin201 = {
[key: string]: unknown;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface LeadRequestLoginDto {
callbackUrl: string;
campaignSlug: string;
email: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MagicLinkResponseDto {
message: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface UserMeDto {
/** Creation timestamp */
createdAt: string;
email: string;
entries: LeadEntry[];
evmAddress?: string;
/** Unique identifier */
id: number;
isEmailVerified: boolean;
/** Last update timestamp */
updatedAt: string;
userData: UserDataEntity[];
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
/**
* @nullable
*/
type MeDtoUser = UserMeDto | null;
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface UserDataPublicDto {
newsletterEmail?: string;
telegramId?: string;
telegramInfo?: TelegramInfoDto;
twitterHandle?: string;
twitterId?: string;
web3Info?: Web3InfoDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
/**
* @nullable
*/
type MeDtoUserData = UserDataPublicDto | null;
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MeDto {
/** @nullable */
user: MeDtoUser;
/** @nullable */
userData: MeDtoUserData;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ValidationResultProgress {
current: number;
percentage: number;
total: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type ValidationResultType = typeof ValidationResultType[keyof typeof ValidationResultType];
declare const ValidationResultType: {
readonly SOCIAL_X_ACCOUNT: "SOCIAL_X_ACCOUNT";
readonly SOCIAL_TELEGRAM_ACCOUNT: "SOCIAL_TELEGRAM_ACCOUNT";
readonly TOKEN_HOLDING: "TOKEN_HOLDING";
readonly TIME_ELAPSED_SINCE: "TIME_ELAPSED_SINCE";
readonly DATE: "DATE";
readonly INVITES: "INVITES";
readonly QUEST: "QUEST";
readonly PUSH_NOTIFICATIONS: "PUSH_NOTIFICATIONS";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ValidationResult {
message?: string;
progress?: ValidationResultProgress;
success: boolean;
type: ValidationResultType;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface TierRequirementStatusPublicDto {
isQualified: boolean;
results: ValidationResult[];
tier: MultiplierTier;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface MultiplierTierPublicDto {
allTiers: TierRequirementStatusPublicDto[];
currentTier?: MultiplierTier;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PublicCampaignsDtoLoginTypesItem = typeof PublicCampaignsDtoLoginTypesItem[keyof typeof PublicCampaignsDtoLoginTypesItem];
declare const PublicCampaignsDtoLoginTypesItem: {
readonly email: "email";
readonly web3: "web3";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PublicQuestDtoType = typeof PublicQuestDtoType[keyof typeof PublicQuestDtoType];
declare const PublicQuestDtoType: {
readonly INSTAGRAM: "INSTAGRAM";
readonly X: "X";
readonly VERIFY_EMAIL: "VERIFY_EMAIL";
readonly VISIT_WEBSITE: "VISIT_WEBSITE";
readonly DAILY_REWARD: "DAILY_REWARD";
readonly SUBSCRIBE_TO_NEWSLETTER: "SUBSCRIBE_TO_NEWSLETTER";
readonly TELEGRAM: "TELEGRAM";
readonly QUIZ: "QUIZ";
readonly POOL: "POOL";
readonly WEB_HOLDING: "WEB_HOLDING";
readonly NFT_HOLDING: "NFT_HOLDING";
readonly UPLOAD_IMAGE: "UPLOAD_IMAGE";
readonly CONTRACT_INTERACTION: "CONTRACT_INTERACTION";
readonly PUSH_NOTIFICATIONS: "PUSH_NOTIFICATIONS";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PublicQuestDto {
/** Creation timestamp */
createdAt: string;
/** @maxLength 500 */
description: string;
endAt?: string;
/** Unique identifier */
id: number;
name: string;
points: number;
settings: QuestSettings;
startAt?: string;
type: PublicQuestDtoType;
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PublicCampaignsDtoResetPointsPeriod = typeof PublicCampaignsDtoResetPointsPeriod[keyof typeof PublicCampaignsDtoResetPointsPeriod];
declare const PublicCampaignsDtoResetPointsPeriod: {
readonly daily: "daily";
readonly weekly: "weekly";
readonly monthly: "monthly";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PublicCampaignsDtoState = typeof PublicCampaignsDtoState[keyof typeof PublicCampaignsDtoState];
declare const PublicCampaignsDtoState: {
readonly draft: "draft";
readonly started: "started";
readonly ended: "ended";
readonly stopped: "stopped";
readonly archived: "archived";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PublicCampaignsDtoType = typeof PublicCampaignsDtoType[keyof typeof PublicCampaignsDtoType];
declare const PublicCampaignsDtoType: {
readonly waitlist: "waitlist";
readonly giveaway: "giveaway";
readonly loyalty: "loyalty";
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PublicCampaignsDto {
askForLeadName: boolean;
contentBattles: ContentBattle[];
/** Creation timestamp */
createdAt: string;
createdBy: string;
endDate?: string;
/** Unique identifier */
id: number;
lastPointsReset?: string;
leads: LeadEntry[];
loginTypes: PublicCampaignsDtoLoginTypesItem[];
logo?: string;
multiplier?: CreateMultiplierDto;
name: string;
organization: Organization;
prizes: PrizeDto[];
publicSettings?: PublicSettingsDto;
quests: PublicQuestDto[];
referralSettings: ReferralSettingsDto;
resetPointsPeriod?: PublicCampaignsDtoResetPointsPeriod;
slug: string;
startDate?: string;
state: PublicCampaignsDtoState;
type: PublicCampaignsDtoType;
/** Last update timestamp */
updatedAt: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PublicLeaderboardDto {
leaderboard: LeadEntryPublicDto[];
totalPoints: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PublicStatsDto {
leadsCount: number;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PushNotificationsControllerGetSubscriptionStatusParams = {
endpoint: string;
campaignSlug: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PushNotificationsControllerSubscribeParams = {
campaignSlug: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type PushNotificationsControllerUnsubscribeParams = {
endpoint: string;
campaignSlug: string;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PushNotificationsStatusDto {
isSubscribed: boolean;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface PushNotificationsVapidPublicKeyDto {
publicKey: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface QuestProgressDto {
message: string;
progress: number;
success: boolean;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
type QuestsPublicControllerUploadBody = {
file?: Blob;
};
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface SubscriptionDto {
endpoint: string;
keys: KeysDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
/**
* @nullable
*/
type UserEntryPublicDtoEntry = LeadEntryPublicDto | null;
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface UserEntryPublicDto {
completedQuests: PublicQuestDto[];
/** @nullable */
entry: UserEntryPublicDtoEntry;
multipliers?: MultiplierTierPublicDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ValidateQuestDto {
newsletterEmail?: string;
poolAnswer?: number;
quizAnswers?: number[];
txHash?: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface ValidateQuestResponseDto {
message: string;
points?: number;
success: boolean;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface VerifyCodeDto {
/**
* @minLength 6
* @maxLength 6
*/
code: string;
email: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface VerifyCodeResponseDto {
token: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface VerifyTokenResponseDto {
token: string;
user: UserPublicDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Web3LoginDto {
address: string;
signature: string;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Web3LoginResponseDto {
token: string;
user: UserPublicDto;
}
/**
* Generated by orval v7.3.0 🍺
* Do not edit manually.
* Elevora Public API
* The Elevora Public API documentation
* OpenAPI spec version: 1.0
*/
interface Web3MessageResponseDto {
message: string;
}
interface ElevoraContextType {
campaignSlug: string;
campaign?: PublicCampaignsDto;
userEntry?: UserEntryPublicDto;
setToken: (token: string) => void;
isConnected: boolean;
haveEntry: boolean;
signin: (data?: CreateLeadEntryDto) => Promise<void>;
refetch: (options?: RefetchOptions | undefined) => Promise<QueryObserverResult<UserEntryPublicDto, unknown>>;
logout: () => void;
user?: MeDto;
style: Partial<PublicSettingsDto>;
refetchUser: (options?: RefetchOptions | undefined) => Promise<QueryObserverResult<MeDto, unknown>>;
isLoadingUser: boolean;
isLoadingEntry: boolean;
}
interface ElevoraProviderProps {
campaignSlug: string;
initialCampaignData?: PublicCampaignsDto;
children: ReactNode;
}
declare function ElevoraProvider({ campaignSlug, children, initialCampaignData }: ElevoraProviderProps): React.JSX.Element;
declare function useElevora(): ElevoraContextType;
/**
* Hook to manage daily reward claims and streak calculations
* @param {PublicQuestDto} [quest] - Optional quest object containing daily reward settings
* @returns {Object} An object containing:
* - currentStreak: Current number of consecutive daily claims
* - timeUntilNextClaim: Time remaining until next claim (format: "Xh Ym")
* - canClaim: Boolean indicating if user can claim reward now
* - calculateDailyReward: Function to calculate reward points based on streak
* - currentStreakNotIncremented: Streak count used for reward calculation
*/
declare function useDailyReward(quest?: PublicQuestDto): {
currentStreak: number;
timeUntilNextClaim: string;
canClaim: boolean;
calculateDailyReward: (day: number) => number;
currentStreakNotIncremented: number;
};
interface UseMissionsProps {
onSuccess?: () => void;
onError?: (error: {
message: string;
}) => void;
vibrate?: boolean;
}
declare function useMissions({ onSuccess, onError, vibrate }?: UseMissionsProps): {
validateQuest: (questId: string, data?: ValidateQuestDto) => Promise<{
success: boolean;
message?: undefined;
} | {
success: boolean;
message: any;
}>;
totalMissionsPoints: number | undefined;
};
declare function useSocialConnect(): {
connectX: () => void;
accountX: string | undefined;
accountTelegram: string | undefined;
};
declare function usePoints(): {
points: number;
currentMultiplierFactor: number;
pointsWithMultiplier: number;
multiplierTiers: TierRequirementStatusPublicDto[] | undefined;
applyMultiplier: (points: number) => number;
};
/**
* Interface for the useContentBattle hook props
* @interface UseContentBattleProps
* @property {number} [battleId] - Optional ID of the content battle
* @property {() => void} [onSuccess] - Optional callback function called on any successful operation
* @property {(error: string) => void} [onError] - Optional callback function called when an error occurs
* @property {() => void} [onVoteSuccess] - Optional callback function called specifically after a successful vote
* @property {() => void} [onSubmitEntrySuccess] - Optional callback function called specifically after a successful entry submission
*/
interface UseContentBattleProps {
battleId?: number;
onSuccess?: () => void;
onError?: (error: string) => void;
onVoteSuccess?: () => void;
onSubmitEntrySuccess?: () => void;
}
/**
* Hook to manage content battle operations including submitting entries and votes
* @param {UseContentBattleProps} props - The props object
* @returns {Object} An object containing:
* - currentRound: The current round data
* - userEntry: The user's entry data
* - submitEntry: Function to submit a new entry
* - submitVote: Function to submit a vote
* - refetchRound: Function to refresh the current round data
* - refetchEntry: Function to refresh the user's entry data
* - error: The error message
*/
declare function useContentBattle({ battleId: _battleId, onSuccess, onError, onVoteSuccess, onSubmitEntrySuccess, }: UseContentBattleProps): {
currentRound: GetCurrentRoundResponseDtoRound | undefined;
error: GetCurrentRoundResponseDtoError | undefined;
userEntry: ContentBattleContentDto | undefined;
submitEntry: (image: File) => Promise<{
success: boolean;
message: string;
} | {
success: boolean;
message?: undefined;
}>;
submitVote: (contentId: number) => Promise<{
success: boolean;
message: string;
} | {
success: boolean;
message?: undefined;
}>;
refetchRound: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<GetCurrentRoundResponseDto, unknown>>;
refetchEntry: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<ContentBattleContentDto, unknown>>;
};
/**
* Custom hook to fetch and manage leaderboard data for a specific campaign.
*
* @returns {Object} An object containing the leaderboard and total points.
* @returns {Array} return.leaderboard - The list of leaderboard entries.
* @returns {number} return.totalPoints - The total points accumulated in the campaign.
*/
declare function useLeaderboard(): {
leaderboard: LeadEntryPublicDto[];
totalPoints: number;
};
declare function useNotifications(): {
isSupported: boolean;
isSubscribed: boolean;
isLoading: boolean;
subscribe: () => Promise<boolean>;
unsubscribe: () => Promise<boolean>;
};
declare const customInstance: <T>(config: AxiosRequestConfig, options?: AxiosRequestConfig) => Promise<T>;
type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
/**
* @summary Get public details for a campaign
*/
declare const campaignsPublicControllerPublicDetails: (slug: string, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<PublicCampaignsDto>;
declare const getCampaignsPublicControllerPublicDetailsQueryKey: (slug: string) => readonly [`/public/campaigns/${string}`];
declare const getCampaignsPublicControllerPublicDetailsQueryOptions: <TData = PublicCampaignsDto, TError = unknown>(slug: string, options?: {
query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>, TError, TData>>;
request?: SecondParameter<typeof customInstance>;
}) => UseQueryOptions<Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>, TError, TData> & {
queryKey: DataTag<QueryKey, TData>;
};
type CampaignsPublicControllerPublicDetailsQueryResult = NonNullable<Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>>;
type CampaignsPublicControllerPublicDetailsQueryError = unknown;
declare function useCampaignsPublicControllerPublicDetails<TData = Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>, TError = unknown>(slug: string, options: {
query: Partial<UseQueryOptions<Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof campaignsPublicControllerPublicDetails>>, TError, TData>, 'initialData'>;
request?: SecondParameter<typeof customInstance>;
}): DefinedUseQueryResult<TData, TError> & {
queryKey: DataTag<QueryKey, TData>;
};
declare function useCampaignsPublicControllerPublicDetails<TData = Awaited<ReturnType<ty