diff --git a/packages/client/src/actions/actions.ts b/packages/client/src/actions/actions.ts index 844c358540..8c6f430d69 100644 --- a/packages/client/src/actions/actions.ts +++ b/packages/client/src/actions/actions.ts @@ -37,7 +37,6 @@ import type { UnauthenticatedError, UnexpectedError } from '../errors'; * ```ts * const result = await configurePostAction(sessionClient, { * post: postId('1234…'), - * feed: evmAddress('0x1234…'), * params: { * simpleCollect: { * amount: { @@ -66,8 +65,7 @@ export function configurePostAction( * ```ts * const result = await enablePostAction(sessionClient, { * post: postId('1234…'), - * feed: evmAddress('0x1234…'), - * action: 'SIMPLE_COLLECT' + * action: { simpleCollect: true } * }); * ``` * @@ -88,8 +86,7 @@ export function enablePostAction( * ```ts * const result = await disablePostAction(sessionClient, { * post: postId('1234…'), - * feed: evmAddress('0x1234…'), - * action: 'SIMPLE_COLLECT' + * action: { simpleCollect: true } * }); * ``` * @@ -110,11 +107,9 @@ export function disablePostAction( * ```ts * const result = await executePostAction(sessionClient, { * post: postId('1234…'), - * feed: evmAddress('0x1234…'), - * params: { + * action: { * simpleCollect: { - * value: '100', - * currency: evmAddress('0x5678…') + * selected: true, * } * } * }); @@ -161,10 +156,17 @@ export function configureAccountAction( /** * Enable account action. + * The tipping action is not possible to modify. * * ```ts * const result = await enableAccountAction(sessionClient, { - * action: 'TIPPING' + * unknown: { + * params: [{ + * key: 'usd', + * value: '100' + * }], + * address: evmAddress('0x1234…'), + * } * }); * ``` * @@ -181,10 +183,13 @@ export function enableAccountAction( /** * Disable account action. + * Not possible to disable the tipping action. * * ```ts * const result = await disableAccountAction(sessionClient, { - * action: 'TIPPING' + * unknown: { + * address: evmAddress('0x1234…'), + * } * }); * ``` * diff --git a/packages/client/src/actions/index.ts b/packages/client/src/actions/index.ts index 9e1382ebe0..125d33c2ab 100644 --- a/packages/client/src/actions/index.ts +++ b/packages/client/src/actions/index.ts @@ -9,8 +9,9 @@ export * from './follow'; export * from './graph'; export * from './group'; export * from './health'; -export * from './namespace'; +export * from './metadata'; export * from './ml'; +export * from './namespace'; export * from './notifications'; export * from './post'; export * from './posts'; diff --git a/packages/client/src/actions/metadata.test.ts b/packages/client/src/actions/metadata.test.ts new file mode 100644 index 0000000000..65fe6aaa31 --- /dev/null +++ b/packages/client/src/actions/metadata.test.ts @@ -0,0 +1,48 @@ +import { type PostId, assertOk, invariant } from '@lens-protocol/types'; +import { beforeAll, describe, expect, it } from 'vitest'; + +import { + createPublicClient, + loginAsAccountOwner, + postOnlyTextMetadata, + wallet, +} from '../test-utils'; +import { handleOperationWith } from '../viem'; +import { refreshMetadata, waitForMetadata } from './metadata'; +import { post } from './post'; +import { fetchPost } from './posts'; + +describe('Given user creates a post', () => { + let postId: PostId; + + beforeAll(async () => { + // Create a post with metadata + const resources = await postOnlyTextMetadata(); + const result = await loginAsAccountOwner().andThen((sessionClient) => + post(sessionClient, { + contentUri: resources.uri, + }) + .andThen(handleOperationWith(wallet)) + .andThen(sessionClient.waitForTransaction) + .andThen((tx) => fetchPost(sessionClient, { txHash: tx })), + ); + assertOk(result); + invariant(result.value, 'Expected post to be defined and created'); + postId = result.value.id; + }); + + describe('When user modifies metadata in the used URL and call refreshMetadata', () => { + it('Then post metadata content should be updated', async () => { + // TODO: add possibility to change metadata in the same URL and refresh later + // That feature will be available soon in the storage nodes + const client = createPublicClient(); + const newMetadata = await refreshMetadata(client, { entity: { post: postId } }); + + assertOk(newMetadata); + invariant(newMetadata.value, 'Expected to be defined'); + const result = await waitForMetadata(client, newMetadata.value.id); + assertOk(result); + expect(result.value).toEqual(newMetadata.value.id); + }); + }); +}); diff --git a/packages/client/src/actions/metadata.ts b/packages/client/src/actions/metadata.ts new file mode 100644 index 0000000000..48270cc6db --- /dev/null +++ b/packages/client/src/actions/metadata.ts @@ -0,0 +1,97 @@ +import type { + RefreshMetadataRequest, + RefreshMetadataResult, + RefreshMetadataStatusRequest, + RefreshMetadataStatusResult, +} from '@lens-protocol/graphql'; +import { + IndexingStatus, + RefreshMetadataMutation, + RefreshMetadataStatusQuery, +} from '@lens-protocol/graphql'; +import { ResultAsync, type UUID } from '@lens-protocol/types'; + +import type { AnyClient } from '../clients'; +import { MetadataIndexingError, type UnauthenticatedError, UnexpectedError } from '../errors'; +import { delay } from '../utils'; + +/** + * Fetch the indexing status of metadata. + * + * ```ts + * const result = await refreshMetadataStatus(anyClient, { + * id: uuid("a0a88a62-377f-46eb-a1ec-ca6597aef164") + * }); + * ``` + * + * @param client - Any Lens client. + * @param request - The query request. + * @returns The indexing status of the metadata. + */ +export function refreshMetadataStatus( + client: AnyClient, + request: RefreshMetadataStatusRequest, +): ResultAsync { + return client.query(RefreshMetadataStatusQuery, { request }); +} + +/** + * Refresh the metadata for a given entity. + * + * ```ts + * const result = await refreshMetadata(anyClient, { + * entity: { + * post: postId('42'), + * }, + * }); + * ``` + * + * @param client - Any Lens client. + * @param request - The mutation request. + * @returns - UUID to track the metadata refresh. + */ +export function refreshMetadata( + client: AnyClient, + request: RefreshMetadataRequest, +): ResultAsync { + return client.mutation(RefreshMetadataMutation, { request }); +} + +/** + * Given a metadata id, wait for the metadata to be either confirmed or rejected by the Lens API. + * + * @param client - Any Lens client. + * @param id - The metadata id to wait for. + * @returns The metadata id if the metadata was confirmed or an error if the transaction was rejected. + */ +export function waitForMetadata( + client: AnyClient, + id: UUID, +): ResultAsync { + return ResultAsync.fromPromise(pollMetadataStatus(client, id), (err) => { + if (err instanceof MetadataIndexingError || err instanceof UnexpectedError) { + return err; + } + return UnexpectedError.from(err); + }); +} + +async function pollMetadataStatus(client: AnyClient, id: UUID): Promise { + const startedAt = Date.now(); + while (Date.now() - startedAt < client.context.environment.indexingTimeout) { + const result = await refreshMetadataStatus(client, { id }); + if (result.isErr()) { + throw UnexpectedError.from(result.error); + } + switch (result.value.status) { + case IndexingStatus.Finished: + return result.value.id; + case IndexingStatus.Failed: + throw MetadataIndexingError.from(result.value.reason); + case IndexingStatus.Pending: + await delay(client.context.environment.pollingInterval); + break; + } + } + throw MetadataIndexingError.from(`Timeout waiting for metadata ${id}`); +} diff --git a/packages/client/src/clients.ts b/packages/client/src/clients.ts index 16c6edd08a..f2a4e8600e 100644 --- a/packages/client/src/clients.ts +++ b/packages/client/src/clients.ts @@ -1,10 +1,11 @@ -import { AuthenticateMutation, ChallengeMutation, RefreshMutation } from '@lens-protocol/graphql'; import type { AuthenticationChallenge, ChallengeRequest, SignedAuthChallenge, StandardData, + SwitchAccountRequest, } from '@lens-protocol/graphql'; +import { AuthenticateMutation, ChallengeMutation, RefreshMutation } from '@lens-protocol/graphql'; import type { Credentials, IStorage } from '@lens-protocol/storage'; import { createCredentialsStorage } from '@lens-protocol/storage'; import { @@ -25,10 +26,9 @@ import { createClient, fetchExchange, } from '@urql/core'; +import { type AuthConfig, authExchange } from '@urql/exchange-auth'; import { type Logger, getLogger } from 'loglevel'; -import type { SwitchAccountRequest } from '@lens-protocol/graphql'; -import { type AuthConfig, authExchange } from '@urql/exchange-auth'; import { type AuthenticatedUser, authenticatedUser } from './AuthenticatedUser'; import { revokeAuthentication, switchAccount, transactionStatus } from './actions'; import type { ClientConfig } from './config'; diff --git a/packages/client/src/errors.ts b/packages/client/src/errors.ts index 039d5bdf74..ee496cc235 100644 --- a/packages/client/src/errors.ts +++ b/packages/client/src/errors.ts @@ -67,6 +67,13 @@ export class TransactionIndexingError extends ResultAwareError { name = 'TransactionIndexingError' as const; } +/** + * Error indicating metadata failed to index. + */ +export class MetadataIndexingError extends ResultAwareError { + name = 'MetadataIndexingError' as const; +} + /** * Error indicating an operation was not executed due to a validation error. * See the `cause` property for more information. diff --git a/packages/client/src/test-utils.ts b/packages/client/src/test-utils.ts index d19c88efb1..2e51166987 100644 --- a/packages/client/src/test-utils.ts +++ b/packages/client/src/test-utils.ts @@ -3,9 +3,11 @@ import { StorageClient } from '@lens-chain/storage-client'; import { chains } from '@lens-network/sdk/viem'; import { evmAddress } from '@lens-protocol/types'; -import { http, type Account, type Transport, type WalletClient, createWalletClient } from 'viem'; +import type { Account, Transport, WalletClient } from 'viem'; +import { http, createWalletClient } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; +import { ContentWarning, type TextOnlyOptions, textOnly } from '@lens-protocol/metadata'; import { GraphQLErrorCode, PublicClient, staging } from '.'; const pk = privateKeyToAccount(import.meta.env.PRIVATE_KEY); @@ -29,7 +31,6 @@ export function createPublicClient() { export function loginAsAccountOwner() { const client = createPublicClient(); - return client.login({ accountOwner: { account, @@ -72,4 +73,17 @@ export function createGraphQLErrorObject(code: GraphQLErrorCode) { }; } +export function postOnlyTextMetadata(customMetadata?: TextOnlyOptions) { + const metadata = + customMetadata !== undefined + ? customMetadata + : { + content: 'This is a post for testing purposes', + tags: ['test', 'lens', 'sdk'], + contentWarning: ContentWarning.SENSITIVE, + locale: 'en-US', + }; + + return storageClient.uploadAsJson(textOnly(metadata)); +} export const storageClient = StorageClient.create(); diff --git a/packages/graphql/schema.graphql b/packages/graphql/schema.graphql index 2e4cd530fe..205f80a686 100644 --- a/packages/graphql/schema.graphql +++ b/packages/graphql/schema.graphql @@ -97,6 +97,9 @@ type AccountFeedsStats { """The total number of collects.""" collects: Int! + + """The total number of tips received.""" + tips: Int! } input AccountFeedsStatsFilter { @@ -1633,7 +1636,6 @@ type DictionaryKeyValue { } input DisableAccountActionRequest @oneOf { - tipping: AlwaysTrue unknown: UnknownActionConfigInput } @@ -1845,7 +1847,6 @@ type EmbedMetadata { } input EnableAccountActionRequest @oneOf { - tipping: AlwaysTrue unknown: UnknownActionConfigInput } @@ -3569,10 +3570,12 @@ type LoggedInAccountOperations { } type LoggedInFeedPostOperations { + id: ID! canPost: FeedOperationValidationOutcome! } type LoggedInGroupOperations { + id: ID! canJoin: GroupOperationValidationOutcome! canLeave: GroupOperationValidationOutcome! canAddMember: GroupOperationValidationOutcome! @@ -3608,10 +3611,12 @@ type LoggedInPostOperations { } type LoggedInUsernameNamespaceOperations { + id: ID! canCreate: NamespaceOperationValidationOutcome! } type LoggedInUsernameOperations { + id: ID! canRemove: NamespaceOperationValidationOutcome! canAssign: NamespaceOperationValidationOutcome! canUnassign: NamespaceOperationValidationOutcome! @@ -4467,7 +4472,7 @@ type Mutation { legacyRolloverRefresh(request: RolloverRefreshRequest!): RefreshResult! """Refreshes the metadata for the provided entity.""" - refreshMetadata(request: EntityId!): RefreshMetadataResult! + refreshMetadata(request: RefreshMetadataRequest!): RefreshMetadataResult! """ Create a new post. @@ -5730,6 +5735,9 @@ type PostStats { """The total number of collects.""" collects: Int! + """The total number of tips received.""" + tips: Int! + """Get the number of reactions for the post.""" reactions(request: StatsReactionRequest! = {type: UPVOTE}): Int! } @@ -5983,7 +5991,7 @@ type Query { debugMetadata(debugMetadataRequest: DebugPostMetadataRequest!): DebugPostMetadataResult! """Get the status of a refresh metadata job.""" - refreshMetadataStatus(id: UUID!): RefreshMetadataStatusResult! + refreshMetadataStatus(request: RefreshMetadataStatusRequest!): RefreshMetadataStatusResult! """Create a frame typed data""" createFrameTypedData(request: FrameEIP712Request!): CreateFrameEIP712TypedData! @@ -6080,6 +6088,10 @@ input ReferralCut { percent: Int! } +input RefreshMetadataRequest { + entity: EntityId! +} + type RefreshMetadataResult { """ The id of the refresh metadata job. You can use this id to check the status of the job. @@ -6087,6 +6099,11 @@ type RefreshMetadataResult { id: UUID! } +input RefreshMetadataStatusRequest { + """The refresh metadata status ID from the refreshMetadata mutation.""" + id: UUID! +} + type RefreshMetadataStatusResult { """ The id of the refresh metadata job. You can use this id to check the status of the job. @@ -7376,7 +7393,7 @@ input UnknownActionConfigInput { address: EvmAddress! """Optional action configuration params""" - params: [AnyKeyValueInput!]! + params: [AnyKeyValueInput!]! = [] } input UnknownActionExecuteInput { @@ -7864,4 +7881,4 @@ type WrongSignerError { type _Service { sdl: String -} \ No newline at end of file +} diff --git a/packages/graphql/src/accounts/account.ts b/packages/graphql/src/accounts/account.ts index f9615451c1..eb0d4eb4ac 100644 --- a/packages/graphql/src/accounts/account.ts +++ b/packages/graphql/src/accounts/account.ts @@ -169,6 +169,7 @@ const AccountFeedsStatsFragment = graphql( reacted reactions collects + tips }`, ); export type AccountFeedsStats = FragmentOf; @@ -277,26 +278,18 @@ export const ReportAccountMutation = graphql( ); export type ReportAccountRequest = RequestOf; -const BlockErrorFragment = graphql( - `fragment BlockError on BlockError { - __typename - error - }`, -); -export type BlockError = FragmentOf; - -const BlockResponseFragment = graphql( - `fragment BlockResponse on BlockResponse { +const AccountBlockedResponseFragment = graphql( + `fragment AccountBlockedResponse on AccountBlockedResponse { __typename hash }`, ); -export type BlockResponse = FragmentOf; +export type AccountBlockedResponse = FragmentOf; const BlockResultFragment = graphql( `fragment BlockResult on BlockResult { - ...on BlockResponse { - ...BlockResponse + ...on AccountBlockedResponse { + ...AccountBlockedResponse } ...on SponsoredTransactionRequest { @@ -307,15 +300,15 @@ const BlockResultFragment = graphql( ...SelfFundedTransactionRequest } - ...on BlockError { - ...BlockError + ...on TransactionWillFail { + ...TransactionWillFail } }`, [ - BlockResponseFragment, + AccountBlockedResponseFragment, SponsoredTransactionRequestFragment, SelfFundedTransactionRequestFragment, - BlockErrorFragment, + TransactionWillFailFragment, ], ); export type BlockResult = FragmentOf; @@ -330,26 +323,18 @@ export const BlockMutation = graphql( ); export type BlockRequest = RequestOf; -const UnblockResponseFragment = graphql( - `fragment UnblockResponse on UnblockResponse { +const AccountUnblockedResponseFragment = graphql( + `fragment AccountUnblockedResponse on AccountUnblockedResponse { __typename hash }`, ); -export type UnblockResponse = FragmentOf; - -const UnblockErrorFragment = graphql( - `fragment UnblockError on UnblockError { - __typename - error - }`, -); -export type UnblockError = FragmentOf; +export type AccountUnblockedResponse = FragmentOf; const UnblockResultFragment = graphql( `fragment UnblockResult on UnblockResult { - ...on UnblockResponse { - ...UnblockResponse + ...on AccountUnblockedResponse { + ...AccountUnblockedResponse } ...on SponsoredTransactionRequest { ...SponsoredTransactionRequest @@ -357,15 +342,15 @@ const UnblockResultFragment = graphql( ...on SelfFundedTransactionRequest { ...SelfFundedTransactionRequest } - ...on UnblockError { - ...UnblockError + ...on TransactionWillFail { + ...TransactionWillFail } }`, [ - UnblockResponseFragment, + AccountUnblockedResponseFragment, SponsoredTransactionRequestFragment, SelfFundedTransactionRequestFragment, - UnblockErrorFragment, + TransactionWillFailFragment, ], ); export type UnblockResult = FragmentOf; diff --git a/packages/graphql/src/enums.ts b/packages/graphql/src/enums.ts index 9e75860c27..b39d14118a 100644 --- a/packages/graphql/src/enums.ts +++ b/packages/graphql/src/enums.ts @@ -920,9 +920,9 @@ export enum TimelineEventItemType { * Enum for TokenStandard. */ export enum TokenStandard { - Erc20 = 'ERC_20', - Erc721 = 'ERC_721', - Erc1155 = 'ERC_1155', + Erc20 = 'ERC20', + Erc721 = 'ERC721', + Erc1155 = 'ERC1155', } /** diff --git a/packages/graphql/src/fragments/post.ts b/packages/graphql/src/fragments/post.ts index c8e878a4d1..5b7d01e6a3 100644 --- a/packages/graphql/src/fragments/post.ts +++ b/packages/graphql/src/fragments/post.ts @@ -429,6 +429,7 @@ export const PostStatsFragment = graphql( upvotes: reactions(request: { type: UPVOTE }) downvotes: reactions(request: { type: UPVOTE }) reposts + tips }`, ); export type PostStats = FragmentOf; diff --git a/packages/graphql/src/fragments/primitives.ts b/packages/graphql/src/fragments/primitives.ts index bf4019fa2b..892d2de32e 100644 --- a/packages/graphql/src/fragments/primitives.ts +++ b/packages/graphql/src/fragments/primitives.ts @@ -155,6 +155,7 @@ export type FeedOperationValidationOutcome = export const LoggedInFeedPostOperationsFragment = graphql( `fragment LoggedInFeedPostOperations on LoggedInFeedPostOperations { __typename + id canPost { ...FeedOperationValidationOutcome } @@ -382,6 +383,7 @@ export type NamespaceOperationValidationOutcome = export const LoggedInUsernameNamespaceOperationsFragment = graphql( `fragment LoggedInUsernameNamespaceOperations on LoggedInUsernameNamespaceOperations { __typename + id canCreate { ...NamespaceOperationValidationOutcome } @@ -548,6 +550,7 @@ export type GroupOperationValidationOutcome = export const LoggedInGroupOperationsFragment = graphql( `fragment LoggedInGroupOperations on LoggedInGroupOperations { __typename + id canJoin { ...GroupOperationValidationOutcome } diff --git a/packages/graphql/src/fragments/username.ts b/packages/graphql/src/fragments/username.ts index 425321a0f6..a570e0bff7 100644 --- a/packages/graphql/src/fragments/username.ts +++ b/packages/graphql/src/fragments/username.ts @@ -5,6 +5,7 @@ import { NamespaceOperationValidationOutcomeFragment } from './primitives'; export const LoggedInUsernameOperationsFragment = graphql( `fragment LoggedInUsernameOperations on LoggedInUsernameOperations { __typename + id canRemove { ...NamespaceOperationValidationOutcome } diff --git a/packages/graphql/src/frames.ts b/packages/graphql/src/frames.ts index d79f445acf..cbaa01ed92 100644 --- a/packages/graphql/src/frames.ts +++ b/packages/graphql/src/frames.ts @@ -1,32 +1,33 @@ import type { FragmentOf } from 'gql.tada'; import { type RequestOf, graphql } from './graphql'; -const EIP712TypedDataDomainFragment = graphql( - `fragment EIP712TypedDataDomain on EIP712TypedDataDomain { +const Eip712TypedDataDomainFragment = graphql( + `fragment Eip712TypedDataDomain on Eip712TypedDataDomain { + __typename name - chain_id + chainId version - verifying_contract + verifyingContract }`, ); export const CreateFrameEip712TypedDataFragment = graphql( `fragment CreateFrameEip712TypedData on CreateFrameEIP712TypedData { types { - FrameData { + frameData { name type } } domain { - ...EIP712TypedDataDomain + ...Eip712TypedDataDomain } value { specVersion url buttonIndex account - post + postId inputText state transactionId @@ -34,7 +35,7 @@ export const CreateFrameEip712TypedDataFragment = graphql( deadline } }`, - [EIP712TypedDataDomainFragment], + [Eip712TypedDataDomainFragment], ); export type CreateFrameEip712TypedDataFragment = FragmentOf< typeof CreateFrameEip712TypedDataFragment @@ -71,7 +72,7 @@ export type FrameLensManagerSignatureResultFragment = FragmentOf< >; export const SignFrameActionMutation = graphql( - `mutation SignFrameAction($request: FrameLensManagerEIP712Request!) { + `mutation SignFrameAction($request: FrameEIP712Request!) { value: signFrameAction(request: $request) { ...FrameLensManagerSignatureResult } diff --git a/packages/graphql/src/graphql-env.d.ts b/packages/graphql/src/graphql-env.d.ts index 026a978ccd..e5ebc8888d 100644 --- a/packages/graphql/src/graphql-env.d.ts +++ b/packages/graphql/src/graphql-env.d.ts @@ -14,7 +14,7 @@ export type introspection_types = { 'AccountBlockedResponse': { kind: 'OBJECT'; name: 'AccountBlockedResponse'; fields: { 'hash': { name: 'hash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'TxHash'; ofType: null; }; } }; }; }; 'AccountCreatedNotificationAttributes': { kind: 'INPUT_OBJECT'; name: 'AccountCreatedNotificationAttributes'; isOneOf: false; inputFields: [{ name: 'graph'; type: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; defaultValue: null }, { name: 'app'; type: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; defaultValue: null }]; }; 'AccountExecutedActions': { kind: 'OBJECT'; name: 'AccountExecutedActions'; fields: { 'account': { name: 'account'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Account'; ofType: null; }; } }; 'firstAt': { name: 'firstAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'lastAt': { name: 'lastAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'total': { name: 'total'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'AccountFeedsStats': { kind: 'OBJECT'; name: 'AccountFeedsStats'; fields: { 'collects': { name: 'collects'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'comments': { name: 'comments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'posts': { name: 'posts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'quotes': { name: 'quotes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reacted': { name: 'reacted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reactions': { name: 'reactions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reposts': { name: 'reposts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'AccountFeedsStats': { kind: 'OBJECT'; name: 'AccountFeedsStats'; fields: { 'collects': { name: 'collects'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'comments': { name: 'comments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'posts': { name: 'posts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'quotes': { name: 'quotes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reacted': { name: 'reacted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reactions': { name: 'reactions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reposts': { name: 'reposts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tips': { name: 'tips'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; 'AccountFeedsStatsFilter': { kind: 'INPUT_OBJECT'; name: 'AccountFeedsStatsFilter'; isOneOf: false; inputFields: [{ name: 'feeds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'FeedOneOf'; ofType: null; }; }; }; defaultValue: null }]; }; 'AccountFeedsStatsRequest': { kind: 'INPUT_OBJECT'; name: 'AccountFeedsStatsRequest'; isOneOf: false; inputFields: [{ name: 'account'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'filter'; type: { kind: 'INPUT_OBJECT'; name: 'AccountFeedsStatsFilter'; ofType: null; }; defaultValue: null }]; }; 'AccountFollowOperationValidationFailed': { kind: 'OBJECT'; name: 'AccountFollowOperationValidationFailed'; fields: { 'reason': { name: 'reason'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'unsatisfiedRules': { name: 'unsatisfiedRules'; type: { kind: 'OBJECT'; name: 'AccountFollowUnsatisfiedRules'; ofType: null; } }; }; }; @@ -209,7 +209,7 @@ export type introspection_types = { 'DeletePostResult': { kind: 'UNION'; name: 'DeletePostResult'; fields: {}; possibleTypes: 'DeletePostResponse' | 'SelfFundedTransactionRequest' | 'SponsoredTransactionRequest' | 'TransactionWillFail'; }; 'DeleteSnsSubscriptionRequest': { kind: 'INPUT_OBJECT'; name: 'DeleteSnsSubscriptionRequest'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UUID'; ofType: null; }; }; defaultValue: null }]; }; 'DictionaryKeyValue': { kind: 'OBJECT'; name: 'DictionaryKeyValue'; fields: { 'dictionary': { name: 'dictionary'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PrimitiveData'; ofType: null; }; }; }; } }; 'key': { name: 'key'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; - 'DisableAccountActionRequest': { kind: 'INPUT_OBJECT'; name: 'DisableAccountActionRequest'; isOneOf: true; inputFields: [{ name: 'tipping'; type: { kind: 'SCALAR'; name: 'AlwaysTrue'; ofType: null; }; defaultValue: null }, { name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; + 'DisableAccountActionRequest': { kind: 'INPUT_OBJECT'; name: 'DisableAccountActionRequest'; isOneOf: true; inputFields: [{ name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; 'DisableAccountActionResponse': { kind: 'OBJECT'; name: 'DisableAccountActionResponse'; fields: { 'hash': { name: 'hash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'TxHash'; ofType: null; }; } }; }; }; 'DisableAccountActionResult': { kind: 'UNION'; name: 'DisableAccountActionResult'; fields: {}; possibleTypes: 'DisableAccountActionResponse' | 'SelfFundedTransactionRequest' | 'SponsoredTransactionRequest' | 'TransactionWillFail'; }; 'DisablePostActionParams': { kind: 'INPUT_OBJECT'; name: 'DisablePostActionParams'; isOneOf: true; inputFields: [{ name: 'simpleCollect'; type: { kind: 'SCALAR'; name: 'AlwaysTrue'; ofType: null; }; defaultValue: null }, { name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; @@ -226,7 +226,7 @@ export type introspection_types = { 'Eip712TypedDataField': { kind: 'OBJECT'; name: 'Eip712TypedDataField'; fields: { 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'type': { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; 'Eip712TypedDataFieldInput': { kind: 'INPUT_OBJECT'; name: 'Eip712TypedDataFieldInput'; isOneOf: false; inputFields: [{ name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }, { name: 'type'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; }; defaultValue: null }]; }; 'EmbedMetadata': { kind: 'OBJECT'; name: 'EmbedMetadata'; fields: { 'attachments': { name: 'attachments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AnyMedia'; ofType: null; }; }; }; } }; 'attributes': { name: 'attributes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MetadataAttribute'; ofType: null; }; }; }; } }; 'content': { name: 'content'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'contentWarning': { name: 'contentWarning'; type: { kind: 'ENUM'; name: 'ContentWarning'; ofType: null; } }; 'embed': { name: 'embed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'URI'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'MetadataId'; ofType: null; }; } }; 'locale': { name: 'locale'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Locale'; ofType: null; }; } }; 'mainContentFocus': { name: 'mainContentFocus'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'MainContentFocus'; ofType: null; }; } }; 'tags': { name: 'tags'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Tag'; ofType: null; }; }; } }; }; }; - 'EnableAccountActionRequest': { kind: 'INPUT_OBJECT'; name: 'EnableAccountActionRequest'; isOneOf: true; inputFields: [{ name: 'tipping'; type: { kind: 'SCALAR'; name: 'AlwaysTrue'; ofType: null; }; defaultValue: null }, { name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; + 'EnableAccountActionRequest': { kind: 'INPUT_OBJECT'; name: 'EnableAccountActionRequest'; isOneOf: true; inputFields: [{ name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; 'EnableAccountActionResponse': { kind: 'OBJECT'; name: 'EnableAccountActionResponse'; fields: { 'hash': { name: 'hash'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'TxHash'; ofType: null; }; } }; }; }; 'EnableAccountActionResult': { kind: 'UNION'; name: 'EnableAccountActionResult'; fields: {}; possibleTypes: 'EnableAccountActionResponse' | 'SelfFundedTransactionRequest' | 'SponsoredTransactionRequest' | 'TransactionWillFail'; }; 'EnablePostActionParams': { kind: 'INPUT_OBJECT'; name: 'EnablePostActionParams'; isOneOf: true; inputFields: [{ name: 'simpleCollect'; type: { kind: 'SCALAR'; name: 'AlwaysTrue'; ofType: null; }; defaultValue: null }, { name: 'unknown'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; ofType: null; }; defaultValue: null }]; }; @@ -389,11 +389,11 @@ export type introspection_types = { 'LivestreamMetadata': { kind: 'OBJECT'; name: 'LivestreamMetadata'; fields: { 'attachments': { name: 'attachments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AnyMedia'; ofType: null; }; }; }; } }; 'attributes': { name: 'attributes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'MetadataAttribute'; ofType: null; }; }; }; } }; 'checkLiveApi': { name: 'checkLiveApi'; type: { kind: 'SCALAR'; name: 'URI'; ofType: null; } }; 'content': { name: 'content'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'contentWarning': { name: 'contentWarning'; type: { kind: 'ENUM'; name: 'ContentWarning'; ofType: null; } }; 'endsAt': { name: 'endsAt'; type: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'MetadataId'; ofType: null; }; } }; 'liveUrl': { name: 'liveUrl'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'URI'; ofType: null; }; } }; 'locale': { name: 'locale'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Locale'; ofType: null; }; } }; 'mainContentFocus': { name: 'mainContentFocus'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'MainContentFocus'; ofType: null; }; } }; 'playbackUrl': { name: 'playbackUrl'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'URI'; ofType: null; }; } }; 'startsAt': { name: 'startsAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'tags': { name: 'tags'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Tag'; ofType: null; }; }; } }; 'title': { name: 'title'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; }; 'Locale': unknown; 'LoggedInAccountOperations': { kind: 'OBJECT'; name: 'LoggedInAccountOperations'; fields: { 'canBlock': { name: 'canBlock'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canFollow': { name: 'canFollow'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AccountFollowOperationValidationOutcome'; ofType: null; }; } }; 'canUnblock': { name: 'canUnblock'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'canUnfollow': { name: 'canUnfollow'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'AccountFollowOperationValidationOutcome'; ofType: null; }; } }; 'hasBlockedMe': { name: 'hasBlockedMe'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasReported': { name: 'hasReported'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isBlockedByMe': { name: 'isBlockedByMe'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isFollowedByMe': { name: 'isFollowedByMe'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isFollowingMe': { name: 'isFollowingMe'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isMutedByMe': { name: 'isMutedByMe'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; }; - 'LoggedInFeedPostOperations': { kind: 'OBJECT'; name: 'LoggedInFeedPostOperations'; fields: { 'canPost': { name: 'canPost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'FeedOperationValidationOutcome'; ofType: null; }; } }; }; }; - 'LoggedInGroupOperations': { kind: 'OBJECT'; name: 'LoggedInGroupOperations'; fields: { 'canAddMember': { name: 'canAddMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canJoin': { name: 'canJoin'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canLeave': { name: 'canLeave'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canRemoveMember': { name: 'canRemoveMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'hasRequestedMembership': { name: 'hasRequestedMembership'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isBanned': { name: 'isBanned'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isMember': { name: 'isMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; }; + 'LoggedInFeedPostOperations': { kind: 'OBJECT'; name: 'LoggedInFeedPostOperations'; fields: { 'canPost': { name: 'canPost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'FeedOperationValidationOutcome'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; }; }; + 'LoggedInGroupOperations': { kind: 'OBJECT'; name: 'LoggedInGroupOperations'; fields: { 'canAddMember': { name: 'canAddMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canJoin': { name: 'canJoin'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canLeave': { name: 'canLeave'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'canRemoveMember': { name: 'canRemoveMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'GroupOperationValidationOutcome'; ofType: null; }; } }; 'hasRequestedMembership': { name: 'hasRequestedMembership'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isBanned': { name: 'isBanned'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'isMember': { name: 'isMember'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; }; 'LoggedInPostOperations': { kind: 'OBJECT'; name: 'LoggedInPostOperations'; fields: { 'canComment': { name: 'canComment'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostOperationValidationOutcome'; ofType: null; }; } }; 'canDelete': { name: 'canDelete'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostOperationValidationOutcome'; ofType: null; }; } }; 'canEdit': { name: 'canEdit'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostOperationValidationOutcome'; ofType: null; }; } }; 'canQuote': { name: 'canQuote'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostOperationValidationOutcome'; ofType: null; }; } }; 'canRepost': { name: 'canRepost'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'PostOperationValidationOutcome'; ofType: null; }; } }; 'canSimpleCollect': { name: 'canSimpleCollect'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'SimpleCollectValidationOutcome'; ofType: null; }; } }; 'canTip': { name: 'canTip'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'executedUnknownActionCount': { name: 'executedUnknownActionCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'hasBookmarked': { name: 'hasBookmarked'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasCommented': { name: 'hasCommented'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'BooleanValue'; ofType: null; }; } }; 'hasExecutedUnknownAction': { name: 'hasExecutedUnknownAction'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasQuoted': { name: 'hasQuoted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'BooleanValue'; ofType: null; }; } }; 'hasReacted': { name: 'hasReacted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasReported': { name: 'hasReported'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasReposted': { name: 'hasReposted'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'BooleanValue'; ofType: null; }; } }; 'hasSimpleCollected': { name: 'hasSimpleCollected'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'hasTipped': { name: 'hasTipped'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'isNotInterested': { name: 'isNotInterested'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'lastTip': { name: 'lastTip'; type: { kind: 'OBJECT'; name: 'PostTip'; ofType: null; } }; 'postTipCount': { name: 'postTipCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'simpleCollectCount': { name: 'simpleCollectCount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; - 'LoggedInUsernameNamespaceOperations': { kind: 'OBJECT'; name: 'LoggedInUsernameNamespaceOperations'; fields: { 'canCreate': { name: 'canCreate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; }; }; - 'LoggedInUsernameOperations': { kind: 'OBJECT'; name: 'LoggedInUsernameOperations'; fields: { 'canAssign': { name: 'canAssign'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'canRemove': { name: 'canRemove'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'canUnassign': { name: 'canUnassign'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; }; }; + 'LoggedInUsernameNamespaceOperations': { kind: 'OBJECT'; name: 'LoggedInUsernameNamespaceOperations'; fields: { 'canCreate': { name: 'canCreate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; }; }; + 'LoggedInUsernameOperations': { kind: 'OBJECT'; name: 'LoggedInUsernameOperations'; fields: { 'canAssign': { name: 'canAssign'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'canRemove': { name: 'canRemove'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'canUnassign': { name: 'canUnassign'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'NamespaceOperationValidationOutcome'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; }; }; 'MainContentFocus': { name: 'MainContentFocus'; enumValues: 'ARTICLE' | 'AUDIO' | 'CHECKING_IN' | 'EMBED' | 'EVENT' | 'IMAGE' | 'LINK' | 'LIVESTREAM' | 'MINT' | 'SHORT_VIDEO' | 'SPACE' | 'STORY' | 'TEXT_ONLY' | 'THREE_D' | 'TRANSACTION' | 'VIDEO'; }; 'ManagedAccountsVisibility': { name: 'ManagedAccountsVisibility'; enumValues: 'NONE_HIDDEN' | 'HIDDEN_ONLY' | 'ALL'; }; 'ManagedBy': { kind: 'INPUT_OBJECT'; name: 'ManagedBy'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'includeOwners'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; }; defaultValue: "true" }]; }; @@ -550,7 +550,7 @@ export type introspection_types = { 'PostRules': { kind: 'OBJECT'; name: 'PostRules'; fields: { 'anyOf': { name: 'anyOf'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PostRule'; ofType: null; }; }; }; } }; 'required': { name: 'required'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PostRule'; ofType: null; }; }; }; } }; }; }; 'PostRulesConfigInput': { kind: 'INPUT_OBJECT'; name: 'PostRulesConfigInput'; isOneOf: false; inputFields: [{ name: 'required'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PostRuleConfig'; ofType: null; }; }; }; }; defaultValue: "[]" }, { name: 'anyOf'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PostRuleConfig'; ofType: null; }; }; }; }; defaultValue: "[]" }]; }; 'PostRulesProcessingParams': { kind: 'INPUT_OBJECT'; name: 'PostRulesProcessingParams'; isOneOf: false; inputFields: [{ name: 'unknownRule'; type: { kind: 'INPUT_OBJECT'; name: 'UnknownRuleProcessingParams'; ofType: null; }; defaultValue: null }]; }; - 'PostStats': { kind: 'OBJECT'; name: 'PostStats'; fields: { 'bookmarks': { name: 'bookmarks'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'collects': { name: 'collects'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'comments': { name: 'comments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'quotes': { name: 'quotes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reactions': { name: 'reactions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reposts': { name: 'reposts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; + 'PostStats': { kind: 'OBJECT'; name: 'PostStats'; fields: { 'bookmarks': { name: 'bookmarks'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'collects': { name: 'collects'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'comments': { name: 'comments'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'quotes': { name: 'quotes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reactions': { name: 'reactions'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'reposts': { name: 'reposts'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'tips': { name: 'tips'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; }; }; 'PostTag': { kind: 'OBJECT'; name: 'PostTag'; fields: { 'total': { name: 'total'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'value': { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; }; 'PostTagsFilter': { kind: 'INPUT_OBJECT'; name: 'PostTagsFilter'; isOneOf: false; inputFields: [{ name: 'feeds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'FeedOneOf'; ofType: null; }; }; }; defaultValue: null }]; }; 'PostTagsOrderBy': { name: 'PostTagsOrderBy'; enumValues: 'MOST_POPULAR' | 'ALPHABETICAL'; }; @@ -573,7 +573,9 @@ export type introspection_types = { 'RecommendAccount': { kind: 'INPUT_OBJECT'; name: 'RecommendAccount'; isOneOf: false; inputFields: [{ name: 'account'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }]; }; 'ReferencingPostInput': { kind: 'INPUT_OBJECT'; name: 'ReferencingPostInput'; isOneOf: false; inputFields: [{ name: 'post'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PostId'; ofType: null; }; }; defaultValue: null }, { name: 'postRulesProcessingParams'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PostRulesProcessingParams'; ofType: null; }; }; }; defaultValue: null }]; }; 'ReferralCut': { kind: 'INPUT_OBJECT'; name: 'ReferralCut'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'percent'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; }; + 'RefreshMetadataRequest': { kind: 'INPUT_OBJECT'; name: 'RefreshMetadataRequest'; isOneOf: false; inputFields: [{ name: 'entity'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EntityId'; ofType: null; }; }; defaultValue: null }]; }; 'RefreshMetadataResult': { kind: 'OBJECT'; name: 'RefreshMetadataResult'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UUID'; ofType: null; }; } }; }; }; + 'RefreshMetadataStatusRequest': { kind: 'INPUT_OBJECT'; name: 'RefreshMetadataStatusRequest'; isOneOf: false; inputFields: [{ name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UUID'; ofType: null; }; }; defaultValue: null }]; }; 'RefreshMetadataStatusResult': { kind: 'OBJECT'; name: 'RefreshMetadataStatusResult'; fields: { 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'UUID'; ofType: null; }; } }; 'reason': { name: 'reason'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'status': { name: 'status'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'IndexingStatus'; ofType: null; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; }; 'RefreshRequest': { kind: 'INPUT_OBJECT'; name: 'RefreshRequest'; isOneOf: false; inputFields: [{ name: 'refreshToken'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'RefreshToken'; ofType: null; }; }; defaultValue: null }]; }; 'RefreshResult': { kind: 'UNION'; name: 'RefreshResult'; fields: {}; possibleTypes: 'AuthenticationTokens' | 'ForbiddenError'; }; @@ -739,7 +741,7 @@ export type introspection_types = { 'UnhideReplyRequest': { kind: 'INPUT_OBJECT'; name: 'UnhideReplyRequest'; isOneOf: false; inputFields: [{ name: 'post'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'PostId'; ofType: null; }; }; defaultValue: null }]; }; 'UnknownAccountRuleConfig': { kind: 'INPUT_OBJECT'; name: 'UnknownAccountRuleConfig'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AnyKeyValueInput'; ofType: null; }; }; }; defaultValue: null }]; }; 'UnknownAction': { kind: 'OBJECT'; name: 'UnknownAction'; fields: { 'address': { name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'config': { name: 'config'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'RawKeyValue'; ofType: null; }; }; }; } }; 'metadata': { name: 'metadata'; type: { kind: 'OBJECT'; name: 'ActionMetadata'; ofType: null; } }; }; }; - 'UnknownActionConfigInput': { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AnyKeyValueInput'; ofType: null; }; }; }; }; defaultValue: null }]; }; + 'UnknownActionConfigInput': { kind: 'INPUT_OBJECT'; name: 'UnknownActionConfigInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AnyKeyValueInput'; ofType: null; }; }; }; }; defaultValue: "[]" }]; }; 'UnknownActionExecuteInput': { kind: 'INPUT_OBJECT'; name: 'UnknownActionExecuteInput'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'RawKeyValueInput'; ofType: null; }; }; }; }; defaultValue: null }]; }; 'UnknownFeedRuleConfig': { kind: 'INPUT_OBJECT'; name: 'UnknownFeedRuleConfig'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'executeOn'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'FeedRuleExecuteOn'; ofType: null; }; }; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AnyKeyValueInput'; ofType: null; }; }; }; defaultValue: null }]; }; 'UnknownGraphRuleConfig': { kind: 'INPUT_OBJECT'; name: 'UnknownGraphRuleConfig'; isOneOf: false; inputFields: [{ name: 'address'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'executeOn'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'GraphRuleExecuteOn'; ofType: null; }; }; }; }; defaultValue: null }, { name: 'params'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'AnyKeyValueInput'; ofType: null; }; }; }; defaultValue: null }]; }; diff --git a/packages/graphql/src/index.ts b/packages/graphql/src/index.ts index 141f409cd9..ecec44b37d 100644 --- a/packages/graphql/src/index.ts +++ b/packages/graphql/src/index.ts @@ -13,6 +13,7 @@ export * from './graph'; export * from './graphql'; export * from './group'; export * from './health'; +export * from './metadata'; export * from './ml'; export * from './namespace'; export * from './notifications'; diff --git a/packages/graphql/src/metadata.ts b/packages/graphql/src/metadata.ts new file mode 100644 index 0000000000..b4646390b7 --- /dev/null +++ b/packages/graphql/src/metadata.ts @@ -0,0 +1,41 @@ +import type { FragmentOf } from 'gql.tada'; +import { type RequestOf, graphql } from './graphql'; + +export const RefreshMetadataStatusResultFragment = graphql( + `fragment RefreshMetadataStatusResult on RefreshMetadataStatusResult { + __typename + id + status + reason + updatedAt + }`, +); +export type RefreshMetadataStatusResult = FragmentOf; + +export const RefreshMetadataStatusQuery = graphql( + `query RefreshMetadataStatus($request: RefreshMetadataStatusRequest!) { + value: refreshMetadataStatus(request: $request) { + ...RefreshMetadataStatusResult + } + }`, + [RefreshMetadataStatusResultFragment], +); +export type RefreshMetadataStatusRequest = RequestOf; + +export const RefreshMetadataResultFragment = graphql( + `fragment RefreshMetadataResult on RefreshMetadataResult { + __typename + id + }`, +); +export type RefreshMetadataResult = FragmentOf; + +export const RefreshMetadataMutation = graphql( + `mutation RefreshMetadata($request: RefreshMetadataRequest!) { + value: refreshMetadata(request: $request){ + ...RefreshMetadataResult + } + }`, + [RefreshMetadataResultFragment], +); +export type RefreshMetadataRequest = RequestOf; diff --git a/packages/storage/README.md b/packages/storage/README.md index 225d8c3635..bee35546f8 100644 --- a/packages/storage/README.md +++ b/packages/storage/README.md @@ -5,4 +5,3 @@ This package contains functionality related to storage. --- **It is not intended to be used directly. Its interface will change without notice, use it at your own risk.** -