import { GetFollowAPIResponse } from "getstream"; import { MintProfileDbEntry, UserReferralStatsDbEntry, UserSocialNetworkDbEntry, NftCollectionDbEntry, WatchlistDbEntry } from "../../database/types"; import { WatchlistEntityEnum } from "../../enums"; import { RedirectDomains, TelegramResponse } from "../../integrations"; import { CreateSocialProfileParamsBase, SocialNetworks } from "../../sui/contracts"; export declare enum Errors { UNKNOWN = "UNKNOWN", ALREADY_EXISTS = "ALREADY_EXISTS", WALLET_REQUIRED = "WALLET_REQUIRED", TRANSACTION_ERROR = "TRANSACTION_ERROR", SOCIAL_ACCOUNT_ALREADY_USED = "SOCIAL_ACCOUNT_ALREADY_USED", INVALID_TELEGRAM_SIGNATURE = "INVALID_TELEGRAM_SIGNATURE", SERVICE_ERROR = "SERVICE_ERROR", ALREADY_MINTED = "ALREADY_MINTED", NICKNAME_RESERVED = "NICKNAME_RESERVED", NICKNAME_INVALID = "NICKNAME_INVALID", PERMISSIONS_ERROR = "PERMISSIONS_ERROR", WRONG_GAME_ID = "WRONG_GAME_ID", WRONG_WALLET = "WRONG_WALLET_PROVIDED", WRONG_ACTION_TYPE = "WRONG_ACTION_TYPE", WRONG_PERIOD = "WRONG_SPECIFIED_PERIOD", GAME_DOESNT_EXISTS = "GAME_DOESNT_EXISTS", NAME_FOR_GAME_DOESNT_EXISTS = "NAME_FOR_GAME_DOESNT_EXISTS", WRONG_ENTITY_ID = "WRONG_ENTITY_ID", WRONG_ENTITY_TYPE = "WRONG_ENTITY_TYPE" } export declare type MintProfileRequest = CreateSocialProfileParamsBase & { socialNetworks: { twitterToken?: string; discordToken?: string; telegram?: TelegramResponse; }; referrer?: string; deleteNetworks?: SocialNetworks[]; }; export declare type EmptyResponse = { ok: boolean; error?: Errors; errorDetails?: string; }; export declare type SaveScoreRequest = { result: string; name: string; }; export declare type CollectStatsRequest = { actionType: string; gameId: string; wallet: string; }; export declare type GetStatsRequestParams = { gameId: string; actionType: "play"; period: number; }; export declare type GetStatsResponse = { stats: { byPeriod: { date: string; count: number; }[]; by24Hours: number; by7Days: number; by30Days: number; }; } | EmptyResponse; export declare type ValidateGameExistanceInput = { gameId: string; }; export declare type GetAppStatusResponse = { status: { overloaded?: boolean; }; }; export declare type WatchlistEditRequestParams = { entityType: WatchlistEntityEnum; entityId: string; userId: string; }; export declare type WatchlistGetAllByUserRequestParams = { userId: string; }; export declare type WatchlistGetAllByUserResponse = { entityType: WatchlistEntityEnum; documentsList: WatchlistDbEntry[]; count: number; }[] | EmptyResponse; export declare type WatchlistCountByEntityRequestParams = { entityType: WatchlistEntityEnum; entityIdList: string[]; }; export declare type WatchlistAggregatedObj = { [key: string]: number; }; export declare type WatchlistCountByEntityResponse = WatchlistAggregatedObj | EmptyResponse; export declare type IssueUrlRequest = { redirectDomain: keyof typeof RedirectDomains; }; export declare type IssueTokenRequest = IssueUrlRequest & { code: string; }; export declare type AuthoriseDiscordRequest = { discordId: string; }; export declare type IssueJwtStep1Request = { wallet: string; }; export declare type IssueJwtStep1Response = { amount: number; signature: string; }; export declare type IssueJwtStep2Request = { transactionDigest: string; signature: string; wallet: string; }; export declare type IssueJwtStep2Response = { jwt: string; }; export declare type IssueTokenResponse = { accessToken: string; expiresAt: number; handle: string; existingUserWallet?: string; }; export declare type TelegramCheckByHandleResponse = { existingUserWallet?: string; }; export declare type SocialNetworkResponse = { handle: string; id: string; network: SocialNetworks; }; export declare type GetProfileResponse = { profile?: Omit; socialNetworks?: SocialNetworkResponse[]; }; export declare type PagedRequest = { limit?: string; offset?: string; }; export declare type ContractIdRequestParam = { contractId: string; }; export declare type GetStreamTimelineRequest = { walletAddress: string; limit: number; offset: number; }; export declare type ReferrerStatsResponse = { stats?: UserReferralStatsDbEntry; }; export declare type GetstreamStatsApiResponse = { followers: GetFollowAPIResponse; following: GetFollowAPIResponse; }; export declare type SearchProfilesResponse = { profiles: { profile: MintProfileDbEntry; followers: number; following: number; }[]; }; export declare type ValidateProfileResponse = { error: Errors; field: "profile" | keyof MintProfileRequest; } | { newSocialNetworks: UserSocialNetworkDbEntry[]; normalizedName: string; }; export declare type ValidateProfileParams = { checkAlreadyMinted?: boolean; }; export declare type MintValidationResponse = { ok: boolean; error?: Errors; field?: "profile" | keyof MintProfileRequest; }; export declare type NftCollection = Omit; export declare type PagedResposne = { items: T[]; total: number; }; export declare type TypesenseRequest = { collection: string; page: number; per_page: number; query_by: string; q?: string; filter_by?: string; facet_by?: string; sort_by?: string; }; export declare type TypesenseResult = { results: { hits: { document: T; }[]; facet_counts: { counts: { count: number; highlighted: string; value: string; }[]; }[]; }[]; };