storefront-service-api

GraphQL API Reference

GraphQl endpoints for storefront-service!

API Endpoints

# devel:
https://storefront-service.devel.original.works
# staging:
https://storefront-service.stage.original.works
# prod:
https://storefront-service.original.works

Queries

collectionEntities

Response

Returns a CollectionEntityConnection!

Arguments

NameDescription

Specify to filter the records returned. Default = {}

paging - OffsetPaging!

Limit or page results. Default = {limit: 10}

Specify to sort results. Default = []

Example

Query

query CollectionEntities(
  $filter: CollectionEntityFilter!,
  $paging: OffsetPaging!,
  $sorting: [CollectionEntitySort!]!
) {
  collectionEntities(
    filter: $filter,
    paging: $paging,
    sorting: $sorting
  ) {
    nodes {
      avatarUrl
      bannerUrl
      createdAt
      description
      email
      entityUri
      id
      name
      networkConfigs {
        ...NetworkConfigFragment
      }
      redirectDomains {
        ...RedirectDomainFragment
      }
      tenant {
        ...TenantFragment
      }
      tenantId
      type
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    totalCount
  }
}

Variables

{"filter": {}, "paging": {"limit": 10}, "sorting": [""]}

Response

{
  "data": {
    "collectionEntities": {
      "nodes": [CollectionEntity],
      "pageInfo": OffsetPageInfo,
      "totalCount": 123
    }
  }
}

Queries

collectionEntity

Response

Returns a CollectionEntity!

Arguments

NameDescription

id - ID!

The id of the record to find.

Example

Query

query CollectionEntity($id: ID!) {
  collectionEntity(id: $id) {
    avatarUrl
    bannerUrl
    createdAt
    description
    email
    entityUri
    id
    name
    networkConfigs {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    redirectDomains {
      domain
    }
    tenant {
      createdAt
      id
      name
      paymentBatcherAddress
      tenantUri
      updatedAt
    }
    tenantId
    type
    updatedAt
  }
}

Variables

{"id": "4"}

Response

{
  "data": {
    "collectionEntity": {
      "avatarUrl": "abc123",
      "bannerUrl": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "email": "abc123",
      "entityUri": "xyz789",
      "id": 4,
      "name": "xyz789",
      "networkConfigs": [NetworkConfig],
      "redirectDomains": [RedirectDomain],
      "tenant": Tenant,
      "tenantId": 4,
      "type": "ARTIST",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Queries

collectionEntityRelation

Response

Returns a CollectionEntityRelation!

Arguments

NameDescription

id - ID!

The id of the record to find.

Example

Query

query CollectionEntityRelation($id: ID!) {
  collectionEntityRelation(id: $id) {
    childEntityId
    createdAt
    id
    network {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    parentEntityId
    relationType
    tenant {
      createdAt
      id
      name
      paymentBatcherAddress
      tenantUri
      updatedAt
    }
    tenantId
    updatedAt
  }
}

Variables

{"id": "4"}

Response

{
  "data": {
    "collectionEntityRelation": {
      "childEntityId": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "network": NetworkConfig,
      "parentEntityId": "xyz789",
      "relationType": "ENTERPIRSE_ARTIST",
      "tenant": Tenant,
      "tenantId": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Queries

collectionEntityRelations

Response

Returns a CollectionEntityRelationConnection!

Arguments

NameDescription

Specify to filter the records returned. Default = {}

paging - OffsetPaging!

Limit or page results. Default = {limit: 10}

Specify to sort results. Default = []

Example

Query

query CollectionEntityRelations(
  $filter: CollectionEntityRelationFilter!,
  $paging: OffsetPaging!,
  $sorting: [CollectionEntityRelationSort!]!
) {
  collectionEntityRelations(
    filter: $filter,
    paging: $paging,
    sorting: $sorting
  ) {
    nodes {
      childEntityId
      createdAt
      id
      network {
        ...NetworkConfigFragment
      }
      parentEntityId
      relationType
      tenant {
        ...TenantFragment
      }
      tenantId
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    totalCount
  }
}

Variables

{"filter": {}, "paging": {"limit": 10}, "sorting": [""]}

Response

{
  "data": {
    "collectionEntityRelations": {
      "nodes": [CollectionEntityRelation],
      "pageInfo": OffsetPageInfo,
      "totalCount": 987
    }
  }
}

Queries

contactByNickName

Description

Returns a contact by nickname.

Response

Returns a ContactDto!

Arguments

NameDescription

nickName - String!

nick name of a contact

Example

Query

query ContactByNickName($nickName: String!) {
  contactByNickName(nickName: $nickName) {
    createdAt
    id
    nickName
    ownerUri
    updatedAt
    walletAddress
  }
}

Variables

{"nickName": "xyz789"}

Response

{
  "data": {
    "contactByNickName": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 987.65,
      "nickName": "xyz789",
      "ownerUri": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z",
      "walletAddress": "abc123"
    }
  }
}

Queries

contactByWalletAddress

Description

Returns a contact by wallet address.

Response

Returns a ContactDto!

Arguments

NameDescription

walletAddress - String!

wallet address of a contact

Example

Query

query ContactByWalletAddress($walletAddress: String!) {
  contactByWalletAddress(walletAddress: $walletAddress) {
    createdAt
    id
    nickName
    ownerUri
    updatedAt
    walletAddress
  }
}

Variables

{"walletAddress": "abc123"}

Response

{
  "data": {
    "contactByWalletAddress": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 987.65,
      "nickName": "xyz789",
      "ownerUri": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z",
      "walletAddress": "abc123"
    }
  }
}

Queries

contacts

Description

Returns contacts of a contactBook entity.

Response

Returns a ContactsDto!

Example

Query

query Contacts {
  contacts {
    count
    items {
      createdAt
      id
      nickName
      ownerUri
      updatedAt
      walletAddress
    }
  }
}

Response

{
  "data": {
    "contacts": {"count": 987.65, "items": [ContactDto]}
  }
}

Queries

getEntityByTokenPayload

Response

Returns a CollectionEntity!

Example

Query

query GetEntityByTokenPayload {
  getEntityByTokenPayload {
    avatarUrl
    bannerUrl
    createdAt
    description
    email
    entityUri
    id
    name
    networkConfigs {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    redirectDomains {
      domain
    }
    tenant {
      createdAt
      id
      name
      paymentBatcherAddress
      tenantUri
      updatedAt
    }
    tenantId
    type
    updatedAt
  }
}

Response

{
  "data": {
    "getEntityByTokenPayload": {
      "avatarUrl": "xyz789",
      "bannerUrl": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "email": "xyz789",
      "entityUri": "xyz789",
      "id": 4,
      "name": "xyz789",
      "networkConfigs": [NetworkConfig],
      "redirectDomains": [RedirectDomain],
      "tenant": Tenant,
      "tenantId": 4,
      "type": "ARTIST",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Queries

networkConfigByNameV2

Description

Returns networkConfig for given network name

Response

Returns a NetworkConfigV2Model!

Arguments

NameDescription

networkName - NetworkName!

Example

Query

query NetworkConfigByNameV2($networkName: NetworkName!) {
  networkConfigByNameV2(networkName: $networkName) {
    agreementFactoryAddress
    agreementSubgraphUrl
    capabilities {
      networkCapability
    }
    chainId
    createdAt
    currencies {
      lendingToken {
        ...CurrencyModelFragment
      }
      nativeCoin {
        ...CurrencyModelFragment
      }
      otherCurrencies {
        ...CurrencyModelFragment
      }
    }
    explorer
    feeManagerAddress
    id
    ipfsEndpoint
    jsonRpcUrl
    lendingContractAddress
    marketAddress
    marketOwner
    networkName
    nftSubgraphUrl
    updatedAt
  }
}

Variables

{"networkName": "amoy"}

Response

{
  "data": {
    "networkConfigByNameV2": {
      "agreementFactoryAddress": "xyz789",
      "agreementSubgraphUrl": "abc123",
      "capabilities": [NetworkCapabilitiesModel],
      "chainId": 987.65,
      "createdAt": "2007-12-03T10:15:30Z",
      "currencies": CurrenciesModel,
      "explorer": "abc123",
      "feeManagerAddress": "abc123",
      "id": "xyz789",
      "ipfsEndpoint": "xyz789",
      "jsonRpcUrl": "abc123",
      "lendingContractAddress": "xyz789",
      "marketAddress": "xyz789",
      "marketOwner": "xyz789",
      "networkName": "amoy",
      "nftSubgraphUrl": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Queries

networkConfigs

Response

Returns a NetworkConfigConnection!

Arguments

NameDescription

Specify to filter the records returned. Default = {}

paging - OffsetPaging!

Limit or page results. Default = {limit: 10}

Specify to sort results. Default = []

Example

Query

query NetworkConfigs(
  $filter: NetworkConfigFilter!,
  $paging: OffsetPaging!,
  $sorting: [NetworkConfigSort!]!
) {
  networkConfigs(
    filter: $filter,
    paging: $paging,
    sorting: $sorting
  ) {
    nodes {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
    totalCount
  }
}

Variables

{"filter": {}, "paging": {"limit": 10}, "sorting": [""]}

Response

{
  "data": {
    "networkConfigs": {
      "nodes": [NetworkConfig],
      "pageInfo": OffsetPageInfo,
      "totalCount": 123
    }
  }
}

Queries

networkConfigsV2

Description

Returns list of networkConfigs

Response

Returns [NetworkConfigV2Model!]!

Example

Query

query NetworkConfigsV2 {
  networkConfigsV2 {
    agreementFactoryAddress
    agreementSubgraphUrl
    capabilities {
      networkCapability
    }
    chainId
    createdAt
    currencies {
      lendingToken {
        ...CurrencyModelFragment
      }
      nativeCoin {
        ...CurrencyModelFragment
      }
      otherCurrencies {
        ...CurrencyModelFragment
      }
    }
    explorer
    feeManagerAddress
    id
    ipfsEndpoint
    jsonRpcUrl
    lendingContractAddress
    marketAddress
    marketOwner
    networkName
    nftSubgraphUrl
    updatedAt
  }
}

Response

{
  "data": {
    "networkConfigsV2": [
      {
        "agreementFactoryAddress": "abc123",
        "agreementSubgraphUrl": "abc123",
        "capabilities": [NetworkCapabilitiesModel],
        "chainId": 123.45,
        "createdAt": "2007-12-03T10:15:30Z",
        "currencies": CurrenciesModel,
        "explorer": "abc123",
        "feeManagerAddress": "xyz789",
        "id": "xyz789",
        "ipfsEndpoint": "abc123",
        "jsonRpcUrl": "abc123",
        "lendingContractAddress": "abc123",
        "marketAddress": "xyz789",
        "marketOwner": "xyz789",
        "networkName": "amoy",
        "nftSubgraphUrl": "xyz789",
        "updatedAt": "2007-12-03T10:15:30Z"
      }
    ]
  }
}

Queries

publicNetworkConfigsV2

Description

Returns list of networkConfigs without sensitive data

Response

Returns [NetworkConfigPublicModel!]!

Example

Query

query PublicNetworkConfigsV2 {
  publicNetworkConfigsV2 {
    capabilities {
      networkCapability
    }
    chainId
    networkName
    studioPublicJsonRpcUrl
  }
}

Response

{
  "data": {
    "publicNetworkConfigsV2": [
      {
        "capabilities": [NetworkCapabilitiesModel],
        "chainId": 987.65,
        "networkName": "amoy",
        "studioPublicJsonRpcUrl": "abc123"
      }
    ]
  }
}

Queries

testConfig

Response

Returns a String!

Example

Query

query TestConfig {
  testConfig
}

Response

{"data": {"testConfig": "abc123"}}

Mutations

createContact

Description

Create contact record. Returns record of the contactBook entity.

Response

Returns a ContactDto!

Arguments

NameDescription

nickName - String!

nick name of a contact

walletAddress - String!

wallet address of a contact

Example

Query

mutation CreateContact(
  $nickName: String!,
  $walletAddress: String!
) {
  createContact(
    nickName: $nickName,
    walletAddress: $walletAddress
  ) {
    createdAt
    id
    nickName
    ownerUri
    updatedAt
    walletAddress
  }
}

Variables

{
  "nickName": "abc123",
  "walletAddress": "abc123"
}

Response

{
  "data": {
    "createContact": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 123.45,
      "nickName": "abc123",
      "ownerUri": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z",
      "walletAddress": "xyz789"
    }
  }
}

Mutations

createOneCollectionEntity

Response

Returns a CollectionEntity!

Arguments

NameDescription

Example

Query

mutation CreateOneCollectionEntity($input: CreateOneCollectionEntityInput!) {
  createOneCollectionEntity(input: $input) {
    avatarUrl
    bannerUrl
    createdAt
    description
    email
    entityUri
    id
    name
    networkConfigs {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    redirectDomains {
      domain
    }
    tenant {
      createdAt
      id
      name
      paymentBatcherAddress
      tenantUri
      updatedAt
    }
    tenantId
    type
    updatedAt
  }
}

Variables

{"input": CreateOneCollectionEntityInput}

Response

{
  "data": {
    "createOneCollectionEntity": {
      "avatarUrl": "abc123",
      "bannerUrl": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "xyz789",
      "email": "xyz789",
      "entityUri": "abc123",
      "id": "4",
      "name": "xyz789",
      "networkConfigs": [NetworkConfig],
      "redirectDomains": [RedirectDomain],
      "tenant": Tenant,
      "tenantId": 4,
      "type": "ARTIST",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Mutations

createRelation

Response

Returns a CollectionEntityRelation!

Arguments

NameDescription

Example

Query

mutation CreateRelation($createRelation: CreateCollectionEntityRelation!) {
  createRelation(createRelation: $createRelation) {
    childEntityId
    createdAt
    id
    network {
      activitiesSubgraphUrl
      agreementFactoryAddress
      agreementSubgraphUrl
      alchemyApiKey
      capabilities {
        ...NetworkCapabilityFragment
      }
      chainId
      createdAt
      defaultStripeFeeInPercent
      dmmAddress
      feeManagerAddress
      id
      jsonRpcUrl
      lendingContractAddress
      marketAddress
      marketOwner
      nativeCoin
      nativeCoinDecimals
      networkName
      nftSubgraphUrl
      paymentBatcherFactoryAddress
      studioPublicJsonRpcUrl
      updatedAt
    }
    parentEntityId
    relationType
    tenant {
      createdAt
      id
      name
      paymentBatcherAddress
      tenantUri
      updatedAt
    }
    tenantId
    updatedAt
  }
}

Variables

{"createRelation": CreateCollectionEntityRelation}

Response

{
  "data": {
    "createRelation": {
      "childEntityId": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": "4",
      "network": NetworkConfig,
      "parentEntityId": "xyz789",
      "relationType": "ENTERPIRSE_ARTIST",
      "tenant": Tenant,
      "tenantId": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Mutations

createS3Url

Description

🔒 JWT Token

Creates an s3 url for enterprise's avatar or banner

Response

Returns a S3LinkRes!

Arguments

NameDescription

s3ReqDto - S3LinkReq!

🔒 JWT Token

defines fileName and contentType

Example

Query

mutation CreateS3Url($s3ReqDto: S3LinkReq!) {
  createS3Url(s3ReqDto: $s3ReqDto) {
    uploadUrl
  }
}

Variables

{"s3ReqDto": S3LinkReq}

Response

{
  "data": {
    "createS3Url": {"uploadUrl": "xyz789"}
  }
}

Mutations

deleteContact

Description

Delete contact record. Returns record of the contactBook entity.

Response

Returns a ContactDto!

Arguments

NameDescription

id - Float!

id of a contact

Example

Query

mutation DeleteContact($id: Float!) {
  deleteContact(id: $id) {
    createdAt
    id
    nickName
    ownerUri
    updatedAt
    walletAddress
  }
}

Variables

{"id": 123.45}

Response

{
  "data": {
    "deleteContact": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 123.45,
      "nickName": "abc123",
      "ownerUri": "abc123",
      "updatedAt": "2007-12-03T10:15:30Z",
      "walletAddress": "xyz789"
    }
  }
}

Mutations

deleteManyCollectionEntities

Response

Returns a DeleteManyResponse!

Arguments

NameDescription

Example

Query

mutation DeleteManyCollectionEntities($input: DeleteManyCollectionEntitiesInput!) {
  deleteManyCollectionEntities(input: $input) {
    deletedCount
  }
}

Variables

{"input": DeleteManyCollectionEntitiesInput}

Response

{"data": {"deleteManyCollectionEntities": {"deletedCount": 987}}}

Mutations

deleteManyRelations

Response

Returns a DeleteManyResponse!

Arguments

Example

Query

mutation DeleteManyRelations($input: DeleteManyCollectionEntityRelationsInput!) {
  deleteManyRelations(input: $input) {
    deletedCount
  }
}

Variables

{"input": DeleteManyCollectionEntityRelationsInput}

Response

{"data": {"deleteManyRelations": {"deletedCount": 123}}}

Mutations

deleteOneCollectionEntity

Response

Returns a CollectionEntityDeleteResponse!

Arguments

NameDescription

Example

Query

mutation DeleteOneCollectionEntity($input: DeleteOneCollectionEntityInput!) {
  deleteOneCollectionEntity(input: $input) {
    avatarUrl
    bannerUrl
    createdAt
    description
    email
    entityUri
    id
    name
    tenantId
    type
    updatedAt
  }
}

Variables

{"input": DeleteOneCollectionEntityInput}

Response

{
  "data": {
    "deleteOneCollectionEntity": {
      "avatarUrl": "abc123",
      "bannerUrl": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "description": "abc123",
      "email": "abc123",
      "entityUri": "abc123",
      "id": 4,
      "name": "xyz789",
      "tenantId": 4,
      "type": "ARTIST",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Mutations

deleteOneRelation

Response

Returns a CollectionEntityRelationDeleteResponse!

Arguments

Example

Query

mutation DeleteOneRelation($input: DeleteOneCollectionEntityRelationInput!) {
  deleteOneRelation(input: $input) {
    childEntityId
    createdAt
    id
    parentEntityId
    relationType
    tenantId
    updatedAt
  }
}

Variables

{"input": DeleteOneCollectionEntityRelationInput}

Response

{
  "data": {
    "deleteOneRelation": {
      "childEntityId": "xyz789",
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 4,
      "parentEntityId": "abc123",
      "relationType": "ENTERPIRSE_ARTIST",
      "tenantId": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z"
    }
  }
}

Mutations

updateContact

Description

Update contact record. Returns record of the contactBook entity.

Response

Returns a ContactDto!

Arguments

NameDescription

id - Float!

id of a contact

nickName - String

nick name of a contact

walletAddress - String

wallet address of a contact

Example

Query

mutation UpdateContact(
  $id: Float!,
  $nickName: String,
  $walletAddress: String
) {
  updateContact(
    id: $id,
    nickName: $nickName,
    walletAddress: $walletAddress
  ) {
    createdAt
    id
    nickName
    ownerUri
    updatedAt
    walletAddress
  }
}

Variables

{
  "id": 123.45,
  "nickName": "abc123",
  "walletAddress": "abc123"
}

Response

{
  "data": {
    "updateContact": {
      "createdAt": "2007-12-03T10:15:30Z",
      "id": 123.45,
      "nickName": "xyz789",
      "ownerUri": "xyz789",
      "updatedAt": "2007-12-03T10:15:30Z",
      "walletAddress": "abc123"
    }
  }
}

Mutations

updateManyCollectionEntities

Response

Returns an UpdateManyResponse!

Arguments

NameDescription

Example

Query

mutation UpdateManyCollectionEntities($input: UpdateManyCollectionEntitiesInput!) {
  updateManyCollectionEntities(input: $input) {
    updatedCount
  }
}

Variables

{"input": UpdateManyCollectionEntitiesInput}

Response