From f7a6aebb2371a5d57a77b845c2a4fd7b706518b9 Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 10:52:54 -0700 Subject: [PATCH 01/10] facilitator post drawer --- src/components/grant/FacilitatorActions.tsx | 20 ++++++++++++++++++- .../grant/FacilitatorApprovalDrawer.tsx | 3 --- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/grant/FacilitatorActions.tsx b/src/components/grant/FacilitatorActions.tsx index 51d8e02..a4d0e26 100644 --- a/src/components/grant/FacilitatorActions.tsx +++ b/src/components/grant/FacilitatorActions.tsx @@ -4,12 +4,17 @@ import { IconPlus } from '@tabler/icons-react'; import { FacilitatorApprovalDrawer } from './FacilitatorApprovalDrawer'; import { useGrant } from '../../hooks/useGrant'; import { GameStatus, GrantStatus } from '../../types/common'; +import { PostDrawer } from '../PostDrawer'; +import { DAO_MASONS, HATS } from '../../constants/gameSetup'; +import { Player } from '../../types/ui'; +import { PostGrantDrawer } from './PostGrantDrawer'; export const FacilitatorActions = () => { const [approvalOpened, { open: openApprove, close: closeApprove }] = useDisclosure(); + const [postOpened, { open: openPost, close: closePost }] = useDisclosure(); - const { grant } = useGrant(); + const { grant, project, ship, refetchGrant } = useGrant(); const isReadyToApprove = grant?.status === GrantStatus.MilestonesApproved; return ( @@ -24,11 +29,24 @@ export const FacilitatorActions = () => { Review Grantee )} + + ); }; diff --git a/src/components/grant/FacilitatorApprovalDrawer.tsx b/src/components/grant/FacilitatorApprovalDrawer.tsx index 587856f..8ff88b7 100644 --- a/src/components/grant/FacilitatorApprovalDrawer.tsx +++ b/src/components/grant/FacilitatorApprovalDrawer.tsx @@ -64,9 +64,6 @@ export const FacilitatorApprovalDrawer = ({ ] ); - console.log('encoded', encoded); - console.log('ship.poolId', ship.poolId); - tx({ writeContractParams: { abi: AlloAbi, From 644d9b9e775bdd3e26159c665bdb3ad8d40e2f7a Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 11:12:41 -0700 Subject: [PATCH 02/10] fix facilitator post tag --- .graphclientrc.yml | 4 +- src/.graphclient/index.ts | 146 +- src/.graphclient/schema.graphql | 118 +- .../grant-ships/introspectionSchema.ts | 1208 ++++++----------- .../sources/grant-ships/schema.graphql | 118 +- src/.graphclient/sources/grant-ships/types.ts | 108 +- src/components/grant/GrantTimeline.tsx | 5 +- src/components/grant/PostGrantDrawer.tsx | 2 +- src/constants/tags.ts | 1 + 9 files changed, 682 insertions(+), 1028 deletions(-) diff --git a/.graphclientrc.yml b/.graphclientrc.yml index 12d8ecd..b6c7898 100644 --- a/.graphclientrc.yml +++ b/.graphclientrc.yml @@ -2,8 +2,8 @@ sources: - name: grant-ships handler: graphql: - endpoint: https://indexer.bigdevenergy.link/3a96753/v1/graphql - # endpoint: http://localhost:8080/v1/graphql + # endpoint: https://indexer.bigdevenergy.link/3a96753/v1/graphql + endpoint: http://localhost:8080/v1/graphql documents: # - './src/**/*.graphql' - './src/graphql/newQueries/**/*.graphql' diff --git a/src/.graphclient/index.ts b/src/.graphclient/index.ts index 61d2c8e..6e2222e 100644 --- a/src/.graphclient/index.ts +++ b/src/.graphclient/index.ts @@ -38,6 +38,8 @@ export type Scalars = { Boolean: boolean; Int: number; Float: number; + _numeric: any; + _text: any; contract_type: any; entity_type: any; event_type: any; @@ -791,7 +793,7 @@ export type EventPost_variance_order_by = { /** columns and relationships of "FactoryEventsSummary" */ export type FactoryEventsSummary = { address: Scalars['String']; - admins: Array; + admins: Scalars['_text']; contestBuiltCount: Scalars['numeric']; contestCloneCount: Scalars['numeric']; contestTemplateCount: Scalars['numeric']; @@ -807,7 +809,7 @@ export type FactoryEventsSummary_bool_exp = { _not?: InputMaybe; _or?: InputMaybe>; address?: InputMaybe; - admins?: InputMaybe; + admins?: InputMaybe<_text_comparison_exp>; contestBuiltCount?: InputMaybe; contestCloneCount?: InputMaybe; contestTemplateCount?: InputMaybe; @@ -862,7 +864,7 @@ export type FactoryEventsSummary_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type FactoryEventsSummary_stream_cursor_value_input = { address?: InputMaybe; - admins?: InputMaybe>; + admins?: InputMaybe; contestBuiltCount?: InputMaybe; contestCloneCount?: InputMaybe; contestTemplateCount?: InputMaybe; @@ -1886,8 +1888,8 @@ export type GrantShip = { name: Scalars['String']; nonce: Scalars['numeric']; owner: Scalars['String']; - pastNames: Array; - pastProfileIds: Array; + pastNames: Scalars['_text']; + pastProfileIds: Scalars['_text']; poolActive?: Maybe; poolFunded: Scalars['Boolean']; poolId?: Maybe; @@ -1987,8 +1989,8 @@ export type GrantShip_bool_exp = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; + pastNames?: InputMaybe<_text_comparison_exp>; + pastProfileIds?: InputMaybe<_text_comparison_exp>; poolActive?: InputMaybe; poolFunded?: InputMaybe; poolId?: InputMaybe; @@ -2027,8 +2029,6 @@ export type GrantShip_max_order_by = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; poolId?: InputMaybe; profileId?: InputMaybe; profileMetadata_id?: InputMaybe; @@ -2063,8 +2063,6 @@ export type GrantShip_min_order_by = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; poolId?: InputMaybe; profileId?: InputMaybe; profileMetadata_id?: InputMaybe; @@ -2309,8 +2307,8 @@ export type GrantShip_stream_cursor_value_input = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe>; - pastProfileIds?: InputMaybe>; + pastNames?: InputMaybe; + pastProfileIds?: InputMaybe; poolActive?: InputMaybe; poolFunded?: InputMaybe; poolId?: InputMaybe; @@ -2848,7 +2846,7 @@ export type HatsPoster = { db_write_timestamp?: Maybe; /** An array relationship */ eventPosts: Array; - hatIds: Array; + hatIds: Scalars['_numeric']; hatsAddress: Scalars['String']; id: Scalars['String']; /** An array relationship */ @@ -2882,7 +2880,7 @@ export type HatsPoster_bool_exp = { _or?: InputMaybe>; db_write_timestamp?: InputMaybe; eventPosts?: InputMaybe; - hatIds?: InputMaybe; + hatIds?: InputMaybe<_numeric_comparison_exp>; hatsAddress?: InputMaybe; id?: InputMaybe; record?: InputMaybe; @@ -2920,7 +2918,7 @@ export type HatsPoster_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type HatsPoster_stream_cursor_value_input = { db_write_timestamp?: InputMaybe; - hatIds?: InputMaybe>; + hatIds?: InputMaybe; hatsAddress?: InputMaybe; id?: InputMaybe; }; @@ -3538,7 +3536,7 @@ export type ProfileIdToAnchor_stream_cursor_value_input = { /** columns and relationships of "ProfileMemberGroup" */ export type ProfileMemberGroup = { - addresses: Array; + addresses: Scalars['_text']; db_write_timestamp?: Maybe; id: Scalars['String']; role: Scalars['String']; @@ -3549,7 +3547,7 @@ export type ProfileMemberGroup_bool_exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - addresses?: InputMaybe; + addresses?: InputMaybe<_text_comparison_exp>; db_write_timestamp?: InputMaybe; id?: InputMaybe; role?: InputMaybe; @@ -3584,7 +3582,7 @@ export type ProfileMemberGroup_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type ProfileMemberGroup_stream_cursor_value_input = { - addresses?: InputMaybe>; + addresses?: InputMaybe; db_write_timestamp?: InputMaybe; id?: InputMaybe; role?: InputMaybe; @@ -3608,8 +3606,8 @@ export type Project = { name: Scalars['String']; nonce: Scalars['numeric']; owner: Scalars['String']; - pastNames: Array; - pastProfileIds: Array; + pastNames: Scalars['_text']; + pastProfileIds: Scalars['_text']; profileId: Scalars['String']; status: Scalars['Int']; totalAmountReceived: Scalars['numeric']; @@ -3643,8 +3641,8 @@ export type Project_bool_exp = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; + pastNames?: InputMaybe<_text_comparison_exp>; + pastProfileIds?: InputMaybe<_text_comparison_exp>; profileId?: InputMaybe; status?: InputMaybe; totalAmountReceived?: InputMaybe; @@ -3725,8 +3723,8 @@ export type Project_stream_cursor_value_input = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe>; - pastProfileIds?: InputMaybe>; + pastNames?: InputMaybe; + pastProfileIds?: InputMaybe; profileId?: InputMaybe; status?: InputMaybe; totalAmountReceived?: InputMaybe; @@ -4521,23 +4519,6 @@ export type StemModule_stream_cursor_value_input = { moduleTemplate_id?: InputMaybe; }; -/** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ -export type String_array_comparison_exp = { - /** is the array contained in the given array value */ - _contained_in?: InputMaybe>; - /** does the array contain the given value */ - _contains?: InputMaybe>; - _eq?: InputMaybe>; - _gt?: InputMaybe>; - _gte?: InputMaybe>; - _in?: InputMaybe>>; - _is_null?: InputMaybe; - _lt?: InputMaybe>; - _lte?: InputMaybe>; - _neq?: InputMaybe>; - _nin?: InputMaybe>>; -}; - /** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ export type String_comparison_exp = { _eq?: InputMaybe; @@ -4829,6 +4810,32 @@ export type Update_stream_cursor_value_input = { timestamp?: InputMaybe; }; +/** Boolean expression to compare columns of type "_numeric". All fields are combined with logical 'AND'. */ +export type _numeric_comparison_exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + +/** Boolean expression to compare columns of type "_text". All fields are combined with logical 'AND'. */ +export type _text_comparison_exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "chain_metadata" */ export type chain_metadata = { block_height: Scalars['Int']; @@ -5466,23 +5473,6 @@ export type json_comparison_exp = { _nin?: InputMaybe>; }; -/** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ -export type numeric_array_comparison_exp = { - /** is the array contained in the given array value */ - _contained_in?: InputMaybe>; - /** does the array contain the given value */ - _contains?: InputMaybe>; - _eq?: InputMaybe>; - _gt?: InputMaybe>; - _gte?: InputMaybe>; - _in?: InputMaybe>>; - _is_null?: InputMaybe; - _lt?: InputMaybe>; - _lte?: InputMaybe>; - _neq?: InputMaybe>; - _nin?: InputMaybe>>; -}; - /** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ export type numeric_comparison_exp = { _eq?: InputMaybe; @@ -8266,7 +8256,6 @@ export type ResolversTypes = ResolversObject<{ StemModule_stream_cursor_input: StemModule_stream_cursor_input; StemModule_stream_cursor_value_input: StemModule_stream_cursor_value_input; String: ResolverTypeWrapper; - String_array_comparison_exp: String_array_comparison_exp; String_comparison_exp: String_comparison_exp; TVParams: ResolverTypeWrapper; TVParams_bool_exp: TVParams_bool_exp; @@ -8286,6 +8275,10 @@ export type ResolversTypes = ResolversObject<{ Update_select_column: Update_select_column; Update_stream_cursor_input: Update_stream_cursor_input; Update_stream_cursor_value_input: Update_stream_cursor_value_input; + _numeric: ResolverTypeWrapper; + _numeric_comparison_exp: _numeric_comparison_exp; + _text: ResolverTypeWrapper; + _text_comparison_exp: _text_comparison_exp; chain_metadata: ResolverTypeWrapper; chain_metadata_bool_exp: chain_metadata_bool_exp; chain_metadata_order_by: chain_metadata_order_by; @@ -8338,7 +8331,6 @@ export type ResolversTypes = ResolversObject<{ json: ResolverTypeWrapper; json_comparison_exp: json_comparison_exp; numeric: ResolverTypeWrapper; - numeric_array_comparison_exp: numeric_array_comparison_exp; numeric_comparison_exp: numeric_comparison_exp; order_by: order_by; persisted_state: ResolverTypeWrapper; @@ -8658,7 +8650,6 @@ export type ResolversParentTypes = ResolversObject<{ StemModule_stream_cursor_input: StemModule_stream_cursor_input; StemModule_stream_cursor_value_input: StemModule_stream_cursor_value_input; String: Scalars['String']; - String_array_comparison_exp: String_array_comparison_exp; String_comparison_exp: String_comparison_exp; TVParams: TVParams; TVParams_bool_exp: TVParams_bool_exp; @@ -8675,6 +8666,10 @@ export type ResolversParentTypes = ResolversObject<{ Update_order_by: Update_order_by; Update_stream_cursor_input: Update_stream_cursor_input; Update_stream_cursor_value_input: Update_stream_cursor_value_input; + _numeric: Scalars['_numeric']; + _numeric_comparison_exp: _numeric_comparison_exp; + _text: Scalars['_text']; + _text_comparison_exp: _text_comparison_exp; chain_metadata: chain_metadata; chain_metadata_bool_exp: chain_metadata_bool_exp; chain_metadata_order_by: chain_metadata_order_by; @@ -8721,7 +8716,6 @@ export type ResolversParentTypes = ResolversObject<{ json: Scalars['json']; json_comparison_exp: json_comparison_exp; numeric: Scalars['numeric']; - numeric_array_comparison_exp: numeric_array_comparison_exp; numeric_comparison_exp: numeric_comparison_exp; persisted_state: persisted_state; persisted_state_bool_exp: persisted_state_bool_exp; @@ -8835,7 +8829,7 @@ export type EventPostResolvers = ResolversObject<{ address?: Resolver; - admins?: Resolver, ParentType, ContextType>; + admins?: Resolver; contestBuiltCount?: Resolver; contestCloneCount?: Resolver; contestTemplateCount?: Resolver; @@ -9027,8 +9021,8 @@ export type GrantShipResolvers; nonce?: Resolver; owner?: Resolver; - pastNames?: Resolver, ParentType, ContextType>; - pastProfileIds?: Resolver, ParentType, ContextType>; + pastNames?: Resolver; + pastProfileIds?: Resolver; poolActive?: Resolver, ParentType, ContextType>; poolFunded?: Resolver; poolId?: Resolver, ParentType, ContextType>; @@ -9079,7 +9073,7 @@ export type HALParamsResolvers = ResolversObject<{ db_write_timestamp?: Resolver, ParentType, ContextType>; eventPosts?: Resolver, ParentType, ContextType, Partial>; - hatIds?: Resolver, ParentType, ContextType>; + hatIds?: Resolver; hatsAddress?: Resolver; id?: Resolver; record?: Resolver, ParentType, ContextType, Partial>; @@ -9144,7 +9138,7 @@ export type ProfileIdToAnchorResolvers; export type ProfileMemberGroupResolvers = ResolversObject<{ - addresses?: Resolver, ParentType, ContextType>; + addresses?: Resolver; db_write_timestamp?: Resolver, ParentType, ContextType>; id?: Resolver; role?: Resolver; @@ -9165,8 +9159,8 @@ export type ProjectResolvers; nonce?: Resolver; owner?: Resolver; - pastNames?: Resolver, ParentType, ContextType>; - pastProfileIds?: Resolver, ParentType, ContextType>; + pastNames?: Resolver; + pastProfileIds?: Resolver; profileId?: Resolver; status?: Resolver; totalAmountReceived?: Resolver; @@ -9297,6 +9291,14 @@ export type UpdateResolvers; }>; +export interface _numericScalarConfig extends GraphQLScalarTypeConfig { + name: '_numeric'; +} + +export interface _textScalarConfig extends GraphQLScalarTypeConfig { + name: '_text'; +} + export type chain_metadataResolvers = ResolversObject<{ block_height?: Resolver; chain_id?: Resolver; @@ -9694,6 +9696,8 @@ export type Resolvers = ResolversObject<{ TVParams?: TVParamsResolvers; Transaction?: TransactionResolvers; Update?: UpdateResolvers; + _numeric?: GraphQLScalarType; + _text?: GraphQLScalarType; chain_metadata?: chain_metadataResolvers; contract_type?: GraphQLScalarType; dynamic_contract_registry?: dynamic_contract_registryResolvers; @@ -9762,7 +9766,7 @@ const grantShipsTransforms = []; const additionalTypeDefs = [] as any[]; const grantShipsHandler = new GraphqlHandler({ name: "grant-ships", - config: {"endpoint":"https://indexer.bigdevenergy.link/3a96753/v1/graphql"}, + config: {"endpoint":"http://localhost:8080/v1/graphql"}, baseDir, cache, pubsub, diff --git a/src/.graphclient/schema.graphql b/src/.graphclient/schema.graphql index 4e8f639..23d44e9 100644 --- a/src/.graphclient/schema.graphql +++ b/src/.graphclient/schema.graphql @@ -866,7 +866,7 @@ columns and relationships of "FactoryEventsSummary" """ type FactoryEventsSummary { address: String! - admins: [String!]! + admins: _text! contestBuiltCount: numeric! contestCloneCount: numeric! contestTemplateCount: numeric! @@ -884,7 +884,7 @@ input FactoryEventsSummary_bool_exp { _not: FactoryEventsSummary_bool_exp _or: [FactoryEventsSummary_bool_exp!] address: String_comparison_exp - admins: String_array_comparison_exp + admins: _text_comparison_exp contestBuiltCount: numeric_comparison_exp contestCloneCount: numeric_comparison_exp contestTemplateCount: numeric_comparison_exp @@ -944,7 +944,7 @@ input FactoryEventsSummary_stream_cursor_input { """Initial value of the column from where the streaming should start""" input FactoryEventsSummary_stream_cursor_value_input { address: String - admins: [String!] + admins: _text contestBuiltCount: numeric contestCloneCount: numeric contestTemplateCount: numeric @@ -2091,8 +2091,8 @@ type GrantShip { name: String! nonce: numeric! owner: String! - pastNames: [String!]! - pastProfileIds: [String!]! + pastNames: _text! + pastProfileIds: _text! poolActive: Boolean poolFunded: Boolean! poolId: numeric @@ -2188,8 +2188,8 @@ input GrantShip_bool_exp { name: String_comparison_exp nonce: numeric_comparison_exp owner: String_comparison_exp - pastNames: String_array_comparison_exp - pastProfileIds: String_array_comparison_exp + pastNames: _text_comparison_exp + pastProfileIds: _text_comparison_exp poolActive: Boolean_comparison_exp poolFunded: Boolean_comparison_exp poolId: numeric_comparison_exp @@ -2230,8 +2230,6 @@ input GrantShip_max_order_by { name: order_by nonce: order_by owner: order_by - pastNames: order_by - pastProfileIds: order_by poolId: order_by profileId: order_by profileMetadata_id: order_by @@ -2268,8 +2266,6 @@ input GrantShip_min_order_by { name: order_by nonce: order_by owner: order_by - pastNames: order_by - pastProfileIds: order_by poolId: order_by profileId: order_by profileMetadata_id: order_by @@ -2525,8 +2521,8 @@ input GrantShip_stream_cursor_value_input { name: String nonce: numeric owner: String - pastNames: [String!] - pastProfileIds: [String!] + pastNames: _text + pastProfileIds: _text poolActive: Boolean poolFunded: Boolean poolId: numeric @@ -3134,7 +3130,7 @@ type HatsPoster { """filter the rows returned""" where: EventPost_bool_exp ): [EventPost!]! - hatIds: [numeric!]! + hatIds: _numeric! hatsAddress: String! id: String! """An array relationship""" @@ -3161,7 +3157,7 @@ input HatsPoster_bool_exp { _or: [HatsPoster_bool_exp!] db_write_timestamp: timestamp_comparison_exp eventPosts: EventPost_bool_exp - hatIds: numeric_array_comparison_exp + hatIds: _numeric_comparison_exp hatsAddress: String_comparison_exp id: String_comparison_exp record: Record_bool_exp @@ -3204,7 +3200,7 @@ input HatsPoster_stream_cursor_input { """Initial value of the column from where the streaming should start""" input HatsPoster_stream_cursor_value_input { db_write_timestamp: timestamp - hatIds: [numeric!] + hatIds: _numeric hatsAddress: String id: String } @@ -3916,7 +3912,7 @@ input ProfileIdToAnchor_stream_cursor_value_input { columns and relationships of "ProfileMemberGroup" """ type ProfileMemberGroup { - addresses: [String!]! + addresses: _text! db_write_timestamp: timestamp id: String! role: String! @@ -3929,7 +3925,7 @@ input ProfileMemberGroup_bool_exp { _and: [ProfileMemberGroup_bool_exp!] _not: ProfileMemberGroup_bool_exp _or: [ProfileMemberGroup_bool_exp!] - addresses: String_array_comparison_exp + addresses: _text_comparison_exp db_write_timestamp: timestamp_comparison_exp id: String_comparison_exp role: String_comparison_exp @@ -3969,7 +3965,7 @@ input ProfileMemberGroup_stream_cursor_input { """Initial value of the column from where the streaming should start""" input ProfileMemberGroup_stream_cursor_value_input { - addresses: [String!] + addresses: _text db_write_timestamp: timestamp id: String role: String @@ -4006,8 +4002,8 @@ type Project { name: String! nonce: numeric! owner: String! - pastNames: [String!]! - pastProfileIds: [String!]! + pastNames: _text! + pastProfileIds: _text! profileId: String! status: Int! totalAmountReceived: numeric! @@ -4033,8 +4029,8 @@ input Project_bool_exp { name: String_comparison_exp nonce: numeric_comparison_exp owner: String_comparison_exp - pastNames: String_array_comparison_exp - pastProfileIds: String_array_comparison_exp + pastNames: _text_comparison_exp + pastProfileIds: _text_comparison_exp profileId: String_comparison_exp status: Int_comparison_exp totalAmountReceived: numeric_comparison_exp @@ -4120,8 +4116,8 @@ input Project_stream_cursor_value_input { name: String nonce: numeric owner: String - pastNames: [String!] - pastProfileIds: [String!] + pastNames: _text + pastProfileIds: _text profileId: String status: Int totalAmountReceived: numeric @@ -5046,25 +5042,6 @@ input StemModule_stream_cursor_value_input { moduleTemplate_id: String } -""" -Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. -""" -input String_array_comparison_exp { - """is the array contained in the given array value""" - _contained_in: [String!] - """does the array contain the given value""" - _contains: [String!] - _eq: [String!] - _gt: [String!] - _gte: [String!] - _in: [[String!]!] - _is_null: Boolean - _lt: [String!] - _lte: [String!] - _neq: [String!] - _nin: [[String!]!] -} - """ Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. """ @@ -5393,6 +5370,40 @@ input Update_stream_cursor_value_input { timestamp: Int } +scalar _numeric + +""" +Boolean expression to compare columns of type "_numeric". All fields are combined with logical 'AND'. +""" +input _numeric_comparison_exp { + _eq: _numeric + _gt: _numeric + _gte: _numeric + _in: [_numeric!] + _is_null: Boolean + _lt: _numeric + _lte: _numeric + _neq: _numeric + _nin: [_numeric!] +} + +scalar _text + +""" +Boolean expression to compare columns of type "_text". All fields are combined with logical 'AND'. +""" +input _text_comparison_exp { + _eq: _text + _gt: _text + _gte: _text + _in: [_text!] + _is_null: Boolean + _lt: _text + _lte: _text + _neq: _text + _nin: [_text!] +} + """ columns and relationships of "chain_metadata" """ @@ -6107,25 +6118,6 @@ input json_comparison_exp { scalar numeric -""" -Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. -""" -input numeric_array_comparison_exp { - """is the array contained in the given array value""" - _contained_in: [numeric!] - """does the array contain the given value""" - _contains: [numeric!] - _eq: [numeric!] - _gt: [numeric!] - _gte: [numeric!] - _in: [[numeric!]!] - _is_null: Boolean - _lt: [numeric!] - _lte: [numeric!] - _neq: [numeric!] - _nin: [[numeric!]!] -} - """ Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. """ diff --git a/src/.graphclient/sources/grant-ships/introspectionSchema.ts b/src/.graphclient/sources/grant-ships/introspectionSchema.ts index a14fe1c..1a7c430 100644 --- a/src/.graphclient/sources/grant-ships/introspectionSchema.ts +++ b/src/.graphclient/sources/grant-ships/introspectionSchema.ts @@ -7689,16 +7689,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -7932,7 +7926,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -8419,16 +8413,10 @@ const schemaAST = { "value": "admins" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -19716,16 +19704,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -19741,16 +19723,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -21012,7 +20988,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -21027,7 +21003,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -21557,36 +21533,6 @@ const schemaAST = { }, "directives": [] }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pastNames" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "order_by" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pastProfileIds" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "order_by" - } - }, - "directives": [] - }, { "kind": "InputValueDefinition", "name": { @@ -22052,36 +21998,6 @@ const schemaAST = { }, "directives": [] }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pastNames" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "order_by" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "pastProfileIds" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "order_by" - } - }, - "directives": [] - }, { "kind": "InputValueDefinition", "name": { @@ -24718,16 +24634,10 @@ const schemaAST = { "value": "pastNames" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -24739,16 +24649,10 @@ const schemaAST = { "value": "pastProfileIds" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -30857,16 +30761,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" } } }, @@ -31166,7 +31064,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "numeric_array_comparison_exp" + "value": "_numeric_comparison_exp" } }, "directives": [] @@ -31483,16 +31381,10 @@ const schemaAST = { "value": "hatIds" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" } }, "directives": [] @@ -37892,16 +37784,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -38044,7 +37930,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -38316,16 +38202,10 @@ const schemaAST = { "value": "addresses" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -38769,16 +38649,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -38794,16 +38668,10 @@ const schemaAST = { "type": { "kind": "NonNullType", "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } } }, @@ -39144,7 +39012,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -39159,7 +39027,7 @@ const schemaAST = { "kind": "NamedType", "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "_text_comparison_exp" } }, "directives": [] @@ -39934,16 +39802,10 @@ const schemaAST = { "value": "pastNames" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -39955,16 +39817,10 @@ const schemaAST = { "value": "pastProfileIds" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" } }, "directives": [] @@ -47833,57 +47689,35 @@ const schemaAST = { }, "name": { "kind": "Name", - "value": "String_array_comparison_exp" + "value": "String_comparison_exp" }, "fields": [ { "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "is the array contained in the given array value", - "block": true - }, "name": { "kind": "Name", - "value": "_contained_in" + "value": "_eq" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" } }, "directives": [] }, { "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "does the array contain the given value", - "block": true - }, "name": { "kind": "Name", - "value": "_contains" + "value": "_gt" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" } }, "directives": [] @@ -47892,40 +47726,33 @@ const schemaAST = { "kind": "InputValueDefinition", "name": { "kind": "Name", - "value": "_eq" + "value": "_gte" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" } }, "directives": [] }, { "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "does the column match the given case-insensitive pattern", + "block": true + }, "name": { "kind": "Name", - "value": "_gt" + "value": "_ilike" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" } }, "directives": [] @@ -47934,7 +47761,7 @@ const schemaAST = { "kind": "InputValueDefinition", "name": { "kind": "Name", - "value": "_gte" + "value": "_in" }, "type": { "kind": "ListType", @@ -47953,253 +47780,20 @@ const schemaAST = { }, { "kind": "InputValueDefinition", + "description": { + "kind": "StringValue", + "value": "does the column match the given POSIX regular expression, case insensitive", + "block": true + }, "name": { "kind": "Name", - "value": "_in" + "value": "_iregex" }, "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_is_null" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_lt" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_lte" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_neq" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_nin" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - } - } - }, - "directives": [] - } - ], - "directives": [] - }, - { - "kind": "InputObjectTypeDefinition", - "description": { - "kind": "StringValue", - "value": "Boolean expression to compare columns of type \"String\". All fields are combined with logical 'AND'.", - "block": true - }, - "name": { - "kind": "Name", - "value": "String_comparison_exp" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_eq" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_gt" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_gte" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "does the column match the given case-insensitive pattern", - "block": true - }, - "name": { - "kind": "Name", - "value": "_ilike" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "does the column match the given POSIX regular expression, case insensitive", - "block": true - }, - "name": { - "kind": "Name", - "value": "_iregex" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "String" + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "String" } }, "directives": [] @@ -51146,6 +50740,346 @@ const schemaAST = { ], "directives": [] }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "_numeric" + }, + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "description": { + "kind": "StringValue", + "value": "Boolean expression to compare columns of type \"_numeric\". All fields are combined with logical 'AND'.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_numeric_comparison_exp" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_eq" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_is_null" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_neq" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_nin" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_numeric" + } + } + } + }, + "directives": [] + } + ], + "directives": [] + }, + { + "kind": "ScalarTypeDefinition", + "name": { + "kind": "Name", + "value": "_text" + }, + "directives": [] + }, + { + "kind": "InputObjectTypeDefinition", + "description": { + "kind": "StringValue", + "value": "Boolean expression to compare columns of type \"_text\". All fields are combined with logical 'AND'.", + "block": true + }, + "name": { + "kind": "Name", + "value": "_text_comparison_exp" + }, + "fields": [ + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_eq" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_gt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_gte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_in" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + } + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_is_null" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "Boolean" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_lt" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_lte" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_neq" + }, + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + }, + "directives": [] + }, + { + "kind": "InputValueDefinition", + "name": { + "kind": "Name", + "value": "_nin" + }, + "type": { + "kind": "ListType", + "type": { + "kind": "NonNullType", + "type": { + "kind": "NamedType", + "name": { + "kind": "Name", + "value": "_text" + } + } + } + }, + "directives": [] + } + ], + "directives": [] + }, { "kind": "ObjectTypeDefinition", "description": { @@ -57913,268 +57847,6 @@ const schemaAST = { }, "directives": [] }, - { - "kind": "InputObjectTypeDefinition", - "description": { - "kind": "StringValue", - "value": "Boolean expression to compare columns of type \"numeric\". All fields are combined with logical 'AND'.", - "block": true - }, - "name": { - "kind": "Name", - "value": "numeric_array_comparison_exp" - }, - "fields": [ - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "is the array contained in the given array value", - "block": true - }, - "name": { - "kind": "Name", - "value": "_contained_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "description": { - "kind": "StringValue", - "value": "does the array contain the given value", - "block": true - }, - "name": { - "kind": "Name", - "value": "_contains" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_eq" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_gt" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_gte" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_in" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_is_null" - }, - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "Boolean" - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_lt" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_lte" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_neq" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - }, - "directives": [] - }, - { - "kind": "InputValueDefinition", - "name": { - "kind": "Name", - "value": "_nin" - }, - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "ListType", - "type": { - "kind": "NonNullType", - "type": { - "kind": "NamedType", - "name": { - "kind": "Name", - "value": "numeric" - } - } - } - } - } - }, - "directives": [] - } - ], - "directives": [] - }, { "kind": "InputObjectTypeDefinition", "description": { diff --git a/src/.graphclient/sources/grant-ships/schema.graphql b/src/.graphclient/sources/grant-ships/schema.graphql index 4e8f639..23d44e9 100644 --- a/src/.graphclient/sources/grant-ships/schema.graphql +++ b/src/.graphclient/sources/grant-ships/schema.graphql @@ -866,7 +866,7 @@ columns and relationships of "FactoryEventsSummary" """ type FactoryEventsSummary { address: String! - admins: [String!]! + admins: _text! contestBuiltCount: numeric! contestCloneCount: numeric! contestTemplateCount: numeric! @@ -884,7 +884,7 @@ input FactoryEventsSummary_bool_exp { _not: FactoryEventsSummary_bool_exp _or: [FactoryEventsSummary_bool_exp!] address: String_comparison_exp - admins: String_array_comparison_exp + admins: _text_comparison_exp contestBuiltCount: numeric_comparison_exp contestCloneCount: numeric_comparison_exp contestTemplateCount: numeric_comparison_exp @@ -944,7 +944,7 @@ input FactoryEventsSummary_stream_cursor_input { """Initial value of the column from where the streaming should start""" input FactoryEventsSummary_stream_cursor_value_input { address: String - admins: [String!] + admins: _text contestBuiltCount: numeric contestCloneCount: numeric contestTemplateCount: numeric @@ -2091,8 +2091,8 @@ type GrantShip { name: String! nonce: numeric! owner: String! - pastNames: [String!]! - pastProfileIds: [String!]! + pastNames: _text! + pastProfileIds: _text! poolActive: Boolean poolFunded: Boolean! poolId: numeric @@ -2188,8 +2188,8 @@ input GrantShip_bool_exp { name: String_comparison_exp nonce: numeric_comparison_exp owner: String_comparison_exp - pastNames: String_array_comparison_exp - pastProfileIds: String_array_comparison_exp + pastNames: _text_comparison_exp + pastProfileIds: _text_comparison_exp poolActive: Boolean_comparison_exp poolFunded: Boolean_comparison_exp poolId: numeric_comparison_exp @@ -2230,8 +2230,6 @@ input GrantShip_max_order_by { name: order_by nonce: order_by owner: order_by - pastNames: order_by - pastProfileIds: order_by poolId: order_by profileId: order_by profileMetadata_id: order_by @@ -2268,8 +2266,6 @@ input GrantShip_min_order_by { name: order_by nonce: order_by owner: order_by - pastNames: order_by - pastProfileIds: order_by poolId: order_by profileId: order_by profileMetadata_id: order_by @@ -2525,8 +2521,8 @@ input GrantShip_stream_cursor_value_input { name: String nonce: numeric owner: String - pastNames: [String!] - pastProfileIds: [String!] + pastNames: _text + pastProfileIds: _text poolActive: Boolean poolFunded: Boolean poolId: numeric @@ -3134,7 +3130,7 @@ type HatsPoster { """filter the rows returned""" where: EventPost_bool_exp ): [EventPost!]! - hatIds: [numeric!]! + hatIds: _numeric! hatsAddress: String! id: String! """An array relationship""" @@ -3161,7 +3157,7 @@ input HatsPoster_bool_exp { _or: [HatsPoster_bool_exp!] db_write_timestamp: timestamp_comparison_exp eventPosts: EventPost_bool_exp - hatIds: numeric_array_comparison_exp + hatIds: _numeric_comparison_exp hatsAddress: String_comparison_exp id: String_comparison_exp record: Record_bool_exp @@ -3204,7 +3200,7 @@ input HatsPoster_stream_cursor_input { """Initial value of the column from where the streaming should start""" input HatsPoster_stream_cursor_value_input { db_write_timestamp: timestamp - hatIds: [numeric!] + hatIds: _numeric hatsAddress: String id: String } @@ -3916,7 +3912,7 @@ input ProfileIdToAnchor_stream_cursor_value_input { columns and relationships of "ProfileMemberGroup" """ type ProfileMemberGroup { - addresses: [String!]! + addresses: _text! db_write_timestamp: timestamp id: String! role: String! @@ -3929,7 +3925,7 @@ input ProfileMemberGroup_bool_exp { _and: [ProfileMemberGroup_bool_exp!] _not: ProfileMemberGroup_bool_exp _or: [ProfileMemberGroup_bool_exp!] - addresses: String_array_comparison_exp + addresses: _text_comparison_exp db_write_timestamp: timestamp_comparison_exp id: String_comparison_exp role: String_comparison_exp @@ -3969,7 +3965,7 @@ input ProfileMemberGroup_stream_cursor_input { """Initial value of the column from where the streaming should start""" input ProfileMemberGroup_stream_cursor_value_input { - addresses: [String!] + addresses: _text db_write_timestamp: timestamp id: String role: String @@ -4006,8 +4002,8 @@ type Project { name: String! nonce: numeric! owner: String! - pastNames: [String!]! - pastProfileIds: [String!]! + pastNames: _text! + pastProfileIds: _text! profileId: String! status: Int! totalAmountReceived: numeric! @@ -4033,8 +4029,8 @@ input Project_bool_exp { name: String_comparison_exp nonce: numeric_comparison_exp owner: String_comparison_exp - pastNames: String_array_comparison_exp - pastProfileIds: String_array_comparison_exp + pastNames: _text_comparison_exp + pastProfileIds: _text_comparison_exp profileId: String_comparison_exp status: Int_comparison_exp totalAmountReceived: numeric_comparison_exp @@ -4120,8 +4116,8 @@ input Project_stream_cursor_value_input { name: String nonce: numeric owner: String - pastNames: [String!] - pastProfileIds: [String!] + pastNames: _text + pastProfileIds: _text profileId: String status: Int totalAmountReceived: numeric @@ -5046,25 +5042,6 @@ input StemModule_stream_cursor_value_input { moduleTemplate_id: String } -""" -Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. -""" -input String_array_comparison_exp { - """is the array contained in the given array value""" - _contained_in: [String!] - """does the array contain the given value""" - _contains: [String!] - _eq: [String!] - _gt: [String!] - _gte: [String!] - _in: [[String!]!] - _is_null: Boolean - _lt: [String!] - _lte: [String!] - _neq: [String!] - _nin: [[String!]!] -} - """ Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. """ @@ -5393,6 +5370,40 @@ input Update_stream_cursor_value_input { timestamp: Int } +scalar _numeric + +""" +Boolean expression to compare columns of type "_numeric". All fields are combined with logical 'AND'. +""" +input _numeric_comparison_exp { + _eq: _numeric + _gt: _numeric + _gte: _numeric + _in: [_numeric!] + _is_null: Boolean + _lt: _numeric + _lte: _numeric + _neq: _numeric + _nin: [_numeric!] +} + +scalar _text + +""" +Boolean expression to compare columns of type "_text". All fields are combined with logical 'AND'. +""" +input _text_comparison_exp { + _eq: _text + _gt: _text + _gte: _text + _in: [_text!] + _is_null: Boolean + _lt: _text + _lte: _text + _neq: _text + _nin: [_text!] +} + """ columns and relationships of "chain_metadata" """ @@ -6107,25 +6118,6 @@ input json_comparison_exp { scalar numeric -""" -Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. -""" -input numeric_array_comparison_exp { - """is the array contained in the given array value""" - _contained_in: [numeric!] - """does the array contain the given value""" - _contains: [numeric!] - _eq: [numeric!] - _gt: [numeric!] - _gte: [numeric!] - _in: [[numeric!]!] - _is_null: Boolean - _lt: [numeric!] - _lte: [numeric!] - _neq: [numeric!] - _nin: [[numeric!]!] -} - """ Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. """ diff --git a/src/.graphclient/sources/grant-ships/types.ts b/src/.graphclient/sources/grant-ships/types.ts index bd6ae92..e971acf 100644 --- a/src/.graphclient/sources/grant-ships/types.ts +++ b/src/.graphclient/sources/grant-ships/types.ts @@ -16,6 +16,8 @@ export type Scalars = { Boolean: boolean; Int: number; Float: number; + _numeric: any; + _text: any; contract_type: any; entity_type: any; event_type: any; @@ -769,7 +771,7 @@ export type EventPost_variance_order_by = { /** columns and relationships of "FactoryEventsSummary" */ export type FactoryEventsSummary = { address: Scalars['String']; - admins: Array; + admins: Scalars['_text']; contestBuiltCount: Scalars['numeric']; contestCloneCount: Scalars['numeric']; contestTemplateCount: Scalars['numeric']; @@ -785,7 +787,7 @@ export type FactoryEventsSummary_bool_exp = { _not?: InputMaybe; _or?: InputMaybe>; address?: InputMaybe; - admins?: InputMaybe; + admins?: InputMaybe<_text_comparison_exp>; contestBuiltCount?: InputMaybe; contestCloneCount?: InputMaybe; contestTemplateCount?: InputMaybe; @@ -840,7 +842,7 @@ export type FactoryEventsSummary_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type FactoryEventsSummary_stream_cursor_value_input = { address?: InputMaybe; - admins?: InputMaybe>; + admins?: InputMaybe; contestBuiltCount?: InputMaybe; contestCloneCount?: InputMaybe; contestTemplateCount?: InputMaybe; @@ -1864,8 +1866,8 @@ export type GrantShip = { name: Scalars['String']; nonce: Scalars['numeric']; owner: Scalars['String']; - pastNames: Array; - pastProfileIds: Array; + pastNames: Scalars['_text']; + pastProfileIds: Scalars['_text']; poolActive?: Maybe; poolFunded: Scalars['Boolean']; poolId?: Maybe; @@ -1965,8 +1967,8 @@ export type GrantShip_bool_exp = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; + pastNames?: InputMaybe<_text_comparison_exp>; + pastProfileIds?: InputMaybe<_text_comparison_exp>; poolActive?: InputMaybe; poolFunded?: InputMaybe; poolId?: InputMaybe; @@ -2005,8 +2007,6 @@ export type GrantShip_max_order_by = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; poolId?: InputMaybe; profileId?: InputMaybe; profileMetadata_id?: InputMaybe; @@ -2041,8 +2041,6 @@ export type GrantShip_min_order_by = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; poolId?: InputMaybe; profileId?: InputMaybe; profileMetadata_id?: InputMaybe; @@ -2287,8 +2285,8 @@ export type GrantShip_stream_cursor_value_input = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe>; - pastProfileIds?: InputMaybe>; + pastNames?: InputMaybe; + pastProfileIds?: InputMaybe; poolActive?: InputMaybe; poolFunded?: InputMaybe; poolId?: InputMaybe; @@ -2826,7 +2824,7 @@ export type HatsPoster = { db_write_timestamp?: Maybe; /** An array relationship */ eventPosts: Array; - hatIds: Array; + hatIds: Scalars['_numeric']; hatsAddress: Scalars['String']; id: Scalars['String']; /** An array relationship */ @@ -2860,7 +2858,7 @@ export type HatsPoster_bool_exp = { _or?: InputMaybe>; db_write_timestamp?: InputMaybe; eventPosts?: InputMaybe; - hatIds?: InputMaybe; + hatIds?: InputMaybe<_numeric_comparison_exp>; hatsAddress?: InputMaybe; id?: InputMaybe; record?: InputMaybe; @@ -2898,7 +2896,7 @@ export type HatsPoster_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type HatsPoster_stream_cursor_value_input = { db_write_timestamp?: InputMaybe; - hatIds?: InputMaybe>; + hatIds?: InputMaybe; hatsAddress?: InputMaybe; id?: InputMaybe; }; @@ -3516,7 +3514,7 @@ export type ProfileIdToAnchor_stream_cursor_value_input = { /** columns and relationships of "ProfileMemberGroup" */ export type ProfileMemberGroup = { - addresses: Array; + addresses: Scalars['_text']; db_write_timestamp?: Maybe; id: Scalars['String']; role: Scalars['String']; @@ -3527,7 +3525,7 @@ export type ProfileMemberGroup_bool_exp = { _and?: InputMaybe>; _not?: InputMaybe; _or?: InputMaybe>; - addresses?: InputMaybe; + addresses?: InputMaybe<_text_comparison_exp>; db_write_timestamp?: InputMaybe; id?: InputMaybe; role?: InputMaybe; @@ -3562,7 +3560,7 @@ export type ProfileMemberGroup_stream_cursor_input = { /** Initial value of the column from where the streaming should start */ export type ProfileMemberGroup_stream_cursor_value_input = { - addresses?: InputMaybe>; + addresses?: InputMaybe; db_write_timestamp?: InputMaybe; id?: InputMaybe; role?: InputMaybe; @@ -3586,8 +3584,8 @@ export type Project = { name: Scalars['String']; nonce: Scalars['numeric']; owner: Scalars['String']; - pastNames: Array; - pastProfileIds: Array; + pastNames: Scalars['_text']; + pastProfileIds: Scalars['_text']; profileId: Scalars['String']; status: Scalars['Int']; totalAmountReceived: Scalars['numeric']; @@ -3621,8 +3619,8 @@ export type Project_bool_exp = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe; - pastProfileIds?: InputMaybe; + pastNames?: InputMaybe<_text_comparison_exp>; + pastProfileIds?: InputMaybe<_text_comparison_exp>; profileId?: InputMaybe; status?: InputMaybe; totalAmountReceived?: InputMaybe; @@ -3703,8 +3701,8 @@ export type Project_stream_cursor_value_input = { name?: InputMaybe; nonce?: InputMaybe; owner?: InputMaybe; - pastNames?: InputMaybe>; - pastProfileIds?: InputMaybe>; + pastNames?: InputMaybe; + pastProfileIds?: InputMaybe; profileId?: InputMaybe; status?: InputMaybe; totalAmountReceived?: InputMaybe; @@ -4499,23 +4497,6 @@ export type StemModule_stream_cursor_value_input = { moduleTemplate_id?: InputMaybe; }; -/** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ -export type String_array_comparison_exp = { - /** is the array contained in the given array value */ - _contained_in?: InputMaybe>; - /** does the array contain the given value */ - _contains?: InputMaybe>; - _eq?: InputMaybe>; - _gt?: InputMaybe>; - _gte?: InputMaybe>; - _in?: InputMaybe>>; - _is_null?: InputMaybe; - _lt?: InputMaybe>; - _lte?: InputMaybe>; - _neq?: InputMaybe>; - _nin?: InputMaybe>>; -}; - /** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ export type String_comparison_exp = { _eq?: InputMaybe; @@ -4807,6 +4788,32 @@ export type Update_stream_cursor_value_input = { timestamp?: InputMaybe; }; +/** Boolean expression to compare columns of type "_numeric". All fields are combined with logical 'AND'. */ +export type _numeric_comparison_exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + +/** Boolean expression to compare columns of type "_text". All fields are combined with logical 'AND'. */ +export type _text_comparison_exp = { + _eq?: InputMaybe; + _gt?: InputMaybe; + _gte?: InputMaybe; + _in?: InputMaybe>; + _is_null?: InputMaybe; + _lt?: InputMaybe; + _lte?: InputMaybe; + _neq?: InputMaybe; + _nin?: InputMaybe>; +}; + /** columns and relationships of "chain_metadata" */ export type chain_metadata = { block_height: Scalars['Int']; @@ -5444,23 +5451,6 @@ export type json_comparison_exp = { _nin?: InputMaybe>; }; -/** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ -export type numeric_array_comparison_exp = { - /** is the array contained in the given array value */ - _contained_in?: InputMaybe>; - /** does the array contain the given value */ - _contains?: InputMaybe>; - _eq?: InputMaybe>; - _gt?: InputMaybe>; - _gte?: InputMaybe>; - _in?: InputMaybe>>; - _is_null?: InputMaybe; - _lt?: InputMaybe>; - _lte?: InputMaybe>; - _neq?: InputMaybe>; - _nin?: InputMaybe>>; -}; - /** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */ export type numeric_comparison_exp = { _eq?: InputMaybe; diff --git a/src/components/grant/GrantTimeline.tsx b/src/components/grant/GrantTimeline.tsx index 876121e..ea083e3 100644 --- a/src/components/grant/GrantTimeline.tsx +++ b/src/components/grant/GrantTimeline.tsx @@ -21,7 +21,7 @@ import { IconMail } from '@tabler/icons-react'; export const GrantTimeline = () => { const { timeline, ship, project } = useGrant(); - + console.log('timeLine', timeline); return ( @@ -67,6 +67,9 @@ export const GrantTimeline = () => { /> ); } + if (item.tag === 'grant/update/facilitator') { + return 'test'; + } if (item.tag === 'grant/invite/ship') { const update = item as GrantUpdate; diff --git a/src/components/grant/PostGrantDrawer.tsx b/src/components/grant/PostGrantDrawer.tsx index e1c149f..8a230dd 100644 --- a/src/components/grant/PostGrantDrawer.tsx +++ b/src/components/grant/PostGrantDrawer.tsx @@ -95,7 +95,7 @@ export const PostGrantDrawer = ({ return; } - const FULL_TAG = `${playerType === Player.Project ? Tag.ProjectGrantUpdate : Tag.ShipGrantUpdate}:${projectId}`; + const FULL_TAG = `${playerType === Player.Project ? Tag.ProjectGrantUpdate : playerType === Player.Ship ? Tag.ShipGrantUpdate : Tag.FacilitatorGrantUpdate}:${projectId}`; tx({ writeContractParams: { diff --git a/src/constants/tags.ts b/src/constants/tags.ts index ce384ef..a7cdbc0 100644 --- a/src/constants/tags.ts +++ b/src/constants/tags.ts @@ -9,4 +9,5 @@ export enum Tag { ShipSubmitReport = 'TAG:SHIP_SUBMIT_REPORT', ProjectGrantUpdate = 'TAG:PROJECT_GRANT_UPDATE', ShipGrantUpdate = 'TAG:SHIP_GRANT_UPDATE', + FacilitatorGrantUpdate = 'TAG:FACILITATOR_GRANT_UPDATE', } From 597c2febdcd4076bf4a42c4cb2349366893cb5fd Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 11:22:07 -0700 Subject: [PATCH 03/10] display facilitator post --- src/components/grant/FacilitatorActions.tsx | 3 ++- src/components/grant/GrantTimeline.tsx | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/grant/FacilitatorActions.tsx b/src/components/grant/FacilitatorActions.tsx index a4d0e26..592c0b4 100644 --- a/src/components/grant/FacilitatorActions.tsx +++ b/src/components/grant/FacilitatorActions.tsx @@ -8,6 +8,7 @@ import { PostDrawer } from '../PostDrawer'; import { DAO_MASONS, HATS } from '../../constants/gameSetup'; import { Player } from '../../types/ui'; import { PostGrantDrawer } from './PostGrantDrawer'; +import { getGatewayUrl } from '../../utils/ipfs/get'; export const FacilitatorActions = () => { const [approvalOpened, { open: openApprove, close: closeApprove }] = @@ -41,7 +42,7 @@ export const FacilitatorActions = () => { opened={postOpened} onClose={closePost} projectId={project?.id || ''} - avatarImg={DAO_MASONS.AVATAR_IMG} + avatarImg={getGatewayUrl(DAO_MASONS.AVATAR_IMG) || ''} avatarName={'Facilitators'} shipSrcAddress={ship?.shipContractAddress || ''} playerType={Player.Facilitators} diff --git a/src/components/grant/GrantTimeline.tsx b/src/components/grant/GrantTimeline.tsx index ea083e3..73b10e7 100644 --- a/src/components/grant/GrantTimeline.tsx +++ b/src/components/grant/GrantTimeline.tsx @@ -18,6 +18,8 @@ import { FundsDistributed } from './FundsDistributed'; import { GrantHelper } from './GrantHelpers'; import { InsetUpdate } from './InsetUpdate'; import { IconMail } from '@tabler/icons-react'; +import { DAO_MASONS } from '../../constants/gameSetup'; +import { getGatewayUrl } from '../../utils/ipfs/get'; export const GrantTimeline = () => { const { timeline, ship, project } = useGrant(); @@ -68,7 +70,18 @@ export const GrantTimeline = () => { ); } if (item.tag === 'grant/update/facilitator') { - return 'test'; + const update = item as GrantUpdate; + + return ( + + ); } if (item.tag === 'grant/invite/ship') { const update = item as GrantUpdate; From ab420008d17d41102cb2a1b93afea3d31201a542 Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 11:40:58 -0700 Subject: [PATCH 04/10] fix editor focus...again --- src/components/RTEditor.tsx | 1 + .../facilitator/FacPostUpdatePanel.tsx | 65 +++++++++++++------ src/components/grant/FacilitatorActions.tsx | 5 +- src/components/grant/GrantTimeline.tsx | 5 +- src/pages/FacilitatorDashboard.tsx | 1 - 5 files changed, 50 insertions(+), 27 deletions(-) diff --git a/src/components/RTEditor.tsx b/src/components/RTEditor.tsx index 2ed3e87..7728a54 100644 --- a/src/components/RTEditor.tsx +++ b/src/components/RTEditor.tsx @@ -40,6 +40,7 @@ export const RTEditor = ({ ref={editorContainerRef} bg={'transparent'} classNames={{ root: classes.editor }} + onClick={handleContentEditorFocus} > diff --git a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx index ae825a4..df94fd8 100644 --- a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx +++ b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { DAO_MASONS } from '../../../constants/gameSetup'; import { UpdateInput } from '../../forms/UpdateInput'; -import { PINATA_GATEWAY } from '../../../utils/ipfs/get'; +import { PINATA_GATEWAY, getGatewayUrl } from '../../../utils/ipfs/get'; import { useTx } from '../../../hooks/useTx'; import GameManagerAbi from '../../../abi/GameManager.json'; import { ADDR } from '../../../constants/addresses'; @@ -12,25 +12,36 @@ import { basicUpdateSchema, } from '../../forms/validationSchemas/updateSchemas'; import { pinJSONToIPFS } from '../../../utils/ipfs/pin'; +import { Group } from '@mantine/core'; +import { PlayerAvatar } from '../../PlayerAvatar'; +import { Player } from '../../../types/ui'; +import { TxButton } from '../../TxButton'; +import { IconPlus } from '@tabler/icons-react'; +import { RTEditor } from '../../RTEditor'; +import { useEditor } from '@tiptap/react'; +import StarterKit from '@tiptap/starter-kit'; +import Link from '@tiptap/extension-link'; +import Image from '@tiptap/extension-image'; +import { tiptapContentSchema } from '../../forms/validationSchemas/tiptap'; +import { useGameManager } from '../../../hooks/useGameMangers'; +const defaultContent = { type: 'doc', content: [] }; export const FacPostUpdatePanel = () => { const { tx } = useTx(); + const { refetchGameManager } = useGameManager(); - const handlePostUpdate = async (text: string, clear: () => void) => { - if (text === '' || text === null) { - notifications.show({ - title: 'Error', - message: 'Update text is missing', - color: 'red', - }); + const editor = useEditor({ + extensions: [ + StarterKit, + Link, + Image.configure({ inline: true, allowBase64: true }), + ], - return; - } + content: defaultContent, + }); - const metadata = basicUpdateSchema.safeParse({ - text, - contentSchema: ContentSchema.BasicUpdate, - }); + const handlePostUpdate = async () => { + const metadata = tiptapContentSchema.safeParse(editor?.getJSON()); if (!metadata.success) { notifications.show({ @@ -61,15 +72,31 @@ export const FacPostUpdatePanel = () => { args: [Tag.GameUpdate, [1n, pinRes.IpfsHash]], }, onComplete() { - clear?.(); + refetchGameManager(); }, }); }; return ( - + <> + + + + } onClick={handlePostUpdate}> + Post + + + + + ); }; + +// diff --git a/src/components/grant/FacilitatorActions.tsx b/src/components/grant/FacilitatorActions.tsx index 592c0b4..a796b9b 100644 --- a/src/components/grant/FacilitatorActions.tsx +++ b/src/components/grant/FacilitatorActions.tsx @@ -3,9 +3,8 @@ import { useDisclosure } from '@mantine/hooks'; import { IconPlus } from '@tabler/icons-react'; import { FacilitatorApprovalDrawer } from './FacilitatorApprovalDrawer'; import { useGrant } from '../../hooks/useGrant'; -import { GameStatus, GrantStatus } from '../../types/common'; -import { PostDrawer } from '../PostDrawer'; -import { DAO_MASONS, HATS } from '../../constants/gameSetup'; +import { GrantStatus } from '../../types/common'; +import { DAO_MASONS } from '../../constants/gameSetup'; import { Player } from '../../types/ui'; import { PostGrantDrawer } from './PostGrantDrawer'; import { getGatewayUrl } from '../../utils/ipfs/get'; diff --git a/src/components/grant/GrantTimeline.tsx b/src/components/grant/GrantTimeline.tsx index 73b10e7..8761e87 100644 --- a/src/components/grant/GrantTimeline.tsx +++ b/src/components/grant/GrantTimeline.tsx @@ -23,7 +23,7 @@ import { getGatewayUrl } from '../../utils/ipfs/get'; export const GrantTimeline = () => { const { timeline, ship, project } = useGrant(); - console.log('timeLine', timeline); + return ( @@ -44,7 +44,6 @@ export const GrantTimeline = () => { } if (item.tag === 'grant/update/ship') { const update = item as GrantUpdate; - return ( { } if (item.tag === 'grant/update/facilitator') { const update = item as GrantUpdate; - return ( { } if (item.tag === 'grant/invite/ship') { const update = item as GrantUpdate; - return ( Date: Thu, 15 Aug 2024 17:27:10 -0700 Subject: [PATCH 05/10] successfully post update --- src/components/RTEditor.tsx | 2 -- .../dashboard/facilitator/FacPostUpdatePanel.tsx | 8 +++----- src/constants/addresses.ts | 3 ++- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/RTEditor.tsx b/src/components/RTEditor.tsx index 7728a54..c67fca5 100644 --- a/src/components/RTEditor.tsx +++ b/src/components/RTEditor.tsx @@ -66,8 +66,6 @@ export const RTEditor = ({ p="lg" fz="md" bg={'transparent'} - // mih={editorHeight} - // h="100%" onClick={handleContentEditorFocus} /> diff --git a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx index df94fd8..1ba01f1 100644 --- a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx +++ b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx @@ -7,10 +7,7 @@ import GameManagerAbi from '../../../abi/GameManager.json'; import { ADDR } from '../../../constants/addresses'; import { Tag } from '../../../constants/tags'; import { notifications } from '@mantine/notifications'; -import { - ContentSchema, - basicUpdateSchema, -} from '../../forms/validationSchemas/updateSchemas'; + import { pinJSONToIPFS } from '../../../utils/ipfs/pin'; import { Group } from '@mantine/core'; import { PlayerAvatar } from '../../PlayerAvatar'; @@ -73,6 +70,7 @@ export const FacPostUpdatePanel = () => { }, onComplete() { refetchGameManager(); + editor?.commands.setContent(defaultContent); }, }); }; @@ -91,7 +89,7 @@ export const FacPostUpdatePanel = () => { - + ); }; diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index 5f300e3..a63be4a 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -4,7 +4,8 @@ export const ADDR_TESTNET: Record = { ALLO: '0x1133eA7Af70876e64665ecD07C0A0476d09465a1', REGISTRY: '0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3', HATS: '0x3bc1A0Ad72417f2d411118085256fC53CBdDd137', - GAME_MANAGER: '0x6525E305b79EB0BF8291b4235ee7952Bad130Ed8', + GAME_MANAGER: '0x4aa52Bb50b869D4f92b1fA7e76F352AC319a0362', + // GAME_MANAGER: '0x6525E305b79EB0BF8291b4235ee7952Bad130Ed8', GM_FACTORY: '0x14e32E7893D6A1fA5f852d8B2fE8c57A2aB670ba', GS_FACTORY: '0x1F8cbC9d98E63575F8eE4C21a7BA68A34f66F280', HATS_POSTER: '0x168EBDCF12b054d3fD4179817aE1bD0DcF303433', From bf27eca25742d904fecfa5f039a8ec5ad56e8a65 Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 17:57:59 -0700 Subject: [PATCH 06/10] display full page facilitator update --- src/components/feed/RichTextUpdate.tsx | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/feed/RichTextUpdate.tsx b/src/components/feed/RichTextUpdate.tsx index d6ad945..9f6accb 100644 --- a/src/components/feed/RichTextUpdate.tsx +++ b/src/components/feed/RichTextUpdate.tsx @@ -12,6 +12,9 @@ import { secondsToShortRelativeTime } from '../../utils/time'; import { AddressAvatar } from '../AddressAvatar'; import { Address } from 'viem'; import { RTDisplay } from '../RTDisplay'; +import { Player } from '../../types/ui'; +import { getGatewayUrl } from '../../utils/ipfs/get'; +import { DAO_MASONS } from '../../constants/gameSetup'; export const getRTUpdate = async (id: string, chainId: number) => { const { getRTUpdate } = getBuiltGraphSDK(); @@ -21,7 +24,7 @@ export const getRTUpdate = async (id: string, chainId: number) => { chainId: chainId, }); - if (!Update) { + if (!Update[0].content) { throw new Error('No update found'); } @@ -77,10 +80,24 @@ export const RichTextUpdate = () => { return Error: {error.message}; } - if (!update || !update.content || !update.posterProfile) { + if (!update || !update.content) { return 404: No update found; } + const imgUrl = + update.playerType === Player.Facilitators + ? getGatewayUrl(DAO_MASONS.AVATAR_IMG) + : update?.posterProfile?.imgUrl + ? update.posterProfile.imgUrl + : '?'; + + const name = + update?.playerType === Player.Facilitators + ? 'Facilitators' + : update?.posterProfile?.name + ? update?.posterProfile?.name + : 'Unknown'; + return ( @@ -88,8 +105,8 @@ export const RichTextUpdate = () => { · From b4677bf0701074c7920104b68a607104c776f07b Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 18:44:57 -0700 Subject: [PATCH 07/10] ship post in dashboard --- src/components/PostDrawer.tsx | 12 ------ src/components/feed/FeedCard.tsx | 45 +++++++++++++-------- src/constants/addresses.ts | 4 +- src/pages/ShipOpDashboard.tsx | 68 ++++++++++++++++++++------------ 4 files changed, 73 insertions(+), 56 deletions(-) diff --git a/src/components/PostDrawer.tsx b/src/components/PostDrawer.tsx index b7dd5df..714e66d 100644 --- a/src/components/PostDrawer.tsx +++ b/src/components/PostDrawer.tsx @@ -46,21 +46,10 @@ export const PostDrawer = ({ Link, Image.configure({ inline: true, allowBase64: true }), ], - onUpdate({ editor }) { - const newContent = editor.getJSON(); - localStorage.setItem(posterId, JSON.stringify(newContent)); - }, content, }); const { tx } = useTx(); - useEffect(() => { - const draft = localStorage.getItem(posterId); - if (editor && draft) { - editor.commands.setContent(JSON.parse(draft)); - } - }, [posterId, editor]); - const isOpen = location.pathname.includes('post'); const onClose = () => @@ -121,7 +110,6 @@ export const PostDrawer = ({ writeContractOptions: { onPollSuccess() { refetch?.(); - localStorage.removeItem(posterId); }, }, }); diff --git a/src/components/feed/FeedCard.tsx b/src/components/feed/FeedCard.tsx index 0c30cd9..b1e5b99 100644 --- a/src/components/feed/FeedCard.tsx +++ b/src/components/feed/FeedCard.tsx @@ -29,7 +29,6 @@ import { Link } from 'react-router-dom'; import { GAME_TOKEN } from '../../constants/gameSetup'; import { useElementSize, useIntersection } from '@mantine/hooks'; import { IconAward } from '@tabler/icons-react'; - import { PlayerAvatar } from '../PlayerAvatar'; import { Content } from '@tiptap/react'; import { RTDisplay } from '../RTDisplay'; @@ -246,13 +245,20 @@ export const FeedCard = ({ if (internalLink) { return ( - - + + + {Inner} @@ -261,15 +267,22 @@ export const FeedCard = ({ if (externalLink) { return ( - - + - {Inner} - + target="_blank" + rel="noopener noreferrer" + style={{ + textDecoration: 'none', + position: 'absolute', + top: 0, + left: 0, + bottom: 0, + right: 0, + zIndex: 1, + }} + /> + {Inner} ); } diff --git a/src/constants/addresses.ts b/src/constants/addresses.ts index a63be4a..968e8cc 100644 --- a/src/constants/addresses.ts +++ b/src/constants/addresses.ts @@ -4,8 +4,8 @@ export const ADDR_TESTNET: Record = { ALLO: '0x1133eA7Af70876e64665ecD07C0A0476d09465a1', REGISTRY: '0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3', HATS: '0x3bc1A0Ad72417f2d411118085256fC53CBdDd137', - GAME_MANAGER: '0x4aa52Bb50b869D4f92b1fA7e76F352AC319a0362', - // GAME_MANAGER: '0x6525E305b79EB0BF8291b4235ee7952Bad130Ed8', + // GAME_MANAGER: '0x4aa52Bb50b869D4f92b1fA7e76F352AC319a0362', + GAME_MANAGER: '0x6525E305b79EB0BF8291b4235ee7952Bad130Ed8', GM_FACTORY: '0x14e32E7893D6A1fA5f852d8B2fE8c57A2aB670ba', GS_FACTORY: '0x1F8cbC9d98E63575F8eE4C21a7BA68A34f66F280', HATS_POSTER: '0x168EBDCF12b054d3fD4179817aE1bD0DcF303433', diff --git a/src/pages/ShipOpDashboard.tsx b/src/pages/ShipOpDashboard.tsx index 5a10f59..da86cad 100644 --- a/src/pages/ShipOpDashboard.tsx +++ b/src/pages/ShipOpDashboard.tsx @@ -1,12 +1,15 @@ import { Avatar, Box, + Group, Skeleton, Stack, Tabs, Text, useMantineTheme, } from '@mantine/core'; +import { Link as TipTapLink } from '@tiptap/extension-link'; +import { Image as TipTapImage } from '@tiptap/extension-image'; import { MainSection, PageTitle } from '../layout/Sections'; import { Link, useParams } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; @@ -23,13 +26,22 @@ import { import ShipAbi from '../abi/GrantShip.json'; import { Tag } from '../constants/tags'; import { Address } from 'viem'; -import { GAME_MANAGER, ZER0_ADDRESS } from '../constants/gameSetup'; +import { DAO_MASONS, GAME_MANAGER, ZER0_ADDRESS } from '../constants/gameSetup'; import { SettingsPanel } from '../components/dashboard/ship/SettingsPanel'; import { getShipGrants } from '../queries/getShipGrants'; import { GrantCard } from '../components/grant/GrantCard'; import { GrantStatus } from '../types/common'; import { useMemo } from 'react'; +import { Player } from '../types/ui'; +import { getGatewayUrl } from '../utils/ipfs/get'; +import { PlayerAvatar } from '../components/PlayerAvatar'; +import { TxButton } from '../components/TxButton'; +import { IconPlus } from '@tabler/icons-react'; +import { tiptapContentSchema } from '../components/forms/validationSchemas/tiptap'; +import { useEditor } from '@tiptap/react'; +import StarterKit from '@tiptap/starter-kit'; +import { useGameManager } from '../hooks/useGameMangers'; export const ShipOpDashboard = () => { const { id } = useParams(); @@ -182,8 +194,7 @@ export const ShipOpDashboard = () => { )} */} - <> - {/* */} + @@ -244,34 +255,34 @@ export const GrantManager = ({ // }; +const defaultContent = { type: 'doc', content: [] }; const PostUpdatePanel = ({ ship }: { ship?: DashShip }) => { const { tx } = useTx(); - const handlePostUpdate = async (text: string, clear: () => void) => { - if (!ship || !ship.shipContractAddress) { - notifications.show({ - title: 'Error', - message: 'Ship ID is missing', - color: 'red', - }); + const editor = useEditor({ + extensions: [ + StarterKit, + TipTapLink, + TipTapImage.configure({ inline: true, allowBase64: true }), + ], + content: defaultContent, + }); + const handlePostUpdate = async () => { + if (!editor) { return; } - - if (text === '' || text === null) { + if (!ship || !ship.shipContractAddress) { notifications.show({ title: 'Error', - message: 'Update text is missing', + message: 'Ship ID is missing', color: 'red', }); return; } - const metadata = basicUpdateSchema.safeParse({ - text, - contentSchema: ContentSchema.BasicUpdate, - }); + const metadata = tiptapContentSchema.safeParse(editor.getJSON()); if (!metadata.success) { notifications.show({ @@ -284,7 +295,7 @@ const PostUpdatePanel = ({ ship }: { ship?: DashShip }) => { } const pinRes = await pinJSONToIPFS(metadata.data); - + const tag = `TAG:SHIP_POST:${GAME_MANAGER.ADDRESS}`; if (typeof pinRes.IpfsHash !== 'string' && pinRes.IpfsHash[0] !== 'Q') { notifications.show({ title: 'IPFS Upload Error', @@ -299,18 +310,23 @@ const PostUpdatePanel = ({ ship }: { ship?: DashShip }) => { abi: ShipAbi, functionName: 'postUpdate', address: ship?.shipContractAddress as Address, - args: [Tag.ShipPostUpdate, [1n, pinRes.IpfsHash], ZER0_ADDRESS], - }, - onComplete() { - clear?.(); + args: [tag, [1n, pinRes.IpfsHash], ZER0_ADDRESS], }, }); }; return ( - + + + + } onClick={handlePostUpdate}> + Post + + + ); }; From 6227b3820f20c3f1c546ca240b2e623b4d5aae2a Mon Sep 17 00:00:00 2001 From: jordan Date: Thu, 15 Aug 2024 18:48:55 -0700 Subject: [PATCH 08/10] post from ship dash panel --- src/pages/ShipOpDashboard.tsx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/pages/ShipOpDashboard.tsx b/src/pages/ShipOpDashboard.tsx index da86cad..c34e03e 100644 --- a/src/pages/ShipOpDashboard.tsx +++ b/src/pages/ShipOpDashboard.tsx @@ -42,6 +42,7 @@ import { tiptapContentSchema } from '../components/forms/validationSchemas/tipta import { useEditor } from '@tiptap/react'; import StarterKit from '@tiptap/starter-kit'; import { useGameManager } from '../hooks/useGameMangers'; +import { RTEditor } from '../components/RTEditor'; export const ShipOpDashboard = () => { const { id } = useParams(); @@ -316,17 +317,20 @@ const PostUpdatePanel = ({ ship }: { ship?: DashShip }) => { }; return ( - - - - } onClick={handlePostUpdate}> - Post - + <> + + + + } onClick={handlePostUpdate}> + Post + + - + + ); }; From 911647991c96c36ba221bd7812634d6b56ef5862 Mon Sep 17 00:00:00 2001 From: jordan Date: Fri, 16 Aug 2024 11:11:34 -0700 Subject: [PATCH 09/10] can submit after approve --- .../facilitator/FacPostUpdatePanel.tsx | 4 +-- src/components/grant/ApplicationDrawer.tsx | 5 ++-- src/components/grant/ProjectActions.tsx | 27 +++++++++++-------- src/pages/ShipOpDashboard.tsx | 11 ++------ src/styles/extendButtonTheme.module.css | 21 +++++++++++++++ 5 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx index 1ba01f1..c9c5a41 100644 --- a/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx +++ b/src/components/dashboard/facilitator/FacPostUpdatePanel.tsx @@ -1,7 +1,5 @@ -import React from 'react'; import { DAO_MASONS } from '../../../constants/gameSetup'; -import { UpdateInput } from '../../forms/UpdateInput'; -import { PINATA_GATEWAY, getGatewayUrl } from '../../../utils/ipfs/get'; +import { getGatewayUrl } from '../../../utils/ipfs/get'; import { useTx } from '../../../hooks/useTx'; import GameManagerAbi from '../../../abi/GameManager.json'; import { ADDR } from '../../../constants/addresses'; diff --git a/src/components/grant/ApplicationDrawer.tsx b/src/components/grant/ApplicationDrawer.tsx index 63e20e4..35778a8 100644 --- a/src/components/grant/ApplicationDrawer.tsx +++ b/src/components/grant/ApplicationDrawer.tsx @@ -216,8 +216,9 @@ export const ApplicationDrawer = ({ {alreadyHasApplication && currentApplication.status !== GameStatus.Rejected && ( - You have already submitted an application. Resubmitting an old - application will overwrite the previous one. + WARNING: You have already submitted an application. Resubmitting an + old application will overwrite the previous one and restart the + grant process from the beginning. )} diff --git a/src/components/grant/ProjectActions.tsx b/src/components/grant/ProjectActions.tsx index 36e5c94..81ec8a4 100644 --- a/src/components/grant/ProjectActions.tsx +++ b/src/components/grant/ProjectActions.tsx @@ -28,7 +28,8 @@ export const ProjectActions = () => { useDisclosure(); const isApplicationStage = - !grant || (grant?.status && grant.status < GrantStatus.ApplicationApproved); + !grant || (grant?.status && grant.status < GrantStatus.MilestonesApproved); + const isMilestonePlanning = grant?.status && grant.status >= GrantStatus.ApplicationApproved && @@ -45,6 +46,20 @@ export const ProjectActions = () => { return ( <> + {isApplicationStage && alreadyHasApplication && ( + + )} + {isMilestonePlanning && ( )} - {isApplicationStage && alreadyHasApplication && ( - - )} - {isApplicationStage && !alreadyHasApplication && (