From b1e557ca760283f72a38800a4365ea2344fb30c3 Mon Sep 17 00:00:00 2001 From: Anshul Goel Date: Thu, 8 Jun 2023 12:30:35 +0530 Subject: [PATCH 1/2] Show error toast on mint failure, update schema file --- package-lock.json | 23 +- package.json | 3 +- schema.graphql | 1923 +++++++++++++++++++++++++++++++----------- src/app/App.tsx | 18 +- src/app/Home.tsx | 16 +- src/graphql.types.ts | 311 ++++++- 6 files changed, 1758 insertions(+), 536 deletions(-) diff --git a/package-lock.json b/package-lock.json index 730a8aa..b180754 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,7 +33,8 @@ "ramda": "^0.28.0", "react": "^18.2.0", "react-dom": "18.2.0", - "react-spinners": "^0.13.8" + "react-spinners": "^0.13.8", + "react-toastify": "^9.1.3" }, "devDependencies": { "@graphql-codegen/cli": "^2.16.4", @@ -11198,6 +11199,18 @@ "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/react-toastify": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-9.1.3.tgz", + "integrity": "sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==", + "dependencies": { + "clsx": "^1.1.1" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -20648,6 +20661,14 @@ "integrity": "sha512-3e+k56lUkPj0vb5NDXPVFAOkPC//XyhKPJjvcGjyMNPWsBKpplfeyialP74G7H7+It7KzhtET+MvGqbKgAqpZA==", "requires": {} }, + "react-toastify": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-9.1.3.tgz", + "integrity": "sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==", + "requires": { + "clsx": "^1.1.1" + } + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", diff --git a/package.json b/package.json index 4abfe59..c08a360 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "ramda": "^0.28.0", "react": "^18.2.0", "react-dom": "18.2.0", - "react-spinners": "^0.13.8" + "react-spinners": "^0.13.8", + "react-toastify": "^9.1.3" }, "devDependencies": { "@graphql-codegen/cli": "^2.16.4", diff --git a/schema.graphql b/schema.graphql index f79484e..63f2c60 100644 --- a/schema.graphql +++ b/schema.graphql @@ -3,51 +3,110 @@ schema { mutation: Mutation } -"""Input required for accepting an invitation to the organization.""" +""" +Input required for accepting an invitation to the organization. +""" input AcceptInviteInput { - """The ID of the invitation.""" + """ + The ID of the invitation. + """ invite: UUID! } -"""The response returned after accepting an invitation to the organization.""" +""" +The response returned after accepting an invitation to the organization. +""" type AcceptInvitePayload { - """The invitation to the organization that has been accepted.""" + """ + The invitation to the organization that has been accepted. + """ invite: Invite! } -"""An access token used to authenticate and authorize access to the Hub API.""" +""" +An access token used to authenticate and authorize access to the Hub API. +""" type AccessToken { - """A string representing the access token used to authenticate requests.""" + """ + A string representing the access token used to authenticate requests. + """ accessToken: String! - """A timestamp indicating when the access token will expire.""" + + """ + A timestamp indicating when the access token will expire. + """ expiresAt: NaiveDateTime! - """A string indicating the type of access token, such as "Bearer".""" + + """ + A string indicating the type of access token, such as "Bearer". + """ tokenType: String! } -"""An enum type named Affiliation that defines a user's association to an organization. The enum is derived using a Union attribute. It has two variants, each containing an associated data type:""" -union Affiliation = Owner | Member +enum Action { + CREATE_DROP + CREATE_WALLET + MINT_EDITION + RETRY_DROP + RETRY_MINT + TRANSFER_ASSET +} + +""" +Represents the cost of performing a certain action on different blockchains +""" +type ActionCost { + """ + enum that represents the type of action being performed. + """ + action: Action! + + """ + a vector of BlockchainCost structs that represents the cost of performing the action on each blockchain. + """ + blockchains: [BlockchainCost!]! +} + +""" +An enum type named Affiliation that defines a user's association to an organization. The enum is derived using a Union attribute. It has two variants, each containing an associated data type: +""" +union Affiliation = Member | Owner -"""Fireblocks-defined blockchain identifiers.""" +""" +Fireblocks-defined blockchain identifiers. +""" enum AssetType { - """Mainnet Solana""" - SOL """ - Devnet Solana - Note: Holaplex uses `SOL_TEST` for provisioning wallets on its staging environment but still submits transactions to mainnet. + Ethereum Mainnet """ - SOL_TEST + ETH + + """ + Note: Holaplex uses `ETH_TEST` for provisioning wallets on its staging environment but still submits transactions to mainnet. + """ + ETH_TEST + + """ + Mainnet Polygon + """ + MATIC + """ Ploygon Mumbai Testnet Note: Holaplex uses `MATIC_TEST` for provisioning wallets on its staging environment but still submits transactions to mainnet. """ MATIC_TEST - """Mainnet Polygon""" - MATIC - """Note: Holaplex uses `ETH_TEST` for provisioning wallets on its staging environment but still submits transactions to mainnet.""" - ETH_TEST - """Ethereum Mainnet""" - ETH + + """ + Mainnet Solana + """ + SOL + + """ + Devnet Solana + Note: Holaplex uses `SOL_TEST` for provisioning wallets on its staging environment but still submits transactions to mainnet. + """ + SOL_TEST } enum Blockchain { @@ -56,127 +115,272 @@ enum Blockchain { SOLANA } -"""An NFT collection that has either a fixed supply or unlimited mints. NFT collections are deployed to a desired blockchain.""" +""" +Represents the cost of performing an action on a specific blockchain +""" +type BlockchainCost { + """ + enum that represents the blockchain on which the action is being performed. + """ + blockchain: Blockchain! + + """ + represents the cost in credits for performing the action on the blockchain. + """ + credits: Int! +} + type Collection { - """The unique identifier for the collection.""" - id: UUID! - """The blockchain of the collection.""" + """ + The blockchain address of the collection used to view it in blockchain explorers. + """ + address: String + + """ + The blockchain of the collection. + """ blockchain: Blockchain! - """The total supply of the collection. Setting to `null` implies unlimited minting.""" - supply: Int - """The creation status of the collection. When the collection is in a `CREATED` status you can mint NFTs from the collection.""" + + """ + The creation status of the collection. When the collection is in a `CREATED` status you can mint NFTs from the collection. + """ creationStatus: CreationStatus! - """The blockchain address of the collection used to view it in blockchain explorers.""" - address: String - """The current number of NFTs minted from the collection.""" - totalMints: Int! - signature: String + + """ + The list of attributed creators for the collection. + """ + creators: [CollectionCreator!] + + """ + The list of current holders of NFTs from the collection. + """ + holders: [Holder!] + + """ + The unique identifier for the collection. + """ + id: UUID! + """ The metadata json associated to the collection. ## References [Metaplex v1.1.0 Standard](https://docs.metaplex.com/programs/token-metadata/token-standard) """ metadataJson: MetadataJson - """The list of minted NFTs from the collection including the NFTs address and current owner's wallet address.""" + + """ + The list of minted NFTs from the collection including the NFTs address and current owner's wallet address. + """ mints: [CollectionMint!] - """The list of attributed creators for the collection.""" - creators: [CollectionCreator!] - """The list of current holders of NFTs from the collection.""" - holders: [Holder!] - """A list of all NFT purchases from the collection, including both primary and secondary sales.""" + + """ + A list of all NFT purchases from the collection, including both primary and secondary sales. + """ purchases: [Purchase!] + + """ + The royalties assigned to mints belonging to the collection expressed in basis points. + """ + sellerFeeBasisPoints: Int! + + """ + The transaction signature of the collection. + """ + signature: String + + """ + The total supply of the collection. Setting to `null` implies unlimited minting. + """ + supply: Int + + """ + The current number of NFTs minted from the collection. + """ + totalMints: Int! } type CollectionCreator { - collectionId: UUID! address: String! - verified: Boolean! + collectionId: UUID! share: Int! + verified: Boolean! } -"""An attributed creator for a colleciton.""" +""" +An attributed creator for a colleciton. +""" input CollectionCreatorInput { - """The wallet address of the creator.""" + """ + The wallet address of the creator. + """ address: String! + + """ + The share of royalties payout the creator should receive. + """ + share: Int! + """ This field indicates whether the collection's creator has been verified. This feature is only supported on the Solana blockchain. ## References [Metaplex Token Metadata - Verify creator instruction](https://docs.metaplex.com/programs/token-metadata/instructions#verify-a-creator) """ verified: Boolean - """The share of royalties payout the creator should receive.""" - share: Int! } +""" +Represents a single NFT minted from a collection. +""" type CollectionMint { - id: UUID! - collectionId: UUID! + """ + The wallet address of the NFT. + """ address: String! - owner: String! - creationStatus: CreationStatus! - createdBy: UUID! - createdAt: NaiveDateTime! - signature: String + + """ + The collection the NFT was minted from. + """ collection: Collection + + """ + The ID of the collection the NFT was minted from. + """ + collectionId: UUID! + + """ + The date and time when the NFT was created. + """ + createdAt: DateTime! + + """ + The unique ID of the creator of the NFT. + """ + createdBy: UUID! + + """ + The status of the NFT creation. + """ + creationStatus: CreationStatus! + + """ + credits deduction id + """ + creditsDeductionId: UUID + + """ + The unique edition number of the NFT. + """ + edition: Int! + + """ + The unique ID of the minted NFT. + """ + id: UUID! + """ The metadata json associated to the collection. - ## References [Metaplex v1.1.0 Standard](https://docs.metaplex.com/programs/token-metadata/token-standard) """ metadataJson: MetadataJson + + """ + The wallet address of the owner of the NFT. + """ + owner: String! + + """ + The seller fee basis points (ie royalties) for the NFT. + """ + sellerFeeBasisPoints: Int! + + """ + The transaction signature associated with the NFT. + """ + signature: String } -"""This struct represents the input for creating a new API credential, including the ID of the organization that the credential will be associated with and the friendly name assigned to the credential.""" +""" +This struct represents the input for creating a new API credential, including the ID of the organization that the credential will be associated with and the friendly name assigned to the credential. +""" input CreateCredentialInput { - """The ID of the organization that the new API credential will be associated with.""" - organization: UUID! - """The friendly name assigned to the new API credential.""" + """ + The friendly name assigned to the new API credential. + """ name: String! + + """ + The ID of the organization that the new API credential will be associated with. + """ + organization: UUID! } -"""The response payload returned after successfully creating an API credential. It includes the newly created Credential object, which represents the API credential, as well as an `AccessToken` object that can be used to authenticate requests to the Hub API.""" +""" +The response payload returned after successfully creating an API credential. It includes the newly created Credential object, which represents the API credential, as well as an `AccessToken` object that can be used to authenticate requests to the Hub API. +""" type CreateCredentialPayload { - """A `Credential` object representing the newly created API credential.""" - credential: Credential! - """An `AccessToken` object that can be used to authenticate requests to the Hub API.""" + """ + An `AccessToken` object that can be used to authenticate requests to the Hub API. + """ accessToken: AccessToken! + + """ + A `Credential` object representing the newly created API credential. + """ + credential: Credential! } -"""This input object is used for creating a customer and associated treasury for holding custodial wallets on behalf of the user.""" +""" +This input object is used for creating a customer and associated treasury for holding custodial wallets on behalf of the user. +""" input CreateCustomerInput { - """The unique identifier of the project to which the customer is associated.""" + """ + The unique identifier of the project to which the customer is associated. + """ project: UUID! } -"""This response represents the payload returned after successfully creating a new `customer` record. It contains a single field customer which is a `Customer` object representing the newly created customer record.""" +""" +This response represents the payload returned after successfully creating a new `customer` record. It contains a single field customer which is a `Customer` object representing the newly created customer record. +""" type CreateCustomerPayload { - """The customer record created by the create customer mutation.""" + """ + The customer record created by the create customer mutation. + """ customer: Customer! } -"""Input for creating a customer wallet.""" +""" +Input for creating a customer wallet. +""" input CreateCustomerWalletInput { - """The customer ID.""" - customer: UUID! - """Blockchain for wallet creation.""" + """ + Blockchain for wallet creation. + """ assetType: AssetType! + + """ + The customer ID. + """ + customer: UUID! } -"""Response after wallet creation.""" +""" +Response after wallet creation. +""" type CreateCustomerWalletPayload { wallet: Wallet! } input CreateDropInput { - project: UUID! - price: Int - sellerFeeBasisPoints: Int - supply: Int - startTime: DateTime - endTime: DateTime blockchain: Blockchain! creators: [CollectionCreatorInput!]! + endTime: DateTime metadataJson: MetadataJsonInput! + price: Int + project: UUID! + sellerFeeBasisPoints: Int + startTime: DateTime + supply: Int } type CreateDropPayload { @@ -192,33 +396,47 @@ type CreateOrganizationPayload { organization: Organization! } -"""The input used for creating a project.""" +""" +The input used for creating a project. +""" input CreateProjectInput { - """The ID of the organization the project belongs to.""" - organization: UUID! - """The friendly name to denote the project from others belonging to the organization.""" + """ + The friendly name to denote the project from others belonging to the organization. + """ name: String! - """The URL of the project's profile image.""" + + """ + The ID of the organization the project belongs to. + """ + organization: UUID! + + """ + The URL of the project's profile image. + """ profileImageUrl: String } -"""* The payload returned by the `createProject` mutation.""" +""" +* The payload returned by the `createProject` mutation. +""" type CreateProjectPayload { - """* The project that was created.""" + """ + * The project that was created. + """ project: Project! } input CreateWebhookInput { - url: String! - organization: UUID! description: String! - projects: [UUID!]! filterTypes: [FilterType!]! -} - + organization: UUID! + projects: [UUID!]! + url: String! +} + type CreateWebhookPayload { - webhook: Webhook! secret: String! + webhook: Webhook! } enum CreationStatus { @@ -230,46 +448,102 @@ enum CreationStatus { REJECTED } -"""An `OAuth2` client application used for authentication with the Hub API.""" +""" +An `OAuth2` client application used for authentication with the Hub API. +""" type Credential { - """A user-friendly name assigned to the credential.""" - name: String! - """A unique identifier for the credential.""" + """ + A unique identifier for the credential. + """ clientId: String! - """The ID of the user who created the credential.""" - createdById: UUID! - """The ID of the organization the credential belongs to.""" - organizationId: UUID! - """The datetime in UTC when the credential was created.""" + + """ + The datetime in UTC when the credential was created. + """ createdAt: NaiveDateTime! - """This field represents the user who created the credential.""" + + """ + This field represents the user who created the credential. + """ createdBy: User + + """ + The ID of the user who created the credential. + """ + createdById: UUID! + + """ + A user-friendly name assigned to the credential. + """ + name: String! + + """ + The ID of the organization the credential belongs to. + """ + organizationId: UUID! } -"""A customer record represents a user in your service and is used to group custodial wallets within a specific project. This allows for easy management of wallets and associated assets for a particular customer within your service.""" -type Customer { - """The unique identifier for the customer record.""" +type CreditDeposit { + cost: Float! + createdAt: DateTime! + credits: Int! id: UUID! - """The ID of the project to which the customer record belongs.""" - projectId: UUID! - """The datetime when the customer record was created.""" - createdAt: NaiveDateTime! - """An optional datetime indicating the last time the customer record was updated. If the customer record has not been updated, this field will be `null`.""" - updatedAt: NaiveDateTime + initiatedBy: UUID! + organization: UUID! + perCreditCost: Float! + reason: DepositReason! +} + +type Credits { + balance: Int! + deposits: [CreditDeposit!] + id: UUID! +} + +""" +A customer record represents a user in your service and is used to group custodial wallets within a specific project. This allows for easy management of wallets and associated assets for a particular customer within your service. +""" +type Customer { """ Returns all the wallet addresses associated with the customer. The blockchain of the address is not included and they are in no particular order. In the future, the blockchain may be indicated with a pattern of {blockchain}:{address}. This field returns null when there is no treasury assigned to the customer yet. """ addresses: [String!] - """The NFTs owned by any of the customers' wallets.""" + + """ + The datetime when the customer record was created. + """ + createdAt: NaiveDateTime! + + """ + The unique identifier for the customer record. + """ + id: UUID! + + """ + The NFTs owned by any of the customers' wallets. + """ mints: [CollectionMint!] - """The treasury assigned to the customer, which contains the customer's wallets.""" + + """ + The ID of the project to which the customer record belongs. + """ + projectId: UUID! + + """ + The treasury assigned to the customer, which contains the customer's wallets. + """ treasury: Treasury + + """ + An optional datetime indicating the last time the customer record was updated. If the customer record has not been updated, this field will be `null`. + """ + updatedAt: NaiveDateTime wallet(assetId: AssetType): [Wallet!] } """ -Implement the DateTime scalar +Implement the DateTime scalar The input/output is a string in RFC3339 format. """ @@ -279,15 +553,28 @@ input DeactivateMemberInput { id: UUID! } -"""The input for deleting a credential.""" +type DeductionTotals { + action: Action! + spent: Int! +} + +""" +The input for deleting a credential. +""" input DeleteCredentialInput { - """The unique identifier assigned to the credential to be deleted.""" + """ + The unique identifier assigned to the credential to be deleted. + """ credential: String! } -"""The response for deleting a credential.""" +""" +The response for deleting a credential. +""" type DeleteCredentialPayload { - """The unique identifier assigned to the deleted credential.""" + """ + The unique identifier assigned to the deleted credential. + """ credential: String! } @@ -299,68 +586,142 @@ type DeleteWebhookPayload { webhook: UUID! } +enum DepositReason { + GIFTED + PURCHASED +} + type Drop { - """The unique identifier for the drop.""" - id: UUID! - """The identifier of the project to which the drop is associated.""" - projectId: UUID! - """The creation status of the drop.""" + """ + The collection for which the drop is managing mints. + """ + collection: Collection! + + """ + The date and time in UTC when the drop was created. + """ + createdAt: DateTime! + + """ + The user id of the person who created the drop. + """ + createdById: UUID! + + """ + The creation status of the drop. + """ creationStatus: CreationStatus! - """The date and time in UTC when the drop is eligible for minting. A value of `null` means the drop can be minted immediately.""" - startTime: NaiveDateTime - """The end date and time in UTC for the drop. A value of `null` means the drop does not end until it is fully minted.""" - endTime: NaiveDateTime - """The cost to mint the drop in US dollars. When purchasing with crypto the user will be charged at the current conversion rate for the blockchain's native coin at the time of minting.""" + + """ + The end date and time in UTC for the drop. A value of `null` means the drop does not end until it is fully minted. + """ + endTime: DateTime + + """ + The unique identifier for the drop. + """ + id: UUID! + pausedAt: DateTime + + """ + The cost to mint the drop in US dollars. When purchasing with crypto the user will be charged at the current conversion rate for the blockchain's native coin at the time of minting. + """ price: Int! - """The user id of the person who created the drop.""" - createdById: UUID! - """The date and time in UTC when the drop was created.""" - createdAt: NaiveDateTime! - pausedAt: NaiveDateTime + + """ + The identifier of the project to which the drop is associated. + """ + projectId: UUID! + + """ + A list of all NFT purchases from this drop. + """ + purchases: [Purchase!] + """ The shutdown_at field represents the date and time in UTC when the drop was shutdown If it is null, the drop is currently not shutdown """ - shutdownAt: NaiveDateTime - """The collection for which the drop is managing mints.""" - collection: Collection! - """The current status of the drop.""" + shutdownAt: DateTime + + """ + The date and time in UTC when the drop is eligible for minting. A value of `null` means the drop can be minted immediately. + """ + startTime: DateTime + + """ + The current status of the drop. + """ status: DropStatus! - """A list of all NFT purchases from this drop.""" - purchases: [Purchase!] } -"""The different phases of a drop.""" +""" +The different phases of a drop. +""" enum DropStatus { - """Actively minting.""" - MINTING - """The minting process for the collection is complete.""" - MINTED - """The drop is scheduled for minting.""" - SCHEDULED - """The drop has expired and its end time has passed.""" - EXPIRED - """The drop is still being created and is not ready to mint.""" + """ + The drop is still being created and is not ready to mint. + """ CREATING - """The drop is temporarily paused and cannot be minted at the moment.""" + + """ + The drop has expired and its end time has passed. + """ + EXPIRED + + """ + The creation process for the drop has failed + """ + FAILED + + """ + The minting process for the collection is complete. + """ + MINTED + + """ + Actively minting. + """ + MINTING + + """ + The drop is temporarily paused and cannot be minted at the moment. + """ PAUSED - """The drop is permanently shut down and can no longer be minted.""" + + """ + The drop is scheduled for minting. + """ + SCHEDULED + + """ + The drop is permanently shut down and can no longer be minted. + """ SHUTDOWN - """The creation process for the drop has failed""" - FAILED } -"""The input for editing the name of an existing credential by providing the `client_id` of the credential and the new `name` to be assigned.""" +""" +The input for editing the name of an existing credential by providing the `client_id` of the credential and the new `name` to be assigned. +""" input EditCredentialInput { - """A unique string identifier assigned to the credential during creation.""" + """ + A unique string identifier assigned to the credential during creation. + """ clientId: String! - """The new name to be assigned to the credential.""" + + """ + The new name to be assigned to the credential. + """ name: String! } -"""The response for editing the name of a credential.""" +""" +The response for editing the name of a credential. +""" type EditCredentialPayload { - """The updated credential with the edited name.""" + """ + The updated credential with the edited name. + """ credential: Credential! } @@ -385,129 +746,261 @@ type EditProjectPayload { } input EditWebhookInput { - webhook: UUID! - url: String! description: String! - projects: [UUID!]! - filterTypes: [FilterType!]! disabled: Boolean + filterTypes: [FilterType!]! + projects: [UUID!]! + url: String! + webhook: UUID! } type EditWebhookPayload { webhook: Webhook! } -"""An event to which an external service can subscribe.""" +""" +An event to which an external service can subscribe. +""" type EventType { - """Whether the event is archived or not.""" + """ + Whether the event is archived or not. + """ archived: Boolean - """The date and time when the event was created, in string format.""" + + """ + The date and time when the event was created, in string format. + """ createdAt: String! - """A description of the event.""" + + """ + A description of the event. + """ description: String! - """The name of the event.""" + + """ + The name of the event. + """ name: String! - """The JSON schema for the event payload.""" + + """ + The JSON schema for the event payload. + """ schemas: JSON! - """The date and time when the event was last updated, in string format.""" + + """ + The date and time when the event was last updated, in string format. + """ updatedAt: String! } -"""An enumeration of event types that can be subscribed to by a webhook.""" +""" +An enumeration of event types that can be subscribed to by a webhook. +""" enum FilterType { - """Event triggered when a new project is created""" - PROJECT_CREATED - """Event triggered when a new customer is created""" + """ + Event triggered when a new customer is created + """ CUSTOMER_CREATED - """Event triggered when a new customer treasury is created""" + + """ + Event triggered when a new customer treasury is created + """ CUSTOMER_TREASURY_CREATED - """Event triggered when a new wallet is created for a project""" - PROJECT_WALLET_CREATED - """Event triggered when a new wallet is created for a customer""" + + """ + Event triggered when a new wallet is created for a customer + """ CUSTOMER_WALLET_CREATED - """Event triggered when a new drop is created""" + + """ + Event triggered when a new drop is created + """ DROP_CREATED - """Event triggered when a new drop is minted""" + + """ + Event triggered when a new drop is minted + """ DROP_MINTED + + """ + Event triggered when a new project is created + """ + PROJECT_CREATED + + """ + Event triggered when a new wallet is created for a project + """ + PROJECT_WALLET_CREATED } -"""The holder of a collection.""" +""" +The holder of a collection. +""" type Holder { - """The collection ID that the holder owns.""" - collectionId: UUID! - """The wallet address of the holder.""" + """ + The wallet address of the holder. + """ address: String! - """The number of NFTs that the holder owns in the collection.""" - owns: Int! - """The specific mints from the collection that the holder owns.""" + + """ + The collection ID that the holder owns. + """ + collectionId: UUID! + + """ + The specific mints from the collection that the holder owns. + """ mints: [String!]! + + """ + The number of NFTs that the holder owns in the collection. + """ + owns: Int! } -"""An invitation sent to join a Holaplex organization.""" +""" +An invitation sent to join a Holaplex organization. +""" type Invite { - """The ID of the invitation.""" - id: UUID! - """The email address of the user being invited to become a member of the organization.""" - email: String! - """The status of the invitation.""" - status: InviteStatus! - """The ID of the organization to which the invitation belongs.""" - organizationId: UUID! - """The ID of the user who created the invitation.""" - createdBy: UUID! - """The datetime, in UTC, when the invitation to join the organization was created.""" + """ + The datetime, in UTC, when the invitation to join the organization was created. + """ createdAt: NaiveDateTime! - """The datetime, in UTC, when the invitation status was updated.""" - updatedAt: NaiveDateTime - """The member record that is generated after the invitation to join the organization is accepted. When the user has not accepted the invitation, this field returns `null`.""" - member: Member - """The organization to which the invitation to join belongs.""" - organization: Organization -} -"""Input required for inviting a member to the organization.""" -input InviteMemberInput { - """The ID of the organization.""" - organization: UUID! - """The email address of the invited user.""" + """ + The ID of the user who created the invitation. + """ + createdBy: UUID! + + """ + The email address of the user being invited to become a member of the organization. + """ + email: String! + + """ + The ID of the invitation. + """ + id: UUID! + + """ + The member record that is generated after the invitation to join the organization is accepted. When the user has not accepted the invitation, this field returns `null`. + """ + member: Member + + """ + The organization to which the invitation to join belongs. + """ + organization: Organization + + """ + The ID of the organization to which the invitation belongs. + """ + organizationId: UUID! + + """ + The status of the invitation. + """ + status: InviteStatus! + + """ + The datetime, in UTC, when the invitation status was updated. + """ + updatedAt: NaiveDateTime +} + +""" +Input required for inviting a member to the organization. +""" +input InviteMemberInput { + """ + The email address of the invited user. + """ email: String! + + """ + The ID of the organization. + """ + organization: UUID! } -"""The status of a member invitation.""" +""" +The status of a member invitation. +""" enum InviteStatus { - """The member invitation has been accepted by the invited user.""" + """ + The member invitation has been accepted by the invited user. + """ ACCEPTED - """The member invitation has been revoked by an existing member of the organization and is no longer valid.""" + + """ + The member invitation has been revoked by an existing member of the organization and is no longer valid. + """ REVOKED - """The member invitation has been sent to the invited user.""" + + """ + The member invitation has been sent to the invited user. + """ SENT } -"""A scalar that can represent any JSON value.""" +""" +A scalar that can represent any JSON value. +""" scalar JSON -"""A member of a Holaplex organization, representing an individual who has been granted access to the organization.""" +""" +A member of a Holaplex organization, representing an individual who has been granted access to the organization. +""" type Member { - """The ID of the user who has been granted access to the Holaplex organization as a member.""" - userId: UUID! - """The user identity who is a member of the organization.""" - user: User - """The unique identifier of the member.""" - id: UUID! - """The ID of the Holaplex organization to which the user has been granted access.""" - organizationId: UUID! - """The datetime, in UTC, when the member joined the organization.""" + """ + The datetime, in UTC, when the member joined the organization. + """ createdAt: NaiveDateTime! - """The datetime, in UTC, when the member was revoked from the organization.""" - revokedAt: NaiveDateTime - """The ID of the invitation that the member accepted to join the organization.""" - inviteId: UUID! - """The datetime, in UTC, when the member was deactivated from the organization.""" + + """ + The datetime, in UTC, when the member was deactivated from the organization. + """ deactivatedAt: NaiveDateTime - """The Holaplex organization to which the member belongs, representing an individual who has been granted access to the organization.""" - organization: Organization - """The invitation to join the Holaplex organization that the member accepted in order to gain access to the organization.""" + + """ + The unique identifier of the member. + """ + id: UUID! + + """ + The invitation to join the Holaplex organization that the member accepted in order to gain access to the organization. + """ invite: Invite + + """ + The ID of the invitation that the member accepted to join the organization. + """ + inviteId: UUID! + + """ + The Holaplex organization to which the member belongs, representing an individual who has been granted access to the organization. + """ + organization: Organization + + """ + The ID of the Holaplex organization to which the user has been granted access. + """ + organizationId: UUID! + + """ + The datetime, in UTC, when the member was revoked from the organization. + """ + revokedAt: NaiveDateTime + + """ + The user identity who is a member of the organization. + """ + user: User + + """ + The ID of the user who has been granted access to the Holaplex organization as a member. + """ + userId: UUID! } """ @@ -516,32 +1009,61 @@ The collection's associated metadata JSON. [Metaplex v1.1.0 Standard](https://docs.metaplex.com/programs/token-metadata/token-standard) """ type MetadataJson { + """ + An optional animated version of the NFT art. + """ + animationUrl: String + attributes: [MetadataJsonAttribute!] + + """ + The description of the NFT. + """ + description: String! + + """ + An optional URL where viewers can find more information on the NFT, such as the collection's homepage or Twitter page. + """ + externalUrl: String id: UUID! identifier: String! - """The assigned name of the NFT.""" + image: String + + """ + The image URI for the NFT. + """ + imageOriginal: String! + + """ + The assigned name of the NFT. + """ name: String! - """The URI for the complete metadata JSON.""" - uri: String! - """The symbol of the NFT.""" + + """ + The symbol of the NFT. + """ symbol: String! - """The description of the NFT.""" - description: String! - """The image URI for the NFT.""" - image: String! - """An optional animated version of the NFT art.""" - animationUrl: String - """An optional URL where viewers can find more information on the NFT, such as the collection's homepage or Twitter page.""" - externalUrl: String - attributes: [MetadataJsonAttribute!] + + """ + The URI for the complete metadata JSON. + """ + uri: String! } -"""An attribute of the NFT.""" +""" +An attribute of the NFT. +""" type MetadataJsonAttribute { id: UUID! metadataJsonId: UUID! - """The name of the attribute.""" + + """ + The name of the attribute. + """ traitType: String! - """The value of the attribute.""" + + """ + The value of the attribute. + """ value: String! } @@ -551,152 +1073,242 @@ input MetadataJsonAttributeInput { } input MetadataJsonCollectionInput { - name: String family: String + name: String } input MetadataJsonFileInput { - uri: String fileType: String + uri: String } input MetadataJsonInput { - name: String! - symbol: String! - description: String! - image: String! animationUrl: String - collection: MetadataJsonCollectionInput attributes: [MetadataJsonAttributeInput!]! + collection: MetadataJsonCollectionInput + description: String! externalUrl: String + image: String! + name: String! properties: MetadataJsonPropertyInput + symbol: String! } input MetadataJsonPropertyInput { - files: [MetadataJsonFileInput!] category: String + files: [MetadataJsonFileInput!] } +""" +Represents input data for `mint_edition` mutation with a UUID and recipient as fields +""" input MintDropInput { drop: UUID! recipient: String! } +""" +Represents payload data for the `mint_edition` mutation +""" type MintEditionPayload { collectionMint: CollectionMint! } type Mutation { - """Create an API credential to authenticate and authorize API requests to the Holaplex Hub.""" - createCredential(input: CreateCredentialInput!): CreateCredentialPayload! - """Edit the name assigned to the API credential.""" - editCredential(input: EditCredentialInput!): EditCredentialPayload! - """Delete the OAuth2 API credential.""" - deleteCredential(input: DeleteCredentialInput!): DeleteCredentialPayload! - """This mutation creates a customer record and a corresponding treasury that holds custodial wallets on behalf of a user. The treasury serves as a way to group the customer's wallets together. This makes it easier to manage wallets and associated assets for the user within a specific project. The customer and treasury are associated with the specified project ID. The response includes the newly created customer record. If there is an error connecting to the database or unable to emit a customer created event, the mutation will fail and an error will be returned.""" - createCustomer(input: CreateCustomerInput!): CreateCustomerPayload! """ - This mutation creates a new NFT drop and its associated collection. The drop returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the drop is ready to be minted. - Error - If the drop cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + Accept an invite to the organization. + # Error + This mutation will produce an error if it is unable to connect to the database or if the user's email does not match the invitation. """ - createDrop(input: CreateDropInput!): CreateDropPayload! - """This mutation allows for the temporary blocking of the minting of editions and can be resumed by calling the resumeDrop mutation.""" - pauseDrop(input: PauseDropInput!): PauseDropPayload! - """This mutation resumes a paused drop, allowing minting of editions to be restored""" - resumeDrop(input: ResumeDropInput!): ResumeDropPayload! + acceptInvite(input: AcceptInviteInput!): AcceptInvitePayload! + """ - Shuts down a drop by writing the current UTC timestamp to the shutdown_at field of drop record. - Returns the `Drop` object on success. - - # Errors - Fails if the drop or collection is not found, or if updating the drop record fails. + Create an API credential to authenticate and authorize API requests to the Holaplex Hub. """ - shutdownDrop(input: ShutdownDropInput!): ShutdownDropPayload! + createCredential(input: CreateCredentialInput!): CreateCredentialPayload! + """ - This mutation allows updating a drop and it's associated collection by ID. - It returns an error if it fails to reach the database, emit update events or assemble the on-chain transaction. - Returns the `PatchDropPayload` object on success. + This mutation creates a customer record and a corresponding treasury that holds custodial wallets on behalf of a user. The treasury serves as a way to group the customer's wallets together. This makes it easier to manage wallets and associated assets for the user within a specific project. The customer and treasury are associated with the specified project ID. The response includes the newly created customer record. If there is an error connecting to the database or unable to emit a customer created event, the mutation will fail and an error will be returned. """ - patchDrop(input: PatchDropInput!): PatchDropPayload! + createCustomer(input: CreateCustomerInput!): CreateCustomerPayload! + """ - This mutation mints an NFT edition for a specific drop ID. The mint returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the mint is accepted by the blockchain. + Create a wallet for a customer and assign it to the customer's treasury account. + # Errors - If the mint cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + The mutation will result in an error if it is unable to interact with the database or communicate with Fireblocks. """ - mintEdition(input: MintDropInput!): MintEditionPayload! + createCustomerWallet( + input: CreateCustomerWalletInput! + ): CreateCustomerWalletPayload! + + """ + This mutation creates a new NFT drop and its associated collection. The drop returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the drop is ready to be minted. + Error + If the drop cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + """ + createDrop(input: CreateDropInput!): CreateDropPayload! + """ This mutation creates a new Holaplex organization, with the user triggering the mutation automatically assigned as the owner of the organization. # Errors This mutation produces an error if it is unable to connect to the database, emit the organization creation event, or if the user is not set in the X-USER-ID header. """ - createOrganization(input: CreateOrganizationInput!): CreateOrganizationPayload! - """This mutation edits the name or profile image of the organization.""" - editOrganization(input: EditOrganizationInput!): EditOrganizationPayload! + createOrganization( + input: CreateOrganizationInput! + ): CreateOrganizationPayload! + """ This mutation creates a new project under the specified organization. - + # Errors This mutation produces an error if it is unable to connect to the database, emit the project creation event, or if the user is not set in the X-USER-ID header. """ createProject(input: CreateProjectInput!): CreateProjectPayload! - """This mutations edits the name and profile image of the project.""" - editProject(input: EditProjectInput!): EditProjectPayload! - """ - To invite a person to the organization, provide their email address. - # Error - This mutation will produce an error if it is unable to connect to the database or if there is no associated user set in the X-USER-ID header. - """ - inviteMember(input: InviteMemberInput!): Invite! - """ - Accept an invite to the organization. - # Error - This mutation will produce an error if it is unable to connect to the database or if the user's email does not match the invitation. - """ - acceptInvite(input: AcceptInviteInput!): AcceptInvitePayload! + """ - Returns member object on success - + Res + # Errors - This code may result in an error if the update to the database fails or if it fails to produce an event. + This function fails if ... """ - deactivateMember(input: DeactivateMemberInput!): Member! + createWebhook(input: CreateWebhookInput!): CreateWebhookPayload! + """ Returns member object on success - + # Errors This code may result in an error if the update to the database fails or if it fails to produce an event. """ - reactivateMember(input: ReactivateMemberInput!): Member! + deactivateMember(input: DeactivateMemberInput!): Member! + """ - Create a wallet for a customer and assign it to the customer's treasury account. - - # Errors - The mutation will result in an error if it is unable to interact with the database or communicate with Fireblocks. + Delete the OAuth2 API credential. """ - createCustomerWallet(input: CreateCustomerWalletInput!): CreateCustomerWalletPayload! + deleteCredential(input: DeleteCredentialInput!): DeleteCredentialPayload! + """ Res - + # Errors This function fails if ... """ - createWebhook(input: CreateWebhookInput!): CreateWebhookPayload! + deleteWebhook(input: DeleteWebhookInput!): DeleteWebhookPayload! + """ - Res - - # Errors - This function fails if ... + Edit the name assigned to the API credential. """ - deleteWebhook(input: DeleteWebhookInput!): DeleteWebhookPayload! + editCredential(input: EditCredentialInput!): EditCredentialPayload! + + """ + This mutation edits the name or profile image of the organization. + """ + editOrganization(input: EditOrganizationInput!): EditOrganizationPayload! + + """ + This mutations edits the name and profile image of the project. + """ + editProject(input: EditProjectInput!): EditProjectPayload! + """ Res - + # Errors This function fails if ... """ editWebhook(input: EditWebhookInput!): EditWebhookPayload! -} + + """ + To invite a person to the organization, provide their email address. + # Error + This mutation will produce an error if it is unable to connect to the database or if there is no associated user set in the X-USER-ID header. + """ + inviteMember(input: InviteMemberInput!): Invite! + mint: CollectionMint + + """ + This mutation mints an NFT edition for a specific drop ID. The mint returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the mint is accepted by the blockchain. + # Errors + If the mint cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + """ + mintEdition(input: MintDropInput!): MintEditionPayload! + + """ + This mutation allows updating a drop and it's associated collection by ID. + It returns an error if it fails to reach the database, emit update events or assemble the on-chain transaction. + Returns the `PatchDropPayload` object on success. + """ + patchDrop(input: PatchDropInput!): PatchDropPayload! + + """ + This mutation allows for the temporary blocking of the minting of editions and can be resumed by calling the resumeDrop mutation. + """ + pauseDrop(input: PauseDropInput!): PauseDropPayload! + + """ + Returns member object on success + + # Errors + This code may result in an error if the update to the database fails or if it fails to produce an event. + """ + reactivateMember(input: ReactivateMemberInput!): Member! + + """ + This mutation resumes a paused drop, allowing minting of editions to be restored + """ + resumeDrop(input: ResumeDropInput!): ResumeDropPayload! + + """ + This mutation retries an existing drop. + The drop returns immediately with a creation status of CREATING. + You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the drop is ready to be minted. + Errors + The mutation will fail if the drop and its related collection cannot be located, + if the transaction response cannot be built, + or if the transaction event cannot be emitted. + """ + retryDrop(input: RetryDropInput!): CreateDropPayload! + + """ + This mutation retries a mint which failed or is in pending state. The mint returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the mint is accepted by the blockchain. + # Errors + If the mint cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + """ + retryMint(input: RetryMintInput!): RetryMintPayload! + + """ + Shuts down a drop by writing the current UTC timestamp to the shutdown_at field of drop record. + Returns the `Drop` object on success. + + # Errors + Fails if the drop or collection is not found, or if updating the drop record fails. + """ + shutdownDrop(input: ShutdownDropInput!): ShutdownDropPayload! + subscribe: Subscription + + """ + Transfers an asset from one user to another on a supported blockchain network. + + # Arguments + + * `self` - A reference to the current instance of the struct. + * `ctx` - A context object containing application context data. + * `input` - A TransferAssetInput struct containing the input data for the asset transfer. + + # Returns + + Returns a Result containing a TransferAssetPayload struct with the updated mint information upon success. + + # Errors + This function returns an error : + If the specified blockchain is not currently supported. + If the specified mint does not exist. + If there is an error while making a transfer request to the Solana blockchain. + If there is an error while sending the TransferAsset event to the event producer. + """ + transferAsset(input: TransferAssetInput!): TransferAssetPayload! + unsubscribe: Subscription +} """ ISO 8601 combined date and time without timezone. @@ -707,270 +1319,493 @@ ISO 8601 combined date and time without timezone. """ scalar NaiveDateTime -"""A Holaplex organization is the top-level account within the Holaplex ecosystem. Each organization has a single owner who can invite members to join. Organizations use projects to organize NFT campaigns or initiatives.""" +""" +A Holaplex organization is the top-level account within the Holaplex ecosystem. Each organization has a single owner who can invite members to join. Organizations use projects to organize NFT campaigns or initiatives. +""" type Organization { - """The unique identifier assigned to the Holaplex organization, which is used to distinguish it from other organizations within the Holaplex ecosystem.""" - id: UUID! + """ + The datetime, in UTC, when the Holaplex organization was created by its owner. + """ + createdAt: NaiveDateTime! + """ Get a single API credential by client ID. - + # Arguments - + * `ctx` - The GraphQL context object containing the database connection pool and other data. * `client_id` - The client ID of the API credential to retrieve. - + # Returns - + The API credential with the specified client ID. """ credential(clientId: String!): Credential! + """ Get a list of API credentials associated with this organization. - + # Arguments - + * `ctx` - The GraphQL context object containing the database connection pool and other data. * `limit` - Optional limit on the number of credentials to retrieve. * `offset` - Optional offset for the credentials to retrieve. - + # Returns - + A list of API credentials associated with this organization. """ credentials(limit: Int, offset: Int): [Credential!]! - """The name given to the Holaplex organization, which is used to identify it within the Holaplex ecosystem and to its members and users.""" - name: String! - """The datetime, in UTC, when the Holaplex organization was created by its owner.""" - createdAt: NaiveDateTime! - """The datetime, in UTC, when the Holaplex organization was deactivated by its owner.""" + + """ + Define an asynchronous function to load the credits for the organization + Returns `Credits` object + #Errors + returns error if credits_loader is not found in the context or if the loader fails to load the credits + """ + credits: Credits + + """ + The datetime, in UTC, when the Holaplex organization was deactivated by its owner. + """ deactivatedAt: NaiveDateTime - """The optional profile image associated with the Holaplex organization, which can be used to visually represent the organization.""" - profileImageUrl: String - """The members who have been granted access to the Holaplex organization, represented by individuals who have been invited and accepted the invitation to join the organization.""" + + """ + Define an asynchronous function to load the total credits deducted for each action + Returns `DeductionTotals` object + #Errors + returns error if total_deductions_loader is not found in the context or if the loader fails to load the total deductions + """ + deductionTotals: [DeductionTotals!] + + """ + The unique identifier assigned to the Holaplex organization, which is used to distinguish it from other organizations within the Holaplex ecosystem. + """ + id: UUID! + + """ + The invitations to join the Holaplex organization that have been sent to email addresses and are either awaiting or have been accepted by the recipients. + """ + invites(status: InviteStatus): [Invite!]! + + """ + The members who have been granted access to the Holaplex organization, represented by individuals who have been invited and accepted the invitation to join the organization. + """ members: [Member!] - """The owner of the Holaplex organization, who has created the organization and has full control over its settings and members.""" + + """ + The name given to the Holaplex organization, which is used to identify it within the Holaplex ecosystem and to its members and users. + """ + name: String! + + """ + The owner of the Holaplex organization, who has created the organization and has full control over its settings and members. + """ owner: Owner - """The invitations to join the Holaplex organization that have been sent to email addresses and are either awaiting or have been accepted by the recipients.""" - invites(status: InviteStatus): [Invite!]! - """The projects that have been created and are currently associated with the Holaplex organization, which are used to organize NFT campaigns or initiatives within the organization.""" + + """ + The optional profile image associated with the Holaplex organization, which can be used to visually represent the organization. + """ + profileImageUrl: String + + """ + The projects that have been created and are currently associated with the Holaplex organization, which are used to organize NFT campaigns or initiatives within the organization. + """ projects: [Project!]! + """ - Retrieves a list of all webhooks associated with the organization. - + Retrieves a specific webhook associated with the organization, based on its ID. + # Arguments - + * `ctx` - The context object representing the current request. - + * `id` - The UUID of the Webhook to retrieve. + # Returns - - A vector of all Webhook objects associated with the Organization, or None if there are none. - + + The specified Webhook object, or None if it does not exist. + # Errors - + This function will return an error if the data context cannot be retrieved. """ - webhooks: [Webhook!] + webhook(id: UUID!): Webhook + """ - Retrieves a specific webhook associated with the organization, based on its ID. - + Retrieves a list of all webhooks associated with the organization. + # Arguments - + * `ctx` - The context object representing the current request. - * `id` - The UUID of the Webhook to retrieve. - + # Returns - - The specified Webhook object, or None if it does not exist. - + + A vector of all Webhook objects associated with the Organization, or None if there are none. + # Errors - + This function will return an error if the data context cannot be retrieved. """ - webhook(id: UUID!): Webhook + webhooks: [Webhook!] } -"""The owner of the Holaplex organization, who is the individual that created the organization.""" +""" +The owner of the Holaplex organization, who is the individual that created the organization. +""" type Owner { - """The ID of the user who created the Holaplex organization and serves as its owner.""" - userId: UUID! - """The user identity associated with the owner of the organization.""" - user: User - """The unique identifier assigned to the record of the user who created the Holaplex organization and serves as its owner, which is used to distinguish their record from other records within the Holaplex ecosystem.""" + """ + The datetime, in UTC, when the organization was created. + """ + createdAt: NaiveDateTime! + + """ + The unique identifier assigned to the record of the user who created the Holaplex organization and serves as its owner, which is used to distinguish their record from other records within the Holaplex ecosystem. + """ id: UUID! + + """ + The Holaplex organization owned by the user. + """ + organization: Organization + """ The ID assigned to the Holaplex organization owned by the user, which is used to distinguish it from other organizations within the Holaplex ecosystem." """ organizationId: UUID! - """The datetime, in UTC, when the organization was created.""" - createdAt: NaiveDateTime! - """The Holaplex organization owned by the user.""" - organization: Organization + + """ + The user identity associated with the owner of the organization. + """ + user: User + + """ + The ID of the user who created the Holaplex organization and serves as its owner. + """ + userId: UUID! } -"""Input object for patching a drop and associated collection by ID""" +""" +Input object for patching a drop and associated collection by ID +""" input PatchDropInput { - """The unique identifier of the drop""" + """ + The creators of the drop + """ + creators: [CollectionCreatorInput!] + + """ + The new end time for the drop in UTC + """ + endTime: DateTime + + """ + The unique identifier of the drop + """ id: UUID! - """The new price for the drop in the native token of the blockchain""" + + """ + The new metadata JSON for the drop + """ + metadataJson: MetadataJsonInput + + """ + The new price for the drop in the native token of the blockchain + """ price: Int - """The new start time for the drop in UTC""" - startTime: DateTime - """The new end time for the drop in UTC""" - endTime: DateTime - """The new seller fee basis points for the drop""" + + """ + The new seller fee basis points for the drop + """ sellerFeeBasisPoints: Int - """The new metadata JSON for the drop""" - metadataJson: MetadataJsonInput - """The creators of the drop""" - creators: [CollectionCreatorInput!] + + """ + The new start time for the drop in UTC + """ + startTime: DateTime } -"""Represents the result of a successful patch drop mutation.""" +""" +Represents the result of a successful patch drop mutation. +""" type PatchDropPayload { - """The drop that has been patched.""" + """ + The drop that has been patched. + """ drop: Drop! } -"""Represents input fields for pausing a drop.""" +""" +Represents input fields for pausing a drop. +""" input PauseDropInput { drop: UUID! } -"""Represents the result of a successful pause drop mutation.""" +""" +Represents the result of a successful pause drop mutation. +""" type PauseDropPayload { - """The drop that has been paused.""" + """ + The drop that has been paused. + """ drop: Drop! } -"""A Holaplex project that belongs to an organization. Projects are used to group unique NFT campaigns or initiatives, and are used to assign objects that end customers will interact with, such as drops and wallets.""" +""" +A Holaplex project that belongs to an organization. Projects are used to group unique NFT campaigns or initiatives, and are used to assign objects that end customers will interact with, such as drops and wallets. +""" type Project { - """The unique identifier assigned to the Holaplex project.""" - id: UUID! - """Retrieve a customer record associated with the project, using its ID.""" + """ + The datetime, in UTC, when the project was created. + """ + createdAt: NaiveDateTime! + + """ + Retrieve a customer record associated with the project, using its ID. + """ customer(id: UUID!): Customer - """Retrieve all customer records associated with a given project.""" + + """ + Retrieve all customer records associated with a given project. + """ customers: [Customer!] - """The drops associated with the project.""" - drops: [Drop!] - """Look up a drop associated with the project by its ID.""" + + """ + The date and time in Coordinated Universal Time (UTC) when the Holaplex project was created. Once a project is deactivated, objects that were assigned to the project can no longer be interacted with. + """ + deactivatedAt: NaiveDateTime + + """ + Look up a drop associated with the project by its ID. + """ drop(id: UUID!): Drop - """The friendly name assigned to the Holaplex project to differentiate it from other projects belonging to the organization.""" + + """ + The drops associated with the project. + """ + drops: [Drop!] + + """ + The unique identifier assigned to the Holaplex project. + """ + id: UUID! + + """ + The friendly name assigned to the Holaplex project to differentiate it from other projects belonging to the organization. + """ name: String! - """The ID of the Holaplex organization to which the project belongs.""" + organization: Organization + + """ + The ID of the Holaplex organization to which the project belongs. + """ organizationId: UUID! - """The datetime, in UTC, when the project was created.""" - createdAt: NaiveDateTime! - """The date and time in Coordinated Universal Time (UTC) when the Holaplex project was created. Once a project is deactivated, objects that were assigned to the project can no longer be interacted with.""" - deactivatedAt: NaiveDateTime - """The optional profile image associated with the project, which can be used to visually represent the project.""" + + """ + The optional profile image associated with the project, which can be used to visually represent the project. + """ profileImageUrl: String - organization: Organization - """The treasury assigned to the project, which contains the project's wallets.""" + + """ + The treasury assigned to the project, which contains the project's wallets. + """ treasury: Treasury } -"""Represents the purchase of an NFT.""" +""" +Represents the purchase of an NFT. +""" type Purchase { - """The ID of the purchase.""" + """ + The date and time when the purchase was created. + """ + createdAt: DateTime! + + """ + The ID of the drop that facilitated the purchase, if any. + """ + dropId: UUID + + """ + The ID of the purchase. + """ id: UUID! - """The ID of the NFT being purchased.""" + + """ + The ID of the NFT being purchased. + """ mintId: UUID! - """The ID of the drop that facilitated the purchase, if any.""" - dropId: UUID - """The wallet address of the buyer.""" - wallet: String! - """The amount spent on the purchase.""" + + """ + The amount spent on the purchase. + """ spent: Int! - """The signature of the transaction, if any.""" - txSignature: String - """The status of the creation of the NFT.""" + + """ + The status of the creation of the NFT. + """ status: CreationStatus! - """The date and time when the purchase was created.""" - createdAt: NaiveDateTime! + + """ + The signature of the transaction, if any. + """ + txSignature: String + + """ + The wallet address of the buyer. + """ + wallet: String! } type Query { - """Retrieve a user identity by providing their ID.""" - user(id: UUID!): User - """Query an organization by its ID, this query returns `null` if the organization does not exist.""" - organization(id: UUID!): Organization - """Query a project by it's ID, this query returns `null` if the project does not exist.""" - project(id: UUID!): Project - """Retrieve a member invitation by its ID.""" - invite(id: UUID!): Invite + collectibles: [CollectionMint] + + """ + Returns a list of `ActionCost` which represents the cost of each action on different blockchains. + + # Errors + This function fails if it fails to get `CreditsClient` or if blockchain enum conversion fails. + """ + creditSheet: [ActionCost!]! + drop: Drop + drops: [Drop] + """ Returns a list of event types that an external service can subscribe to. - + # Returns - + A vector of EventType objects representing the different event types that can be subscribed to. - + # Errors - + This function returns an error if there was a problem with retrieving the event types. """ eventTypes: [EventType!]! + + """ + Retrieve a member invitation by its ID. + """ + invite(id: UUID!): Invite + me: User + + """ + Query an organization by its ID, this query returns `null` if the organization does not exist. + """ + organization(id: UUID!): Organization + + """ + Query a project by it's ID, this query returns `null` if the project does not exist. + """ + project(id: UUID!): Project + subscription: Subscription + + """ + Retrieve a user identity by providing their ID. + """ + user(id: UUID!): User } input ReactivateMemberInput { id: UUID! } -"""Represents input fields for resuming a paused drop.""" +""" +Represents input fields for resuming a paused drop. +""" input ResumeDropInput { drop: UUID! } -"""Represents the result of a successful resume drop mutation.""" +""" +Represents the result of a successful resume drop mutation. +""" type ResumeDropPayload { - """The drop that has been resumed.""" + """ + The drop that has been resumed. + """ drop: Drop! } -"""Represents the input fields for shutting down a drop""" +input RetryDropInput { + drop: UUID! +} + +""" +Represents input data for `retry_mint` mutation with an ID as a field of type UUID +""" +input RetryMintInput { + id: UUID! +} + +""" +Represents payload data for `retry_mint` mutation +""" +type RetryMintPayload { + collectionMint: CollectionMint! +} + +""" +Represents the input fields for shutting down a drop +""" input ShutdownDropInput { drop: UUID! } -"""Represents the result of a successful shutdown drop mutation""" +""" +Represents the result of a successful shutdown drop mutation +""" type ShutdownDropPayload { - """Drop that has been shutdown""" + """ + Drop that has been shutdown + """ drop: Drop! } -"""A collection of wallets assigned to different entities in the Holaplex ecosystem.""" +type Subscription { + subscribedAt: String + userId: String +} + +input TransferAssetInput { + id: UUID! + recipient: String! +} + +type TransferAssetPayload { + mint: CollectionMint! +} + +""" +A collection of wallets assigned to different entities in the Holaplex ecosystem. +""" type Treasury { - """The unique identifier for the treasury.""" + """ + The creation datetime of the vault. + """ + createdAt: NaiveDateTime! + + """ + The unique identifier for the treasury. + """ id: UUID! + """ The associated Fireblocks vault ID. ## Reference [Vault Objects](https://docs.fireblocks.com/api/#vault-objects) """ vaultId: String! - """The creation datetime of the vault.""" - createdAt: NaiveDateTime! - """The treasury's associated wallets.""" - wallets: [Wallet!] - """Lookup a wallet based on its `asset_type`.""" + + """ + Lookup a wallet based on its `asset_type`. + """ wallet(assetType: AssetType!): Wallet -} -"""A unique user identity across the entire Holaplex ecosystem. A user can be associated with multiple organizations, but they are not required to have separate login credentials.""" -type User { - """The unique identifier for the user identity.""" - id: UUID! - """The first name of the user identity.""" - firstName: String! - """The last name of the user identity.""" - lastName: String! - """The email address associated with the user identity.""" - email: String! - """The timestamp in UTC when the user identity was created.""" - createdAt: String! - """The timestamp in UTC when the user identity was last updated.""" - updatedAt: String! - affiliations: [Affiliation!]! + """ + The treasury's associated wallets. + """ + wallets: [Wallet!] } """ @@ -985,62 +1820,138 @@ entities without requiring a central allocating authority. """ scalar UUID -"""A blockchain wallet is a digital wallet that allows users to securely store, manage, and transfer their cryptocurrencies or other digital assets on a blockchain network.""" +""" +A unique user identity across the entire Holaplex ecosystem. A user can be associated with multiple organizations, but they are not required to have separate login credentials. +""" +type User { + affiliations: [Affiliation!]! + + """ + The timestamp in UTC when the user identity was created. + """ + createdAt: String! + + """ + The email address associated with the user identity. + """ + email: String! + + """ + The first name of the user identity. + """ + firstName: String! + + """ + The unique identifier for the user identity. + """ + id: UUID! + image: String + + """ + The last name of the user identity. + """ + lastName: String! + name: String + + """ + The profile image associated with the user identity. + """ + profileImage: String + + """ + The timestamp in UTC when the user identity was last updated. + """ + updatedAt: String! + wallet: Wallet +} + +""" +A blockchain wallet is a digital wallet that allows users to securely store, manage, and transfer their cryptocurrencies or other digital assets on a blockchain network. +""" type Wallet { - """The wallet address.""" + """ + The wallet address. + """ address: String! - """The NFTs that were minted from Holaplex and are owned by the wallet's address.""" - mints: [CollectionMint!] - treasuryId: UUID! - legacyAddress: String! - tag: String! + + """ + The wallet's associated blockchain. + """ + assetId: AssetType! createdAt: NaiveDateTime! - removedAt: NaiveDateTime createdBy: UUID! - """The wallet's associated blockchain.""" - assetId: AssetType! + legacyAddress: String! + + """ + The NFTs that were minted from Holaplex and are owned by the wallet's address. + """ + mints: [CollectionMint!] + removedAt: NaiveDateTime + tag: String! + treasuryId: UUID! } -"""A webhook represents an endpoint registered to receive notifications for specific events within a project.""" +""" +A webhook represents an endpoint registered to receive notifications for specific events within a project. +""" type Webhook { - """Retrieves the ID of the user who created the webhook.""" - createdById: UUID! - """The user who created the webhook.""" - createdBy: User - """Retrieves the ID of the webhook.""" - id: UUID! - """Retrieves the channels the webhook is subscribed to.""" + """ + Retrieves the channels the webhook is subscribed to. + """ channels: [String!]! - """This field specifies the list of projects for which an associated object will trigger a webhook event.""" - projects: [Project!]! - """Retrieves the ID of the webhook's endpoint.""" + + """ + Retrieves the creation datetime of the webhook. + """ + createdAt: NaiveDateTime! + + """ + The user who created the webhook. + """ + createdBy: User + + """ + Retrieves the ID of the user who created the webhook. + """ + createdById: UUID! + + """ + Retrieves the webhook's description. + """ + description: String! + + """ + Retrieves the ID of the webhook's endpoint. + """ endpointId: String! - """Retrieves the URL of the webhook's endpoint.""" - url: String! - """Retrieves the events the webhook is subscribed to.""" + + """ + Retrieves the events the webhook is subscribed to. + """ events: [FilterType!]! - """Retrieves the webhook's description.""" - description: String! - """Retrieves the creation datetime of the webhook.""" - createdAt: NaiveDateTime! - """Retrieves the ID of the organization the webhook belongs to.""" + + """ + Retrieves the ID of the webhook. + """ + id: UUID! + + """ + Retrieves the ID of the organization the webhook belongs to. + """ organizationId: UUID! - """Retrieves the last update datetime of the webhook.""" - updatedAt: NaiveDateTime -} -type User { - name: String - email: String - image: String - wallet: Wallet -} + """ + This field specifies the list of projects for which an associated object will trigger a webhook event. + """ + projects: [Project!]! -type Query { - drop: Drop - me: User -} + """ + Retrieves the last update datetime of the webhook. + """ + updatedAt: NaiveDateTime -type Mutation { - mint: CollectionMint + """ + Retrieves the URL of the webhook's endpoint. + """ + url: String! } diff --git a/src/app/App.tsx b/src/app/App.tsx index 448a95a..fcfbff1 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,20 +1,24 @@ -"use client"; +'use client'; -import { ApolloProvider } from "@apollo/client"; -import api from "@/modules/api"; -import MeProvider from "@/providers/MeProvider"; -import { User } from "@/graphql.types"; +import { ApolloProvider } from '@apollo/client'; +import api from '@/modules/api'; +import MeProvider from '@/providers/MeProvider'; +import { User } from '@/graphql.types'; +import { ToastContainer } from 'react-toastify'; export default function App({ children, - me, + me }: { children: React.ReactNode; me: User | undefined; }) { return ( - {children} + + {children} + + ); } diff --git a/src/app/Home.tsx b/src/app/Home.tsx index d0495fb..a732611 100644 --- a/src/app/Home.tsx +++ b/src/app/Home.tsx @@ -4,15 +4,16 @@ import { useMemo } from 'react'; import { Holder } from '@/graphql.types'; import { shorten } from '../modules/wallet'; import { MintDrop } from '@/mutations/mint.graphql'; -import { useApolloClient, useMutation, useQuery } from '@apollo/client'; +import { useMutation, useQuery } from '@apollo/client'; import { GetDrop } from '@/queries/drop.graphql'; import BounceLoader from 'react-spinners/BounceLoader'; import Link from 'next/link'; import clsx from 'clsx'; -import { drop, isNil, not, pipe } from 'ramda'; +import { isNil, not, pipe } from 'ramda'; import useMe from '@/hooks/useMe'; import { Session } from 'next-auth'; import { CheckIcon } from '@heroicons/react/24/solid'; +import { toast } from 'react-toastify'; interface MintData { mint: string; @@ -43,7 +44,16 @@ export default function Home({ session }: HomeProps) { }); const onMint = () => { - mint(); + mint() + .then((data: any) => { + toast.success('Mint successful'); + }) + .catch((e: any) => { + console.log('Mint error', e); + toast.error( + 'Unable to mint. Please try again or reach out to support.' + ); + }); }; return ( diff --git a/src/graphql.types.ts b/src/graphql.types.ts index aa1341f..ddca21f 100644 --- a/src/graphql.types.ts +++ b/src/graphql.types.ts @@ -14,7 +14,7 @@ export type Scalars = { Int: number; Float: number; /** - * Implement the DateTime scalar + * Implement the DateTime scalar * * The input/output is a string in RFC3339 format. */ @@ -66,6 +66,24 @@ export type AccessToken = { tokenType: Scalars['String']; }; +export enum Action { + CreateDrop = 'CREATE_DROP', + CreateWallet = 'CREATE_WALLET', + MintEdition = 'MINT_EDITION', + RetryDrop = 'RETRY_DROP', + RetryMint = 'RETRY_MINT', + TransferAsset = 'TRANSFER_ASSET' +} + +/** Represents the cost of performing a certain action on different blockchains */ +export type ActionCost = { + __typename?: 'ActionCost'; + /** enum that represents the type of action being performed. */ + action: Action; + /** a vector of BlockchainCost structs that represents the cost of performing the action on each blockchain. */ + blockchains: Array; +}; + /** An enum type named Affiliation that defines a user's association to an organization. The enum is derived using a Union attribute. It has two variants, each containing an associated data type: */ export type Affiliation = Member | Owner; @@ -97,7 +115,15 @@ export enum Blockchain { Solana = 'SOLANA' } -/** An NFT collection that has either a fixed supply or unlimited mints. NFT collections are deployed to a desired blockchain. */ +/** Represents the cost of performing an action on a specific blockchain */ +export type BlockchainCost = { + __typename?: 'BlockchainCost'; + /** enum that represents the blockchain on which the action is being performed. */ + blockchain: Blockchain; + /** represents the cost in credits for performing the action on the blockchain. */ + credits: Scalars['Int']; +}; + export type Collection = { __typename?: 'Collection'; /** The blockchain address of the collection used to view it in blockchain explorers. */ @@ -164,11 +190,15 @@ export type CollectionMint = { /** The ID of the collection the NFT was minted from. */ collectionId: Scalars['UUID']; /** The date and time when the NFT was created. */ - createdAt: Scalars['NaiveDateTime']; + createdAt: Scalars['DateTime']; /** The unique ID of the creator of the NFT. */ createdBy: Scalars['UUID']; /** The status of the NFT creation. */ creationStatus: CreationStatus; + /** credits deduction id */ + creditsDeductionId?: Maybe; + /** The unique edition number of the NFT. */ + edition: Scalars['Int']; /** The unique ID of the minted NFT. */ id: Scalars['UUID']; /** @@ -312,6 +342,25 @@ export type Credential = { organizationId: Scalars['UUID']; }; +export type CreditDeposit = { + __typename?: 'CreditDeposit'; + cost: Scalars['Float']; + createdAt: Scalars['DateTime']; + credits: Scalars['Int']; + id: Scalars['UUID']; + initiatedBy: Scalars['UUID']; + organization: Scalars['UUID']; + perCreditCost: Scalars['Float']; + reason: DepositReason; +}; + +export type Credits = { + __typename?: 'Credits'; + balance: Scalars['Int']; + deposits?: Maybe>; + id: Scalars['UUID']; +}; + /** A customer record represents a user in your service and is used to group custodial wallets within a specific project. This allows for easy management of wallets and associated assets for a particular customer within your service. */ export type Customer = { __typename?: 'Customer'; @@ -345,6 +394,12 @@ export type DeactivateMemberInput = { id: Scalars['UUID']; }; +export type DeductionTotals = { + __typename?: 'DeductionTotals'; + action: Action; + spent: Scalars['Int']; +}; + /** The input for deleting a credential. */ export type DeleteCredentialInput = { /** The unique identifier assigned to the credential to be deleted. */ @@ -367,21 +422,26 @@ export type DeleteWebhookPayload = { webhook: Scalars['UUID']; }; +export enum DepositReason { + Gifted = 'GIFTED', + Purchased = 'PURCHASED' +} + export type Drop = { __typename?: 'Drop'; /** The collection for which the drop is managing mints. */ collection: Collection; /** The date and time in UTC when the drop was created. */ - createdAt: Scalars['NaiveDateTime']; + createdAt: Scalars['DateTime']; /** The user id of the person who created the drop. */ createdById: Scalars['UUID']; /** The creation status of the drop. */ creationStatus: CreationStatus; /** The end date and time in UTC for the drop. A value of `null` means the drop does not end until it is fully minted. */ - endTime?: Maybe; + endTime?: Maybe; /** The unique identifier for the drop. */ id: Scalars['UUID']; - pausedAt?: Maybe; + pausedAt?: Maybe; /** The cost to mint the drop in US dollars. When purchasing with crypto the user will be charged at the current conversion rate for the blockchain's native coin at the time of minting. */ price: Scalars['Int']; /** The identifier of the project to which the drop is associated. */ @@ -392,9 +452,9 @@ export type Drop = { * The shutdown_at field represents the date and time in UTC when the drop was shutdown * If it is null, the drop is currently not shutdown */ - shutdownAt?: Maybe; + shutdownAt?: Maybe; /** The date and time in UTC when the drop is eligible for minting. A value of `null` means the drop can be minted immediately. */ - startTime?: Maybe; + startTime?: Maybe; /** The current status of the drop. */ status: DropStatus; }; @@ -600,8 +660,9 @@ export type MetadataJson = { externalUrl?: Maybe; id: Scalars['UUID']; identifier: Scalars['String']; + image?: Maybe; /** The image URI for the NFT. */ - image: Scalars['String']; + imageOriginal: Scalars['String']; /** The assigned name of the NFT. */ name: Scalars['String']; /** The symbol of the NFT. */ @@ -653,11 +714,13 @@ export type MetadataJsonPropertyInput = { files?: InputMaybe>; }; +/** Represents input data for `mint_edition` mutation with a UUID and recipient as fields */ export type MintDropInput = { drop: Scalars['UUID']; recipient: Scalars['String']; }; +/** Represents payload data for the `mint_edition` mutation */ export type MintEditionPayload = { __typename?: 'MintEditionPayload'; collectionMint: CollectionMint; @@ -767,6 +830,22 @@ export type Mutation = { reactivateMember: Member; /** This mutation resumes a paused drop, allowing minting of editions to be restored */ resumeDrop: ResumeDropPayload; + /** + * This mutation retries an existing drop. + * The drop returns immediately with a creation status of CREATING. + * You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the drop is ready to be minted. + * Errors + * The mutation will fail if the drop and its related collection cannot be located, + * if the transaction response cannot be built, + * or if the transaction event cannot be emitted. + */ + retryDrop: CreateDropPayload; + /** + * This mutation retries a mint which failed or is in pending state. The mint returns immediately with a creation status of CREATING. You can [set up a webhook](https://docs.holaplex.dev/hub/For%20Developers/webhooks-overview) to receive a notification when the mint is accepted by the blockchain. + * # Errors + * If the mint cannot be saved to the database or fails to be emitted for submission to the desired blockchain, the mutation will result in an error. + */ + retryMint: RetryMintPayload; /** * Shuts down a drop by writing the current UTC timestamp to the shutdown_at field of drop record. * Returns the `Drop` object on success. @@ -775,6 +854,29 @@ export type Mutation = { * Fails if the drop or collection is not found, or if updating the drop record fails. */ shutdownDrop: ShutdownDropPayload; + subscribe?: Maybe; + /** + * Transfers an asset from one user to another on a supported blockchain network. + * + * # Arguments + * + * * `self` - A reference to the current instance of the struct. + * * `ctx` - A context object containing application context data. + * * `input` - A TransferAssetInput struct containing the input data for the asset transfer. + * + * # Returns + * + * Returns a Result containing a TransferAssetPayload struct with the updated mint information upon success. + * + * # Errors + * This function returns an error : + * If the specified blockchain is not currently supported. + * If the specified mint does not exist. + * If there is an error while making a transfer request to the Solana blockchain. + * If there is an error while sending the TransferAsset event to the event producer. + */ + transferAsset: TransferAssetPayload; + unsubscribe?: Maybe; }; @@ -883,10 +985,25 @@ export type MutationResumeDropArgs = { }; +export type MutationRetryDropArgs = { + input: RetryDropInput; +}; + + +export type MutationRetryMintArgs = { + input: RetryMintInput; +}; + + export type MutationShutdownDropArgs = { input: ShutdownDropInput; }; + +export type MutationTransferAssetArgs = { + input: TransferAssetInput; +}; + /** A Holaplex organization is the top-level account within the Holaplex ecosystem. Each organization has a single owner who can invite members to join. Organizations use projects to organize NFT campaigns or initiatives. */ export type Organization = { __typename?: 'Organization'; @@ -919,8 +1036,22 @@ export type Organization = { * A list of API credentials associated with this organization. */ credentials: Array; + /** + * Define an asynchronous function to load the credits for the organization + * Returns `Credits` object + * #Errors + * returns error if credits_loader is not found in the context or if the loader fails to load the credits + */ + credits?: Maybe; /** The datetime, in UTC, when the Holaplex organization was deactivated by its owner. */ deactivatedAt?: Maybe; + /** + * Define an asynchronous function to load the total credits deducted for each action + * Returns `DeductionTotals` object + * #Errors + * returns error if total_deductions_loader is not found in the context or if the loader fails to load the total deductions + */ + deductionTotals?: Maybe>; /** The unique identifier assigned to the Holaplex organization, which is used to distinguish it from other organizations within the Holaplex ecosystem. */ id: Scalars['UUID']; /** The invitations to join the Holaplex organization that have been sent to email addresses and are either awaiting or have been accepted by the recipients. */ @@ -1093,7 +1224,7 @@ export type ProjectDropArgs = { export type Purchase = { __typename?: 'Purchase'; /** The date and time when the purchase was created. */ - createdAt: Scalars['NaiveDateTime']; + createdAt: Scalars['DateTime']; /** The ID of the drop that facilitated the purchase, if any. */ dropId?: Maybe; /** The ID of the purchase. */ @@ -1112,7 +1243,16 @@ export type Purchase = { export type Query = { __typename?: 'Query'; + collectibles?: Maybe>>; + /** + * Returns a list of `ActionCost` which represents the cost of each action on different blockchains. + * + * # Errors + * This function fails if it fails to get `CreditsClient` or if blockchain enum conversion fails. + */ + creditSheet: Array; drop?: Maybe; + drops?: Maybe>>; /** * Returns a list of event types that an external service can subscribe to. * @@ -1132,6 +1272,7 @@ export type Query = { organization?: Maybe; /** Query a project by it's ID, this query returns `null` if the project does not exist. */ project?: Maybe; + subscription?: Maybe; /** Retrieve a user identity by providing their ID. */ user?: Maybe; }; @@ -1172,6 +1313,21 @@ export type ResumeDropPayload = { drop: Drop; }; +export type RetryDropInput = { + drop: Scalars['UUID']; +}; + +/** Represents input data for `retry_mint` mutation with an ID as a field of type UUID */ +export type RetryMintInput = { + id: Scalars['UUID']; +}; + +/** Represents payload data for `retry_mint` mutation */ +export type RetryMintPayload = { + __typename?: 'RetryMintPayload'; + collectionMint: CollectionMint; +}; + /** Represents the input fields for shutting down a drop */ export type ShutdownDropInput = { drop: Scalars['UUID']; @@ -1184,6 +1340,22 @@ export type ShutdownDropPayload = { drop: Drop; }; +export type Subscription = { + __typename?: 'Subscription'; + subscribedAt?: Maybe; + userId?: Maybe; +}; + +export type TransferAssetInput = { + id: Scalars['UUID']; + recipient: Scalars['String']; +}; + +export type TransferAssetPayload = { + __typename?: 'TransferAssetPayload'; + mint: CollectionMint; +}; + /** A collection of wallets assigned to different entities in the Holaplex ecosystem. */ export type Treasury = { __typename?: 'Treasury'; @@ -1225,6 +1397,8 @@ export type User = { /** The last name of the user identity. */ lastName: Scalars['String']; name?: Maybe; + /** The profile image associated with the user identity. */ + profileImage?: Maybe; /** The timestamp in UTC when the user identity was last updated. */ updatedAt: Scalars['String']; wallet?: Maybe; @@ -1353,9 +1527,12 @@ export type ResolversTypes = { AcceptInviteInput: AcceptInviteInput; AcceptInvitePayload: ResolverTypeWrapper; AccessToken: ResolverTypeWrapper; + Action: Action; + ActionCost: ResolverTypeWrapper; Affiliation: ResolverTypeWrapper; AssetType: AssetType; Blockchain: Blockchain; + BlockchainCost: ResolverTypeWrapper; Boolean: ResolverTypeWrapper; Collection: ResolverTypeWrapper; CollectionCreator: ResolverTypeWrapper; @@ -1377,13 +1554,17 @@ export type ResolversTypes = { CreateWebhookPayload: ResolverTypeWrapper; CreationStatus: CreationStatus; Credential: ResolverTypeWrapper; + CreditDeposit: ResolverTypeWrapper; + Credits: ResolverTypeWrapper; Customer: ResolverTypeWrapper; DateTime: ResolverTypeWrapper; DeactivateMemberInput: DeactivateMemberInput; + DeductionTotals: ResolverTypeWrapper; DeleteCredentialInput: DeleteCredentialInput; DeleteCredentialPayload: ResolverTypeWrapper; DeleteWebhookInput: DeleteWebhookInput; DeleteWebhookPayload: ResolverTypeWrapper; + DepositReason: DepositReason; Drop: ResolverTypeWrapper; DropStatus: DropStatus; EditCredentialInput: EditCredentialInput; @@ -1396,6 +1577,7 @@ export type ResolversTypes = { EditWebhookPayload: ResolverTypeWrapper; EventType: ResolverTypeWrapper; FilterType: FilterType; + Float: ResolverTypeWrapper; Holder: ResolverTypeWrapper; Int: ResolverTypeWrapper; Invite: ResolverTypeWrapper; @@ -1426,9 +1608,15 @@ export type ResolversTypes = { ReactivateMemberInput: ReactivateMemberInput; ResumeDropInput: ResumeDropInput; ResumeDropPayload: ResolverTypeWrapper; + RetryDropInput: RetryDropInput; + RetryMintInput: RetryMintInput; + RetryMintPayload: ResolverTypeWrapper; ShutdownDropInput: ShutdownDropInput; ShutdownDropPayload: ResolverTypeWrapper; String: ResolverTypeWrapper; + Subscription: ResolverTypeWrapper<{}>; + TransferAssetInput: TransferAssetInput; + TransferAssetPayload: ResolverTypeWrapper; Treasury: ResolverTypeWrapper; UUID: ResolverTypeWrapper; User: ResolverTypeWrapper & { affiliations: Array }>; @@ -1441,7 +1629,9 @@ export type ResolversParentTypes = { AcceptInviteInput: AcceptInviteInput; AcceptInvitePayload: AcceptInvitePayload; AccessToken: AccessToken; + ActionCost: ActionCost; Affiliation: ResolversUnionTypes['Affiliation']; + BlockchainCost: BlockchainCost; Boolean: Scalars['Boolean']; Collection: Collection; CollectionCreator: CollectionCreator; @@ -1462,9 +1652,12 @@ export type ResolversParentTypes = { CreateWebhookInput: CreateWebhookInput; CreateWebhookPayload: CreateWebhookPayload; Credential: Credential; + CreditDeposit: CreditDeposit; + Credits: Credits; Customer: Customer; DateTime: Scalars['DateTime']; DeactivateMemberInput: DeactivateMemberInput; + DeductionTotals: DeductionTotals; DeleteCredentialInput: DeleteCredentialInput; DeleteCredentialPayload: DeleteCredentialPayload; DeleteWebhookInput: DeleteWebhookInput; @@ -1479,6 +1672,7 @@ export type ResolversParentTypes = { EditWebhookInput: EditWebhookInput; EditWebhookPayload: EditWebhookPayload; EventType: EventType; + Float: Scalars['Float']; Holder: Holder; Int: Scalars['Int']; Invite: Invite; @@ -1508,9 +1702,15 @@ export type ResolversParentTypes = { ReactivateMemberInput: ReactivateMemberInput; ResumeDropInput: ResumeDropInput; ResumeDropPayload: ResumeDropPayload; + RetryDropInput: RetryDropInput; + RetryMintInput: RetryMintInput; + RetryMintPayload: RetryMintPayload; ShutdownDropInput: ShutdownDropInput; ShutdownDropPayload: ShutdownDropPayload; String: Scalars['String']; + Subscription: {}; + TransferAssetInput: TransferAssetInput; + TransferAssetPayload: TransferAssetPayload; Treasury: Treasury; UUID: Scalars['UUID']; User: Omit & { affiliations: Array }; @@ -1537,10 +1737,22 @@ export type AccessTokenResolvers; }; +export type ActionCostResolvers = { + action?: Resolver; + blockchains?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type AffiliationResolvers = { __resolveType: TypeResolveFn<'Member' | 'Owner', ParentType, ContextType>; }; +export type BlockchainCostResolvers = { + blockchain?: Resolver; + credits?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type CollectionResolvers = { address?: Resolver, ParentType, ContextType>; blockchain?: Resolver; @@ -1570,9 +1782,11 @@ export type CollectionMintResolvers; collection?: Resolver, ParentType, ContextType>; collectionId?: Resolver; - createdAt?: Resolver; + createdAt?: Resolver; createdBy?: Resolver; creationStatus?: Resolver; + creditsDeductionId?: Resolver, ParentType, ContextType>; + edition?: Resolver; id?: Resolver; metadataJson?: Resolver, ParentType, ContextType>; owner?: Resolver; @@ -1628,6 +1842,25 @@ export type CredentialResolvers; }; +export type CreditDepositResolvers = { + cost?: Resolver; + createdAt?: Resolver; + credits?: Resolver; + id?: Resolver; + initiatedBy?: Resolver; + organization?: Resolver; + perCreditCost?: Resolver; + reason?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type CreditsResolvers = { + balance?: Resolver; + deposits?: Resolver>, ParentType, ContextType>; + id?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type CustomerResolvers = { addresses?: Resolver>, ParentType, ContextType>; createdAt?: Resolver; @@ -1644,6 +1877,12 @@ export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig = { + action?: Resolver; + spent?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type DeleteCredentialPayloadResolvers = { credential?: Resolver; __isTypeOf?: IsTypeOfResolverFn; @@ -1656,17 +1895,17 @@ export type DeleteWebhookPayloadResolvers = { collection?: Resolver; - createdAt?: Resolver; + createdAt?: Resolver; createdById?: Resolver; creationStatus?: Resolver; - endTime?: Resolver, ParentType, ContextType>; + endTime?: Resolver, ParentType, ContextType>; id?: Resolver; - pausedAt?: Resolver, ParentType, ContextType>; + pausedAt?: Resolver, ParentType, ContextType>; price?: Resolver; projectId?: Resolver; purchases?: Resolver>, ParentType, ContextType>; - shutdownAt?: Resolver, ParentType, ContextType>; - startTime?: Resolver, ParentType, ContextType>; + shutdownAt?: Resolver, ParentType, ContextType>; + startTime?: Resolver, ParentType, ContextType>; status?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -1747,7 +1986,8 @@ export type MetadataJsonResolvers, ParentType, ContextType>; id?: Resolver; identifier?: Resolver; - image?: Resolver; + image?: Resolver, ParentType, ContextType>; + imageOriginal?: Resolver; name?: Resolver; symbol?: Resolver; uri?: Resolver; @@ -1790,7 +2030,12 @@ export type MutationResolvers>; reactivateMember?: Resolver>; resumeDrop?: Resolver>; + retryDrop?: Resolver>; + retryMint?: Resolver>; shutdownDrop?: Resolver>; + subscribe?: Resolver, ParentType, ContextType>; + transferAsset?: Resolver>; + unsubscribe?: Resolver, ParentType, ContextType>; }; export interface NaiveDateTimeScalarConfig extends GraphQLScalarTypeConfig { @@ -1801,7 +2046,9 @@ export type OrganizationResolvers; credential?: Resolver>; credentials?: Resolver, ParentType, ContextType, Partial>; + credits?: Resolver, ParentType, ContextType>; deactivatedAt?: Resolver, ParentType, ContextType>; + deductionTotals?: Resolver>, ParentType, ContextType>; id?: Resolver; invites?: Resolver, ParentType, ContextType, Partial>; members?: Resolver>, ParentType, ContextType>; @@ -1851,7 +2098,7 @@ export type ProjectResolvers = { - createdAt?: Resolver; + createdAt?: Resolver; dropId?: Resolver, ParentType, ContextType>; id?: Resolver; mintId?: Resolver; @@ -1863,12 +2110,16 @@ export type PurchaseResolvers = { + collectibles?: Resolver>>, ParentType, ContextType>; + creditSheet?: Resolver, ParentType, ContextType>; drop?: Resolver, ParentType, ContextType>; + drops?: Resolver>>, ParentType, ContextType>; eventTypes?: Resolver, ParentType, ContextType>; invite?: Resolver, ParentType, ContextType, RequireFields>; me?: Resolver, ParentType, ContextType>; organization?: Resolver, ParentType, ContextType, RequireFields>; project?: Resolver, ParentType, ContextType, RequireFields>; + subscription?: Resolver, ParentType, ContextType>; user?: Resolver, ParentType, ContextType, RequireFields>; }; @@ -1877,11 +2128,26 @@ export type ResumeDropPayloadResolvers; }; +export type RetryMintPayloadResolvers = { + collectionMint?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type ShutdownDropPayloadResolvers = { drop?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; +export type SubscriptionResolvers = { + subscribedAt?: SubscriptionResolver, "subscribedAt", ParentType, ContextType>; + userId?: SubscriptionResolver, "userId", ParentType, ContextType>; +}; + +export type TransferAssetPayloadResolvers = { + mint?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + export type TreasuryResolvers = { createdAt?: Resolver; id?: Resolver; @@ -1904,6 +2170,7 @@ export type UserResolvers, ParentType, ContextType>; lastName?: Resolver; name?: Resolver, ParentType, ContextType>; + profileImage?: Resolver, ParentType, ContextType>; updatedAt?: Resolver; wallet?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; @@ -1941,7 +2208,9 @@ export type WebhookResolvers = { AcceptInvitePayload?: AcceptInvitePayloadResolvers; AccessToken?: AccessTokenResolvers; + ActionCost?: ActionCostResolvers; Affiliation?: AffiliationResolvers; + BlockchainCost?: BlockchainCostResolvers; Collection?: CollectionResolvers; CollectionCreator?: CollectionCreatorResolvers; CollectionMint?: CollectionMintResolvers; @@ -1953,8 +2222,11 @@ export type Resolvers = { CreateProjectPayload?: CreateProjectPayloadResolvers; CreateWebhookPayload?: CreateWebhookPayloadResolvers; Credential?: CredentialResolvers; + CreditDeposit?: CreditDepositResolvers; + Credits?: CreditsResolvers; Customer?: CustomerResolvers; DateTime?: GraphQLScalarType; + DeductionTotals?: DeductionTotalsResolvers; DeleteCredentialPayload?: DeleteCredentialPayloadResolvers; DeleteWebhookPayload?: DeleteWebhookPayloadResolvers; Drop?: DropResolvers; @@ -1980,7 +2252,10 @@ export type Resolvers = { Purchase?: PurchaseResolvers; Query?: QueryResolvers; ResumeDropPayload?: ResumeDropPayloadResolvers; + RetryMintPayload?: RetryMintPayloadResolvers; ShutdownDropPayload?: ShutdownDropPayloadResolvers; + Subscription?: SubscriptionResolvers; + TransferAssetPayload?: TransferAssetPayloadResolvers; Treasury?: TreasuryResolvers; UUID?: GraphQLScalarType; User?: UserResolvers; From 89d1d04f1d10c7d12d8bdb7ea182da15bc8f2d8f Mon Sep 17 00:00:00 2001 From: Anshul Goel Date: Thu, 8 Jun 2023 13:11:57 +0530 Subject: [PATCH 2/2] toast css, cleanup --- src/app/App.tsx | 2 +- src/app/layout.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index fcfbff1..2411f18 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -17,7 +17,7 @@ export default function App({ {children} - + ); diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 56606f0..40f6a52 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,3 +1,4 @@ +import 'react-toastify/dist/ReactToastify.css'; import './globals.css'; import { Inter } from '@next/font/google'; import clsx from 'clsx';