diff --git a/pkgs/frontend/app/components/assistcredit/History.tsx b/pkgs/frontend/app/components/assistcredit/History.tsx new file mode 100644 index 0000000..1827d3b --- /dev/null +++ b/pkgs/frontend/app/components/assistcredit/History.tsx @@ -0,0 +1,111 @@ +import { Box, HStack, Text, VStack } from "@chakra-ui/react"; +import { TransferFractionToken_OrderBy } from "gql/graphql"; +import { useNamesByAddresses } from "hooks/useENS"; +import { useGetTransferFractionTokens } from "hooks/useFractionToken"; +import { useGetHat } from "hooks/useHats"; +import { type FC, useMemo } from "react"; +import { FaChevronRight } from "react-icons/fa6"; +import type { HatsDetailSchama } from "types/hats"; +import { ipfs2https } from "utils/ipfs"; +import { abbreviateAddress } from "utils/wallet"; +import { HatsListItemParser } from "../common/HatsListItemParser"; +import { UserIcon } from "../icon/UserIcon"; + +interface Props { + treeId: string; + limit?: number; +} + +interface ItemProps { + from: string; + to: string; + hatId: string; + amount: number; + timestamp: number; +} + +interface AssistCreditTextProps { + amount: number; + detail?: HatsDetailSchama; +} + +const AssistCreaditText: FC = ({ detail, amount }) => { + return ( + + {detail?.data.name}のアシストクレジットを + + {amount} + + 送りました! + + ); +}; + +const AssistCreditItem: FC = ({ + from, + to, + hatId, + amount, + timestamp, +}) => { + const addresses = useMemo(() => { + return [from, to]; + }, [from, to]); + + const { names } = useNamesByAddresses(addresses); + + const { hat } = useGetHat(hatId); + + const fromUser = useMemo(() => { + return names?.[0]?.[0]; + }, [names]); + + const toUser = useMemo(() => { + return names?.[1]?.[0]; + }, [names]); + + return ( + + + <> + + {fromUser?.name || abbreviateAddress(from)} が + + {toUser?.name || abbreviateAddress(to)} に + + + + + ); +}; + +export const AssistCreditHistory: FC = ({ treeId, limit }) => { + const { data } = useGetTransferFractionTokens({ + where: { + workspaceId: treeId, + }, + orderBy: TransferFractionToken_OrderBy.BlockTimestamp, + first: limit, + }); + + return ( + + {data?.transferFractionTokens.map((token) => ( + + ))} + + ); +}; diff --git a/pkgs/frontend/app/components/roles/MyRole.tsx b/pkgs/frontend/app/components/roles/MyRole.tsx index e8670b1..e8175ba 100644 --- a/pkgs/frontend/app/components/roles/MyRole.tsx +++ b/pkgs/frontend/app/components/roles/MyRole.tsx @@ -26,14 +26,14 @@ export const MyRole: FC = (params) => { navigate(`/${treeId}/${hatId}/${address}`)} > - See Detail + 詳細をみる navigate(`/${treeId}/${hatId}/${address}/assistcredit/send`) } > - Transfer Assist Credit + アシストクレジットを送る diff --git a/pkgs/frontend/app/routes/$treeId._index.tsx b/pkgs/frontend/app/routes/$treeId._index.tsx index 8d52694..d4033ed 100644 --- a/pkgs/frontend/app/routes/$treeId._index.tsx +++ b/pkgs/frontend/app/routes/$treeId._index.tsx @@ -1,6 +1,7 @@ import { AspectRatio, Box, + HStack, Heading, SimpleGrid, Text, @@ -12,6 +13,7 @@ import { useActiveWallet } from "hooks/useWallet"; import type { FC } from "react"; import { FaPlus } from "react-icons/fa6"; import { StickyNav } from "~/components/StickyNav"; +import { AssistCreditHistory } from "~/components/assistcredit/History"; import { CommonButton } from "~/components/common/CommonButton"; import { HatsListItemParser } from "~/components/common/HatsListItemParser"; import { MyRole } from "~/components/roles/MyRole"; @@ -28,9 +30,21 @@ const WorkspaceTop: FC = () => { return ( <> + + + 直近のアクティビティ + + + もっと見る + + + + {treeId && } + + {/* My roles */} - - My Roles + + 自分の役割 {tree?.hats ?.filter((h) => Number(h.levelAtLocalTree) >= 2) @@ -49,7 +63,7 @@ const WorkspaceTop: FC = () => { {/* All roles */} - All Roles + 役割一覧 {tree?.hats ?.filter((h) => Number(h.levelAtLocalTree) >= 2) diff --git a/pkgs/frontend/app/routes/$treeId_.assistcredit-history.tsx b/pkgs/frontend/app/routes/$treeId_.assistcredit-history.tsx index 5c1523f..a077cb4 100644 --- a/pkgs/frontend/app/routes/$treeId_.assistcredit-history.tsx +++ b/pkgs/frontend/app/routes/$treeId_.assistcredit-history.tsx @@ -1,37 +1,25 @@ -import { Box, Heading, List, Text } from "@chakra-ui/react"; +import { Box, Heading } from "@chakra-ui/react"; import { useParams } from "@remix-run/react"; -import { useGetTransferFractionTokens } from "hooks/useFractionToken"; import type { FC } from "react"; -import { abbreviateAddress } from "utils/wallet"; -import { StickyNav } from "~/components/StickyNav"; +import { PageHeader } from "~/components/PageHeader"; +import { AssistCreditHistory } from "~/components/assistcredit/History"; const WorkspaceMember: FC = () => { const { treeId } = useParams(); - const { data } = useGetTransferFractionTokens({ - where: { - workspaceId: treeId, - }, - }); - return ( - <> - {/* Members */} - - Transaction History - - {data?.transferFractionTokens.map((token) => ( - - - {abbreviateAddress(token.from)} → {abbreviateAddress(token.to)}{" "} - : {token.amount} - - - ))} - + + + アクティビティ一覧 + + } + /> + + {treeId && } - - + ); }; diff --git a/pkgs/frontend/gql/fragment-masking.ts b/pkgs/frontend/gql/fragment-masking.ts index 2f92c86..aca71b1 100644 --- a/pkgs/frontend/gql/fragment-masking.ts +++ b/pkgs/frontend/gql/fragment-masking.ts @@ -1,18 +1,16 @@ /* eslint-disable */ -import type { - DocumentTypeDecoration, - ResultOf, - TypedDocumentNode, -} from "@graphql-typed-document-node/core"; -import type { FragmentDefinitionNode } from "graphql"; -import type { Incremental } from "./graphql"; +import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import { FragmentDefinitionNode } from 'graphql'; +import { Incremental } from './graphql'; -export type FragmentType< - TDocumentType extends DocumentTypeDecoration, -> = TDocumentType extends DocumentTypeDecoration - ? [TType] extends [{ " $fragmentName"?: infer TKey }] + +export type FragmentType> = TDocumentType extends DocumentTypeDecoration< + infer TType, + any +> + ? [TType] extends [{ ' $fragmentName'?: infer TKey }] ? TKey extends string - ? { " $fragmentRefs"?: { [key in TKey]: TType } } + ? { ' $fragmentRefs'?: { [key in TKey]: TType } } : never : never : never; @@ -20,91 +18,70 @@ export type FragmentType< // return non-nullable if `fragmentType` is non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType>, + fragmentType: FragmentType> ): TType; // return nullable if `fragmentType` is undefined export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType> | undefined, + fragmentType: FragmentType> | undefined ): TType | undefined; // return nullable if `fragmentType` is nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: FragmentType> | null, + fragmentType: FragmentType> | null ): TType | null; // return nullable if `fragmentType` is nullable or undefined export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | FragmentType> - | null - | undefined, + fragmentType: FragmentType> | null | undefined ): TType | null | undefined; // return array of non-nullable if `fragmentType` is array of non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: Array>>, + fragmentType: Array>> ): Array; // return array of nullable if `fragmentType` is array of nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | Array>> - | null - | undefined, + fragmentType: Array>> | null | undefined ): Array | null | undefined; // return readonly array of non-nullable if `fragmentType` is array of non-nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: ReadonlyArray>>, + fragmentType: ReadonlyArray>> ): ReadonlyArray; // return readonly array of nullable if `fragmentType` is array of nullable export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | ReadonlyArray>> - | null - | undefined, + fragmentType: ReadonlyArray>> | null | undefined ): ReadonlyArray | null | undefined; export function useFragment( _documentNode: DocumentTypeDecoration, - fragmentType: - | FragmentType> - | Array>> - | ReadonlyArray>> - | null - | undefined, + fragmentType: FragmentType> | Array>> | ReadonlyArray>> | null | undefined ): TType | Array | ReadonlyArray | null | undefined { return fragmentType as any; } + export function makeFragmentData< F extends DocumentTypeDecoration, - FT extends ResultOf, + FT extends ResultOf >(data: FT, _fragment: F): FragmentType { return data as FragmentType; } export function isFragmentReady( queryNode: DocumentTypeDecoration, fragmentNode: TypedDocumentNode, - data: - | FragmentType, any>> - | null - | undefined, + data: FragmentType, any>> | null | undefined ): data is FragmentType { - const deferredFields = ( - queryNode as { - __meta__?: { deferredFields: Record }; - } - ).__meta__?.deferredFields; + const deferredFields = (queryNode as { __meta__?: { deferredFields: Record } }).__meta__ + ?.deferredFields; if (!deferredFields) return true; - const fragDef = fragmentNode.definitions[0] as - | FragmentDefinitionNode - | undefined; + const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined; const fragName = fragDef?.name?.value; const fields = (fragName && deferredFields[fragName]) || []; - return fields.length > 0 && fields.every((field) => data && field in data); + return fields.length > 0 && fields.every(field => data && field in data); } diff --git a/pkgs/frontend/gql/gql.ts b/pkgs/frontend/gql/gql.ts index 265306c..78af9d0 100644 --- a/pkgs/frontend/gql/gql.ts +++ b/pkgs/frontend/gql/gql.ts @@ -1,6 +1,6 @@ -import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; /* eslint-disable */ -import * as types from "./graphql"; +import * as types from './graphql'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /** * Map of all GraphQL operations in the project. @@ -14,12 +14,9 @@ import * as types from "./graphql"; * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ const documents = { - "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}) {\n transferFractionTokens(where: $where) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n": - types.GetTransferFractionTokensDocument, - "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n": - types.GetWorkspacesDocument, - "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n": - types.GetWorkspaceDocument, + "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, , $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n": types.GetTransferFractionTokensDocument, + "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n": types.GetWorkspacesDocument, + "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n": types.GetWorkspaceDocument, }; /** @@ -39,25 +36,18 @@ export function graphql(source: string): unknown; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}) {\n transferFractionTokens(where: $where) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n", -): (typeof documents)["\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}) {\n transferFractionTokens(where: $where) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n"]; +export function graphql(source: "\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, , $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n"): (typeof documents)["\n query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, , $first: Int = 10) {\n transferFractionTokens(where: $where, orderBy: $orderBy, first: $first) {\n amount\n from\n to\n tokenId\n blockNumber\n blockTimestamp\n hatId\n id\n wearer\n workspaceId\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n", -): (typeof documents)["\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n"]; +export function graphql(source: "\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n"): (typeof documents)["\n query GetWorkspaces($where: Workspace_filter) {\n workspaces(where: $where) {\n creator\n topHatId\n splitCreator\n id\n hatterHatId\n hatsTimeFrameModule\n blockTimestamp\n blockNumber\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql( - source: "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n", -): (typeof documents)["\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n"]; +export function graphql(source: "\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n"): (typeof documents)["\n query GetWorkspace($workspaceId: ID!) {\n workspace(id: $workspaceId) {\n creator\n hatsTimeFrameModule\n hatterHatId\n id\n splitCreator\n topHatId\n blockTimestamp\n blockNumber\n }\n }\n"]; export function graphql(source: string) { return (documents as any)[source] ?? {}; } -export type DocumentType> = - TDocumentNode extends DocumentNode ? TType : never; +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/pkgs/frontend/gql/graphql.ts b/pkgs/frontend/gql/graphql.ts index 06a7c72..997960f 100644 --- a/pkgs/frontend/gql/graphql.ts +++ b/pkgs/frontend/gql/graphql.ts @@ -1,156 +1,143 @@ /* eslint-disable */ -import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-node/core"; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - BigDecimal: { input: any; output: any }; - BigInt: { input: any; output: any }; - Bytes: { input: any; output: any }; + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + BigDecimal: { input: any; output: any; } + BigInt: { input: any; output: any; } + Bytes: { input: any; output: any; } /** * 8 bytes signed integer * */ - Int8: { input: any; output: any }; + Int8: { input: any; output: any; } /** * A string representation of microseconds UNIX timestamp (16 digits) * */ - Timestamp: { input: any; output: any }; + Timestamp: { input: any; output: any; } }; export enum Aggregation_Interval { - Day = "day", - Hour = "hour", + Day = 'day', + Hour = 'hour' } export type BlockChangedFilter = { - number_gte: Scalars["Int"]["input"]; + number_gte: Scalars['Int']['input']; }; export type Block_Height = { - hash?: InputMaybe; - number?: InputMaybe; - number_gte?: InputMaybe; + hash?: InputMaybe; + number?: InputMaybe; + number_gte?: InputMaybe; }; export type InitializedFractionToken = { - __typename?: "InitializedFractionToken"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - hatId: Scalars["BigInt"]["output"]; - id: Scalars["ID"]["output"]; - wearer: Scalars["String"]["output"]; - workspaceId: Scalars["ID"]["output"]; + __typename?: 'InitializedFractionToken'; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + hatId: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + wearer: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; }; export type InitializedFractionToken_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - hatId?: InputMaybe; - hatId_gt?: InputMaybe; - hatId_gte?: InputMaybe; - hatId_in?: InputMaybe>; - hatId_lt?: InputMaybe; - hatId_lte?: InputMaybe; - hatId_not?: InputMaybe; - hatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + hatId?: InputMaybe; + hatId_gt?: InputMaybe; + hatId_gte?: InputMaybe; + hatId_in?: InputMaybe>; + hatId_lt?: InputMaybe; + hatId_lte?: InputMaybe; + hatId_not?: InputMaybe; + hatId_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - wearer?: InputMaybe; - wearer_contains?: InputMaybe; - wearer_contains_nocase?: InputMaybe; - wearer_ends_with?: InputMaybe; - wearer_ends_with_nocase?: InputMaybe; - wearer_gt?: InputMaybe; - wearer_gte?: InputMaybe; - wearer_in?: InputMaybe>; - wearer_lt?: InputMaybe; - wearer_lte?: InputMaybe; - wearer_not?: InputMaybe; - wearer_not_contains?: InputMaybe; - wearer_not_contains_nocase?: InputMaybe; - wearer_not_ends_with?: InputMaybe; - wearer_not_ends_with_nocase?: InputMaybe; - wearer_not_in?: InputMaybe>; - wearer_not_starts_with?: InputMaybe; - wearer_not_starts_with_nocase?: InputMaybe; - wearer_starts_with?: InputMaybe; - wearer_starts_with_nocase?: InputMaybe; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; + wearer?: InputMaybe; + wearer_contains?: InputMaybe; + wearer_contains_nocase?: InputMaybe; + wearer_ends_with?: InputMaybe; + wearer_ends_with_nocase?: InputMaybe; + wearer_gt?: InputMaybe; + wearer_gte?: InputMaybe; + wearer_in?: InputMaybe>; + wearer_lt?: InputMaybe; + wearer_lte?: InputMaybe; + wearer_not?: InputMaybe; + wearer_not_contains?: InputMaybe; + wearer_not_contains_nocase?: InputMaybe; + wearer_not_ends_with?: InputMaybe; + wearer_not_ends_with_nocase?: InputMaybe; + wearer_not_in?: InputMaybe>; + wearer_not_starts_with?: InputMaybe; + wearer_not_starts_with_nocase?: InputMaybe; + wearer_starts_with?: InputMaybe; + wearer_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; }; export enum InitializedFractionToken_OrderBy { - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - HatId = "hatId", - Id = "id", - Wearer = "wearer", - WorkspaceId = "workspaceId", + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + HatId = 'hatId', + Id = 'id', + Wearer = 'wearer', + WorkspaceId = 'workspaceId' } /** Defines the order direction, either ascending or descending */ export enum OrderDirection { - Asc = "asc", - Desc = "desc", + Asc = 'asc', + Desc = 'desc' } export type Query = { - __typename?: "Query"; + __typename?: 'Query'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; initializedFractionToken?: Maybe; @@ -161,60 +148,67 @@ export type Query = { workspaces: Array; }; + export type Query_MetaArgs = { block?: InputMaybe; }; + export type QueryInitializedFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryInitializedFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + export type QueryTransferFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryTransferFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + export type QueryWorkspaceArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type QueryWorkspacesArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type Subscription = { - __typename?: "Subscription"; + __typename?: 'Subscription'; /** Access to subgraph metadata */ _meta?: Maybe<_Meta_>; initializedFractionToken?: Maybe; @@ -225,361 +219,360 @@ export type Subscription = { workspaces: Array; }; + export type Subscription_MetaArgs = { block?: InputMaybe; }; + export type SubscriptionInitializedFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionInitializedFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + export type SubscriptionTransferFractionTokenArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionTransferFractionTokensArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; + export type SubscriptionWorkspaceArgs = { block?: InputMaybe; - id: Scalars["ID"]["input"]; + id: Scalars['ID']['input']; subgraphError?: _SubgraphErrorPolicy_; }; + export type SubscriptionWorkspacesArgs = { block?: InputMaybe; - first?: InputMaybe; + first?: InputMaybe; orderBy?: InputMaybe; orderDirection?: InputMaybe; - skip?: InputMaybe; + skip?: InputMaybe; subgraphError?: _SubgraphErrorPolicy_; where?: InputMaybe; }; export type TransferFractionToken = { - __typename?: "TransferFractionToken"; - amount: Scalars["BigInt"]["output"]; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - from: Scalars["String"]["output"]; - hatId: Scalars["BigInt"]["output"]; - id: Scalars["ID"]["output"]; - to: Scalars["String"]["output"]; - tokenId: Scalars["BigInt"]["output"]; - wearer: Scalars["String"]["output"]; - workspaceId: Scalars["ID"]["output"]; + __typename?: 'TransferFractionToken'; + amount: Scalars['BigInt']['output']; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + from: Scalars['String']['output']; + hatId: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + to: Scalars['String']['output']; + tokenId: Scalars['BigInt']['output']; + wearer: Scalars['String']['output']; + workspaceId: Scalars['ID']['output']; }; export type TransferFractionToken_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; - amount?: InputMaybe; - amount_gt?: InputMaybe; - amount_gte?: InputMaybe; - amount_in?: InputMaybe>; - amount_lt?: InputMaybe; - amount_lte?: InputMaybe; - amount_not?: InputMaybe; - amount_not_in?: InputMaybe>; + amount?: InputMaybe; + amount_gt?: InputMaybe; + amount_gte?: InputMaybe; + amount_in?: InputMaybe>; + amount_lt?: InputMaybe; + amount_lte?: InputMaybe; + amount_not?: InputMaybe; + amount_not_in?: InputMaybe>; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - from?: InputMaybe; - from_contains?: InputMaybe; - from_contains_nocase?: InputMaybe; - from_ends_with?: InputMaybe; - from_ends_with_nocase?: InputMaybe; - from_gt?: InputMaybe; - from_gte?: InputMaybe; - from_in?: InputMaybe>; - from_lt?: InputMaybe; - from_lte?: InputMaybe; - from_not?: InputMaybe; - from_not_contains?: InputMaybe; - from_not_contains_nocase?: InputMaybe; - from_not_ends_with?: InputMaybe; - from_not_ends_with_nocase?: InputMaybe; - from_not_in?: InputMaybe>; - from_not_starts_with?: InputMaybe; - from_not_starts_with_nocase?: InputMaybe; - from_starts_with?: InputMaybe; - from_starts_with_nocase?: InputMaybe; - hatId?: InputMaybe; - hatId_gt?: InputMaybe; - hatId_gte?: InputMaybe; - hatId_in?: InputMaybe>; - hatId_lt?: InputMaybe; - hatId_lte?: InputMaybe; - hatId_not?: InputMaybe; - hatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + from?: InputMaybe; + from_contains?: InputMaybe; + from_contains_nocase?: InputMaybe; + from_ends_with?: InputMaybe; + from_ends_with_nocase?: InputMaybe; + from_gt?: InputMaybe; + from_gte?: InputMaybe; + from_in?: InputMaybe>; + from_lt?: InputMaybe; + from_lte?: InputMaybe; + from_not?: InputMaybe; + from_not_contains?: InputMaybe; + from_not_contains_nocase?: InputMaybe; + from_not_ends_with?: InputMaybe; + from_not_ends_with_nocase?: InputMaybe; + from_not_in?: InputMaybe>; + from_not_starts_with?: InputMaybe; + from_not_starts_with_nocase?: InputMaybe; + from_starts_with?: InputMaybe; + from_starts_with_nocase?: InputMaybe; + hatId?: InputMaybe; + hatId_gt?: InputMaybe; + hatId_gte?: InputMaybe; + hatId_in?: InputMaybe>; + hatId_lt?: InputMaybe; + hatId_lte?: InputMaybe; + hatId_not?: InputMaybe; + hatId_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - to?: InputMaybe; - to_contains?: InputMaybe; - to_contains_nocase?: InputMaybe; - to_ends_with?: InputMaybe; - to_ends_with_nocase?: InputMaybe; - to_gt?: InputMaybe; - to_gte?: InputMaybe; - to_in?: InputMaybe>; - to_lt?: InputMaybe; - to_lte?: InputMaybe; - to_not?: InputMaybe; - to_not_contains?: InputMaybe; - to_not_contains_nocase?: InputMaybe; - to_not_ends_with?: InputMaybe; - to_not_ends_with_nocase?: InputMaybe; - to_not_in?: InputMaybe>; - to_not_starts_with?: InputMaybe; - to_not_starts_with_nocase?: InputMaybe; - to_starts_with?: InputMaybe; - to_starts_with_nocase?: InputMaybe; - tokenId?: InputMaybe; - tokenId_gt?: InputMaybe; - tokenId_gte?: InputMaybe; - tokenId_in?: InputMaybe>; - tokenId_lt?: InputMaybe; - tokenId_lte?: InputMaybe; - tokenId_not?: InputMaybe; - tokenId_not_in?: InputMaybe>; - wearer?: InputMaybe; - wearer_contains?: InputMaybe; - wearer_contains_nocase?: InputMaybe; - wearer_ends_with?: InputMaybe; - wearer_ends_with_nocase?: InputMaybe; - wearer_gt?: InputMaybe; - wearer_gte?: InputMaybe; - wearer_in?: InputMaybe>; - wearer_lt?: InputMaybe; - wearer_lte?: InputMaybe; - wearer_not?: InputMaybe; - wearer_not_contains?: InputMaybe; - wearer_not_contains_nocase?: InputMaybe; - wearer_not_ends_with?: InputMaybe; - wearer_not_ends_with_nocase?: InputMaybe; - wearer_not_in?: InputMaybe>; - wearer_not_starts_with?: InputMaybe; - wearer_not_starts_with_nocase?: InputMaybe; - wearer_starts_with?: InputMaybe; - wearer_starts_with_nocase?: InputMaybe; - workspaceId?: InputMaybe; - workspaceId_gt?: InputMaybe; - workspaceId_gte?: InputMaybe; - workspaceId_in?: InputMaybe>; - workspaceId_lt?: InputMaybe; - workspaceId_lte?: InputMaybe; - workspaceId_not?: InputMaybe; - workspaceId_not_in?: InputMaybe>; + to?: InputMaybe; + to_contains?: InputMaybe; + to_contains_nocase?: InputMaybe; + to_ends_with?: InputMaybe; + to_ends_with_nocase?: InputMaybe; + to_gt?: InputMaybe; + to_gte?: InputMaybe; + to_in?: InputMaybe>; + to_lt?: InputMaybe; + to_lte?: InputMaybe; + to_not?: InputMaybe; + to_not_contains?: InputMaybe; + to_not_contains_nocase?: InputMaybe; + to_not_ends_with?: InputMaybe; + to_not_ends_with_nocase?: InputMaybe; + to_not_in?: InputMaybe>; + to_not_starts_with?: InputMaybe; + to_not_starts_with_nocase?: InputMaybe; + to_starts_with?: InputMaybe; + to_starts_with_nocase?: InputMaybe; + tokenId?: InputMaybe; + tokenId_gt?: InputMaybe; + tokenId_gte?: InputMaybe; + tokenId_in?: InputMaybe>; + tokenId_lt?: InputMaybe; + tokenId_lte?: InputMaybe; + tokenId_not?: InputMaybe; + tokenId_not_in?: InputMaybe>; + wearer?: InputMaybe; + wearer_contains?: InputMaybe; + wearer_contains_nocase?: InputMaybe; + wearer_ends_with?: InputMaybe; + wearer_ends_with_nocase?: InputMaybe; + wearer_gt?: InputMaybe; + wearer_gte?: InputMaybe; + wearer_in?: InputMaybe>; + wearer_lt?: InputMaybe; + wearer_lte?: InputMaybe; + wearer_not?: InputMaybe; + wearer_not_contains?: InputMaybe; + wearer_not_contains_nocase?: InputMaybe; + wearer_not_ends_with?: InputMaybe; + wearer_not_ends_with_nocase?: InputMaybe; + wearer_not_in?: InputMaybe>; + wearer_not_starts_with?: InputMaybe; + wearer_not_starts_with_nocase?: InputMaybe; + wearer_starts_with?: InputMaybe; + wearer_starts_with_nocase?: InputMaybe; + workspaceId?: InputMaybe; + workspaceId_gt?: InputMaybe; + workspaceId_gte?: InputMaybe; + workspaceId_in?: InputMaybe>; + workspaceId_lt?: InputMaybe; + workspaceId_lte?: InputMaybe; + workspaceId_not?: InputMaybe; + workspaceId_not_in?: InputMaybe>; }; export enum TransferFractionToken_OrderBy { - Amount = "amount", - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - From = "from", - HatId = "hatId", - Id = "id", - To = "to", - TokenId = "tokenId", - Wearer = "wearer", - WorkspaceId = "workspaceId", + Amount = 'amount', + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + From = 'from', + HatId = 'hatId', + Id = 'id', + To = 'to', + TokenId = 'tokenId', + Wearer = 'wearer', + WorkspaceId = 'workspaceId' } export type Workspace = { - __typename?: "Workspace"; - blockNumber: Scalars["BigInt"]["output"]; - blockTimestamp: Scalars["BigInt"]["output"]; - creator: Scalars["String"]["output"]; - hatsTimeFrameModule: Scalars["String"]["output"]; - hatterHatId: Scalars["BigInt"]["output"]; - id: Scalars["ID"]["output"]; - splitCreator: Scalars["String"]["output"]; - topHatId: Scalars["BigInt"]["output"]; + __typename?: 'Workspace'; + blockNumber: Scalars['BigInt']['output']; + blockTimestamp: Scalars['BigInt']['output']; + creator: Scalars['String']['output']; + hatsTimeFrameModule: Scalars['String']['output']; + hatterHatId: Scalars['BigInt']['output']; + id: Scalars['ID']['output']; + splitCreator: Scalars['String']['output']; + topHatId: Scalars['BigInt']['output']; }; export type Workspace_Filter = { /** Filter for the block changed event. */ _change_block?: InputMaybe; and?: InputMaybe>>; - blockNumber?: InputMaybe; - blockNumber_gt?: InputMaybe; - blockNumber_gte?: InputMaybe; - blockNumber_in?: InputMaybe>; - blockNumber_lt?: InputMaybe; - blockNumber_lte?: InputMaybe; - blockNumber_not?: InputMaybe; - blockNumber_not_in?: InputMaybe>; - blockTimestamp?: InputMaybe; - blockTimestamp_gt?: InputMaybe; - blockTimestamp_gte?: InputMaybe; - blockTimestamp_in?: InputMaybe>; - blockTimestamp_lt?: InputMaybe; - blockTimestamp_lte?: InputMaybe; - blockTimestamp_not?: InputMaybe; - blockTimestamp_not_in?: InputMaybe>; - creator?: InputMaybe; - creator_contains?: InputMaybe; - creator_contains_nocase?: InputMaybe; - creator_ends_with?: InputMaybe; - creator_ends_with_nocase?: InputMaybe; - creator_gt?: InputMaybe; - creator_gte?: InputMaybe; - creator_in?: InputMaybe>; - creator_lt?: InputMaybe; - creator_lte?: InputMaybe; - creator_not?: InputMaybe; - creator_not_contains?: InputMaybe; - creator_not_contains_nocase?: InputMaybe; - creator_not_ends_with?: InputMaybe; - creator_not_ends_with_nocase?: InputMaybe; - creator_not_in?: InputMaybe>; - creator_not_starts_with?: InputMaybe; - creator_not_starts_with_nocase?: InputMaybe; - creator_starts_with?: InputMaybe; - creator_starts_with_nocase?: InputMaybe; - hatsTimeFrameModule?: InputMaybe; - hatsTimeFrameModule_contains?: InputMaybe; - hatsTimeFrameModule_contains_nocase?: InputMaybe; - hatsTimeFrameModule_ends_with?: InputMaybe; - hatsTimeFrameModule_ends_with_nocase?: InputMaybe; - hatsTimeFrameModule_gt?: InputMaybe; - hatsTimeFrameModule_gte?: InputMaybe; - hatsTimeFrameModule_in?: InputMaybe>; - hatsTimeFrameModule_lt?: InputMaybe; - hatsTimeFrameModule_lte?: InputMaybe; - hatsTimeFrameModule_not?: InputMaybe; - hatsTimeFrameModule_not_contains?: InputMaybe; - hatsTimeFrameModule_not_contains_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_ends_with?: InputMaybe; - hatsTimeFrameModule_not_ends_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_not_in?: InputMaybe>; - hatsTimeFrameModule_not_starts_with?: InputMaybe; - hatsTimeFrameModule_not_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatsTimeFrameModule_starts_with?: InputMaybe; - hatsTimeFrameModule_starts_with_nocase?: InputMaybe< - Scalars["String"]["input"] - >; - hatterHatId?: InputMaybe; - hatterHatId_gt?: InputMaybe; - hatterHatId_gte?: InputMaybe; - hatterHatId_in?: InputMaybe>; - hatterHatId_lt?: InputMaybe; - hatterHatId_lte?: InputMaybe; - hatterHatId_not?: InputMaybe; - hatterHatId_not_in?: InputMaybe>; - id?: InputMaybe; - id_gt?: InputMaybe; - id_gte?: InputMaybe; - id_in?: InputMaybe>; - id_lt?: InputMaybe; - id_lte?: InputMaybe; - id_not?: InputMaybe; - id_not_in?: InputMaybe>; + blockNumber?: InputMaybe; + blockNumber_gt?: InputMaybe; + blockNumber_gte?: InputMaybe; + blockNumber_in?: InputMaybe>; + blockNumber_lt?: InputMaybe; + blockNumber_lte?: InputMaybe; + blockNumber_not?: InputMaybe; + blockNumber_not_in?: InputMaybe>; + blockTimestamp?: InputMaybe; + blockTimestamp_gt?: InputMaybe; + blockTimestamp_gte?: InputMaybe; + blockTimestamp_in?: InputMaybe>; + blockTimestamp_lt?: InputMaybe; + blockTimestamp_lte?: InputMaybe; + blockTimestamp_not?: InputMaybe; + blockTimestamp_not_in?: InputMaybe>; + creator?: InputMaybe; + creator_contains?: InputMaybe; + creator_contains_nocase?: InputMaybe; + creator_ends_with?: InputMaybe; + creator_ends_with_nocase?: InputMaybe; + creator_gt?: InputMaybe; + creator_gte?: InputMaybe; + creator_in?: InputMaybe>; + creator_lt?: InputMaybe; + creator_lte?: InputMaybe; + creator_not?: InputMaybe; + creator_not_contains?: InputMaybe; + creator_not_contains_nocase?: InputMaybe; + creator_not_ends_with?: InputMaybe; + creator_not_ends_with_nocase?: InputMaybe; + creator_not_in?: InputMaybe>; + creator_not_starts_with?: InputMaybe; + creator_not_starts_with_nocase?: InputMaybe; + creator_starts_with?: InputMaybe; + creator_starts_with_nocase?: InputMaybe; + hatsTimeFrameModule?: InputMaybe; + hatsTimeFrameModule_contains?: InputMaybe; + hatsTimeFrameModule_contains_nocase?: InputMaybe; + hatsTimeFrameModule_ends_with?: InputMaybe; + hatsTimeFrameModule_ends_with_nocase?: InputMaybe; + hatsTimeFrameModule_gt?: InputMaybe; + hatsTimeFrameModule_gte?: InputMaybe; + hatsTimeFrameModule_in?: InputMaybe>; + hatsTimeFrameModule_lt?: InputMaybe; + hatsTimeFrameModule_lte?: InputMaybe; + hatsTimeFrameModule_not?: InputMaybe; + hatsTimeFrameModule_not_contains?: InputMaybe; + hatsTimeFrameModule_not_contains_nocase?: InputMaybe; + hatsTimeFrameModule_not_ends_with?: InputMaybe; + hatsTimeFrameModule_not_ends_with_nocase?: InputMaybe; + hatsTimeFrameModule_not_in?: InputMaybe>; + hatsTimeFrameModule_not_starts_with?: InputMaybe; + hatsTimeFrameModule_not_starts_with_nocase?: InputMaybe; + hatsTimeFrameModule_starts_with?: InputMaybe; + hatsTimeFrameModule_starts_with_nocase?: InputMaybe; + hatterHatId?: InputMaybe; + hatterHatId_gt?: InputMaybe; + hatterHatId_gte?: InputMaybe; + hatterHatId_in?: InputMaybe>; + hatterHatId_lt?: InputMaybe; + hatterHatId_lte?: InputMaybe; + hatterHatId_not?: InputMaybe; + hatterHatId_not_in?: InputMaybe>; + id?: InputMaybe; + id_gt?: InputMaybe; + id_gte?: InputMaybe; + id_in?: InputMaybe>; + id_lt?: InputMaybe; + id_lte?: InputMaybe; + id_not?: InputMaybe; + id_not_in?: InputMaybe>; or?: InputMaybe>>; - splitCreator?: InputMaybe; - splitCreator_contains?: InputMaybe; - splitCreator_contains_nocase?: InputMaybe; - splitCreator_ends_with?: InputMaybe; - splitCreator_ends_with_nocase?: InputMaybe; - splitCreator_gt?: InputMaybe; - splitCreator_gte?: InputMaybe; - splitCreator_in?: InputMaybe>; - splitCreator_lt?: InputMaybe; - splitCreator_lte?: InputMaybe; - splitCreator_not?: InputMaybe; - splitCreator_not_contains?: InputMaybe; - splitCreator_not_contains_nocase?: InputMaybe; - splitCreator_not_ends_with?: InputMaybe; - splitCreator_not_ends_with_nocase?: InputMaybe; - splitCreator_not_in?: InputMaybe>; - splitCreator_not_starts_with?: InputMaybe; - splitCreator_not_starts_with_nocase?: InputMaybe; - splitCreator_starts_with?: InputMaybe; - splitCreator_starts_with_nocase?: InputMaybe; - topHatId?: InputMaybe; - topHatId_gt?: InputMaybe; - topHatId_gte?: InputMaybe; - topHatId_in?: InputMaybe>; - topHatId_lt?: InputMaybe; - topHatId_lte?: InputMaybe; - topHatId_not?: InputMaybe; - topHatId_not_in?: InputMaybe>; + splitCreator?: InputMaybe; + splitCreator_contains?: InputMaybe; + splitCreator_contains_nocase?: InputMaybe; + splitCreator_ends_with?: InputMaybe; + splitCreator_ends_with_nocase?: InputMaybe; + splitCreator_gt?: InputMaybe; + splitCreator_gte?: InputMaybe; + splitCreator_in?: InputMaybe>; + splitCreator_lt?: InputMaybe; + splitCreator_lte?: InputMaybe; + splitCreator_not?: InputMaybe; + splitCreator_not_contains?: InputMaybe; + splitCreator_not_contains_nocase?: InputMaybe; + splitCreator_not_ends_with?: InputMaybe; + splitCreator_not_ends_with_nocase?: InputMaybe; + splitCreator_not_in?: InputMaybe>; + splitCreator_not_starts_with?: InputMaybe; + splitCreator_not_starts_with_nocase?: InputMaybe; + splitCreator_starts_with?: InputMaybe; + splitCreator_starts_with_nocase?: InputMaybe; + topHatId?: InputMaybe; + topHatId_gt?: InputMaybe; + topHatId_gte?: InputMaybe; + topHatId_in?: InputMaybe>; + topHatId_lt?: InputMaybe; + topHatId_lte?: InputMaybe; + topHatId_not?: InputMaybe; + topHatId_not_in?: InputMaybe>; }; export enum Workspace_OrderBy { - BlockNumber = "blockNumber", - BlockTimestamp = "blockTimestamp", - Creator = "creator", - HatsTimeFrameModule = "hatsTimeFrameModule", - HatterHatId = "hatterHatId", - Id = "id", - SplitCreator = "splitCreator", - TopHatId = "topHatId", + BlockNumber = 'blockNumber', + BlockTimestamp = 'blockTimestamp', + Creator = 'creator', + HatsTimeFrameModule = 'hatsTimeFrameModule', + HatterHatId = 'hatterHatId', + Id = 'id', + SplitCreator = 'splitCreator', + TopHatId = 'topHatId' } export type _Block_ = { - __typename?: "_Block_"; + __typename?: '_Block_'; /** The hash of the block */ - hash?: Maybe; + hash?: Maybe; /** The block number */ - number: Scalars["Int"]["output"]; + number: Scalars['Int']['output']; /** The hash of the parent block */ - parentHash?: Maybe; + parentHash?: Maybe; /** Integer representation of the timestamp stored in blocks for the chain */ - timestamp?: Maybe; + timestamp?: Maybe; }; /** The type for the top-level _meta field */ export type _Meta_ = { - __typename?: "_Meta_"; + __typename?: '_Meta_'; /** * Information about a specific subgraph block. The hash of the block * will be null if the _meta field has a block constraint that asks for @@ -589,266 +582,42 @@ export type _Meta_ = { */ block: _Block_; /** The deployment ID */ - deployment: Scalars["String"]["output"]; + deployment: Scalars['String']['output']; /** If `true`, the subgraph encountered indexing errors at some past block */ - hasIndexingErrors: Scalars["Boolean"]["output"]; + hasIndexingErrors: Scalars['Boolean']['output']; }; export enum _SubgraphErrorPolicy_ { /** Data will be returned even if the subgraph has indexing errors */ - Allow = "allow", + Allow = 'allow', /** If the subgraph has indexing errors, data will be omitted. The default. */ - Deny = "deny", + Deny = 'deny' } export type GetTransferFractionTokensQueryVariables = Exact<{ where?: InputMaybe; + orderBy?: InputMaybe; + first?: InputMaybe; }>; -export type GetTransferFractionTokensQuery = { - __typename?: "Query"; - transferFractionTokens: Array<{ - __typename?: "TransferFractionToken"; - amount: any; - from: string; - to: string; - tokenId: any; - blockNumber: any; - blockTimestamp: any; - hatId: any; - id: string; - wearer: string; - workspaceId: string; - }>; -}; + +export type GetTransferFractionTokensQuery = { __typename?: 'Query', transferFractionTokens: Array<{ __typename?: 'TransferFractionToken', amount: any, from: string, to: string, tokenId: any, blockNumber: any, blockTimestamp: any, hatId: any, id: string, wearer: string, workspaceId: string }> }; export type GetWorkspacesQueryVariables = Exact<{ where?: InputMaybe; }>; -export type GetWorkspacesQuery = { - __typename?: "Query"; - workspaces: Array<{ - __typename?: "Workspace"; - creator: string; - topHatId: any; - splitCreator: string; - id: string; - hatterHatId: any; - hatsTimeFrameModule: string; - blockTimestamp: any; - blockNumber: any; - }>; -}; + +export type GetWorkspacesQuery = { __typename?: 'Query', workspaces: Array<{ __typename?: 'Workspace', creator: string, topHatId: any, splitCreator: string, id: string, hatterHatId: any, hatsTimeFrameModule: string, blockTimestamp: any, blockNumber: any }> }; export type GetWorkspaceQueryVariables = Exact<{ - workspaceId: Scalars["ID"]["input"]; + workspaceId: Scalars['ID']['input']; }>; -export type GetWorkspaceQuery = { - __typename?: "Query"; - workspace?: { - __typename?: "Workspace"; - creator: string; - hatsTimeFrameModule: string; - hatterHatId: any; - id: string; - splitCreator: string; - topHatId: any; - blockTimestamp: any; - blockNumber: any; - } | null; -}; -export const GetTransferFractionTokensDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetTransferFractionTokens" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "TransferFractionToken_filter" }, - }, - defaultValue: { kind: "ObjectValue", fields: [] }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "transferFractionTokens" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "amount" } }, - { kind: "Field", name: { kind: "Name", value: "from" } }, - { kind: "Field", name: { kind: "Name", value: "to" } }, - { kind: "Field", name: { kind: "Name", value: "tokenId" } }, - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "hatId" } }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { kind: "Field", name: { kind: "Name", value: "wearer" } }, - { kind: "Field", name: { kind: "Name", value: "workspaceId" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode< - GetTransferFractionTokensQuery, - GetTransferFractionTokensQueryVariables ->; -export const GetWorkspacesDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetWorkspaces" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - type: { - kind: "NamedType", - name: { kind: "Name", value: "Workspace_filter" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "workspaces" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "where" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "where" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "creator" } }, - { kind: "Field", name: { kind: "Name", value: "topHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "splitCreator" }, - }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { kind: "Field", name: { kind: "Name", value: "hatterHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "hatsTimeFrameModule" }, - }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode; -export const GetWorkspaceDocument = { - kind: "Document", - definitions: [ - { - kind: "OperationDefinition", - operation: "query", - name: { kind: "Name", value: "GetWorkspace" }, - variableDefinitions: [ - { - kind: "VariableDefinition", - variable: { - kind: "Variable", - name: { kind: "Name", value: "workspaceId" }, - }, - type: { - kind: "NonNullType", - type: { kind: "NamedType", name: { kind: "Name", value: "ID" } }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { - kind: "Field", - name: { kind: "Name", value: "workspace" }, - arguments: [ - { - kind: "Argument", - name: { kind: "Name", value: "id" }, - value: { - kind: "Variable", - name: { kind: "Name", value: "workspaceId" }, - }, - }, - ], - selectionSet: { - kind: "SelectionSet", - selections: [ - { kind: "Field", name: { kind: "Name", value: "creator" } }, - { - kind: "Field", - name: { kind: "Name", value: "hatsTimeFrameModule" }, - }, - { kind: "Field", name: { kind: "Name", value: "hatterHatId" } }, - { kind: "Field", name: { kind: "Name", value: "id" } }, - { - kind: "Field", - name: { kind: "Name", value: "splitCreator" }, - }, - { kind: "Field", name: { kind: "Name", value: "topHatId" } }, - { - kind: "Field", - name: { kind: "Name", value: "blockTimestamp" }, - }, - { kind: "Field", name: { kind: "Name", value: "blockNumber" } }, - ], - }, - }, - ], - }, - }, - ], -} as unknown as DocumentNode; +export type GetWorkspaceQuery = { __typename?: 'Query', workspace?: { __typename?: 'Workspace', creator: string, hatsTimeFrameModule: string, hatterHatId: any, id: string, splitCreator: string, topHatId: any, blockTimestamp: any, blockNumber: any } | null }; + + +export const GetTransferFractionTokensDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTransferFractionTokens"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TransferFractionToken_filter"}},"defaultValue":{"kind":"ObjectValue","fields":[]}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"TransferFractionToken_orderBy"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}},"defaultValue":{"kind":"IntValue","value":"10"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"transferFractionTokens"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}},{"kind":"Argument","name":{"kind":"Name","value":"orderBy"},"value":{"kind":"Variable","name":{"kind":"Name","value":"orderBy"}}},{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"amount"}},{"kind":"Field","name":{"kind":"Name","value":"from"}},{"kind":"Field","name":{"kind":"Name","value":"to"}},{"kind":"Field","name":{"kind":"Name","value":"tokenId"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"hatId"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"wearer"}},{"kind":"Field","name":{"kind":"Name","value":"workspaceId"}}]}}]}}]} as unknown as DocumentNode; +export const GetWorkspacesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspaces"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Workspace_filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspaces"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"topHatId"}},{"kind":"Field","name":{"kind":"Name","value":"splitCreator"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"hatterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"hatsTimeFrameModule"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}}]}}]}}]} as unknown as DocumentNode; +export const GetWorkspaceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetWorkspace"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"workspace"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"workspaceId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creator"}},{"kind":"Field","name":{"kind":"Name","value":"hatsTimeFrameModule"}},{"kind":"Field","name":{"kind":"Name","value":"hatterHatId"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"splitCreator"}},{"kind":"Field","name":{"kind":"Name","value":"topHatId"}},{"kind":"Field","name":{"kind":"Name","value":"blockTimestamp"}},{"kind":"Field","name":{"kind":"Name","value":"blockNumber"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/pkgs/frontend/gql/index.ts b/pkgs/frontend/gql/index.ts index 0ea4a91..f515991 100644 --- a/pkgs/frontend/gql/index.ts +++ b/pkgs/frontend/gql/index.ts @@ -1,2 +1,2 @@ export * from "./fragment-masking"; -export * from "./gql"; +export * from "./gql"; \ No newline at end of file diff --git a/pkgs/frontend/hooks/useFractionToken.ts b/pkgs/frontend/hooks/useFractionToken.ts index 20afea2..37a9d62 100644 --- a/pkgs/frontend/hooks/useFractionToken.ts +++ b/pkgs/frontend/hooks/useFractionToken.ts @@ -5,6 +5,7 @@ import type { GetTransferFractionTokensQuery, GetTransferFractionTokensQueryVariables, TransferFractionToken_Filter, + TransferFractionToken_OrderBy, } from "gql/graphql"; import { useCallback, useEffect, useState } from "react"; import { type Address, decodeEventLog, encodeFunctionData } from "viem"; @@ -521,8 +522,8 @@ export const useTransferFractionToken = (hatId: bigint, wearer: Address) => { ///////////////////////////////////// const queryGetTransferFractionTokens = gql(` - query GetTransferFractionTokens($where: TransferFractionToken_filter = {}) { - transferFractionTokens(where: $where) { + query GetTransferFractionTokens($where: TransferFractionToken_filter = {}, $orderBy: TransferFractionToken_orderBy, , $first: Int = 10) { + transferFractionTokens(where: $where, orderBy: $orderBy, first: $first) { amount from to @@ -539,6 +540,8 @@ const queryGetTransferFractionTokens = gql(` export const useGetTransferFractionTokens = (params: { where?: TransferFractionToken_Filter; + orderBy?: TransferFractionToken_OrderBy; + first?: number; }) => { const result = useQuery< GetTransferFractionTokensQuery, @@ -546,6 +549,8 @@ export const useGetTransferFractionTokens = (params: { >(queryGetTransferFractionTokens, { variables: { where: params.where, + orderBy: params.orderBy, + first: params.first, }, });