Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Garden

Index

Constructors

constructor

  • new Garden(connector: IGardenConnector, address: string): Garden
  • Create a new Garden instance.

    Parameters

    • connector: IGardenConnector

      A GardenConnector instance.

    • address: string

      The garden address.

    Returns Garden

Properties

Private #address

#address: string

Private #connector

#connector: IGardenConnector

Methods

config

  • Fetch the configuration of the garden.

    Returns Promise<Config>

    A promise that resolves to the configuratio of the garden.

disconnect

  • disconnect(): Promise<void>

onConfig

  • onConfig(callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in the configuration of the garden.

    Parameters

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to the configuratio of the garden.

onProposal

  • onProposal(params?: { appAddress: undefined | string; number: undefined | string }, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in a proposal of the garden.

    Parameters

    • params: { appAddress: undefined | string; number: undefined | string } = {}
      • appAddress: undefined | string

        The address of the Aragon application that have created the proposals.

      • number: undefined | string

        The proposal identification number.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to a proposal of the garden.

onProposals

  • onProposals(__namedParameters?: { first: undefined | number; metadata: undefined | string; orderBy: undefined | string; orderDirection: undefined | string; skip: undefined | number; statuses: undefined | number[]; types: undefined | number[] }, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates of a list of proposals of the garden.

    Parameters

    • __namedParameters: { first: undefined | number; metadata: undefined | string; orderBy: undefined | string; orderDirection: undefined | string; skip: undefined | number; statuses: undefined | number[]; types: undefined | number[] } = {}
      • first: undefined | number
      • metadata: undefined | string
      • orderBy: undefined | string
      • orderDirection: undefined | string
      • skip: undefined | number
      • statuses: undefined | number[]
      • types: undefined | number[]
    • callback: FunctionCallback

    Returns SubscriptionHandler

    A GraphQL subsription to a list of proposals of the garden.

onSupporter

  • onSupporter(params?: { id: undefined | string }, callback: FunctionCallback): SubscriptionHandler
  • Subscribe to updates in a supporter of the garden.

    Parameters

    • params: { id: undefined | string } = {}
      • id: undefined | string

        The identifier of the supporter to fetch.

    • callback: FunctionCallback

      A function callback to postprocess the result.

    Returns SubscriptionHandler

    A GraphQL subsription to a supporter of the garden.

proposal

  • proposal(params?: { appAddress: undefined | string; number: undefined | string }): Promise<Proposal>
  • Fetch a proposal of the garden.

    Parameters

    • params: { appAddress: undefined | string; number: undefined | string } = {}
      • appAddress: undefined | string

        The address of the Aragon application that have created the proposals.

      • number: undefined | string

        The proposal identification number.

    Returns Promise<Proposal>

    A promise that resolves to a proposal of the garden.

proposals

  • proposals(params?: { first: undefined | number; metadata: undefined | string; orderBy: undefined | string; orderDirection: undefined | string; skip: undefined | number; statuses: undefined | number[]; types: undefined | number[] }): Promise<Proposal[]>
  • Fetch a list of proposals of the garden.

    Parameters

    • params: { first: undefined | number; metadata: undefined | string; orderBy: undefined | string; orderDirection: undefined | string; skip: undefined | number; statuses: undefined | number[]; types: undefined | number[] } = {}

      A filters object.

      • first: undefined | number

        Number of entities to return.

      • metadata: undefined | string

        Filter by proposal name.

      • orderBy: undefined | string

        Filter to order the results.

      • orderDirection: undefined | string

        Direction to order the results.

      • skip: undefined | number

        Number of entities to skip.

      • statuses: undefined | number[]

        Filter by proposal status.

      • types: undefined | number[]

        Filter by proposal type.

    Returns Promise<Proposal[]>

    A promise that resolves to a list of proposals of the garden.

supporter

  • supporter(params?: { id: undefined | string }): Promise<Supporter>
  • Fetch a supporter of the garden.

    Parameters

    • params: { id: undefined | string } = {}
      • id: undefined | string

        The identifier of the supporter to fetch.

    Returns Promise<Supporter>

    A promise that resolves to a supporter of the garden.

Generated using TypeDoc