diff --git a/apps/gnotribe/App.tsx b/apps/gnotribe/App.tsx index 880c7f2451..a73b4fd58b 100644 --- a/apps/gnotribe/App.tsx +++ b/apps/gnotribe/App.tsx @@ -5,9 +5,9 @@ import AppRoot from "@/dapp-root/App"; const config: AppConfig = { disableBuyTokensButton: true, disableDAppStore: true, - forceNetworkList: ["gno-test5", "gno-zenao"], + forceNetworkList: ["gno-zenao", "gno-zenao-staging"], forceDAppsList: ["feed", "organizations"], - defaultNetworkId: "gno-test5", + defaultNetworkId: "gno-zenao", homeScreen: "Feed", browserTabsPrefix: "Gnotribe - ", logo, diff --git a/networks.json b/networks.json index 6a809fcdce..989c9210c9 100644 --- a/networks.json +++ b/networks.json @@ -4516,6 +4516,7 @@ "backendEndpoint": "http://localhost:9090", "vaultContractAddress": "", "daoRegistryPkgPath": "gno.land/r/teritori/dao_registry", + "globalFeedId": "1", "socialFeedsPkgPath": "gno.land/r/teritori/social_feeds", "socialFeedsDAOPkgPath": "gno.land/r/teritori/social_feeds_dao", "nameServiceContractAddress": "gno.land/r/demo/users", @@ -4571,6 +4572,7 @@ "nameServiceContractAddress": "gno.land/r/demo/users", "nameServiceDefaultImage": "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", "daoRegistryPkgPath": "gno.land/r/teritori/dao_registry", + "globalFeedId": "1", "socialFeedsPkgPath": "gno.land/r/teritori/social_feeds", "socialFeedsDAOPkgPath": "gno.land/r/teritori/social_feeds_dao", "groupsPkgPath": "gno.land/r/teritori/groups", @@ -4585,57 +4587,15 @@ "txIndexerURL": "https://indexer.portal-loop.gno.testnet.teritori.com" }, { - "id": "gno-test3", - "kind": "Gno", - "displayName": "Gno Test3", - "icon": "gno.svg", - "features": [], - "currencies": [ - { - "denom": "ugnot", - "displayName": "GNOT", - "decimals": 6, - "variant": "gno", - "coingeckoId": "gno", - "icon": "gno.svg", - "kind": "native", - "color": "#232800" - } - ], - "stakeCurrency": "ugnot", - "idPrefix": "gnotest3", - "chainId": "test3", - "endpoint": "https://rpc.test3.gno.land", - "txExplorer": "https://gnoscan.io/transactions/details?txhash=$hash", - "accountExplorer": "https://gnoscan.io/accounts/$address", - "contractExplorer": "https://gnoscan.io/realms/details?path=$address", - "testnet": true, - "backendEndpoint": "https://dapp-backend.mainnet.teritori.com", - "vaultContractAddress": "", - "nameServiceContractAddress": "gno.land/r/demo/users", - "nameServiceDefaultImage": "ipfs://bafkreignptjimiu7wuux6mk6uh4hb4odb6ff62ny4bvdokrhes7g67huse", - "gnowebURL": "https://test3.gno.land", - "txIndexerURL": "https://indexer.test3.gno.testnet.teritori.com" - }, - { - "id": "gno-test5", + "id": "gno-zenao", "kind": "Gno", - "displayName": "Gno Test5", - "icon": "gno.svg", + "displayName": "Gno Zenao", + "icon": "zenao.svg", "features": [ "Organizations", - "SocialFeed", "UPP", - "GnoProjectManager", "NameService" ], - "featureObjects": [ - { - "type": "GnoProjectManager", - "projectsManagerPkgPath": "gno.land/r/teritori/projects_manager", - "paymentsDenom": "ugnot" - } - ], "currencies": [ { "denom": "ugnot", @@ -4649,28 +4609,30 @@ } ], "stakeCurrency": "ugnot", - "idPrefix": "gnotest5", - "chainId": "test5", - "endpoint": "https://rpc.test5.gno.land", - "txExplorer": "https://gnoscan.io/transactions/details?txhash=$hash&chainId=test5", - "accountExplorer": "https://gnoscan.io/accounts/$address?chainId=test5", - "contractExplorer": "https://gnoscan.io/realms/details?path=$address&chainId=test5", + "idPrefix": "zenao", + "chainId": "zenao-dev", + "endpoint": "https://gnorpc.prod.zenao.io/", "testnet": true, "backendEndpoint": "https://dapp-backend.testnet.teritori.com", - "gnowebURL": "https://test5.gno.land", + "gnowebURL": "https://gnoweb.prod.zenao.io/", "vaultContractAddress": "", "nameServiceContractAddress": "gno.land/r/demo/users", "nameServiceDefaultImage": "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", - "socialFeedsPkgPath": "gno.land/r/teritori/social_feeds", + "globalFeedId": "g1tas4cej0myrnyu237zgcu8wvvpqetch3k2fjf7:main", + "socialFeedsPkgPath": "gno.land/r/zenao/social_feed", "socialFeedsDAOPkgPath": "gno.land/r/teritori/social_feeds_dao", "daoInterfacesPkgPath": "gno.land/p/teritori/dao_interfaces", "profilePkgPath": "gno.land/r/demo/profile", - "txIndexerURL": "https://indexer.test5.gno.testnet.teritori.com" + "txIndexerURL": "https://indexer.zenao.gno.testnet.teritori.com", + "cockpitNamespace": "zenao", + "txExplorer": "https://gnoscan.io/transactions/details?txhash=$hash&type=custom&chainId=zenao-dev&rpcUrl=https://gnorpc.prod.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", + "accountExplorer": "https://gnoscan.io/accounts/$address?type=custom&chainId=zenao-dev&rpcUrl=https://gnorpc.prod.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", + "contractExplorer": "https://gnoscan.io/realms/details?path=$address&type=custom&chainId=zenao-dev&rpcUrl=https://gnorpc.prod.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com" }, { - "id": "gno-zenao", + "id": "gno-zenao-staging", "kind": "Gno", - "displayName": "Gno Zenao", + "displayName": "Gno Zenao Staging", "icon": "zenao.svg", "features": [ "Organizations", @@ -4690,24 +4652,25 @@ } ], "stakeCurrency": "ugnot", - "idPrefix": "zenao", - "chainId": "zenao-dev", - "endpoint": "https://zenao-gno.fly.dev:26657", + "idPrefix": "zenaostaging", + "chainId": "zenao-dev-staging", + "endpoint": "https://gnorpc.staging.zenao.io/", "testnet": true, "backendEndpoint": "https://dapp-backend.testnet.teritori.com", - "gnowebURL": "https://zenao-gno.fly.dev", + "gnowebURL": "https://gnoweb.staging.zenao.io/", "vaultContractAddress": "", "nameServiceContractAddress": "gno.land/r/demo/users", "nameServiceDefaultImage": "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", - "socialFeedsPkgPath": "gno.land/r/teritori/social_feeds", + "globalFeedId": "g1kzqq22apmtgzd49zlxwyma0x7cu3llr968mdzn:main", + "socialFeedsPkgPath": "gno.land/r/zenao/social_feed", "socialFeedsDAOPkgPath": "gno.land/r/teritori/social_feeds_dao", "daoInterfacesPkgPath": "gno.land/p/teritori/dao_interfaces", "profilePkgPath": "gno.land/r/demo/profile", "txIndexerURL": "https://indexer.zenao.gno.testnet.teritori.com", "cockpitNamespace": "zenao", - "txExplorer": "https://gnoscan.io/transactions/details?txhash=$hash&type=custom&chainId=zenao-dev&rpcUrl=https://zenao-gno.fly.dev:26657&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", - "accountExplorer": "https://gnoscan.io/accounts/$address?type=custom&chainId=zenao-dev&rpcUrl=https://zenao-gno.fly.dev:26657&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", - "contractExplorer": "https://gnoscan.io/realms/details?path=$address&type=custom&chainId=zenao-dev&rpcUrl=https://zenao-gno.fly.dev:26657&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com" + "txExplorer": "https://gnoscan.io/transactions/details?txhash=$hash&type=custom&chainId=zenao-dev-staging&rpcUrl=https://gnorpc.staging.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", + "accountExplorer": "https://gnoscan.io/accounts/$address?type=custom&chainId=zenao-dev-staging&rpcUrl=https://gnorpc.staging.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com", + "contractExplorer": "https://gnoscan.io/realms/details?path=$address&type=custom&chainId=zenao-dev-staging&rpcUrl=https://gnorpc.staging.zenao.io/&indexerUrl=https://indexer.zenao.gno.testnet.teritori.com" }, { "id": "cosmos-registry:gravitybridge", diff --git a/package.json b/package.json index 7835e927c2..5f58ea212e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "engineStrict": true, "dependencies": { "@axelar-network/axelarjs-sdk": "^0.13.6", + "@bufbuild/protobuf": "^2.6.0", "@chain-registry/types": "^0.17.1", "@chain-registry/utils": "1.18.0", "@cosmjs/amino": "0.32.2", diff --git a/packages/api/feeds/v1/feeds_pb.ts b/packages/api/feeds/v1/feeds_pb.ts new file mode 100644 index 0000000000..e3564063e1 --- /dev/null +++ b/packages/api/feeds/v1/feeds_pb.ts @@ -0,0 +1,699 @@ +// @generated by protoc-gen-es v2.5.2 with parameter "target=ts,json_types=true" +// @generated from file feeds/v1/feeds.proto (package feeds.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "../../libs/protobuf-codegenv2.ts"; +import { fileDesc, messageDesc } from "../../libs/protobuf-codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file feeds/v1/feeds.proto. + */ +export const file_feeds_v1_feeds: GenFile = /*@__PURE__*/ + fileDesc("ChRmZWVkcy92MS9mZWVkcy5wcm90bxIIZmVlZHMudjEiJgoKUG9zdEdlb0xvYxILCgNsYXQYAiABKAISCwoDbG5nGAMgASgCIh8KDFN0YW5kYXJkUG9zdBIPCgdjb250ZW50GAEgASgJIl4KC0FydGljbGVQb3N0Eg0KBXRpdGxlGAEgASgJEhQKDHByZXZpZXdfdGV4dBgCIAEoCRIZChFwcmV2aWV3X2ltYWdlX3VyaRgDIAEoCRIPCgdjb250ZW50GAQgASgJIhcKCExpbmtQb3N0EgsKA3VyaRgBIAEoCSJCCglJbWFnZVBvc3QSDQoFdGl0bGUYASABKAkSEwoLZGVzY3JpcHRpb24YAiABKAkSEQoJaW1hZ2VfdXJpGAMgASgJIlUKCUF1ZGlvUG9zdBINCgV0aXRsZRgBIAEoCRITCgtkZXNjcmlwdGlvbhgCIAEoCRIRCglhdWRpb191cmkYAyABKAkSEQoJaW1hZ2VfdXJpGAQgASgJIl8KCVZpZGVvUG9zdBINCgV0aXRsZRgBIAEoCRITCgtkZXNjcmlwdGlvbhgCIAEoCRIRCgl2aWRlb191cmkYAyABKAkSGwoTdGh1bWJuYWlsX2ltYWdlX3VyaRgEIAEoCSI7CghSZWFjdGlvbhIQCghwb3N0X3VyaRgBIAEoCRIMCgRpY29uGAIgASgJEg8KB3VzZXJfaWQYAyABKAkiOwoDVGlwEhUKDXBvc3RfbG9jYWxfaWQYASABKAkSDQoFZGVub20YAyABKAkSDgoGYW1vdW50GAQgASgDIqIDCgRQb3N0EhUKDWxvY2FsX3Bvc3RfaWQYASABKAQSDgoGYXV0aG9yGAIgASgJEhIKCnBhcmVudF91cmkYAyABKAkSIQoDbG9jGAQgASgLMhQuZmVlZHMudjEuUG9zdEdlb0xvYxISCgpjcmVhdGVkX2F0GAUgASgDEhIKCnVwZGF0ZWRfYXQYBiABKAMSEgoKZGVsZXRlZF9hdBgHIAEoAxIMCgR0YWdzGAggAygJEioKCHN0YW5kYXJkGAkgASgLMhYuZmVlZHMudjEuU3RhbmRhcmRQb3N0SAASKAoHYXJ0aWNsZRgKIAEoCzIVLmZlZWRzLnYxLkFydGljbGVQb3N0SAASIgoEbGluaxgLIAEoCzISLmZlZWRzLnYxLkxpbmtQb3N0SAASJAoFaW1hZ2UYDCABKAsyEy5mZWVkcy52MS5JbWFnZVBvc3RIABIkCgV2aWRlbxgNIAEoCzITLmZlZWRzLnYxLlZpZGVvUG9zdEgAEiQKBWF1ZGlvGA4gASgLMhMuZmVlZHMudjEuQXVkaW9Qb3N0SABCBgoEcG9zdCJrCghQb3N0VmlldxIcCgRwb3N0GAEgASgLMg4uZmVlZHMudjEuUG9zdBIWCg5jaGlsZHJlbl9jb3VudBgCIAEoBBIpCglyZWFjdGlvbnMYAyADKAsyFi5mZWVkcy52MS5SZWFjdGlvblZpZXciQwoMUmVhY3Rpb25WaWV3EgwKBGljb24YASABKAkSDQoFY291bnQYAiABKA0SFgoOdXNlcl9oYXNfdm90ZWQYAyABKAhCOVo3Z2l0aHViLmNvbS9zYW1vdXJhaXdvcmxkL3plbmFvL2JhY2tlbmQvZmVlZHMvdjE7ZmVlZHN2MWIGcHJvdG8z"); + +/** + * @generated from message feeds.v1.PostGeoLoc + */ +export type PostGeoLoc = Message<"feeds.v1.PostGeoLoc"> & { + /** + * @generated from field: float lat = 2; + */ + lat: number; + + /** + * @generated from field: float lng = 3; + */ + lng: number; +}; + +/** + * @generated from message feeds.v1.PostGeoLoc + */ +export type PostGeoLocJson = { + /** + * @generated from field: float lat = 2; + */ + lat?: number | "NaN" | "Infinity" | "-Infinity"; + + /** + * @generated from field: float lng = 3; + */ + lng?: number | "NaN" | "Infinity" | "-Infinity"; +}; + +/** + * Describes the message feeds.v1.PostGeoLoc. + * Use `create(PostGeoLocSchema)` to create a new message. + */ +export const PostGeoLocSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 0); + +/** + * @generated from message feeds.v1.StandardPost + */ +export type StandardPost = Message<"feeds.v1.StandardPost"> & { + /** + * @generated from field: string content = 1; + */ + content: string; +}; + +/** + * @generated from message feeds.v1.StandardPost + */ +export type StandardPostJson = { + /** + * @generated from field: string content = 1; + */ + content?: string; +}; + +/** + * Describes the message feeds.v1.StandardPost. + * Use `create(StandardPostSchema)` to create a new message. + */ +export const StandardPostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 1); + +/** + * @generated from message feeds.v1.ArticlePost + */ +export type ArticlePost = Message<"feeds.v1.ArticlePost"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string preview_text = 2; + */ + previewText: string; + + /** + * @generated from field: string preview_image_uri = 3; + */ + previewImageUri: string; + + /** + * @generated from field: string content = 4; + */ + content: string; +}; + +/** + * @generated from message feeds.v1.ArticlePost + */ +export type ArticlePostJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * @generated from field: string preview_text = 2; + */ + previewText?: string; + + /** + * @generated from field: string preview_image_uri = 3; + */ + previewImageUri?: string; + + /** + * @generated from field: string content = 4; + */ + content?: string; +}; + +/** + * Describes the message feeds.v1.ArticlePost. + * Use `create(ArticlePostSchema)` to create a new message. + */ +export const ArticlePostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 2); + +/** + * @generated from message feeds.v1.LinkPost + */ +export type LinkPost = Message<"feeds.v1.LinkPost"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; +}; + +/** + * @generated from message feeds.v1.LinkPost + */ +export type LinkPostJson = { + /** + * @generated from field: string uri = 1; + */ + uri?: string; +}; + +/** + * Describes the message feeds.v1.LinkPost. + * Use `create(LinkPostSchema)` to create a new message. + */ +export const LinkPostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 3); + +/** + * @generated from message feeds.v1.ImagePost + */ +export type ImagePost = Message<"feeds.v1.ImagePost"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri: string; +}; + +/** + * @generated from message feeds.v1.ImagePost + */ +export type ImagePostJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * @generated from field: string description = 2; + */ + description?: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri?: string; +}; + +/** + * Describes the message feeds.v1.ImagePost. + * Use `create(ImagePostSchema)` to create a new message. + */ +export const ImagePostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 4); + +/** + * @generated from message feeds.v1.AudioPost + */ +export type AudioPost = Message<"feeds.v1.AudioPost"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string audio_uri = 3; + */ + audioUri: string; + + /** + * @generated from field: string image_uri = 4; + */ + imageUri: string; +}; + +/** + * @generated from message feeds.v1.AudioPost + */ +export type AudioPostJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * @generated from field: string description = 2; + */ + description?: string; + + /** + * @generated from field: string audio_uri = 3; + */ + audioUri?: string; + + /** + * @generated from field: string image_uri = 4; + */ + imageUri?: string; +}; + +/** + * Describes the message feeds.v1.AudioPost. + * Use `create(AudioPostSchema)` to create a new message. + */ +export const AudioPostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 5); + +/** + * @generated from message feeds.v1.VideoPost + */ +export type VideoPost = Message<"feeds.v1.VideoPost"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string video_uri = 3; + */ + videoUri: string; + + /** + * @generated from field: string thumbnail_image_uri = 4; + */ + thumbnailImageUri: string; +}; + +/** + * @generated from message feeds.v1.VideoPost + */ +export type VideoPostJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * @generated from field: string description = 2; + */ + description?: string; + + /** + * @generated from field: string video_uri = 3; + */ + videoUri?: string; + + /** + * @generated from field: string thumbnail_image_uri = 4; + */ + thumbnailImageUri?: string; +}; + +/** + * Describes the message feeds.v1.VideoPost. + * Use `create(VideoPostSchema)` to create a new message. + */ +export const VideoPostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 6); + +/** + * XXX: not used yet in contracts + * + * @generated from message feeds.v1.Reaction + */ +export type Reaction = Message<"feeds.v1.Reaction"> & { + /** + * @generated from field: string post_uri = 1; + */ + postUri: string; + + /** + * @generated from field: string icon = 2; + */ + icon: string; + + /** + * @generated from field: string user_id = 3; + */ + userId: string; +}; + +/** + * XXX: not used yet in contracts + * + * @generated from message feeds.v1.Reaction + */ +export type ReactionJson = { + /** + * @generated from field: string post_uri = 1; + */ + postUri?: string; + + /** + * @generated from field: string icon = 2; + */ + icon?: string; + + /** + * @generated from field: string user_id = 3; + */ + userId?: string; +}; + +/** + * Describes the message feeds.v1.Reaction. + * Use `create(ReactionSchema)` to create a new message. + */ +export const ReactionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 7); + +/** + * Only on local chaine from the related post + * + * @generated from message feeds.v1.Tip + */ +export type Tip = Message<"feeds.v1.Tip"> & { + /** + * @generated from field: string post_local_id = 1; + */ + postLocalId: string; + + /** + * @generated from field: string denom = 3; + */ + denom: string; + + /** + * XXX: use string encoding? + * + * @generated from field: int64 amount = 4; + */ + amount: bigint; +}; + +/** + * Only on local chaine from the related post + * + * @generated from message feeds.v1.Tip + */ +export type TipJson = { + /** + * @generated from field: string post_local_id = 1; + */ + postLocalId?: string; + + /** + * @generated from field: string denom = 3; + */ + denom?: string; + + /** + * XXX: use string encoding? + * + * @generated from field: int64 amount = 4; + */ + amount?: string; +}; + +/** + * Describes the message feeds.v1.Tip. + * Use `create(TipSchema)` to create a new message. + */ +export const TipSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 8); + +/** + * @generated from message feeds.v1.Post + */ +export type Post = Message<"feeds.v1.Post"> & { + /** + * @generated from field: uint64 local_post_id = 1; + */ + localPostId: bigint; + + /** + * @generated from field: string author = 2; + */ + author: string; + + /** + * @generated from field: string parent_uri = 3; + */ + parentUri: string; + + /** + * XXX: map any extentions = 10; + * + * @generated from field: feeds.v1.PostGeoLoc loc = 4; + */ + loc?: PostGeoLoc; + + /** + * @generated from field: int64 created_at = 5; + */ + createdAt: bigint; + + /** + * @generated from field: int64 updated_at = 6; + */ + updatedAt: bigint; + + /** + * if != 0 -> deleted + * + * @generated from field: int64 deleted_at = 7; + */ + deletedAt: bigint; + + /** + * @generated from field: repeated string tags = 8; + */ + tags: string[]; + + /** + * @generated from oneof feeds.v1.Post.post + */ + post: { + /** + * @generated from field: feeds.v1.StandardPost standard = 9; + */ + value: StandardPost; + case: "standard"; + } | { + /** + * @generated from field: feeds.v1.ArticlePost article = 10; + */ + value: ArticlePost; + case: "article"; + } | { + /** + * @generated from field: feeds.v1.LinkPost link = 11; + */ + value: LinkPost; + case: "link"; + } | { + /** + * @generated from field: feeds.v1.ImagePost image = 12; + */ + value: ImagePost; + case: "image"; + } | { + /** + * @generated from field: feeds.v1.VideoPost video = 13; + */ + value: VideoPost; + case: "video"; + } | { + /** + * @generated from field: feeds.v1.AudioPost audio = 14; + */ + value: AudioPost; + case: "audio"; + } | { case: undefined; value?: undefined }; +}; + +/** + * @generated from message feeds.v1.Post + */ +export type PostJson = { + /** + * @generated from field: uint64 local_post_id = 1; + */ + localPostId?: string; + + /** + * @generated from field: string author = 2; + */ + author?: string; + + /** + * @generated from field: string parent_uri = 3; + */ + parentUri?: string; + + /** + * XXX: map any extentions = 10; + * + * @generated from field: feeds.v1.PostGeoLoc loc = 4; + */ + loc?: PostGeoLocJson; + + /** + * @generated from field: int64 created_at = 5; + */ + createdAt?: string; + + /** + * @generated from field: int64 updated_at = 6; + */ + updatedAt?: string; + + /** + * if != 0 -> deleted + * + * @generated from field: int64 deleted_at = 7; + */ + deletedAt?: string; + + /** + * @generated from field: repeated string tags = 8; + */ + tags?: string[]; + + /** + * @generated from field: feeds.v1.StandardPost standard = 9; + */ + standard?: StandardPostJson; + + /** + * @generated from field: feeds.v1.ArticlePost article = 10; + */ + article?: ArticlePostJson; + + /** + * @generated from field: feeds.v1.LinkPost link = 11; + */ + link?: LinkPostJson; + + /** + * @generated from field: feeds.v1.ImagePost image = 12; + */ + image?: ImagePostJson; + + /** + * @generated from field: feeds.v1.VideoPost video = 13; + */ + video?: VideoPostJson; + + /** + * @generated from field: feeds.v1.AudioPost audio = 14; + */ + audio?: AudioPostJson; +}; + +/** + * Describes the message feeds.v1.Post. + * Use `create(PostSchema)` to create a new message. + */ +export const PostSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 9); + +/** + * @generated from message feeds.v1.PostView + */ +export type PostView = Message<"feeds.v1.PostView"> & { + /** + * @generated from field: feeds.v1.Post post = 1; + */ + post?: Post; + + /** + * @generated from field: uint64 children_count = 2; + */ + childrenCount: bigint; + + /** + * @generated from field: repeated feeds.v1.ReactionView reactions = 3; + */ + reactions: ReactionView[]; +}; + +/** + * @generated from message feeds.v1.PostView + */ +export type PostViewJson = { + /** + * @generated from field: feeds.v1.Post post = 1; + */ + post?: PostJson; + + /** + * @generated from field: uint64 children_count = 2; + */ + childrenCount?: string; + + /** + * @generated from field: repeated feeds.v1.ReactionView reactions = 3; + */ + reactions?: ReactionViewJson[]; +}; + +/** + * Describes the message feeds.v1.PostView. + * Use `create(PostViewSchema)` to create a new message. + */ +export const PostViewSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 10); + +/** + * @generated from message feeds.v1.ReactionView + */ +export type ReactionView = Message<"feeds.v1.ReactionView"> & { + /** + * @generated from field: string icon = 1; + */ + icon: string; + + /** + * @generated from field: uint32 count = 2; + */ + count: number; + + /** + * @generated from field: bool user_has_voted = 3; + */ + userHasVoted: boolean; +}; + +/** + * @generated from message feeds.v1.ReactionView + */ +export type ReactionViewJson = { + /** + * @generated from field: string icon = 1; + */ + icon?: string; + + /** + * @generated from field: uint32 count = 2; + */ + count?: number; + + /** + * @generated from field: bool user_has_voted = 3; + */ + userHasVoted?: boolean; +}; + +/** + * Describes the message feeds.v1.ReactionView. + * Use `create(ReactionViewSchema)` to create a new message. + */ +export const ReactionViewSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_feeds_v1_feeds, 11); + diff --git a/packages/api/libs/protobuf-codegenv2.ts b/packages/api/libs/protobuf-codegenv2.ts new file mode 100644 index 0000000000..81ff2d693d --- /dev/null +++ b/packages/api/libs/protobuf-codegenv2.ts @@ -0,0 +1 @@ +export * from "@bufbuild/protobuf/dist/cjs/codegenv2/index.js"; diff --git a/packages/api/polls/v1/polls_pb.ts b/packages/api/polls/v1/polls_pb.ts new file mode 100644 index 0000000000..8de654aeaa --- /dev/null +++ b/packages/api/polls/v1/polls_pb.ts @@ -0,0 +1,169 @@ +// @generated by protoc-gen-es v2.5.2 with parameter "target=ts,json_types=true" +// @generated from file polls/v1/polls.proto (package polls.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "../../libs/protobuf-codegenv2.ts"; +import { enumDesc, fileDesc, messageDesc } from "../../libs/protobuf-codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file polls/v1/polls.proto. + */ +export const file_polls_v1_polls: GenFile = /*@__PURE__*/ + fileDesc("ChRwb2xscy92MS9wb2xscy5wcm90bxIIcG9sbHMudjEiQwoKUG9sbFJlc3VsdBIOCgZvcHRpb24YASABKAkSDQoFY291bnQYAiABKA0SFgoOaGFzX3VzZXJfdm90ZWQYAyABKAgimwEKBFBvbGwSEAoIcXVlc3Rpb24YASABKAkSJQoHcmVzdWx0cxgCIAMoCzIULnBvbGxzLnYxLlBvbGxSZXN1bHQSIAoEa2luZBgDIAEoDjISLnBvbGxzLnYxLlBvbGxLaW5kEhAKCGR1cmF0aW9uGAQgASgDEhIKCmNyZWF0ZWRfYXQYBSABKAMSEgoKY3JlYXRlZF9ieRgGIAEoCSphCghQb2xsS2luZBIZChVQT0xMX0tJTkRfVU5TUEVDSUZJRUQQABIbChdQT0xMX0tJTkRfU0lOR0xFX0NIT0lDRRABEh0KGVBPTExfS0lORF9NVUxUSVBMRV9DSE9JQ0UQAkI5WjdnaXRodWIuY29tL3NhbW91cmFpd29ybGQvemVuYW8vYmFja2VuZC9wb2xscy92MTtwb2xsc3YxYgZwcm90bzM"); + +/** + * @generated from message polls.v1.PollResult + */ +export type PollResult = Message<"polls.v1.PollResult"> & { + /** + * @generated from field: string option = 1; + */ + option: string; + + /** + * @generated from field: uint32 count = 2; + */ + count: number; + + /** + * @generated from field: bool has_user_voted = 3; + */ + hasUserVoted: boolean; +}; + +/** + * @generated from message polls.v1.PollResult + */ +export type PollResultJson = { + /** + * @generated from field: string option = 1; + */ + option?: string; + + /** + * @generated from field: uint32 count = 2; + */ + count?: number; + + /** + * @generated from field: bool has_user_voted = 3; + */ + hasUserVoted?: boolean; +}; + +/** + * Describes the message polls.v1.PollResult. + * Use `create(PollResultSchema)` to create a new message. + */ +export const PollResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_polls_v1_polls, 0); + +/** + * @generated from message polls.v1.Poll + */ +export type Poll = Message<"polls.v1.Poll"> & { + /** + * @generated from field: string question = 1; + */ + question: string; + + /** + * @generated from field: repeated polls.v1.PollResult results = 2; + */ + results: PollResult[]; + + /** + * @generated from field: polls.v1.PollKind kind = 3; + */ + kind: PollKind; + + /** + * @generated from field: int64 duration = 4; + */ + duration: bigint; + + /** + * @generated from field: int64 created_at = 5; + */ + createdAt: bigint; + + /** + * @generated from field: string created_by = 6; + */ + createdBy: string; +}; + +/** + * @generated from message polls.v1.Poll + */ +export type PollJson = { + /** + * @generated from field: string question = 1; + */ + question?: string; + + /** + * @generated from field: repeated polls.v1.PollResult results = 2; + */ + results?: PollResultJson[]; + + /** + * @generated from field: polls.v1.PollKind kind = 3; + */ + kind?: PollKindJson; + + /** + * @generated from field: int64 duration = 4; + */ + duration?: string; + + /** + * @generated from field: int64 created_at = 5; + */ + createdAt?: string; + + /** + * @generated from field: string created_by = 6; + */ + createdBy?: string; +}; + +/** + * Describes the message polls.v1.Poll. + * Use `create(PollSchema)` to create a new message. + */ +export const PollSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_polls_v1_polls, 1); + +/** + * @generated from enum polls.v1.PollKind + */ +export enum PollKind { + /** + * @generated from enum value: POLL_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: POLL_KIND_SINGLE_CHOICE = 1; + */ + SINGLE_CHOICE = 1, + + /** + * @generated from enum value: POLL_KIND_MULTIPLE_CHOICE = 2; + */ + MULTIPLE_CHOICE = 2, +} + +/** + * @generated from enum polls.v1.PollKind + */ +export type PollKindJson = "POLL_KIND_UNSPECIFIED" | "POLL_KIND_SINGLE_CHOICE" | "POLL_KIND_MULTIPLE_CHOICE"; + +/** + * Describes the enum polls.v1.PollKind. + */ +export const PollKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_polls_v1_polls, 0); + diff --git a/packages/api/zenao/v1/zenao_pb.ts b/packages/api/zenao/v1/zenao_pb.ts new file mode 100644 index 0000000000..d6e3485fbd --- /dev/null +++ b/packages/api/zenao/v1/zenao_pb.ts @@ -0,0 +1,2193 @@ +// @generated by protoc-gen-es v2.5.2 with parameter "target=ts,json_types=true" +// @generated from file zenao/v1/zenao.proto (package zenao.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "../../libs/protobuf-codegenv2.ts"; +import { fileDesc, messageDesc, serviceDesc } from "../../libs/protobuf-codegenv2"; +import type { PollKind, PollKindJson } from "../../polls/v1/polls_pb"; +import { file_polls_v1_polls } from "../../polls/v1/polls_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file zenao/v1/zenao.proto. + */ +export const file_zenao_v1_zenao: GenFile = /*@__PURE__*/ + fileDesc("ChR6ZW5hby92MS96ZW5hby5wcm90bxIIemVuYW8udjEiDwoNSGVhbHRoUmVxdWVzdCIlCg5IZWFsdGhSZXNwb25zZRITCgttYWludGVuYW5jZRgBIAEoCCJICg9FZGl0VXNlclJlcXVlc3QSFAoMZGlzcGxheV9uYW1lGAEgASgJEgsKA2JpbxgCIAEoCRISCgphdmF0YXJfdXJpGAMgASgJIh4KEEVkaXRVc2VyUmVzcG9uc2USCgoCaWQYASABKAkiFwoVR2V0VXNlckFkZHJlc3NSZXF1ZXN0IikKFkdldFVzZXJBZGRyZXNzUmVzcG9uc2USDwoHYWRkcmVzcxgBIAEoCSL/AQoSQ3JlYXRlRXZlbnRSZXF1ZXN0Eg0KBXRpdGxlGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEhEKCWltYWdlX3VyaRgDIAEoCRISCgpzdGFydF9kYXRlGAQgASgEEhAKCGVuZF9kYXRlGAUgASgEEhQKDHRpY2tldF9wcmljZRgGIAEoARIQCghjYXBhY2l0eRgHIAEoDRIpCghsb2NhdGlvbhgJIAEoCzIXLnplbmFvLnYxLkV2ZW50TG9jYXRpb24SEAoIcGFzc3dvcmQYCiABKAkSEgoKb3JnYW5pemVycxgLIAMoCRITCgtnYXRla2VlcGVycxgMIAMoCSIhChNDcmVhdGVFdmVudFJlc3BvbnNlEgoKAmlkGAEgASgJIqgCChBFZGl0RXZlbnRSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJEg0KBXRpdGxlGAIgASgJEhMKC2Rlc2NyaXB0aW9uGAMgASgJEhEKCWltYWdlX3VyaRgEIAEoCRISCgpzdGFydF9kYXRlGAUgASgEEhAKCGVuZF9kYXRlGAYgASgEEhQKDHRpY2tldF9wcmljZRgHIAEoARIQCghjYXBhY2l0eRgIIAEoDRIpCghsb2NhdGlvbhgJIAEoCzIXLnplbmFvLnYxLkV2ZW50TG9jYXRpb24SEAoIcGFzc3dvcmQYCiABKAkSFwoPdXBkYXRlX3Bhc3N3b3JkGAsgASgIEhIKCm9yZ2FuaXplcnMYDCADKAkSEwoLZ2F0ZWtlZXBlcnMYDSADKAkiHwoRRWRpdEV2ZW50UmVzcG9uc2USCgoCaWQYASABKAkiLgoaR2V0RXZlbnRHYXRla2VlcGVyc1JlcXVlc3QSEAoIZXZlbnRfaWQYASABKAkiMgobR2V0RXZlbnRHYXRla2VlcGVyc1Jlc3BvbnNlEhMKC2dhdGVrZWVwZXJzGAEgAygJIj0KF1ZhbGlkYXRlUGFzc3dvcmRSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJEhAKCHBhc3N3b3JkGAIgASgJIikKGFZhbGlkYXRlUGFzc3dvcmRSZXNwb25zZRINCgV2YWxpZBgBIAEoCCJXChJQYXJ0aWNpcGF0ZVJlcXVlc3QSEAoIZXZlbnRfaWQYASABKAkSDQoFZW1haWwYAiABKAkSDgoGZ3Vlc3RzGAMgAygJEhAKCHBhc3N3b3JkGAQgASgJIi4KGkNhbmNlbFBhcnRpY2lwYXRpb25SZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJIh0KG0NhbmNlbFBhcnRpY2lwYXRpb25SZXNwb25zZSIsChNQYXJ0aWNpcGF0ZVJlc3BvbnNlEhUKDXRpY2tldF9zZWNyZXQYASABKAkiUQoVQnJvYWRjYXN0RXZlbnRSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJEg8KB21lc3NhZ2UYAiABKAkSFQoNYXR0YWNoX3RpY2tldBgDIAEoCCIYChZCcm9hZGNhc3RFdmVudFJlc3BvbnNlIsEBCg1FdmVudExvY2F0aW9uEhIKCnZlbnVlX25hbWUYASABKAkSFAoMaW5zdHJ1Y3Rpb25zGAIgASgJEiMKA2dlbxgDIAEoCzIULnplbmFvLnYxLkFkZHJlc3NHZW9IABIrCgd2aXJ0dWFsGAQgASgLMhguemVuYW8udjEuQWRkcmVzc1ZpcnR1YWxIABIpCgZjdXN0b20YBSABKAsyFy56ZW5hby52MS5BZGRyZXNzQ3VzdG9tSABCCQoHYWRkcmVzcyIdCg5BZGRyZXNzVmlydHVhbBILCgN1cmkYASABKAkiRQoKQWRkcmVzc0dlbxIPCgdhZGRyZXNzGAEgASgJEgsKA2xhdBgCIAEoAhILCgNsbmcYAyABKAISDAoEc2l6ZRgEIAEoAiIyCg1BZGRyZXNzQ3VzdG9tEg8KB2FkZHJlc3MYASABKAkSEAoIdGltZXpvbmUYAiABKAkigQEKDEV2ZW50UHJpdmFjeRIuCgZwdWJsaWMYASABKAsyHC56ZW5hby52MS5FdmVudFByaXZhY3lQdWJsaWNIABIwCgdndWFyZGVkGAIgASgLMh0uemVuYW8udjEuRXZlbnRQcml2YWN5R3VhcmRlZEgAQg8KDWV2ZW50X3ByaXZhY3kiFAoSRXZlbnRQcml2YWN5UHVibGljIjMKE0V2ZW50UHJpdmFjeUd1YXJkZWQSHAoUcGFydGljaXBhdGlvbl9wdWJrZXkYASABKAkiswIKCUV2ZW50SW5mbxINCgV0aXRsZRgBIAEoCRITCgtkZXNjcmlwdGlvbhgCIAEoCRIRCglpbWFnZV91cmkYAyABKAkSEgoKb3JnYW5pemVycxgEIAMoCRITCgtnYXRla2VlcGVycxgFIAMoCRISCgpzdGFydF9kYXRlGAYgASgDEhAKCGVuZF9kYXRlGAcgASgDEhAKCGNhcGFjaXR5GAggASgNEikKCGxvY2F0aW9uGAkgASgLMhcuemVuYW8udjEuRXZlbnRMb2NhdGlvbhIUCgxwYXJ0aWNpcGFudHMYCiABKA0SEAoIcGtnX3BhdGgYCyABKAkSJwoHcHJpdmFjeRgMIAEoCzIWLnplbmFvLnYxLkV2ZW50UHJpdmFjeRISCgpjaGVja2VkX2luGA0gASgNIi4KEUJhdGNoUHJvZmlsZUZpZWxkEgwKBHR5cGUYASABKAkSCwoDa2V5GAIgASgJIlUKE0JhdGNoUHJvZmlsZVJlcXVlc3QSKwoGZmllbGRzGAEgAygLMhsuemVuYW8udjEuQmF0Y2hQcm9maWxlRmllbGQSEQoJYWRkcmVzc2VzGAIgAygJInwKEUNyZWF0ZVBvbGxSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJEhAKCHF1ZXN0aW9uGAIgASgJEg8KB29wdGlvbnMYAyADKAkSEAoIZHVyYXRpb24YBCABKAMSIAoEa2luZBgFIAEoDjISLnBvbGxzLnYxLlBvbGxLaW5kIiUKEkNyZWF0ZVBvbGxSZXNwb25zZRIPCgdwb3N0X2lkGAEgASgJIjIKD1ZvdGVQb2xsUmVxdWVzdBIPCgdwb2xsX2lkGAEgASgJEg4KBm9wdGlvbhgCIAEoCSISChBWb3RlUG9sbFJlc3BvbnNlIlcKEUNyZWF0ZVBvc3RSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJEg8KB2NvbnRlbnQYAiABKAkSEQoJcGFyZW50X2lkGAMgASgJEgwKBHRhZ3MYBCADKAkiJQoSQ3JlYXRlUG9zdFJlc3BvbnNlEg8KB3Bvc3RfaWQYASABKAkiJAoRRGVsZXRlUG9zdFJlcXVlc3QSDwoHcG9zdF9pZBgBIAEoCSIUChJEZWxldGVQb3N0UmVzcG9uc2UiMQoQUmVhY3RQb3N0UmVxdWVzdBIPCgdwb3N0X2lkGAEgASgJEgwKBGljb24YAiABKAkiEwoRUmVhY3RQb3N0UmVzcG9uc2UiQQoPRWRpdFBvc3RSZXF1ZXN0Eg8KB3Bvc3RfaWQYASABKAkSDwoHY29udGVudBgCIAEoCRIMCgR0YWdzGAMgAygJIiMKEEVkaXRQb3N0UmVzcG9uc2USDwoHcG9zdF9pZBgBIAEoCSIqChZHZXRFdmVudFRpY2tldHNSZXF1ZXN0EhAKCGV2ZW50X2lkGAEgASgJIkUKF0dldEV2ZW50VGlja2V0c1Jlc3BvbnNlEioKDHRpY2tldHNfaW5mbxgBIAMoCzIULnplbmFvLnYxLlRpY2tldEluZm8iNwoKVGlja2V0SW5mbxIVCg10aWNrZXRfc2VjcmV0GAEgASgJEhIKCnVzZXJfZW1haWwYAiABKAkiOgoOQ2hlY2tpblJlcXVlc3QSFQoNdGlja2V0X3B1YmtleRgBIAEoCRIRCglzaWduYXR1cmUYAiABKAkiEQoPQ2hlY2tpblJlc3BvbnNlIi0KGUV4cG9ydFBhcnRpY2lwYW50c1JlcXVlc3QSEAoIZXZlbnRfaWQYASABKAkiUgoaRXhwb3J0UGFydGljaXBhbnRzUmVzcG9uc2USDwoHY29udGVudBgBIAEoCRIQCghmaWxlbmFtZRgCIAEoCRIRCgltaW1lX3R5cGUYAyABKAky2QsKDFplbmFvU2VydmljZRJBCghFZGl0VXNlchIZLnplbmFvLnYxLkVkaXRVc2VyUmVxdWVzdBoaLnplbmFvLnYxLkVkaXRVc2VyUmVzcG9uc2USUwoOR2V0VXNlckFkZHJlc3MSHy56ZW5hby52MS5HZXRVc2VyQWRkcmVzc1JlcXVlc3QaIC56ZW5hby52MS5HZXRVc2VyQWRkcmVzc1Jlc3BvbnNlEkoKC0NyZWF0ZUV2ZW50EhwuemVuYW8udjEuQ3JlYXRlRXZlbnRSZXF1ZXN0Gh0uemVuYW8udjEuQ3JlYXRlRXZlbnRSZXNwb25zZRJECglFZGl0RXZlbnQSGi56ZW5hby52MS5FZGl0RXZlbnRSZXF1ZXN0GhsuemVuYW8udjEuRWRpdEV2ZW50UmVzcG9uc2USYgoTR2V0RXZlbnRHYXRla2VlcGVycxIkLnplbmFvLnYxLkdldEV2ZW50R2F0ZWtlZXBlcnNSZXF1ZXN0GiUuemVuYW8udjEuR2V0RXZlbnRHYXRla2VlcGVyc1Jlc3BvbnNlElkKEFZhbGlkYXRlUGFzc3dvcmQSIS56ZW5hby52MS5WYWxpZGF0ZVBhc3N3b3JkUmVxdWVzdBoiLnplbmFvLnYxLlZhbGlkYXRlUGFzc3dvcmRSZXNwb25zZRJTCg5Ccm9hZGNhc3RFdmVudBIfLnplbmFvLnYxLkJyb2FkY2FzdEV2ZW50UmVxdWVzdBogLnplbmFvLnYxLkJyb2FkY2FzdEV2ZW50UmVzcG9uc2USSgoLUGFydGljaXBhdGUSHC56ZW5hby52MS5QYXJ0aWNpcGF0ZVJlcXVlc3QaHS56ZW5hby52MS5QYXJ0aWNpcGF0ZVJlc3BvbnNlEmIKE0NhbmNlbFBhcnRpY2lwYXRpb24SJC56ZW5hby52MS5DYW5jZWxQYXJ0aWNpcGF0aW9uUmVxdWVzdBolLnplbmFvLnYxLkNhbmNlbFBhcnRpY2lwYXRpb25SZXNwb25zZRJWCg9HZXRFdmVudFRpY2tldHMSIC56ZW5hby52MS5HZXRFdmVudFRpY2tldHNSZXF1ZXN0GiEuemVuYW8udjEuR2V0RXZlbnRUaWNrZXRzUmVzcG9uc2USPgoHQ2hlY2tpbhIYLnplbmFvLnYxLkNoZWNraW5SZXF1ZXN0GhkuemVuYW8udjEuQ2hlY2tpblJlc3BvbnNlEl8KEkV4cG9ydFBhcnRpY2lwYW50cxIjLnplbmFvLnYxLkV4cG9ydFBhcnRpY2lwYW50c1JlcXVlc3QaJC56ZW5hby52MS5FeHBvcnRQYXJ0aWNpcGFudHNSZXNwb25zZRJHCgpDcmVhdGVQb2xsEhsuemVuYW8udjEuQ3JlYXRlUG9sbFJlcXVlc3QaHC56ZW5hby52MS5DcmVhdGVQb2xsUmVzcG9uc2USQQoIVm90ZVBvbGwSGS56ZW5hby52MS5Wb3RlUG9sbFJlcXVlc3QaGi56ZW5hby52MS5Wb3RlUG9sbFJlc3BvbnNlEkcKCkNyZWF0ZVBvc3QSGy56ZW5hby52MS5DcmVhdGVQb3N0UmVxdWVzdBocLnplbmFvLnYxLkNyZWF0ZVBvc3RSZXNwb25zZRJHCgpEZWxldGVQb3N0EhsuemVuYW8udjEuRGVsZXRlUG9zdFJlcXVlc3QaHC56ZW5hby52MS5EZWxldGVQb3N0UmVzcG9uc2USRAoJUmVhY3RQb3N0EhouemVuYW8udjEuUmVhY3RQb3N0UmVxdWVzdBobLnplbmFvLnYxLlJlYWN0UG9zdFJlc3BvbnNlEkEKCEVkaXRQb3N0EhkuemVuYW8udjEuRWRpdFBvc3RSZXF1ZXN0GhouemVuYW8udjEuRWRpdFBvc3RSZXNwb25zZRI7CgZIZWFsdGgSFy56ZW5hby52MS5IZWFsdGhSZXF1ZXN0GhguemVuYW8udjEuSGVhbHRoUmVzcG9uc2VCOVo3Z2l0aHViLmNvbS9zYW1vdXJhaXdvcmxkL3plbmFvL2JhY2tlbmQvemVuYW8vdjE7emVuYW92MWIGcHJvdG8z", [file_polls_v1_polls]); + +/** + * @generated from message zenao.v1.HealthRequest + */ +export type HealthRequest = Message<"zenao.v1.HealthRequest"> & { +}; + +/** + * @generated from message zenao.v1.HealthRequest + */ +export type HealthRequestJson = { +}; + +/** + * Describes the message zenao.v1.HealthRequest. + * Use `create(HealthRequestSchema)` to create a new message. + */ +export const HealthRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 0); + +/** + * XXX: add more fields (e.g. version, commit_hash, gno.land version, ...) + * + * @generated from message zenao.v1.HealthResponse + */ +export type HealthResponse = Message<"zenao.v1.HealthResponse"> & { + /** + * @generated from field: bool maintenance = 1; + */ + maintenance: boolean; +}; + +/** + * XXX: add more fields (e.g. version, commit_hash, gno.land version, ...) + * + * @generated from message zenao.v1.HealthResponse + */ +export type HealthResponseJson = { + /** + * @generated from field: bool maintenance = 1; + */ + maintenance?: boolean; +}; + +/** + * Describes the message zenao.v1.HealthResponse. + * Use `create(HealthResponseSchema)` to create a new message. + */ +export const HealthResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 1); + +/** + * @generated from message zenao.v1.EditUserRequest + */ +export type EditUserRequest = Message<"zenao.v1.EditUserRequest"> & { + /** + * @generated from field: string display_name = 1; + */ + displayName: string; + + /** + * @generated from field: string bio = 2; + */ + bio: string; + + /** + * @generated from field: string avatar_uri = 3; + */ + avatarUri: string; +}; + +/** + * @generated from message zenao.v1.EditUserRequest + */ +export type EditUserRequestJson = { + /** + * @generated from field: string display_name = 1; + */ + displayName?: string; + + /** + * @generated from field: string bio = 2; + */ + bio?: string; + + /** + * @generated from field: string avatar_uri = 3; + */ + avatarUri?: string; +}; + +/** + * Describes the message zenao.v1.EditUserRequest. + * Use `create(EditUserRequestSchema)` to create a new message. + */ +export const EditUserRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 2); + +/** + * @generated from message zenao.v1.EditUserResponse + */ +export type EditUserResponse = Message<"zenao.v1.EditUserResponse"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * @generated from message zenao.v1.EditUserResponse + */ +export type EditUserResponseJson = { + /** + * @generated from field: string id = 1; + */ + id?: string; +}; + +/** + * Describes the message zenao.v1.EditUserResponse. + * Use `create(EditUserResponseSchema)` to create a new message. + */ +export const EditUserResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 3); + +/** + * @generated from message zenao.v1.GetUserAddressRequest + */ +export type GetUserAddressRequest = Message<"zenao.v1.GetUserAddressRequest"> & { +}; + +/** + * @generated from message zenao.v1.GetUserAddressRequest + */ +export type GetUserAddressRequestJson = { +}; + +/** + * Describes the message zenao.v1.GetUserAddressRequest. + * Use `create(GetUserAddressRequestSchema)` to create a new message. + */ +export const GetUserAddressRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 4); + +/** + * @generated from message zenao.v1.GetUserAddressResponse + */ +export type GetUserAddressResponse = Message<"zenao.v1.GetUserAddressResponse"> & { + /** + * @generated from field: string address = 1; + */ + address: string; +}; + +/** + * @generated from message zenao.v1.GetUserAddressResponse + */ +export type GetUserAddressResponseJson = { + /** + * @generated from field: string address = 1; + */ + address?: string; +}; + +/** + * Describes the message zenao.v1.GetUserAddressResponse. + * Use `create(GetUserAddressResponseSchema)` to create a new message. + */ +export const GetUserAddressResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 5); + +/** + * @generated from message zenao.v1.CreateEventRequest + */ +export type CreateEventRequest = Message<"zenao.v1.CreateEventRequest"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * markdown + * + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri: string; + + /** + * unix seconds + * + * @generated from field: uint64 start_date = 4; + */ + startDate: bigint; + + /** + * unix seconds + * + * @generated from field: uint64 end_date = 5; + */ + endDate: bigint; + + /** + * XXX: use fixed point? + * + * @generated from field: double ticket_price = 6; + */ + ticketPrice: number; + + /** + * @generated from field: uint32 capacity = 7; + */ + capacity: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocation; + + /** + * @generated from field: string password = 10; + */ + password: string; + + /** + * @generated from field: repeated string organizers = 11; + */ + organizers: string[]; + + /** + * @generated from field: repeated string gatekeepers = 12; + */ + gatekeepers: string[]; +}; + +/** + * @generated from message zenao.v1.CreateEventRequest + */ +export type CreateEventRequestJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * markdown + * + * @generated from field: string description = 2; + */ + description?: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri?: string; + + /** + * unix seconds + * + * @generated from field: uint64 start_date = 4; + */ + startDate?: string; + + /** + * unix seconds + * + * @generated from field: uint64 end_date = 5; + */ + endDate?: string; + + /** + * XXX: use fixed point? + * + * @generated from field: double ticket_price = 6; + */ + ticketPrice?: number | "NaN" | "Infinity" | "-Infinity"; + + /** + * @generated from field: uint32 capacity = 7; + */ + capacity?: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocationJson; + + /** + * @generated from field: string password = 10; + */ + password?: string; + + /** + * @generated from field: repeated string organizers = 11; + */ + organizers?: string[]; + + /** + * @generated from field: repeated string gatekeepers = 12; + */ + gatekeepers?: string[]; +}; + +/** + * Describes the message zenao.v1.CreateEventRequest. + * Use `create(CreateEventRequestSchema)` to create a new message. + */ +export const CreateEventRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 6); + +/** + * @generated from message zenao.v1.CreateEventResponse + */ +export type CreateEventResponse = Message<"zenao.v1.CreateEventResponse"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * @generated from message zenao.v1.CreateEventResponse + */ +export type CreateEventResponseJson = { + /** + * @generated from field: string id = 1; + */ + id?: string; +}; + +/** + * Describes the message zenao.v1.CreateEventResponse. + * Use `create(CreateEventResponseSchema)` to create a new message. + */ +export const CreateEventResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 7); + +/** + * @generated from message zenao.v1.EditEventRequest + */ +export type EditEventRequest = Message<"zenao.v1.EditEventRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string title = 2; + */ + title: string; + + /** + * markdown + * + * @generated from field: string description = 3; + */ + description: string; + + /** + * @generated from field: string image_uri = 4; + */ + imageUri: string; + + /** + * unix seconds + * + * @generated from field: uint64 start_date = 5; + */ + startDate: bigint; + + /** + * unix seconds + * + * @generated from field: uint64 end_date = 6; + */ + endDate: bigint; + + /** + * XXX: use fixed point? + * + * @generated from field: double ticket_price = 7; + */ + ticketPrice: number; + + /** + * @generated from field: uint32 capacity = 8; + */ + capacity: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocation; + + /** + * @generated from field: string password = 10; + */ + password: string; + + /** + * @generated from field: bool update_password = 11; + */ + updatePassword: boolean; + + /** + * @generated from field: repeated string organizers = 12; + */ + organizers: string[]; + + /** + * @generated from field: repeated string gatekeepers = 13; + */ + gatekeepers: string[]; +}; + +/** + * @generated from message zenao.v1.EditEventRequest + */ +export type EditEventRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string title = 2; + */ + title?: string; + + /** + * markdown + * + * @generated from field: string description = 3; + */ + description?: string; + + /** + * @generated from field: string image_uri = 4; + */ + imageUri?: string; + + /** + * unix seconds + * + * @generated from field: uint64 start_date = 5; + */ + startDate?: string; + + /** + * unix seconds + * + * @generated from field: uint64 end_date = 6; + */ + endDate?: string; + + /** + * XXX: use fixed point? + * + * @generated from field: double ticket_price = 7; + */ + ticketPrice?: number | "NaN" | "Infinity" | "-Infinity"; + + /** + * @generated from field: uint32 capacity = 8; + */ + capacity?: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocationJson; + + /** + * @generated from field: string password = 10; + */ + password?: string; + + /** + * @generated from field: bool update_password = 11; + */ + updatePassword?: boolean; + + /** + * @generated from field: repeated string organizers = 12; + */ + organizers?: string[]; + + /** + * @generated from field: repeated string gatekeepers = 13; + */ + gatekeepers?: string[]; +}; + +/** + * Describes the message zenao.v1.EditEventRequest. + * Use `create(EditEventRequestSchema)` to create a new message. + */ +export const EditEventRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 8); + +/** + * @generated from message zenao.v1.EditEventResponse + */ +export type EditEventResponse = Message<"zenao.v1.EditEventResponse"> & { + /** + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * @generated from message zenao.v1.EditEventResponse + */ +export type EditEventResponseJson = { + /** + * @generated from field: string id = 1; + */ + id?: string; +}; + +/** + * Describes the message zenao.v1.EditEventResponse. + * Use `create(EditEventResponseSchema)` to create a new message. + */ +export const EditEventResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 9); + +/** + * @generated from message zenao.v1.GetEventGatekeepersRequest + */ +export type GetEventGatekeepersRequest = Message<"zenao.v1.GetEventGatekeepersRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; +}; + +/** + * @generated from message zenao.v1.GetEventGatekeepersRequest + */ +export type GetEventGatekeepersRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; +}; + +/** + * Describes the message zenao.v1.GetEventGatekeepersRequest. + * Use `create(GetEventGatekeepersRequestSchema)` to create a new message. + */ +export const GetEventGatekeepersRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 10); + +/** + * @generated from message zenao.v1.GetEventGatekeepersResponse + */ +export type GetEventGatekeepersResponse = Message<"zenao.v1.GetEventGatekeepersResponse"> & { + /** + * @generated from field: repeated string gatekeepers = 1; + */ + gatekeepers: string[]; +}; + +/** + * @generated from message zenao.v1.GetEventGatekeepersResponse + */ +export type GetEventGatekeepersResponseJson = { + /** + * @generated from field: repeated string gatekeepers = 1; + */ + gatekeepers?: string[]; +}; + +/** + * Describes the message zenao.v1.GetEventGatekeepersResponse. + * Use `create(GetEventGatekeepersResponseSchema)` to create a new message. + */ +export const GetEventGatekeepersResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 11); + +/** + * @generated from message zenao.v1.ValidatePasswordRequest + */ +export type ValidatePasswordRequest = Message<"zenao.v1.ValidatePasswordRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string password = 2; + */ + password: string; +}; + +/** + * @generated from message zenao.v1.ValidatePasswordRequest + */ +export type ValidatePasswordRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string password = 2; + */ + password?: string; +}; + +/** + * Describes the message zenao.v1.ValidatePasswordRequest. + * Use `create(ValidatePasswordRequestSchema)` to create a new message. + */ +export const ValidatePasswordRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 12); + +/** + * @generated from message zenao.v1.ValidatePasswordResponse + */ +export type ValidatePasswordResponse = Message<"zenao.v1.ValidatePasswordResponse"> & { + /** + * @generated from field: bool valid = 1; + */ + valid: boolean; +}; + +/** + * @generated from message zenao.v1.ValidatePasswordResponse + */ +export type ValidatePasswordResponseJson = { + /** + * @generated from field: bool valid = 1; + */ + valid?: boolean; +}; + +/** + * Describes the message zenao.v1.ValidatePasswordResponse. + * Use `create(ValidatePasswordResponseSchema)` to create a new message. + */ +export const ValidatePasswordResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 13); + +/** + * @generated from message zenao.v1.ParticipateRequest + */ +export type ParticipateRequest = Message<"zenao.v1.ParticipateRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string email = 2; + */ + email: string; + + /** + * @generated from field: repeated string guests = 3; + */ + guests: string[]; + + /** + * @generated from field: string password = 4; + */ + password: string; +}; + +/** + * @generated from message zenao.v1.ParticipateRequest + */ +export type ParticipateRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string email = 2; + */ + email?: string; + + /** + * @generated from field: repeated string guests = 3; + */ + guests?: string[]; + + /** + * @generated from field: string password = 4; + */ + password?: string; +}; + +/** + * Describes the message zenao.v1.ParticipateRequest. + * Use `create(ParticipateRequestSchema)` to create a new message. + */ +export const ParticipateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 14); + +/** + * @generated from message zenao.v1.CancelParticipationRequest + */ +export type CancelParticipationRequest = Message<"zenao.v1.CancelParticipationRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; +}; + +/** + * @generated from message zenao.v1.CancelParticipationRequest + */ +export type CancelParticipationRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; +}; + +/** + * Describes the message zenao.v1.CancelParticipationRequest. + * Use `create(CancelParticipationRequestSchema)` to create a new message. + */ +export const CancelParticipationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 15); + +/** + * @generated from message zenao.v1.CancelParticipationResponse + */ +export type CancelParticipationResponse = Message<"zenao.v1.CancelParticipationResponse"> & { +}; + +/** + * @generated from message zenao.v1.CancelParticipationResponse + */ +export type CancelParticipationResponseJson = { +}; + +/** + * Describes the message zenao.v1.CancelParticipationResponse. + * Use `create(CancelParticipationResponseSchema)` to create a new message. + */ +export const CancelParticipationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 16); + +/** + * @generated from message zenao.v1.ParticipateResponse + */ +export type ParticipateResponse = Message<"zenao.v1.ParticipateResponse"> & { + /** + * @generated from field: string ticket_secret = 1; + */ + ticketSecret: string; +}; + +/** + * @generated from message zenao.v1.ParticipateResponse + */ +export type ParticipateResponseJson = { + /** + * @generated from field: string ticket_secret = 1; + */ + ticketSecret?: string; +}; + +/** + * Describes the message zenao.v1.ParticipateResponse. + * Use `create(ParticipateResponseSchema)` to create a new message. + */ +export const ParticipateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 17); + +/** + * @generated from message zenao.v1.BroadcastEventRequest + */ +export type BroadcastEventRequest = Message<"zenao.v1.BroadcastEventRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string message = 2; + */ + message: string; + + /** + * @generated from field: bool attach_ticket = 3; + */ + attachTicket: boolean; +}; + +/** + * @generated from message zenao.v1.BroadcastEventRequest + */ +export type BroadcastEventRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string message = 2; + */ + message?: string; + + /** + * @generated from field: bool attach_ticket = 3; + */ + attachTicket?: boolean; +}; + +/** + * Describes the message zenao.v1.BroadcastEventRequest. + * Use `create(BroadcastEventRequestSchema)` to create a new message. + */ +export const BroadcastEventRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 18); + +/** + * @generated from message zenao.v1.BroadcastEventResponse + */ +export type BroadcastEventResponse = Message<"zenao.v1.BroadcastEventResponse"> & { +}; + +/** + * @generated from message zenao.v1.BroadcastEventResponse + */ +export type BroadcastEventResponseJson = { +}; + +/** + * Describes the message zenao.v1.BroadcastEventResponse. + * Use `create(BroadcastEventResponseSchema)` to create a new message. + */ +export const BroadcastEventResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 19); + +/** + * @generated from message zenao.v1.EventLocation + */ +export type EventLocation = Message<"zenao.v1.EventLocation"> & { + /** + * @generated from field: string venue_name = 1; + */ + venueName: string; + + /** + * markdown + * + * @generated from field: string instructions = 2; + */ + instructions: string; + + /** + * @generated from oneof zenao.v1.EventLocation.address + */ + address: { + /** + * @generated from field: zenao.v1.AddressGeo geo = 3; + */ + value: AddressGeo; + case: "geo"; + } | { + /** + * @generated from field: zenao.v1.AddressVirtual virtual = 4; + */ + value: AddressVirtual; + case: "virtual"; + } | { + /** + * @generated from field: zenao.v1.AddressCustom custom = 5; + */ + value: AddressCustom; + case: "custom"; + } | { case: undefined; value?: undefined }; +}; + +/** + * @generated from message zenao.v1.EventLocation + */ +export type EventLocationJson = { + /** + * @generated from field: string venue_name = 1; + */ + venueName?: string; + + /** + * markdown + * + * @generated from field: string instructions = 2; + */ + instructions?: string; + + /** + * @generated from field: zenao.v1.AddressGeo geo = 3; + */ + geo?: AddressGeoJson; + + /** + * @generated from field: zenao.v1.AddressVirtual virtual = 4; + */ + virtual?: AddressVirtualJson; + + /** + * @generated from field: zenao.v1.AddressCustom custom = 5; + */ + custom?: AddressCustomJson; +}; + +/** + * Describes the message zenao.v1.EventLocation. + * Use `create(EventLocationSchema)` to create a new message. + */ +export const EventLocationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 20); + +/** + * @generated from message zenao.v1.AddressVirtual + */ +export type AddressVirtual = Message<"zenao.v1.AddressVirtual"> & { + /** + * @generated from field: string uri = 1; + */ + uri: string; +}; + +/** + * @generated from message zenao.v1.AddressVirtual + */ +export type AddressVirtualJson = { + /** + * @generated from field: string uri = 1; + */ + uri?: string; +}; + +/** + * Describes the message zenao.v1.AddressVirtual. + * Use `create(AddressVirtualSchema)` to create a new message. + */ +export const AddressVirtualSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 21); + +/** + * @generated from message zenao.v1.AddressGeo + */ +export type AddressGeo = Message<"zenao.v1.AddressGeo"> & { + /** + * @generated from field: string address = 1; + */ + address: string; + + /** + * @generated from field: float lat = 2; + */ + lat: number; + + /** + * @generated from field: float lng = 3; + */ + lng: number; + + /** + * @generated from field: float size = 4; + */ + size: number; +}; + +/** + * @generated from message zenao.v1.AddressGeo + */ +export type AddressGeoJson = { + /** + * @generated from field: string address = 1; + */ + address?: string; + + /** + * @generated from field: float lat = 2; + */ + lat?: number | "NaN" | "Infinity" | "-Infinity"; + + /** + * @generated from field: float lng = 3; + */ + lng?: number | "NaN" | "Infinity" | "-Infinity"; + + /** + * @generated from field: float size = 4; + */ + size?: number | "NaN" | "Infinity" | "-Infinity"; +}; + +/** + * Describes the message zenao.v1.AddressGeo. + * Use `create(AddressGeoSchema)` to create a new message. + */ +export const AddressGeoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 22); + +/** + * @generated from message zenao.v1.AddressCustom + */ +export type AddressCustom = Message<"zenao.v1.AddressCustom"> & { + /** + * @generated from field: string address = 1; + */ + address: string; + + /** + * IANA name + * + * @generated from field: string timezone = 2; + */ + timezone: string; +}; + +/** + * @generated from message zenao.v1.AddressCustom + */ +export type AddressCustomJson = { + /** + * @generated from field: string address = 1; + */ + address?: string; + + /** + * IANA name + * + * @generated from field: string timezone = 2; + */ + timezone?: string; +}; + +/** + * Describes the message zenao.v1.AddressCustom. + * Use `create(AddressCustomSchema)` to create a new message. + */ +export const AddressCustomSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 23); + +/** + * @generated from message zenao.v1.EventPrivacy + */ +export type EventPrivacy = Message<"zenao.v1.EventPrivacy"> & { + /** + * @generated from oneof zenao.v1.EventPrivacy.event_privacy + */ + eventPrivacy: { + /** + * @generated from field: zenao.v1.EventPrivacyPublic public = 1; + */ + value: EventPrivacyPublic; + case: "public"; + } | { + /** + * @generated from field: zenao.v1.EventPrivacyGuarded guarded = 2; + */ + value: EventPrivacyGuarded; + case: "guarded"; + } | { case: undefined; value?: undefined }; +}; + +/** + * @generated from message zenao.v1.EventPrivacy + */ +export type EventPrivacyJson = { + /** + * @generated from field: zenao.v1.EventPrivacyPublic public = 1; + */ + public?: EventPrivacyPublicJson; + + /** + * @generated from field: zenao.v1.EventPrivacyGuarded guarded = 2; + */ + guarded?: EventPrivacyGuardedJson; +}; + +/** + * Describes the message zenao.v1.EventPrivacy. + * Use `create(EventPrivacySchema)` to create a new message. + */ +export const EventPrivacySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 24); + +/** + * @generated from message zenao.v1.EventPrivacyPublic + */ +export type EventPrivacyPublic = Message<"zenao.v1.EventPrivacyPublic"> & { +}; + +/** + * @generated from message zenao.v1.EventPrivacyPublic + */ +export type EventPrivacyPublicJson = { +}; + +/** + * Describes the message zenao.v1.EventPrivacyPublic. + * Use `create(EventPrivacyPublicSchema)` to create a new message. + */ +export const EventPrivacyPublicSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 25); + +/** + * @generated from message zenao.v1.EventPrivacyGuarded + */ +export type EventPrivacyGuarded = Message<"zenao.v1.EventPrivacyGuarded"> & { + /** + * @generated from field: string participation_pubkey = 1; + */ + participationPubkey: string; +}; + +/** + * @generated from message zenao.v1.EventPrivacyGuarded + */ +export type EventPrivacyGuardedJson = { + /** + * @generated from field: string participation_pubkey = 1; + */ + participationPubkey?: string; +}; + +/** + * Describes the message zenao.v1.EventPrivacyGuarded. + * Use `create(EventPrivacyGuardedSchema)` to create a new message. + */ +export const EventPrivacyGuardedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 26); + +/** + * @generated from message zenao.v1.EventInfo + */ +export type EventInfo = Message<"zenao.v1.EventInfo"> & { + /** + * @generated from field: string title = 1; + */ + title: string; + + /** + * @generated from field: string description = 2; + */ + description: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri: string; + + /** + * @generated from field: repeated string organizers = 4; + */ + organizers: string[]; + + /** + * @generated from field: repeated string gatekeepers = 5; + */ + gatekeepers: string[]; + + /** + * unix seconds + * + * @generated from field: int64 start_date = 6; + */ + startDate: bigint; + + /** + * unix seconds + * + * @generated from field: int64 end_date = 7; + */ + endDate: bigint; + + /** + * @generated from field: uint32 capacity = 8; + */ + capacity: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocation; + + /** + * @generated from field: uint32 participants = 10; + */ + participants: number; + + /** + * @generated from field: string pkg_path = 11; + */ + pkgPath: string; + + /** + * @generated from field: zenao.v1.EventPrivacy privacy = 12; + */ + privacy?: EventPrivacy; + + /** + * @generated from field: uint32 checked_in = 13; + */ + checkedIn: number; +}; + +/** + * @generated from message zenao.v1.EventInfo + */ +export type EventInfoJson = { + /** + * @generated from field: string title = 1; + */ + title?: string; + + /** + * @generated from field: string description = 2; + */ + description?: string; + + /** + * @generated from field: string image_uri = 3; + */ + imageUri?: string; + + /** + * @generated from field: repeated string organizers = 4; + */ + organizers?: string[]; + + /** + * @generated from field: repeated string gatekeepers = 5; + */ + gatekeepers?: string[]; + + /** + * unix seconds + * + * @generated from field: int64 start_date = 6; + */ + startDate?: string; + + /** + * unix seconds + * + * @generated from field: int64 end_date = 7; + */ + endDate?: string; + + /** + * @generated from field: uint32 capacity = 8; + */ + capacity?: number; + + /** + * @generated from field: zenao.v1.EventLocation location = 9; + */ + location?: EventLocationJson; + + /** + * @generated from field: uint32 participants = 10; + */ + participants?: number; + + /** + * @generated from field: string pkg_path = 11; + */ + pkgPath?: string; + + /** + * @generated from field: zenao.v1.EventPrivacy privacy = 12; + */ + privacy?: EventPrivacyJson; + + /** + * @generated from field: uint32 checked_in = 13; + */ + checkedIn?: number; +}; + +/** + * Describes the message zenao.v1.EventInfo. + * Use `create(EventInfoSchema)` to create a new message. + */ +export const EventInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 27); + +/** + * @generated from message zenao.v1.BatchProfileField + */ +export type BatchProfileField = Message<"zenao.v1.BatchProfileField"> & { + /** + * @generated from field: string type = 1; + */ + type: string; + + /** + * @generated from field: string key = 2; + */ + key: string; +}; + +/** + * @generated from message zenao.v1.BatchProfileField + */ +export type BatchProfileFieldJson = { + /** + * @generated from field: string type = 1; + */ + type?: string; + + /** + * @generated from field: string key = 2; + */ + key?: string; +}; + +/** + * Describes the message zenao.v1.BatchProfileField. + * Use `create(BatchProfileFieldSchema)` to create a new message. + */ +export const BatchProfileFieldSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 28); + +/** + * @generated from message zenao.v1.BatchProfileRequest + */ +export type BatchProfileRequest = Message<"zenao.v1.BatchProfileRequest"> & { + /** + * @generated from field: repeated zenao.v1.BatchProfileField fields = 1; + */ + fields: BatchProfileField[]; + + /** + * @generated from field: repeated string addresses = 2; + */ + addresses: string[]; +}; + +/** + * @generated from message zenao.v1.BatchProfileRequest + */ +export type BatchProfileRequestJson = { + /** + * @generated from field: repeated zenao.v1.BatchProfileField fields = 1; + */ + fields?: BatchProfileFieldJson[]; + + /** + * @generated from field: repeated string addresses = 2; + */ + addresses?: string[]; +}; + +/** + * Describes the message zenao.v1.BatchProfileRequest. + * Use `create(BatchProfileRequestSchema)` to create a new message. + */ +export const BatchProfileRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 29); + +/** + * @generated from message zenao.v1.CreatePollRequest + */ +export type CreatePollRequest = Message<"zenao.v1.CreatePollRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string question = 2; + */ + question: string; + + /** + * @generated from field: repeated string options = 3; + */ + options: string[]; + + /** + * unix seconds + * + * @generated from field: int64 duration = 4; + */ + duration: bigint; + + /** + * @generated from field: polls.v1.PollKind kind = 5; + */ + kind: PollKind; +}; + +/** + * @generated from message zenao.v1.CreatePollRequest + */ +export type CreatePollRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string question = 2; + */ + question?: string; + + /** + * @generated from field: repeated string options = 3; + */ + options?: string[]; + + /** + * unix seconds + * + * @generated from field: int64 duration = 4; + */ + duration?: string; + + /** + * @generated from field: polls.v1.PollKind kind = 5; + */ + kind?: PollKindJson; +}; + +/** + * Describes the message zenao.v1.CreatePollRequest. + * Use `create(CreatePollRequestSchema)` to create a new message. + */ +export const CreatePollRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 30); + +/** + * @generated from message zenao.v1.CreatePollResponse + */ +export type CreatePollResponse = Message<"zenao.v1.CreatePollResponse"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; +}; + +/** + * @generated from message zenao.v1.CreatePollResponse + */ +export type CreatePollResponseJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; +}; + +/** + * Describes the message zenao.v1.CreatePollResponse. + * Use `create(CreatePollResponseSchema)` to create a new message. + */ +export const CreatePollResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 31); + +/** + * @generated from message zenao.v1.VotePollRequest + */ +export type VotePollRequest = Message<"zenao.v1.VotePollRequest"> & { + /** + * @generated from field: string poll_id = 1; + */ + pollId: string; + + /** + * @generated from field: string option = 2; + */ + option: string; +}; + +/** + * @generated from message zenao.v1.VotePollRequest + */ +export type VotePollRequestJson = { + /** + * @generated from field: string poll_id = 1; + */ + pollId?: string; + + /** + * @generated from field: string option = 2; + */ + option?: string; +}; + +/** + * Describes the message zenao.v1.VotePollRequest. + * Use `create(VotePollRequestSchema)` to create a new message. + */ +export const VotePollRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 32); + +/** + * @generated from message zenao.v1.VotePollResponse + */ +export type VotePollResponse = Message<"zenao.v1.VotePollResponse"> & { +}; + +/** + * @generated from message zenao.v1.VotePollResponse + */ +export type VotePollResponseJson = { +}; + +/** + * Describes the message zenao.v1.VotePollResponse. + * Use `create(VotePollResponseSchema)` to create a new message. + */ +export const VotePollResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 33); + +/** + * @generated from message zenao.v1.CreatePostRequest + */ +export type CreatePostRequest = Message<"zenao.v1.CreatePostRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; + + /** + * @generated from field: string content = 2; + */ + content: string; + + /** + * @generated from field: string parent_id = 3; + */ + parentId: string; + + /** + * @generated from field: repeated string tags = 4; + */ + tags: string[]; +}; + +/** + * @generated from message zenao.v1.CreatePostRequest + */ +export type CreatePostRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; + + /** + * @generated from field: string content = 2; + */ + content?: string; + + /** + * @generated from field: string parent_id = 3; + */ + parentId?: string; + + /** + * @generated from field: repeated string tags = 4; + */ + tags?: string[]; +}; + +/** + * Describes the message zenao.v1.CreatePostRequest. + * Use `create(CreatePostRequestSchema)` to create a new message. + */ +export const CreatePostRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 34); + +/** + * @generated from message zenao.v1.CreatePostResponse + */ +export type CreatePostResponse = Message<"zenao.v1.CreatePostResponse"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; +}; + +/** + * @generated from message zenao.v1.CreatePostResponse + */ +export type CreatePostResponseJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; +}; + +/** + * Describes the message zenao.v1.CreatePostResponse. + * Use `create(CreatePostResponseSchema)` to create a new message. + */ +export const CreatePostResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 35); + +/** + * @generated from message zenao.v1.DeletePostRequest + */ +export type DeletePostRequest = Message<"zenao.v1.DeletePostRequest"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; +}; + +/** + * @generated from message zenao.v1.DeletePostRequest + */ +export type DeletePostRequestJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; +}; + +/** + * Describes the message zenao.v1.DeletePostRequest. + * Use `create(DeletePostRequestSchema)` to create a new message. + */ +export const DeletePostRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 36); + +/** + * @generated from message zenao.v1.DeletePostResponse + */ +export type DeletePostResponse = Message<"zenao.v1.DeletePostResponse"> & { +}; + +/** + * @generated from message zenao.v1.DeletePostResponse + */ +export type DeletePostResponseJson = { +}; + +/** + * Describes the message zenao.v1.DeletePostResponse. + * Use `create(DeletePostResponseSchema)` to create a new message. + */ +export const DeletePostResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 37); + +/** + * @generated from message zenao.v1.ReactPostRequest + */ +export type ReactPostRequest = Message<"zenao.v1.ReactPostRequest"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; + + /** + * @generated from field: string icon = 2; + */ + icon: string; +}; + +/** + * @generated from message zenao.v1.ReactPostRequest + */ +export type ReactPostRequestJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; + + /** + * @generated from field: string icon = 2; + */ + icon?: string; +}; + +/** + * Describes the message zenao.v1.ReactPostRequest. + * Use `create(ReactPostRequestSchema)` to create a new message. + */ +export const ReactPostRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 38); + +/** + * @generated from message zenao.v1.ReactPostResponse + */ +export type ReactPostResponse = Message<"zenao.v1.ReactPostResponse"> & { +}; + +/** + * @generated from message zenao.v1.ReactPostResponse + */ +export type ReactPostResponseJson = { +}; + +/** + * Describes the message zenao.v1.ReactPostResponse. + * Use `create(ReactPostResponseSchema)` to create a new message. + */ +export const ReactPostResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 39); + +/** + * @generated from message zenao.v1.EditPostRequest + */ +export type EditPostRequest = Message<"zenao.v1.EditPostRequest"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; + + /** + * @generated from field: string content = 2; + */ + content: string; + + /** + * @generated from field: repeated string tags = 3; + */ + tags: string[]; +}; + +/** + * @generated from message zenao.v1.EditPostRequest + */ +export type EditPostRequestJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; + + /** + * @generated from field: string content = 2; + */ + content?: string; + + /** + * @generated from field: repeated string tags = 3; + */ + tags?: string[]; +}; + +/** + * Describes the message zenao.v1.EditPostRequest. + * Use `create(EditPostRequestSchema)` to create a new message. + */ +export const EditPostRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 40); + +/** + * @generated from message zenao.v1.EditPostResponse + */ +export type EditPostResponse = Message<"zenao.v1.EditPostResponse"> & { + /** + * @generated from field: string post_id = 1; + */ + postId: string; +}; + +/** + * @generated from message zenao.v1.EditPostResponse + */ +export type EditPostResponseJson = { + /** + * @generated from field: string post_id = 1; + */ + postId?: string; +}; + +/** + * Describes the message zenao.v1.EditPostResponse. + * Use `create(EditPostResponseSchema)` to create a new message. + */ +export const EditPostResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 41); + +/** + * @generated from message zenao.v1.GetEventTicketsRequest + */ +export type GetEventTicketsRequest = Message<"zenao.v1.GetEventTicketsRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; +}; + +/** + * @generated from message zenao.v1.GetEventTicketsRequest + */ +export type GetEventTicketsRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; +}; + +/** + * Describes the message zenao.v1.GetEventTicketsRequest. + * Use `create(GetEventTicketsRequestSchema)` to create a new message. + */ +export const GetEventTicketsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 42); + +/** + * @generated from message zenao.v1.GetEventTicketsResponse + */ +export type GetEventTicketsResponse = Message<"zenao.v1.GetEventTicketsResponse"> & { + /** + * @generated from field: repeated zenao.v1.TicketInfo tickets_info = 1; + */ + ticketsInfo: TicketInfo[]; +}; + +/** + * @generated from message zenao.v1.GetEventTicketsResponse + */ +export type GetEventTicketsResponseJson = { + /** + * @generated from field: repeated zenao.v1.TicketInfo tickets_info = 1; + */ + ticketsInfo?: TicketInfoJson[]; +}; + +/** + * Describes the message zenao.v1.GetEventTicketsResponse. + * Use `create(GetEventTicketsResponseSchema)` to create a new message. + */ +export const GetEventTicketsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 43); + +/** + * @generated from message zenao.v1.TicketInfo + */ +export type TicketInfo = Message<"zenao.v1.TicketInfo"> & { + /** + * @generated from field: string ticket_secret = 1; + */ + ticketSecret: string; + + /** + * @generated from field: string user_email = 2; + */ + userEmail: string; +}; + +/** + * @generated from message zenao.v1.TicketInfo + */ +export type TicketInfoJson = { + /** + * @generated from field: string ticket_secret = 1; + */ + ticketSecret?: string; + + /** + * @generated from field: string user_email = 2; + */ + userEmail?: string; +}; + +/** + * Describes the message zenao.v1.TicketInfo. + * Use `create(TicketInfoSchema)` to create a new message. + */ +export const TicketInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 44); + +/** + * @generated from message zenao.v1.CheckinRequest + */ +export type CheckinRequest = Message<"zenao.v1.CheckinRequest"> & { + /** + * @generated from field: string ticket_pubkey = 1; + */ + ticketPubkey: string; + + /** + * @generated from field: string signature = 2; + */ + signature: string; +}; + +/** + * @generated from message zenao.v1.CheckinRequest + */ +export type CheckinRequestJson = { + /** + * @generated from field: string ticket_pubkey = 1; + */ + ticketPubkey?: string; + + /** + * @generated from field: string signature = 2; + */ + signature?: string; +}; + +/** + * Describes the message zenao.v1.CheckinRequest. + * Use `create(CheckinRequestSchema)` to create a new message. + */ +export const CheckinRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 45); + +/** + * @generated from message zenao.v1.CheckinResponse + */ +export type CheckinResponse = Message<"zenao.v1.CheckinResponse"> & { +}; + +/** + * @generated from message zenao.v1.CheckinResponse + */ +export type CheckinResponseJson = { +}; + +/** + * Describes the message zenao.v1.CheckinResponse. + * Use `create(CheckinResponseSchema)` to create a new message. + */ +export const CheckinResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 46); + +/** + * @generated from message zenao.v1.ExportParticipantsRequest + */ +export type ExportParticipantsRequest = Message<"zenao.v1.ExportParticipantsRequest"> & { + /** + * @generated from field: string event_id = 1; + */ + eventId: string; +}; + +/** + * @generated from message zenao.v1.ExportParticipantsRequest + */ +export type ExportParticipantsRequestJson = { + /** + * @generated from field: string event_id = 1; + */ + eventId?: string; +}; + +/** + * Describes the message zenao.v1.ExportParticipantsRequest. + * Use `create(ExportParticipantsRequestSchema)` to create a new message. + */ +export const ExportParticipantsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 47); + +/** + * @generated from message zenao.v1.ExportParticipantsResponse + */ +export type ExportParticipantsResponse = Message<"zenao.v1.ExportParticipantsResponse"> & { + /** + * XXX: cannot use bytes because not handled in gno-protoc-gen + * + * @generated from field: string content = 1; + */ + content: string; + + /** + * @generated from field: string filename = 2; + */ + filename: string; + + /** + * XXX: use this to change the mime type without re-generating the proto + * + * @generated from field: string mime_type = 3; + */ + mimeType: string; +}; + +/** + * @generated from message zenao.v1.ExportParticipantsResponse + */ +export type ExportParticipantsResponseJson = { + /** + * XXX: cannot use bytes because not handled in gno-protoc-gen + * + * @generated from field: string content = 1; + */ + content?: string; + + /** + * @generated from field: string filename = 2; + */ + filename?: string; + + /** + * XXX: use this to change the mime type without re-generating the proto + * + * @generated from field: string mime_type = 3; + */ + mimeType?: string; +}; + +/** + * Describes the message zenao.v1.ExportParticipantsResponse. + * Use `create(ExportParticipantsResponseSchema)` to create a new message. + */ +export const ExportParticipantsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_zenao_v1_zenao, 48); + +/** + * @generated from service zenao.v1.ZenaoService + */ +export const ZenaoService: GenService<{ + /** + * USER + * + * @generated from rpc zenao.v1.ZenaoService.EditUser + */ + editUser: { + methodKind: "unary"; + input: typeof EditUserRequestSchema; + output: typeof EditUserResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.GetUserAddress + */ + getUserAddress: { + methodKind: "unary"; + input: typeof GetUserAddressRequestSchema; + output: typeof GetUserAddressResponseSchema; + }, + /** + * EVENT + * + * @generated from rpc zenao.v1.ZenaoService.CreateEvent + */ + createEvent: { + methodKind: "unary"; + input: typeof CreateEventRequestSchema; + output: typeof CreateEventResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.EditEvent + */ + editEvent: { + methodKind: "unary"; + input: typeof EditEventRequestSchema; + output: typeof EditEventResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.GetEventGatekeepers + */ + getEventGatekeepers: { + methodKind: "unary"; + input: typeof GetEventGatekeepersRequestSchema; + output: typeof GetEventGatekeepersResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.ValidatePassword + */ + validatePassword: { + methodKind: "unary"; + input: typeof ValidatePasswordRequestSchema; + output: typeof ValidatePasswordResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.BroadcastEvent + */ + broadcastEvent: { + methodKind: "unary"; + input: typeof BroadcastEventRequestSchema; + output: typeof BroadcastEventResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.Participate + */ + participate: { + methodKind: "unary"; + input: typeof ParticipateRequestSchema; + output: typeof ParticipateResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.CancelParticipation + */ + cancelParticipation: { + methodKind: "unary"; + input: typeof CancelParticipationRequestSchema; + output: typeof CancelParticipationResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.GetEventTickets + */ + getEventTickets: { + methodKind: "unary"; + input: typeof GetEventTicketsRequestSchema; + output: typeof GetEventTicketsResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.Checkin + */ + checkin: { + methodKind: "unary"; + input: typeof CheckinRequestSchema; + output: typeof CheckinResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.ExportParticipants + */ + exportParticipants: { + methodKind: "unary"; + input: typeof ExportParticipantsRequestSchema; + output: typeof ExportParticipantsResponseSchema; + }, + /** + * FEED + * + * @generated from rpc zenao.v1.ZenaoService.CreatePoll + */ + createPoll: { + methodKind: "unary"; + input: typeof CreatePollRequestSchema; + output: typeof CreatePollResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.VotePoll + */ + votePoll: { + methodKind: "unary"; + input: typeof VotePollRequestSchema; + output: typeof VotePollResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.CreatePost + */ + createPost: { + methodKind: "unary"; + input: typeof CreatePostRequestSchema; + output: typeof CreatePostResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.DeletePost + */ + deletePost: { + methodKind: "unary"; + input: typeof DeletePostRequestSchema; + output: typeof DeletePostResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.ReactPost + */ + reactPost: { + methodKind: "unary"; + input: typeof ReactPostRequestSchema; + output: typeof ReactPostResponseSchema; + }, + /** + * @generated from rpc zenao.v1.ZenaoService.EditPost + */ + editPost: { + methodKind: "unary"; + input: typeof EditPostRequestSchema; + output: typeof EditPostResponseSchema; + }, + /** + * HEALTH + * + * @generated from rpc zenao.v1.ZenaoService.Health + */ + health: { + methodKind: "unary"; + input: typeof HealthRequestSchema; + output: typeof HealthResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_zenao_v1_zenao, 0); + diff --git a/packages/components/socialFeed/NewsFeed/NewsFeed.tsx b/packages/components/socialFeed/NewsFeed/NewsFeed.tsx index abb731a988..80f1ac824c 100644 --- a/packages/components/socialFeed/NewsFeed/NewsFeed.tsx +++ b/packages/components/socialFeed/NewsFeed/NewsFeed.tsx @@ -110,39 +110,41 @@ export const NewsFeed: React.FC = ({ const ListHeaderComponent = useCallback( () => ( <> - {!disablePosting && ( - - {isMobile ? ( - <> - setCreateModalVisible(true)} - /> - - - ) : ( - <> - - - - )} - - - )} + + {!disablePosting && ( + <> + {isMobile ? ( + <> + setCreateModalVisible(true)} + /> + + + ) : ( + <> + + + + )} + + )} + + ), @@ -252,11 +254,12 @@ export const NewsFeed: React.FC = ({ {flatListContentOffsetY >= OFFSET_Y_LIMIT_FLOATING + headerHeight && ( - setCreateModalVisible(true)} - style={{ marginBottom: layout.spacing_x1_5 }} - /> - + {!disablePosting && ( + setCreateModalVisible(true)} + style={{ marginBottom: layout.spacing_x1_5 }} + /> + )} )} diff --git a/packages/components/socialFeed/SocialActions/FlagModal.tsx b/packages/components/socialFeed/SocialActions/FlagModal.tsx index 128a690116..6ea2df7cb7 100644 --- a/packages/components/socialFeed/SocialActions/FlagModal.tsx +++ b/packages/components/socialFeed/SocialActions/FlagModal.tsx @@ -5,7 +5,6 @@ import { useFeedbacks } from "../../../context/FeedbacksProvider"; import { useSelectedNetworkInfo } from "../../../hooks/useSelectedNetwork"; import useSelectedWallet from "../../../hooks/useSelectedWallet"; import { mustGetGnoNetwork } from "../../../networks"; -import { TERITORI_FEED_ID } from "../../../utils/feed/constants"; import { adenaDoContract, AdenaDoContractMessageType, @@ -50,7 +49,7 @@ export const FlagModal: React.FC = ({ send: "", pkg_path: gnoNetwork.socialFeedsPkgPath, func: flagType === "hideForMe" ? "HidePostForMe" : "FlagPost", - args: [TERITORI_FEED_ID, postId], + args: [gnoNetwork.globalFeedId || "", postId], }; try { diff --git a/packages/components/socialFeed/SocialActions/TipModal.tsx b/packages/components/socialFeed/SocialActions/TipModal.tsx index 8fadf8709c..938643107f 100644 --- a/packages/components/socialFeed/SocialActions/TipModal.tsx +++ b/packages/components/socialFeed/SocialActions/TipModal.tsx @@ -21,7 +21,6 @@ import { } from "../../../networks"; import { prettyPrice } from "../../../utils/coins"; import { defaultSocialFeedFee } from "../../../utils/fee"; -import { TERITORI_FEED_ID } from "../../../utils/feed/constants"; import { adenaDoContract, AdenaDoContractMessageType, @@ -121,7 +120,10 @@ export const TipModal: React.FC<{ send: `${amount}ugnot`, pkg_path: selectedNetworkInfo.socialFeedsPkgPath, func: "TipPost", - args: [TERITORI_FEED_ID, parseNetworkObjectId(postId)[1]], + args: [ + selectedNetworkInfo.globalFeedId || "", + parseNetworkObjectId(postId)[1], + ], }; try { diff --git a/packages/components/socialFeed/SocialCard/SocialCardWrapper.tsx b/packages/components/socialFeed/SocialCard/SocialCardWrapper.tsx index 7ecc5e01a1..b8c6e3c7f7 100644 --- a/packages/components/socialFeed/SocialCard/SocialCardWrapper.tsx +++ b/packages/components/socialFeed/SocialCard/SocialCardWrapper.tsx @@ -6,7 +6,6 @@ import { useFeedbacks } from "../../../context/FeedbacksProvider"; import { useGetBanPostProposals } from "../../../hooks/feed/useBanPostProposals"; import useSelectedWallet from "../../../hooks/useSelectedWallet"; import { NetworkKind, getNetwork } from "../../../networks"; -import { TERITORI_FEED_ID } from "../../../utils/feed/constants"; import { adenaVMCall } from "../../../utils/gno"; import { GnoBanPostMessage, @@ -139,7 +138,7 @@ export const SocialCardWrapper: FC<{ const msg: GnoBanPostMessage = { type: "gno.land/r/teritori/social_feeds.BanPost", payload: { - feedId: +TERITORI_FEED_ID, + feedId: +(postNetwork.globalFeedId || ""), postId: +localPost.localIdentifier, reason: `Flag the post: ${localPost.localIdentifier}`, }, diff --git a/packages/hooks/feed/useCreatePost.tsx b/packages/hooks/feed/useCreatePost.tsx index 92458178ca..9ee36a5821 100644 --- a/packages/hooks/feed/useCreatePost.tsx +++ b/packages/hooks/feed/useCreatePost.tsx @@ -1,11 +1,13 @@ import { useQueryClient } from "@tanstack/react-query"; import { FetchCommentResponse } from "./useFetchComments"; +import { useSelectedNetworkId } from "../useSelectedNetwork"; import useSelectedWallet from "../useSelectedWallet"; +import { Post } from "@/api/feed/v1/feed"; import { useFeedbacks } from "@/context/FeedbacksProvider"; import { useTeritoriSocialFeedCreatePostMutation } from "@/contracts-clients/teritori-social-feed/TeritoriSocialFeed.react-query"; -import { PostResultExtra } from "@/utils/types/feed"; +import { getNetworkObjectId, getUserId } from "@/networks"; // =============== Used only for Simple Post for now. (Sorry for the mess) export const useCreatePost = ({ @@ -16,23 +18,28 @@ export const useCreatePost = ({ onMutate?: () => void; }) => { const wallet = useSelectedWallet(); + const selectedNetworkId = useSelectedNetworkId(); const { setToastSuccess, setToastError } = useFeedbacks(); const queryClient = useQueryClient(); const request = useTeritoriSocialFeedCreatePostMutation({ onMutate: (data) => { - const newComment: PostResultExtra = { + const localIdentifier = data.msg.identifier || ""; + const newComment: Post = { category: data.msg.category, - deleted: false, - identifier: data.msg.identifier, + isDeleted: false, + networkId: selectedNetworkId, + identifier: localIdentifier, + localIdentifier, + id: getNetworkObjectId(selectedNetworkId, localIdentifier), metadata: data.msg.metadata, - parent_post_identifier: data.msg.parentPostIdentifier, - post_by: wallet?.address || "", - sub_post_length: 0, - isInLocal: true, + parentPostIdentifier: data.msg.parentPostIdentifier || "", + subPostLength: 0, + authorId: getUserId(selectedNetworkId, wallet?.address || ""), reactions: [], - user_reactions: [], - tip_amount: "0", + tipAmount: 0, + premiumLevel: 0, + createdAt: Date.now(), }; const prevData = addUpdateNewComment( @@ -45,8 +52,7 @@ export const useCreatePost = ({ return { prevData, newComment }; // context }, onSuccess: async (_, data, context: any) => { - const updatedComment = context.newComment as PostResultExtra; - delete updatedComment.isInLocal; + const updatedComment = context.newComment as Post; addUpdateNewComment( data?.msg?.parentPostIdentifier || "", @@ -77,7 +83,7 @@ export const useCreatePost = ({ const addUpdateNewComment = ( parentPostIdentifier: string, - newComment: PostResultExtra, + newComment: Post, type: "add" | "update" = "add", ) => { const prevData: { pages: FetchCommentResponse[] } = diff --git a/packages/hooks/feed/useFeedPosting.ts b/packages/hooks/feed/useFeedPosting.ts index 5c0dfdef7c..eef1945df6 100644 --- a/packages/hooks/feed/useFeedPosting.ts +++ b/packages/hooks/feed/useFeedPosting.ts @@ -23,7 +23,6 @@ import { } from "@/networks"; import { prettyPrice } from "@/utils/coins"; import { defaultSocialFeedFee } from "@/utils/fee"; -import { TERITORI_FEED_ID } from "@/utils/feed/constants"; import { feedPostingStep, FeedPostingStepId } from "@/utils/feed/posting"; import { adenaDoContract, AdenaDoContractMessageType } from "@/utils/gno"; import { @@ -100,7 +99,7 @@ export const useFeedPosting = ( const msg: GnoCreatePostMessage = { type: "gno.land/r/teritori/social_feeds.CreatePost", payload: { - feedId: TERITORI_FEED_ID, + feedId: network.globalFeedId || "", parentId: "0", category: category.toString(), metadata, @@ -166,7 +165,7 @@ export const useFeedPosting = ( pkg_path: network.socialFeedsPkgPath, func: "CreatePost", args: [ - TERITORI_FEED_ID, + network.globalFeedId || "", parentPostLocalIdentifier || "0", msg.category.toString(), msg.metadata, diff --git a/packages/hooks/feed/useFetchComments.ts b/packages/hooks/feed/useFetchComments.ts index a2603b1864..ef7205e658 100644 --- a/packages/hooks/feed/useFetchComments.ts +++ b/packages/hooks/feed/useFetchComments.ts @@ -2,30 +2,22 @@ import { GnoJSONRPCProvider } from "@gnolang/gno-js-client"; import { useInfiniteQuery } from "@tanstack/react-query"; import { useMemo } from "react"; +import useSelectedWallet from "../useSelectedWallet"; + +import { Post } from "@/api/feed/v1/feed"; import { nonSigningSocialFeedClient } from "@/client-creators/socialFeedClient"; -import { - PostResult, - Reaction, -} from "@/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types"; +import { PostResult } from "@/contracts-clients/teritori-social-feed/TeritoriSocialFeed.types"; import { GnoNetworkInfo, NetworkKind, parseNetworkObjectId } from "@/networks"; -import { TERITORI_FEED_ID } from "@/utils/feed/constants"; -import { decodeGnoPost } from "@/utils/feed/gno"; -import { extractGnoJSONString } from "@/utils/gno"; +import { postViewToPost, postViewsFromJson } from "@/utils/feed/gno"; +import { extractGnoJSONResponse } from "@/utils/gno"; import { postResultToPost } from "@/utils/social-feed"; export type FetchCommentResponse = { - list: PostResult[]; + list: Post[]; } | null; -type PostResultWithCreatedAt = PostResult & { - created_at: number; -}; - const combineFetchCommentPages = (pages: FetchCommentResponse[]) => - pages.reduce( - (acc: PostResult[], page) => [...acc, ...(page?.list || [])], - [], - ); + pages.reduce((acc: Post[], page) => [...acc, ...(page?.list || [])], []); type ConfigType = { parentId?: string; @@ -42,74 +34,67 @@ const fetchTeritoriComments = async ( networkId, }); - const subComment = await client.querySubPosts({ + const comments = await client.querySubPosts({ count: 5, from: pageParam || 0, sort: "desc", identifier: parentId || "", }); - return { list: subComment }; + return { + list: comments.map((subPostRes: PostResult) => + postResultToPost(networkId, subPostRes), + ), + totalCount: comments.length, + }; }; +const gnoCommentsLimit = 10; const fetchGnoComments = async ( selectedNetwork: GnoNetworkInfo, parentId: string, + callerAddress: string | undefined, + pageParam: number, ): Promise => { - const provider = new GnoJSONRPCProvider(selectedNetwork.endpoint); + if (!selectedNetwork.socialFeedsPkgPath) return { list: [] }; + callerAddress = callerAddress || ""; - const offset = 0; - const limit = 100; // For now hardcode to load max 100 comments + const limit = gnoCommentsLimit; + const offset = pageParam * limit; + const tags = ""; + const provider = new GnoJSONRPCProvider(selectedNetwork.endpoint); const output = await provider.evaluateExpression( selectedNetwork.socialFeedsPkgPath || "", - `GetComments(${TERITORI_FEED_ID}, ${parentId}, ${offset}, ${limit})`, + `postViewsToJSON(GetChildrenPosts("${parentId}", ${offset}, ${limit}, "${tags}", "${callerAddress}"))`, ); - - const posts: PostResultWithCreatedAt[] = []; - - const gnoPosts = extractGnoJSONString(output); - for (const gnoPost of gnoPosts) { - const post = decodeGnoPost(selectedNetwork.id, gnoPost); - const [, creatorAddress] = parseNetworkObjectId(post.authorId); - - const chainReactions = post.reactions; - const postReactions: Reaction[] = chainReactions.map((reaction) => ({ - icon: reaction.icon, - count: reaction.count, - ownState: false, // FIXME: find a way to get the user's reaction state from on-chain post - })); - - posts.push({ - identifier: post.localIdentifier, - parent_post_identifier: post.parentPostIdentifier, - category: post.category, - metadata: post.metadata, - reactions: postReactions, - user_reactions: [], - post_by: creatorAddress, - deleted: post.isDeleted, - sub_post_length: post.subPostLength, - tip_amount: "" + post.tipAmount, - created_at: post.createdAt, - }); - } - + const raw = extractGnoJSONResponse(output); + const postViews = postViewsFromJson(raw); return { - list: posts.sort((p1, p2) => p2.created_at - p1.created_at) as PostResult[], + list: postViews.map((postView) => + postViewToPost(postView, selectedNetwork.id), + ), }; }; const useFetchCommentsRaw = ({ parentId, totalCount, enabled }: ConfigType) => { - // request + const selectedWallet = useSelectedWallet(); + const [parentNetwork, localIdentifier] = parseNetworkObjectId(parentId); + const data = useInfiniteQuery( ["FetchComment", parentId], - async ({ pageParam }) => { - const [parentNetwork, localIdentifier] = parseNetworkObjectId(parentId); + async ({ pageParam = 0 }) => { let comments: FetchCommentResponse; if (parentNetwork?.kind === NetworkKind.Gno) { - comments = await fetchGnoComments(parentNetwork, localIdentifier); - } else { + comments = await fetchGnoComments( + parentNetwork, + localIdentifier, + selectedWallet?.address, + pageParam, + ); + } + // Other networks (e.g., Cosmos) + else { comments = await fetchTeritoriComments( parentNetwork?.id || "", pageParam, @@ -120,12 +105,18 @@ const useFetchCommentsRaw = ({ parentId, totalCount, enabled }: ConfigType) => { }, { getNextPageParam: (_, pages) => { - const postsLength = combineFetchCommentPages(pages).length; - - if ((totalCount || 0) > postsLength) { - return postsLength; + if (parentNetwork?.kind === NetworkKind.Gno) { + if ((totalCount || 0) >= gnoCommentsLimit) { + return pages.length; + } + } else { + const postsLength = combineFetchCommentPages(pages).length; + + if ((totalCount || 0) > postsLength) { + return postsLength; + } + return null; } - return null; }, staleTime: Infinity, refetchOnWindowFocus: false, @@ -145,8 +136,7 @@ export const useFetchComments = (config: ConfigType) => { if (!rawData || !networkId) { return []; } - const combined = combineFetchCommentPages(rawData.pages); - return combined.map((rawPost) => postResultToPost(networkId, rawPost)); + return combineFetchCommentPages(rawData.pages); }, [rawData, config.parentId]); return { data, ...other }; diff --git a/packages/hooks/feed/useFetchFeed.ts b/packages/hooks/feed/useFetchFeed.ts index aaafc43d5e..25f8c9ca3a 100644 --- a/packages/hooks/feed/useFetchFeed.ts +++ b/packages/hooks/feed/useFetchFeed.ts @@ -10,16 +10,11 @@ import { PostsWithLocationRequest, PostsRequest, } from "@/api/feed/v1/feed"; -import { - GnoNetworkInfo, - NetworkInfo, - NetworkKind, - parseUserId, -} from "@/networks"; +import { GnoNetworkInfo, NetworkInfo, NetworkKind } from "@/networks"; import { mustGetFeedClient } from "@/utils/backend"; -import { TERITORI_FEED_ID } from "@/utils/feed/constants"; -import { decodeGnoPost } from "@/utils/feed/gno"; -import { extractGnoJSONString } from "@/utils/gno"; +import { postViewsFromJson, postViewsToPostsList } from "@/utils/feed/gno"; +import { extractGnoJSONResponse } from "@/utils/gno"; +import { PostsList } from "@/utils/types/feed"; import { DeepPartial } from "@/utils/typescript"; interface PostsWithAggregations { @@ -28,11 +23,6 @@ interface PostsWithAggregations { aggregations: AggregatedPost[]; } -export type PostsList = { - list: Post[]; - totalCount: number | undefined; -}; - export const combineFetchFeedPages = (pages: PostsList[]) => pages.reduce((acc: Post[], page) => [...acc, ...(page?.list || [])], []); @@ -48,7 +38,7 @@ const fetchTeritoriFeed = async ( const feedClient = mustGetFeedClient(selectedNetwork.id); const response = await feedClient.Posts(postsRequest); const list = response.posts.sort((a, b) => b.createdAt - a.createdAt); - return { list, totalCount: undefined }; + return { list, totalCount: list.length }; }; const fetchGnoFeed = async ( @@ -57,37 +47,24 @@ const fetchGnoFeed = async ( req: DeepPartial, pageParam: number, ) => { - if (!selectedNetwork.socialFeedsPkgPath) return { list: [], totalCount: 0 }; + if (!selectedNetwork.socialFeedsPkgPath || req.filter?.categories?.length) { + return { list: [], totalCount: 0 }; + } callerAddress = callerAddress || ""; - const userId = req.filter?.user || ""; - - const [, userAddress] = parseUserId(userId); - const offset = pageParam || 0; - const limit = req.limit; - const categories = req.filter?.categories || []; // Default = all - const categoriesStr = `[]uint64{${categories.join(",")}}`; - const parentId = 0; + const limit = req.limit || 0; + const offset = pageParam * limit; + const tags = ""; const provider = new GnoJSONRPCProvider(selectedNetwork.endpoint); + const output = await provider.evaluateExpression( - selectedNetwork.socialFeedsPkgPath, - `GetPostsWithCaller(${TERITORI_FEED_ID}, ${parentId}, "${callerAddress}", "${userAddress}", ${categoriesStr}, ${offset}, ${limit})`, + selectedNetwork.socialFeedsPkgPath || "", + `postViewsToJSON(GetFeedPosts("${selectedNetwork.globalFeedId}", ${offset}, ${limit}, "${tags}", "${callerAddress}"))`, ); - - const posts: Post[] = []; - const gnoPosts = extractGnoJSONString(output); - - for (const gnoPost of gnoPosts) { - const post = decodeGnoPost(selectedNetwork.id, gnoPost); - posts.push(post); - } - - const result = { - list: posts.sort((p1, p2) => p2.createdAt - p1.createdAt), - totalCount: posts.length, - } as PostsList; - return result; + const raw = extractGnoJSONResponse(output); + const postViews = postViewsFromJson(raw); + return postViewsToPostsList(postViews, selectedNetwork.id); }; export const useFetchFeed = (req: DeepPartial) => { @@ -98,9 +75,12 @@ export const useFetchFeed = (req: DeepPartial) => { useInfiniteQuery( ["posts", selectedNetwork?.id, wallet?.address, { ...req }], async ({ pageParam = req.offset }) => { + // Cosmos networks if (selectedNetwork?.kind === NetworkKind.Cosmos) { return fetchTeritoriFeed(selectedNetwork, req, pageParam); - } else if (selectedNetwork?.kind === NetworkKind.Gno) { + } + // Gno network + else if (selectedNetwork?.kind === NetworkKind.Gno) { return fetchGnoFeed(selectedNetwork, wallet?.address, req, pageParam); } @@ -108,11 +88,13 @@ export const useFetchFeed = (req: DeepPartial) => { }, { getNextPageParam: (lastPage, pages) => { - // NOTE: On gno feeds, due to list length depends on each user (due to flag, hide) - // so if last page contains posts = limit => try to load more content if (selectedNetwork?.kind === NetworkKind.Gno) { - if (lastPage?.totalCount && lastPage.totalCount === req.limit) { - return pages.length * req.limit; + if ( + lastPage.totalCount && + req.limit && + lastPage.totalCount >= req.limit + ) { + return pages.length; } } else { const postsLength = combineFetchFeedPages(pages).length; diff --git a/packages/hooks/feed/usePost.ts b/packages/hooks/feed/usePost.ts index d2f9dab111..d0ae077b0b 100644 --- a/packages/hooks/feed/usePost.ts +++ b/packages/hooks/feed/usePost.ts @@ -1,39 +1,47 @@ +import { fromJson } from "@bufbuild/protobuf"; import { GnoJSONRPCProvider } from "@gnolang/gno-js-client"; import { useQuery } from "@tanstack/react-query"; import moment from "moment"; +import useSelectedWallet from "../useSelectedWallet"; + import { Post } from "@/api/feed/v1/feed"; +import { PostViewJson, PostViewSchema } from "@/api/feeds/v1/feeds_pb"; import { nonSigningSocialFeedClient } from "@/client-creators/socialFeedClient"; import { NetworkKind, getUserId, parseNetworkObjectId } from "@/networks"; -import { decodeGnoPost } from "@/utils/feed/gno"; -import { extractGnoJSONString } from "@/utils/gno"; +import { postViewToPost } from "@/utils/feed/gno"; +import { extractGnoJSONResponse } from "@/utils/gno"; import { safeParseJSON, zodTryParseJSON } from "@/utils/sanitize"; import { zodSocialFeedCommonMetadata } from "@/utils/types/feed"; export const usePost = (id: string | undefined) => { + const wallet = useSelectedWallet(); + const { data, ...other } = useQuery( ["social-post", id], async () => { if (!id) { return null; } - const [network, localIdentifier] = parseNetworkObjectId(id); - if (!network) { return null; } - - if (network?.kind === NetworkKind.Gno) { + // Gno network + else if (network?.kind === NetworkKind.Gno) { + const callerAddress = wallet?.address || ""; const provider = new GnoJSONRPCProvider(network.endpoint); + const output = await provider.evaluateExpression( network.socialFeedsPkgPath || "", - `GetPost(1, ${localIdentifier})`, + `postViewToJSON(GetPostView(${localIdentifier}, "${callerAddress}"))`, ); - - const gnoPost = extractGnoJSONString(output); - return decodeGnoPost(network.id, gnoPost); - } else { + const raw = extractGnoJSONResponse(output); + const postView = fromJson(PostViewSchema, raw as PostViewJson); + return postViewToPost(postView, network.id); + } + // Other networks (e.g., Cosmos) + else { const client = await nonSigningSocialFeedClient({ networkId: network.id, }); diff --git a/packages/hooks/feed/useSocialReactions.ts b/packages/hooks/feed/useSocialReactions.ts index 11e2642899..9e372ca98c 100644 --- a/packages/hooks/feed/useSocialReactions.ts +++ b/packages/hooks/feed/useSocialReactions.ts @@ -14,7 +14,6 @@ import { NetworkFeature, NetworkKind, } from "@/networks"; -import { TERITORI_FEED_ID } from "@/utils/feed/constants"; import { adenaDoContract, AdenaDoContractMessageType } from "@/utils/gno"; import { DISLIKE_EMOJI, @@ -79,7 +78,12 @@ export const useSocialReactions = ({ send: "", pkg_path: gnoNetwork.socialFeedsPkgPath, func: "ReactPost", - args: [TERITORI_FEED_ID, post.id.split("-")[1], emoji, "true"], + args: [ + gnoNetwork.globalFeedId || "", + post.id.split("-")[1], + emoji, + "true", + ], }; try { diff --git a/packages/networks/gno-dev/index.ts b/packages/networks/gno-dev/index.ts index 1cd00eb988..afa3c018c8 100644 --- a/packages/networks/gno-dev/index.ts +++ b/packages/networks/gno-dev/index.ts @@ -42,6 +42,7 @@ export const gnoDevNetwork: GnoNetworkInfo = { // backendEndpoint: "https://dapp-backend.testnet.teritori.com", vaultContractAddress: "", daoRegistryPkgPath: "gno.land/r/teritori/dao_registry", + globalFeedId: "1", socialFeedsPkgPath: "gno.land/r/teritori/social_feeds", socialFeedsDAOPkgPath: "gno.land/r/teritori/social_feeds_dao", nameServiceContractAddress: "gno.land/r/demo/users", diff --git a/packages/networks/gno-portal/index.ts b/packages/networks/gno-portal/index.ts index a50e00ec78..e7eac1dcdb 100644 --- a/packages/networks/gno-portal/index.ts +++ b/packages/networks/gno-portal/index.ts @@ -30,6 +30,7 @@ export const gnoPortalNetwork: GnoNetworkInfo = { nameServiceDefaultImage: "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", daoRegistryPkgPath: "gno.land/r/teritori/dao_registry", + globalFeedId: "1", socialFeedsPkgPath: "gno.land/r/teritori/social_feeds", socialFeedsDAOPkgPath: "gno.land/r/teritori/social_feeds_dao", // modboardsPkgPath: "gno.land/r/teritori/modboards_v4", diff --git a/packages/networks/gno-test3/currencies.ts b/packages/networks/gno-test3/currencies.ts deleted file mode 100644 index cb3c09b8b1..0000000000 --- a/packages/networks/gno-test3/currencies.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { currencyGNOcolor } from "../../utils/style/colors"; -import { CurrencyInfo } from "../types"; - -export const gnoCurrencies: CurrencyInfo[] = [ - { - denom: "ugnot", - displayName: "GNOT", - decimals: 6, - variant: "gno", - coingeckoId: "gno", - icon: "gno.svg", - kind: "native", - color: currencyGNOcolor, - }, -]; diff --git a/packages/networks/gno-test3/index.ts b/packages/networks/gno-test3/index.ts deleted file mode 100644 index e1146d9434..0000000000 --- a/packages/networks/gno-test3/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { gnoCurrencies } from "./currencies"; -import { GnoNetworkInfo, NetworkKind } from "../types"; - -export const gnoTest3Network: GnoNetworkInfo = { - id: "gno-test3", - kind: NetworkKind.Gno, - displayName: "Gno Test3", - icon: "gno.svg", - features: [], - currencies: gnoCurrencies, - stakeCurrency: "ugnot", - idPrefix: "gnotest3", - chainId: "test3", - endpoint: "https://rpc.test3.gno.land", - txExplorer: "https://gnoscan.io/transactions/details?txhash=$hash", - accountExplorer: "https://gnoscan.io/accounts/$address", - contractExplorer: "https://gnoscan.io/realms/details?path=$address", - testnet: true, - backendEndpoint: "https://dapp-backend.mainnet.teritori.com", - vaultContractAddress: "", - nameServiceContractAddress: "gno.land/r/demo/users", - nameServiceDefaultImage: - "ipfs://bafkreignptjimiu7wuux6mk6uh4hb4odb6ff62ny4bvdokrhes7g67huse", - gnowebURL: "https://test3.gno.land", - txIndexerURL: "https://indexer.test3.gno.testnet.teritori.com", -}; diff --git a/packages/networks/gno-test5/index.ts b/packages/networks/gno-test5/index.ts deleted file mode 100644 index b9498af333..0000000000 --- a/packages/networks/gno-test5/index.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { gnoCurrencies } from "./currencies"; -import { GnoNetworkInfo, NetworkFeature, NetworkKind } from "../types"; - -export const gnoTest5Network: GnoNetworkInfo = { - id: "gno-test5", - kind: NetworkKind.Gno, - displayName: "Gno Test5", - icon: "gno.svg", - features: [ - NetworkFeature.Organizations, - NetworkFeature.SocialFeed, - NetworkFeature.UPP, - NetworkFeature.GnoProjectManager, - NetworkFeature.NameService, - ], - featureObjects: [ - { - type: NetworkFeature.GnoProjectManager, - projectsManagerPkgPath: "gno.land/r/teritori/projects_manager", - paymentsDenom: "ugnot", - }, - ], - currencies: gnoCurrencies, - stakeCurrency: "ugnot", - idPrefix: "gnotest5", - chainId: "test5", - endpoint: "https://rpc.test5.gno.land", - txExplorer: - "https://gnoscan.io/transactions/details?txhash=$hash&chainId=test5", - accountExplorer: "https://gnoscan.io/accounts/$address?chainId=test5", - contractExplorer: - "https://gnoscan.io/realms/details?path=$address&chainId=test5", - testnet: true, - backendEndpoint: "https://dapp-backend.testnet.teritori.com", - gnowebURL: "https://test5.gno.land", - vaultContractAddress: "", - nameServiceContractAddress: "gno.land/r/demo/users", - nameServiceDefaultImage: - "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", - socialFeedsPkgPath: "gno.land/r/teritori/social_feeds", - socialFeedsDAOPkgPath: "gno.land/r/teritori/social_feeds_dao", - daoInterfacesPkgPath: "gno.land/p/teritori/dao_interfaces", - profilePkgPath: "gno.land/r/demo/profile", - txIndexerURL: "https://indexer.test5.gno.testnet.teritori.com", -}; diff --git a/packages/networks/gno-test5/currencies.ts b/packages/networks/gno-zenao-staging/currencies.ts similarity index 100% rename from packages/networks/gno-test5/currencies.ts rename to packages/networks/gno-zenao-staging/currencies.ts diff --git a/packages/networks/gno-zenao-staging/index.ts b/packages/networks/gno-zenao-staging/index.ts new file mode 100644 index 0000000000..1ab1f41146 --- /dev/null +++ b/packages/networks/gno-zenao-staging/index.ts @@ -0,0 +1,51 @@ +import { gnoCurrencies } from "./currencies"; +import { GnoNetworkInfo, NetworkFeature, NetworkKind } from "../types"; + +import { derivePkgAddr } from "@/utils/gno"; + +const testEventId = "40"; +const pkgPath = `gno.land/r/zenao/events/e${testEventId}`; +const globalFeedId = `${derivePkgAddr(pkgPath)}:main`; + +export const gnoZenaoStagingNetwork: GnoNetworkInfo = { + id: "gno-zenao-staging", + kind: NetworkKind.Gno, + displayName: "Gno Zenao Staging", + icon: "zenao.svg", + features: [ + NetworkFeature.Organizations, + NetworkFeature.UPP, + NetworkFeature.NameService, + ], + currencies: gnoCurrencies, + stakeCurrency: "ugnot", + idPrefix: "zenaostaging", + chainId: "zenao-dev-staging", + endpoint: "https://gnorpc.staging.zenao.io/", + testnet: true, + backendEndpoint: "https://dapp-backend.testnet.teritori.com", + gnowebURL: "https://gnoweb.staging.zenao.io/", + vaultContractAddress: "", + nameServiceContractAddress: "gno.land/r/demo/users", + nameServiceDefaultImage: + "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", + globalFeedId, + socialFeedsPkgPath: "gno.land/r/zenao/social_feed", + socialFeedsDAOPkgPath: "gno.land/r/teritori/social_feeds_dao", + daoInterfacesPkgPath: "gno.land/p/teritori/dao_interfaces", + profilePkgPath: "gno.land/r/demo/profile", + txIndexerURL: "https://indexer.zenao.gno.testnet.teritori.com", + cockpitNamespace: "zenao", + + txExplorer: "", + accountExplorer: "", + contractExplorer: "", +}; + +const customGnoscanParams = (network: GnoNetworkInfo) => { + return `type=custom&chainId=${network.chainId}&rpcUrl=${network.endpoint}&indexerUrl=${network.txIndexerURL}`; +}; + +gnoZenaoStagingNetwork.txExplorer = `https://gnoscan.io/transactions/details?txhash=$hash&${customGnoscanParams(gnoZenaoStagingNetwork)}`; +gnoZenaoStagingNetwork.accountExplorer = `https://gnoscan.io/accounts/$address?${customGnoscanParams(gnoZenaoStagingNetwork)}`; +gnoZenaoStagingNetwork.contractExplorer = `https://gnoscan.io/realms/details?path=$address&${customGnoscanParams(gnoZenaoStagingNetwork)}`; diff --git a/packages/networks/gno-zenao/index.ts b/packages/networks/gno-zenao/index.ts index 95c4b06b3b..190c4c39d3 100644 --- a/packages/networks/gno-zenao/index.ts +++ b/packages/networks/gno-zenao/index.ts @@ -1,6 +1,12 @@ import { gnoCurrencies } from "./currencies"; import { GnoNetworkInfo, NetworkFeature, NetworkKind } from "../types"; +import { derivePkgAddr } from "@/utils/gno"; + +const hyperacktiveEventId = "15"; +const pkgPath = `gno.land/r/zenao/events/e${hyperacktiveEventId}`; +const globalFeedId = `${derivePkgAddr(pkgPath)}:main`; + export const gnoZenaoNetwork: GnoNetworkInfo = { id: "gno-zenao", kind: NetworkKind.Gno, @@ -15,15 +21,16 @@ export const gnoZenaoNetwork: GnoNetworkInfo = { stakeCurrency: "ugnot", idPrefix: "zenao", chainId: "zenao-dev", - endpoint: "https://zenao-gno.fly.dev:26657", + endpoint: "https://gnorpc.prod.zenao.io/", testnet: true, backendEndpoint: "https://dapp-backend.testnet.teritori.com", - gnowebURL: "https://zenao-gno.fly.dev", + gnowebURL: "https://gnoweb.prod.zenao.io/", vaultContractAddress: "", nameServiceContractAddress: "gno.land/r/demo/users", nameServiceDefaultImage: "ipfs://bafkreigqm3i4urywxohvpkbz5sgxosiogwn433ufmzz7eqldjxoi6xmwma", - socialFeedsPkgPath: "gno.land/r/teritori/social_feeds", + globalFeedId, + socialFeedsPkgPath: "gno.land/r/zenao/social_feed", socialFeedsDAOPkgPath: "gno.land/r/teritori/social_feeds_dao", daoInterfacesPkgPath: "gno.land/p/teritori/dao_interfaces", profilePkgPath: "gno.land/r/demo/profile", diff --git a/packages/networks/index.ts b/packages/networks/index.ts index 58c4476407..a805742a39 100644 --- a/packages/networks/index.ts +++ b/packages/networks/index.ts @@ -13,9 +13,8 @@ import { ethereumGoerliNetwork } from "./ethereum-goerli"; import { NetworkFeature, NetworkFeatureObject } from "./features"; import { gnoDevNetwork } from "./gno-dev"; import { gnoPortalNetwork } from "./gno-portal"; -import { gnoTest3Network } from "./gno-test3"; -import { gnoTest5Network } from "./gno-test5"; import { gnoZenaoNetwork } from "./gno-zenao"; +import { gnoZenaoStagingNetwork } from "./gno-zenao-staging"; import { osmosisNetwork } from "./osmosis"; import { osmosisTestnetNetwork } from "./osmosis-testnet"; // import { solanaNetwork } from "./solana"; @@ -52,8 +51,6 @@ const packageNetworks = [ osmosisNetwork, osmosisTestnetNetwork, gnoPortalNetwork, - gnoTest3Network, - gnoTest5Network, gnoDevNetwork, polygonMumbaiNetwork, polygonNetwork, @@ -62,6 +59,7 @@ const packageNetworks = [ starknetNetwork, starknetSepoliaNetwork, gnoZenaoNetwork, + gnoZenaoStagingNetwork, ]; export const defaultEnabledNetworks = [ diff --git a/packages/networks/types.ts b/packages/networks/types.ts index 6e33147970..bbb9fdb372 100644 --- a/packages/networks/types.ts +++ b/packages/networks/types.ts @@ -123,6 +123,7 @@ export type GnoNetworkInfo = NetworkInfoBase & { gnowebURL: string; daoRegistryPkgPath?: string; modboardsPkgPath?: string; + globalFeedId?: string; socialFeedsPkgPath?: string; socialFeedsDAOPkgPath?: string; votingGroupPkgPath?: string; diff --git a/packages/utils/feed/constants.ts b/packages/utils/feed/constants.ts deleted file mode 100644 index cbf0bae873..0000000000 --- a/packages/utils/feed/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const TERITORI_FEED_ID = "1"; diff --git a/packages/utils/feed/gno.ts b/packages/utils/feed/gno.ts index 89305b2ba7..9a07336b99 100644 --- a/packages/utils/feed/gno.ts +++ b/packages/utils/feed/gno.ts @@ -1,49 +1,259 @@ -import { Post, Reaction } from "../../api/feed/v1/feed"; -import { getNetworkObjectId, getUserId } from "../../networks"; - -type GnoPost = { - id: number; - parentID: number; - feedID: number; - category: number; - metadata: string; - reactions: { - [key: string]: number; - }; - commentsCount: number; - creator: string; - tipAmount: number; - deleted: boolean; - createdAt: number; - updatedAt: number; - deletedAt: number; +import { fromJson } from "@bufbuild/protobuf"; + +import { + generateArticleMarkdownMetadata, + generatePostMetadata, +} from "../feed/queries"; +import { PostCategory, PostsList } from "../types/feed"; +import { FileType, RemoteFileData } from "../types/files"; + +import { Post, Reaction } from "@/api/feed/v1/feed"; +import { + PostView, + PostViewJson, + PostViewSchema, +} from "@/api/feeds/v1/feeds_pb"; +import { getNetworkObjectId, getUserId } from "@/networks"; + +export const postViewsFromJson = (raw: unknown) => { + const list = raw as unknown[]; + return list.map((elem) => fromJson(PostViewSchema, elem as PostViewJson)); }; -export const decodeGnoPost = (networkId: string, gnoPost: GnoPost): Post => { - const reactions: Reaction[] = []; +const categoryFromPostView = ({ post }: PostView): PostCategory => { + switch (post!.post.case) { + case "article": + return PostCategory.Article; + case "audio": + return PostCategory.Audio; + case "image": + return PostCategory.Picture; + case "link": + if (post!.tags.includes("poll")) return PostCategory.Poll; + return PostCategory.Normal; + case "standard": + return PostCategory.Normal; + case "video": + return PostCategory.VideoNote; + default: + return PostCategory.Normal; + } +}; - for (const [icon, count] of Object.entries(gnoPost.reactions)) { - reactions.push({ icon, count, ownState: false }); // FIXME: find a way to get the user's reaction state from on-chain post +const reactionsFromPostView = ({ reactions }: PostView): Reaction[] => + reactions.map(({ icon, count, userHasVoted }) => ({ + icon, + count, + ownState: userHasVoted, + })); + +const guessMimeTypeFromExtension = (ext: string): string => { + switch (ext) { + case "jpg": + case "jpeg": + return "image/jpeg"; + case "png": + return "image/png"; + case "gif": + return "image/gif"; + case "webp": + return "image/webp"; + case "mp4": + return "video/mp4"; + case "mp3": + return "audio/mpeg"; + case "wav": + return "audio/wav"; + default: + return "application/octet-stream"; // fallback } +}; - const localIdentifier = gnoPost.id ? "" + gnoPost.id : ""; +const guessFileTypeFromMime = (mimeType: string): FileType => { + if (mimeType.startsWith("image/")) return "image"; + if (mimeType.startsWith("video/")) return "video"; + if (mimeType.startsWith("audio/")) return "audio"; + return "file"; // fallback +}; - const post: Post = { - category: gnoPost.category, - isDeleted: gnoPost.deleted, - networkId, +const ipfsFileInsertionRegex = /!\[([^\]]+)\]\((ipfs:\/\/[^)]+)\)/g; +const extractIpfsFiles = (content: string): RemoteFileData[] => { + const matches = [...content.matchAll(ipfsFileInsertionRegex)]; + + return matches.map((match, i) => { + const fileNameFromMarkdown = match[1]; // e.g., Zenao-InsideEventDesc-Long-TMP.png + const url = match[2]; + + const ext = fileNameFromMarkdown.split(".").pop()?.toLowerCase() || ""; + const mimeType = guessMimeTypeFromExtension(ext); + const fileType = guessFileTypeFromMime(mimeType); + + return { + fileName: fileNameFromMarkdown || `File${i + 1}`, + mimeType, + size: 0, // We don't know it + url, + fileType, + }; + }); +}; + +const cleanMdContent = (content: string): string => { + // Remove IPFS file insertion from markdown + return content.replace(ipfsFileInsertionRegex, "").trim(); +}; + +const metadataFromPostView = (postView: PostView): string => { + const post = postView.post!; + let metadata = {}; + switch (post.post.case) { + case "article": + metadata = generateArticleMarkdownMetadata({ + title: post.post.value.title, + message: post.post.value.content, + thumbnailImage: { + fileName: "Image", // We don't know it + mimeType: "image/jpeg", // We don't know it + size: 0, // We don't know it + url: post.post.value.previewImageUri, + fileType: "image", + isThumbnailImage: true, + }, + shortDescription: post.post.value.previewText, + location: post.loc, + files: [], + hashtags: [], + mentions: [], + }); + break; + case "standard": + metadata = generatePostMetadata({ + title: "", + message: cleanMdContent(post.post.value.content), + location: post.loc, + files: extractIpfsFiles(post.post.value.content), + hashtags: [], + mentions: [], + premium: false, + }); + break; + case "video": + metadata = generatePostMetadata({ + title: post.post.value.title, + message: cleanMdContent(post.post.value.description), + location: post.loc, + files: [ + { + fileName: "Video", // We don't know it + mimeType: "video/mp4", // We don't know it + size: 0, // We don't know it + url: post.post.value.videoUri, + fileType: "video", + thumbnailFileData: { + fileName: "Image", // We don't know it + mimeType: "image/jpeg", // We don't know it + size: 0, // We don't know it + url: post.post.value.thumbnailImageUri, + fileType: "image", + }, + }, + ], + hashtags: [], + mentions: [], + premium: false, + }); + break; + case "audio": + metadata = generatePostMetadata({ + title: post.post.value.title, + message: cleanMdContent(post.post.value.description), + location: post.loc, + files: [ + { + fileName: "Audo", // We don't know it + mimeType: "audio/mpeg", // We don't know it + size: 0, // We don't know it + url: post.post.value.imageUri, + fileType: "audio", + }, + ], + hashtags: [], + mentions: [], + premium: false, + }); + break; + case "image": + metadata = generatePostMetadata({ + title: post.post.value.title, + message: cleanMdContent(post.post.value.description), + location: post.loc, + files: [ + { + fileName: "Image", // We don't know it + mimeType: "image/jpeg", // We don't know it + size: 0, // We don't know it + url: post.post.value.imageUri, + fileType: "image", + }, + ], + hashtags: [], + mentions: [], + premium: false, + }); + break; + // TODO: + // + // case "link": + // return generatePollMetadata({ + // ...... + // }); + // break; + default: + metadata = generatePostMetadata({ + title: "", + message: "WARNING: UNKNOWN ZENAO POST CASE", + location: post.loc, + files: [], + hashtags: [], + mentions: [], + premium: false, + }); + } + return JSON.stringify(metadata); +}; + +export const postViewToPost = (postView: PostView, networkId: string): Post => { + const localIdentifier = postView.post!.localPostId.toString(); + + return { + category: categoryFromPostView(postView), + isDeleted: !!postView.post?.deletedAt, identifier: localIdentifier, - localIdentifier, - id: getNetworkObjectId(networkId, localIdentifier), - metadata: gnoPost.metadata, - parentPostIdentifier: gnoPost.parentID ? "" + gnoPost.parentID : "", - subPostLength: gnoPost.commentsCount, - authorId: getUserId(networkId, gnoPost.creator), - createdAt: gnoPost.createdAt, - tipAmount: gnoPost.tipAmount, - reactions, + metadata: metadataFromPostView(postView), + parentPostIdentifier: postView.post?.parentUri || "", + subPostLength: Number(postView.childrenCount), + authorId: getUserId(networkId, postView.post?.author), + createdAt: Number(postView.post?.createdAt), + reactions: reactionsFromPostView(postView), + tipAmount: 0, // TODO: Handle this in future new gno social_feeds premiumLevel: 0, + id: getNetworkObjectId(networkId, localIdentifier), + localIdentifier, + networkId, }; +}; + +export const postViewsToPostsList = ( + postViews: PostView[], + networkId: string, +): PostsList => { + const list: Post[] = postViews + .filter((postView) => !!postView.post) + .map((postView) => postViewToPost(postView, networkId)); - return post; + const postsList = { + list, + totalCount: postViews.length, + }; + return postsList; }; diff --git a/packages/utils/gno.ts b/packages/utils/gno.ts index c9f0c17948..c408d3903b 100644 --- a/packages/utils/gno.ts +++ b/packages/utils/gno.ts @@ -120,7 +120,6 @@ export const extractGnoNumber = (str: string) => { return parseFloat(str.slice("(".length).split(" ")[0]); }; export const extractGnoAddress = (str: string) => { - console.log("extracting address", str); const jsonStr = str.slice("(".length, -" std.Address)".length); if (!jsonStr) { return ""; @@ -130,7 +129,6 @@ export const extractGnoAddress = (str: string) => { return JSON.parse(jsonStr) as string; }; export const extractGnoString = (str: string) => { - console.log("extracting string from", str); const jsonStr = str.slice("(".length, -" string)".length); if (!jsonStr) { return ""; @@ -152,3 +150,21 @@ export const derivePkgAddr = (pkgPath: string): string => { .subarray(0, 20); return bech32.encode("g", bech32.toWords(h)); }; + +const extractGnoStringResponse = (res: string): string => { + const jsonString = res.substring("(".length, res.length - " string)".length); + // eslint-disable-next-line no-restricted-syntax + const jsonStringContent = JSON.parse(jsonString); + if (typeof jsonStringContent != "string") { + throw new Error( + `unexpected response type ${typeof jsonStringContent} in ${jsonString}`, + ); + } + return jsonStringContent; +}; + +export const extractGnoJSONResponse = (res: string): unknown => { + const str = extractGnoStringResponse(res); + // eslint-disable-next-line no-restricted-syntax + return JSON.parse(str) as unknown; +}; diff --git a/packages/utils/types/feed.ts b/packages/utils/types/feed.ts index 68c4a026d7..e8a644c259 100644 --- a/packages/utils/types/feed.ts +++ b/packages/utils/types/feed.ts @@ -20,6 +20,8 @@ export enum PostCategory { MusicAudio, Video, ArticleMarkdown, + // TODO: Handle new category Poll + Poll, } export interface NewArticleFormValues { @@ -52,6 +54,11 @@ export interface PostExtra extends Post { isInLocal?: boolean; } +export interface PostsList { + list: Post[]; + totalCount: number | undefined; +} + // some files are malformed, we use this filter to get only valid file data const MaybeFiles = z .array(z.unknown()) diff --git a/packages/utils/upp.ts b/packages/utils/upp.ts index b8fab32a6b..2eb91138a3 100644 --- a/packages/utils/upp.ts +++ b/packages/utils/upp.ts @@ -27,11 +27,11 @@ export const uppTabItems: { [key: string]: TabDefinition } = { }, [UppTabKeys.nfts]: { name: "NFTs", - networkFeatures: [NetworkFeature.NFTMarketplace], + networkFeatures: [NetworkFeature.SocialFeed], }, [UppTabKeys.quests]: { name: "Quests", - networkKinds: [NetworkKind.Cosmos], + networkFeatures: [NetworkFeature.SocialFeed], }, [UppTabKeys.mentionsPosts]: { name: "Mentions Posts", diff --git a/yarn.lock b/yarn.lock index 820c4de7c4..ac6f93b69d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2126,6 +2126,13 @@ __metadata: languageName: node linkType: hard +"@bufbuild/protobuf@npm:^2.6.0": + version: 2.6.0 + resolution: "@bufbuild/protobuf@npm:2.6.0" + checksum: 9337e89052a0e4b6a1ca099f09801243055c7027a9ecb2e2d22ae25926f8730d32f5e2e8222214155de2847324b0f07fee0318621147f229da8f2fb595ff6802 + languageName: node + linkType: hard + "@callstack/react-theme-provider@npm:^3.0.7": version: 3.0.9 resolution: "@callstack/react-theme-provider@npm:3.0.9" @@ -6912,10 +6919,10 @@ __metadata: languageName: node linkType: hard -"@tanstack/query-core@npm:4.36.1": - version: 4.36.1 - resolution: "@tanstack/query-core@npm:4.36.1" - checksum: 47672094da20d89402d9fe03bb7b0462be73a76ff9ca715169738bc600a719d064d106d083a8eedae22a2c22de22f87d5eb5d31ef447aba771d9190f2117ed10 +"@tanstack/query-core@npm:4.40.0": + version: 4.40.0 + resolution: "@tanstack/query-core@npm:4.40.0" + checksum: 0d51f905819bdaeeeddad30a94a85c2cdda6de90dde716195274613ef0f2840cbc476fc2401848b5ef70bbcbc67749ac4c216a3c5bc56fc933b642a346f32b87 languageName: node linkType: hard @@ -6927,10 +6934,10 @@ __metadata: linkType: hard "@tanstack/react-query@npm:^4.12.0": - version: 4.36.1 - resolution: "@tanstack/react-query@npm:4.36.1" + version: 4.40.1 + resolution: "@tanstack/react-query@npm:4.40.1" dependencies: - "@tanstack/query-core": 4.36.1 + "@tanstack/query-core": 4.40.0 use-sync-external-store: ^1.2.0 peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 @@ -6941,7 +6948,7 @@ __metadata: optional: true react-native: optional: true - checksum: 1aff0a476859386f8d32253fa0d0bde7b81769a6d4d4d9cbd78778f0f955459a3bdb7ee27a0d2ee7373090f12998b45df80db0b5b313bd0a7a39d36c6e8e51c5 + checksum: f183f7cd3c1c1786b901dd01b154b9961f75f247d4c8bf646d752530341d901d2e7057e56e28a3e6c2e880523838defb00a621efde2fc7df6f6500f381715d44 languageName: node linkType: hard @@ -21597,6 +21604,7 @@ __metadata: "@babel/plugin-transform-arrow-functions": ^7.23.3 "@babel/plugin-transform-shorthand-properties": ^7.23.3 "@babel/plugin-transform-template-literals": ^7.23.3 + "@bufbuild/protobuf": ^2.6.0 "@chain-registry/types": ^0.17.1 "@chain-registry/utils": 1.18.0 "@cosmjs/amino": 0.32.2 @@ -22779,7 +22787,7 @@ __metadata: languageName: node linkType: hard -"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.0.0, use-sync-external-store@npm:^1.2.0": +"use-sync-external-store@npm:1.2.0, use-sync-external-store@npm:^1.0.0": version: 1.2.0 resolution: "use-sync-external-store@npm:1.2.0" peerDependencies: @@ -22788,6 +22796,15 @@ __metadata: languageName: node linkType: hard +"use-sync-external-store@npm:^1.2.0": + version: 1.5.0 + resolution: "use-sync-external-store@npm:1.5.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + checksum: 5e639c9273200adb6985b512c96a3a02c458bc8ca1a72e91da9cdc6426144fc6538dca434b0f99b28fb1baabc82e1c383ba7900b25ccdcb43758fb058dc66c34 + languageName: node + linkType: hard + "utf-8-validate@npm:^5.0.2": version: 5.0.10 resolution: "utf-8-validate@npm:5.0.10"