From 147899aa30fe28e4f5cca89c02e8016bcfb28819 Mon Sep 17 00:00:00 2001 From: hthieu1110 Date: Wed, 4 Dec 2024 21:32:08 +0700 Subject: [PATCH] fix: fix types for ts client for social-feed --- .../TeritoriSocialFeed.client.ts | 93 +++++++------- .../TeritoriSocialFeed.react-query.ts | 119 +++++++++--------- .../TeritoriSocialFeed.types.ts | 69 +++++----- 3 files changed, 152 insertions(+), 129 deletions(-) diff --git a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.client.ts b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.client.ts index c0e2e26218..c9bb2109f6 100644 --- a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.client.ts +++ b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.client.ts @@ -1,5 +1,3 @@ -//@ts-nocheck - /** * This file was automatically generated by @cosmwasm/ts-codegen@0.25.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, @@ -23,6 +21,15 @@ import { Reaction, Post, QueryMsg, + ConfigResponse, + QueryAvailableFreePostsResponse, + QueryFeeByCategoryResponse, + QueryLockedTokensResponse, + QueryMainPostsCountResponse, + QueryMainPostsResponse, + QueryPostResponse, + QuerySubPostResponse, + QuerySubPostsResponse, } from "./TeritoriSocialFeed.types"; export interface TeritoriSocialFeedReadOnlyInterface { contractAddress: string; @@ -234,7 +241,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; updateFeeByCategory: ( { @@ -244,9 +251,9 @@ export interface TeritoriSocialFeedInterface category: number; fee: Uint128; }, - fee?: number | StdFee | "auto", + fee2?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; addFreePosts: ( { @@ -258,7 +265,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; createPost: ( { @@ -274,7 +281,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; updatePost: ( { @@ -288,7 +295,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; reactPost: ( { @@ -302,7 +309,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; tipPost: ( { @@ -312,7 +319,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; deletePost: ( { @@ -322,12 +329,12 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; lockTokens: ( fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; unlockTokens: ( { @@ -337,12 +344,12 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; withdrawFund: ( fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; addAIBot: ( { @@ -356,7 +363,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; createPostByBot: ( { @@ -372,7 +379,7 @@ export interface TeritoriSocialFeedInterface }, fee?: number | StdFee | "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ) => Promise; } export class TeritoriSocialFeedClient @@ -386,7 +393,7 @@ export class TeritoriSocialFeedClient constructor( client: SigningCosmWasmClient, sender: string, - contractAddress: string + contractAddress: string, ) { super(client, contractAddress); this.client = client; @@ -415,7 +422,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -427,7 +434,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; updateFeeByCategory = async ( @@ -440,7 +447,7 @@ export class TeritoriSocialFeedClient }, _fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -453,7 +460,7 @@ export class TeritoriSocialFeedClient }, _fee, memo, - funds + funds, ); }; addFreePosts = async ( @@ -466,7 +473,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -479,7 +486,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; createPost = async ( @@ -496,7 +503,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -511,7 +518,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; updatePost = async ( @@ -526,7 +533,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -540,7 +547,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; reactPost = async ( @@ -555,7 +562,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -569,7 +576,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; tipPost = async ( @@ -580,7 +587,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -592,7 +599,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; deletePost = async ( @@ -603,7 +610,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -615,13 +622,13 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; lockTokens = async ( fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -631,7 +638,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; unlockTokens = async ( @@ -642,7 +649,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -654,13 +661,13 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; withdrawFund = async ( fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -670,7 +677,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; addAIBot = async ( @@ -685,7 +692,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -699,7 +706,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; createPostByBot = async ( @@ -716,7 +723,7 @@ export class TeritoriSocialFeedClient }, fee: number | StdFee | "auto" = "auto", memo?: string, - funds?: Coin[] + funds?: Coin[], ): Promise => { return await this.client.execute( this.sender, @@ -731,7 +738,7 @@ export class TeritoriSocialFeedClient }, fee, memo, - funds + funds, ); }; } diff --git a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.react-query.ts b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.react-query.ts index bea0a403c6..e5714721c1 100644 --- a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.react-query.ts +++ b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.react-query.ts @@ -1,5 +1,3 @@ -//@ts-nocheck - /** * This file was automatically generated by @cosmwasm/ts-codegen@0.25.0. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, @@ -25,6 +23,15 @@ import { Reaction, Post, QueryMsg, + QueryMainPostsCountResponse, + QueryMainPostsResponse, + QuerySubPostsResponse, + QuerySubPostResponse, + QueryPostResponse, + QueryAvailableFreePostsResponse, + ConfigResponse, + QueryFeeByCategoryResponse, + QueryLockedTokensResponse, } from "./TeritoriSocialFeed.types"; import { TeritoriSocialFeedQueryClient, @@ -42,7 +49,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, config: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -53,7 +60,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryFeeByCategory: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -64,7 +71,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryLockedTokens: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -75,7 +82,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryAvailableFreePosts: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -86,7 +93,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryPost: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -97,7 +104,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, querySubPost: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -108,7 +115,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, querySubPosts: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -119,7 +126,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryMainPosts: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -130,7 +137,7 @@ export const teritoriSocialFeedQueryKeys = { ] as const, queryMainPostsCount: ( contractAddress: string | undefined, - args?: Record + args?: Record, ) => [ { @@ -152,7 +159,7 @@ export interface TeritoriSocialFeedReactQuery { export interface TeritoriSocialFeedQueryMainPostsCountQuery extends TeritoriSocialFeedReactQuery {} export function useTeritoriSocialFeedQueryMainPostsCountQuery< - TData = QueryMainPostsCountResponse + TData = QueryMainPostsCountResponse, >({ client, options }: TeritoriSocialFeedQueryMainPostsCountQuery) { return useQuery( teritoriSocialFeedQueryKeys.queryMainPostsCount(client?.contractAddress), @@ -164,7 +171,7 @@ export function useTeritoriSocialFeedQueryMainPostsCountQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQueryMainPostsQuery @@ -177,7 +184,7 @@ export interface TeritoriSocialFeedQueryMainPostsQuery }; } export function useTeritoriSocialFeedQueryMainPostsQuery< - TData = QueryMainPostsResponse + TData = QueryMainPostsResponse, >({ client, args, options }: TeritoriSocialFeedQueryMainPostsQuery) { return useQuery( teritoriSocialFeedQueryKeys.queryMainPosts(client?.contractAddress, args), @@ -194,7 +201,7 @@ export function useTeritoriSocialFeedQueryMainPostsQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQuerySubPostsQuery @@ -208,7 +215,7 @@ export interface TeritoriSocialFeedQuerySubPostsQuery }; } export function useTeritoriSocialFeedQuerySubPostsQuery< - TData = QuerySubPostsResponse + TData = QuerySubPostsResponse, >({ client, args, options }: TeritoriSocialFeedQuerySubPostsQuery) { return useQuery( teritoriSocialFeedQueryKeys.querySubPosts(client?.contractAddress, args), @@ -226,7 +233,7 @@ export function useTeritoriSocialFeedQuerySubPostsQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQuerySubPostQuery @@ -238,7 +245,7 @@ export interface TeritoriSocialFeedQuerySubPostQuery }; } export function useTeritoriSocialFeedQuerySubPostQuery< - TData = QuerySubPostResponse + TData = QuerySubPostResponse, >({ client, args, options }: TeritoriSocialFeedQuerySubPostQuery) { return useQuery( teritoriSocialFeedQueryKeys.querySubPost(client?.contractAddress, args), @@ -254,7 +261,7 @@ export function useTeritoriSocialFeedQuerySubPostQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQueryPostQuery @@ -282,7 +289,7 @@ export function useTeritoriSocialFeedQueryPostQuery({ ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQueryAvailableFreePostsQuery @@ -292,7 +299,7 @@ export interface TeritoriSocialFeedQueryAvailableFreePostsQuery }; } export function useTeritoriSocialFeedQueryAvailableFreePostsQuery< - TData = QueryAvailableFreePostsResponse + TData = QueryAvailableFreePostsResponse, >({ client, args, @@ -301,7 +308,7 @@ export function useTeritoriSocialFeedQueryAvailableFreePostsQuery< return useQuery( teritoriSocialFeedQueryKeys.queryAvailableFreePosts( client?.contractAddress, - args + args, ), () => client @@ -313,7 +320,7 @@ export function useTeritoriSocialFeedQueryAvailableFreePostsQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQueryLockedTokensQuery @@ -323,12 +330,12 @@ export interface TeritoriSocialFeedQueryLockedTokensQuery }; } export function useTeritoriSocialFeedQueryLockedTokensQuery< - TData = QueryLockedTokensResponse + TData = QueryLockedTokensResponse, >({ client, args, options }: TeritoriSocialFeedQueryLockedTokensQuery) { return useQuery( teritoriSocialFeedQueryKeys.queryLockedTokens( client?.contractAddress, - args + args, ), () => client @@ -340,7 +347,7 @@ export function useTeritoriSocialFeedQueryLockedTokensQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedQueryFeeByCategoryQuery @@ -350,12 +357,12 @@ export interface TeritoriSocialFeedQueryFeeByCategoryQuery }; } export function useTeritoriSocialFeedQueryFeeByCategoryQuery< - TData = QueryFeeByCategoryResponse + TData = QueryFeeByCategoryResponse, >({ client, args, options }: TeritoriSocialFeedQueryFeeByCategoryQuery) { return useQuery( teritoriSocialFeedQueryKeys.queryFeeByCategory( client?.contractAddress, - args + args, ), () => client @@ -367,7 +374,7 @@ export function useTeritoriSocialFeedQueryFeeByCategoryQuery< ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedConfigQuery @@ -384,7 +391,7 @@ export function useTeritoriSocialFeedConfigQuery({ ...options, enabled: !!client && (options?.enabled != undefined ? options.enabled : true), - } + }, ); } export interface TeritoriSocialFeedCreatePostByBotMutation { @@ -409,7 +416,7 @@ export function useTeritoriSocialFeedCreatePostByBotMutation( TeritoriSocialFeedCreatePostByBotMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -418,7 +425,7 @@ export function useTeritoriSocialFeedCreatePostByBotMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.createPostByBot(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedAddAIBotMutation { @@ -442,12 +449,12 @@ export function useTeritoriSocialFeedAddAIBotMutation( TeritoriSocialFeedAddAIBotMutation >, "mutationFn" - > + >, ) { return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => client.addAIBot(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedWithdrawFundMutation { @@ -466,7 +473,7 @@ export function useTeritoriSocialFeedWithdrawFundMutation( TeritoriSocialFeedWithdrawFundMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -475,7 +482,7 @@ export function useTeritoriSocialFeedWithdrawFundMutation( >( ({ client, args: { fee, memo, funds } = {} }) => client.withdrawFund(fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedUnlockTokensMutation { @@ -497,7 +504,7 @@ export function useTeritoriSocialFeedUnlockTokensMutation( TeritoriSocialFeedUnlockTokensMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -506,7 +513,7 @@ export function useTeritoriSocialFeedUnlockTokensMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.unlockTokens(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedLockTokensMutation { @@ -525,7 +532,7 @@ export function useTeritoriSocialFeedLockTokensMutation( TeritoriSocialFeedLockTokensMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -534,7 +541,7 @@ export function useTeritoriSocialFeedLockTokensMutation( >( ({ client, args: { fee, memo, funds } = {} }) => client.lockTokens(fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedDeletePostMutation { @@ -556,7 +563,7 @@ export function useTeritoriSocialFeedDeletePostMutation( TeritoriSocialFeedDeletePostMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -565,7 +572,7 @@ export function useTeritoriSocialFeedDeletePostMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.deletePost(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedTipPostMutation { @@ -583,12 +590,12 @@ export function useTeritoriSocialFeedTipPostMutation( options?: Omit< UseMutationOptions, "mutationFn" - > + >, ) { return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => client.tipPost(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedReactPostMutation { @@ -612,12 +619,12 @@ export function useTeritoriSocialFeedReactPostMutation( TeritoriSocialFeedReactPostMutation >, "mutationFn" - > + >, ) { return useMutation( ({ client, msg, args: { fee, memo, funds } = {} }) => client.reactPost(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedUpdatePostMutation { @@ -641,7 +648,7 @@ export function useTeritoriSocialFeedUpdatePostMutation( TeritoriSocialFeedUpdatePostMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -650,7 +657,7 @@ export function useTeritoriSocialFeedUpdatePostMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.updatePost(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedCreatePostMutation { @@ -675,7 +682,7 @@ export function useTeritoriSocialFeedCreatePostMutation( TeritoriSocialFeedCreatePostMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -684,7 +691,7 @@ export function useTeritoriSocialFeedCreatePostMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.createPost(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedAddFreePostsMutation { @@ -707,7 +714,7 @@ export function useTeritoriSocialFeedAddFreePostsMutation( TeritoriSocialFeedAddFreePostsMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -716,7 +723,7 @@ export function useTeritoriSocialFeedAddFreePostsMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.addFreePosts(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedUpdateFeeByCategoryMutation { @@ -739,7 +746,7 @@ export function useTeritoriSocialFeedUpdateFeeByCategoryMutation( TeritoriSocialFeedUpdateFeeByCategoryMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -748,7 +755,7 @@ export function useTeritoriSocialFeedUpdateFeeByCategoryMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateFeeByCategory(msg, fee, memo, funds), - options + options, ); } export interface TeritoriSocialFeedUpdateConfigMutation { @@ -770,7 +777,7 @@ export function useTeritoriSocialFeedUpdateConfigMutation( TeritoriSocialFeedUpdateConfigMutation >, "mutationFn" - > + >, ) { return useMutation< ExecuteResult, @@ -779,6 +786,6 @@ export function useTeritoriSocialFeedUpdateConfigMutation( >( ({ client, msg, args: { fee, memo, funds } = {} }) => client.updateConfig(msg, fee, memo, funds), - options + options, ); } diff --git a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types.ts b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types.ts index 394bb2f6d8..965b64f33a 100644 --- a/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types.ts +++ b/packages/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types.ts @@ -1,11 +1,13 @@ -//@ts-nocheck - /** - * This file was automatically generated by @cosmwasm/ts-codegen@0.25.0. + * This file was automatically generated by @cosmwasm/ts-codegen@1.11.1. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run the @cosmwasm/ts-codegen generate command to regenerate this file. */ +export interface ConfigResponse { + owner: string; + [k: string]: unknown; +} export type Addr = string; export interface Config { owner: Addr; @@ -57,12 +59,6 @@ export type ExecuteMsg = [k: string]: unknown; }; } - | { - tip_post: { - identifier: string; - [k: string]: unknown; - }; - } | { delete_post: { identifier: string; @@ -84,23 +80,6 @@ export type ExecuteMsg = withdraw_fund: { [k: string]: unknown; }; - } - | { - add_a_i_bot: { - addr: Addr; - name: string; - post_limit: number; - [k: string]: unknown; - }; - } - | { - create_post_by_bot: { - category: number; - identifier: string; - metadata: string; - parent_post_identifier?: string | null; - [k: string]: unknown; - }; }; export type Uint128 = string; export interface InstantiateMsg { @@ -113,9 +92,7 @@ export type PostCategory = | "Article" | "Picture" | "Audio" - | "Video" - | "Question" - | "BriefForStableDiffusion"; + | "Video"; export interface PostResult { category: number; deleted: boolean; @@ -125,13 +102,14 @@ export interface PostResult { post_by: Addr; reactions: Reaction[]; sub_post_length: number; - tip_amount: Uint128; user_reactions: string[]; + tip_amount: Uint128; [k: string]: unknown; } export interface Reaction { count: number; icon: string; + ownState: boolean; [k: string]: unknown; } export interface Post { @@ -147,6 +125,11 @@ export interface Post { tip_amount: Uint128; [k: string]: unknown; } +export type QueryAvailableFreePostsResponse = string; +export type QueryFeeByCategoryResponse = string; +export type QueryLockedTokensResponse = string; +export type QueryMainPostsCountResponse = number; +export type QueryMainPostsResponse = PostResult[]; export type QueryMsg = | { config: { @@ -210,3 +193,29 @@ export type QueryMsg = [k: string]: unknown; }; }; +export interface QueryPostResponse { + category: number; + deleted: boolean; + identifier: string; + metadata: string; + parent_post_identifier?: string | null; + post_by: Addr; + reactions: Reaction[]; + sub_post_length: number; + user_reactions: string[]; + tip_amount: Uint128; + [k: string]: unknown; +} +export interface QuerySubPostResponse { + category: number; + deleted: boolean; + identifier: string; + metadata: string; + parent_post_identifier?: string | null; + post_by: Addr; + reactions: Reaction[]; + sub_post_length: number; + user_reactions: string[]; + [k: string]: unknown; +} +export type QuerySubPostsResponse = PostResult[];