Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Safe integration for profile updates #201

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"@hypercerts-org/sdk": "2.3.0",
"@ipld/car": "^5.2.5",
"@openzeppelin/merkle-tree": "^1.0.5",
"@safe-global/api-kit": "^2.5.4",
"@safe-global/protocol-kit": "^5.0.4",
"@sentry/integrations": "^7.114.0",
"@sentry/node": "^8.2.1",
"@sentry/profiling-node": "^8.2.1",
Expand Down
327 changes: 236 additions & 91 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ type GetSalesResponse {
data: [Sale!]
}

type GetSignatureRequestResponse {
count: Int
data: [SignatureRequest!]
}

type GetUsersResponse {
count: Int
data: [User!]
Expand Down Expand Up @@ -505,6 +510,9 @@ type HyperboardOwner {
"""The display name of the user"""
display_name: String
percentage_owned: Float!

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
}

input HyperboardSortOptions {
Expand Down Expand Up @@ -832,6 +840,7 @@ type Query {
metadata(first: Int, offset: Int, sort: MetadataFetchInput, where: MetadataWhereInput): GetMetadataResponse!
orders(first: Int, offset: Int, sort: OrderFetchInput, where: OrderWhereInput): GetOrdersResponse!
sales(first: Int, offset: Int, sort: SaleFetchInput, where: SaleWhereInput): GetSalesResponse!
signatureRequests(first: Int, offset: Int, sort: SignatureRequestFetchInput, where: SignatureRequestWhereInput): GetSignatureRequestResponse!
users(first: Int, offset: Int, where: UserWhereInput): GetUsersResponse!
}

Expand Down Expand Up @@ -941,6 +950,9 @@ type SectionEntryOwner {
"""The display name of the user"""
display_name: String
percentage: Float!

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
units: BigInt
}

Expand All @@ -949,6 +961,70 @@ type SectionResponseType {
data: [Section!]!
}

"""Pending signature request for a user"""
type SignatureRequest {
"""The chain ID of the signature request"""
chain_id: Int!

"""When the signature request was created"""
created_at: String!

"""The message data in JSON format"""
message: String!

"""The hash of the Safe message (not the message to be signed)"""
message_hash: String!

"""The purpose of the signature request"""
purpose: SignatureRequestPurpose!

"""The safe address of the user who needs to sign"""
safe_address: String!

"""The status of the signature request"""
status: SignatureRequestStatus!
}

input SignatureRequestFetchInput {
by: SignatureRequestSortOptions
}

"""Purpose of the signature request"""
enum SignatureRequestPurpose {
UPDATE_USER_DATA
}

input SignatureRequestPurposeSearchOptions {
eq: SignatureRequestPurpose
}

input SignatureRequestSortOptions {
created_at: SortOrder
message_hash: SortOrder
purpose: SortOrder
safe_address: SortOrder
}

"""Status of the signature request"""
enum SignatureRequestStatus {
CANCELED
EXECUTED
PENDING
}

input SignatureRequestStatusSearchOptions {
eq: SignatureRequestStatus
}

input SignatureRequestWhereInput {
chain_id: NumberSearchOptions
created_at: StringSearchOptions
message_hash: StringSearchOptions
purpose: SignatureRequestPurposeSearchOptions
safe_address: StringSearchOptions
status: SignatureRequestStatusSearchOptions
}

"""The direction to sort the query results"""
enum SortOrder {
"""Ascending order"""
Expand Down Expand Up @@ -988,6 +1064,9 @@ type User {

"""The display name of the user"""
display_name: String

"""Pending signature requests for the user"""
signature_requests: [SignatureRequest!]
}

input UserWhereInput {
Expand Down
93 changes: 91 additions & 2 deletions src/__generated__/routes/routes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading