Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "spec/methods/private/private"

Index

Modules

CreateDapp

CreateDapp:

Create a new dapp. Accepts all properties from a full DappItem, except for the name, which the API infers by the path.

Args

Args: Omit<Full, "DappName">

Response

Response: MessageResponse

Result

Message ought to be something like, "Your dapp has been successfully created."

Const HTTP

HTTP: POST = "POST"

Const Path

Path: DappPath = DappPath

Given a DappName, return the fully scoped private path to create it.

param

isArgs

  • isArgs(val: any): boolean
  • Type guard; only returns true if all Item.Full attributes other than DappName have been correctly set. The underlying guard verifies that if it's an Enterprise Dapp, the GitHub config is set.

    Parameters

    • val: any

    Returns boolean

newArgs

  • Factory to produce an Args object with an empty string. Useful for getting the correct shape as a value, without having to hardcode strings.

    Returns Args

DeleteDapp

DeleteDapp:

Delete an existing dapp. Its DappName will be reclaimed for other users. Only works if the caller is the dapp's owner.

Args

Args: void

Body requires no arguments, email and DappName are taken from Authorization & path respectively.

Response

Response: MessageResponse

Result

Message will say something (not exactly) like, "Your dapp has been successfully deleted."

Const HTTP

HTTP: DELETE = "DELETE"

Const Path

Path: DappPath = DappPath

Given a DappName, returns its fully scoped private path

param

ListDapps

ListDapps:

List all of the dapp's owned by the calling user in their API representation.

Result

Result:

count

count: number

items

items: Api[]

Args

Args: void

Body requires no arguments, email and DappName are taken from Authorization & path respectively.

Response

Response: ApiResponse<Result>

Const HTTP

HTTP: GET = "GET"

Const Path

Path: string = privateBasePath

ReadDapp

ReadDapp:

Retrieve the API representation of any given dapp. Will not succeed if the caller is not the owner of said dapp. Gracefully returns with itemExists === false if the dapp does not exist.

FoundResult

FoundResult:

exists

exists: true

item

item: Api

NotFoundResult

NotFoundResult:

exists

exists: false

item

item: null

Args

Args: void

Body requires no arguments, email and DappName are taken from Authorization & path respectively.

Response

Response: ApiResponse<Result>

Result

Const HTTP

HTTP: GET = "GET"

Const Path

Path: DappPath = DappPath

Given a DappName, returns its fully scoped private path

param

UpdateDapp

UpdateDapp:

Update an existing dapp. An existing Dapp can only have its ABI, ContractAddr, Web3URL, & GuardianURL modified. Only works if the caller is the dapp's owner.

Args

Args: AtLeastOne<Omit<Core, "DappName">>

Response

Response: MessageResponse

Result

Message will say something (not exactly) like, "Your dapp has been successfully updated."

Const HTTP

HTTP: PUT = "PUT"

Const Path

Path: DappPath = DappPath

Given a DappName, returns its fully scoped path

param

isArgs

  • isArgs(val: any): boolean
  • Type guard; only returns true if one of the valid Item.Core update attributes has been set.

    Parameters

    • val: any

    Returns boolean

newArgs

  • Factory to produce a sample Args object. As the argument only requires one to be set, this arg would set the Web3URL to a blank string.

    Returns Args

Variables

Const privateBasePath

privateBasePath: string = `${apiBasePath}/${RootResources.private}`

Functions

DappPath

  • DappPath(DappName: string): string

Generated using TypeDoc