Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Class GNParam

A Parameter Configurator for Auth.Route / Data.Route definitions.

Pre-Made Parameters

Name Type Versions Description
Token header N/A An API-Token that session-user must pass in order to make requests.
Single query N/A A boolean that specifies wether to return a list or the first object within the list
Limit query ["SQL"] A result limit for pagination. An alternate, SQL-version exists for SQL queries.
Page query ["SQL"] A result page for pagination. An alternate, SQL-version exists for SQL queries.
CliIP query N/A When used, grabs the Client's IP Address.
ID query N/A Reserved - An arbitrary identifier for Client ReactComponents. As non-hidden query/body params are always sent back with the payload, this simply ensures a Component knows which result is its own.
UUID query N/A

Hierarchy

  • GNParam

Index

Constructors

Constructor Properties

Methods

Constructors

constructor

  • A Parameter Configurator for GNRequest Objects.

    Parameters

    Returns GNParam

Constructor Properties

Name

Name: string

The fullname of the Param.

Aliases

Aliases: string[]

An array of other names that will reference this GNParam (see: {@link CFG.PNTS.GNParam.aliases|GNParam.aliases}).

Default

Default: any

The default value for the Param. If this value is declare as function that returns the actual value, this default will be considered hidden, and will not appear in the REST-API Docs.

Format

Format: CBFormat

A callback that handles any post-processing needed before hydration.

Desc

Desc: GNDescr

A GNDescr object or {@link Params.Descr} config describing the GNParam.

Version

Version: object

The collection of alertnate versions of this GNParam.

Type declaration

hideDefault

hideDefault: boolean

This is true if a GNParam's {@link CFG.PNTS.Params.default|default} is enclosed within a callback instead of a direct value.

Methods

AddVersion

  • AddVersion(version: string, configs: Params, use: string, derived?: boolean): GNParam
  • Allows one to add another version of the GNParam.

    Parameters

    • version: string

      A string to represent this Version.

    • configs: Params

      Config properties for the GNParam object.

    • use: string

      A string specifying a version to derive from.

    • Default value derived: boolean = false

      If true, specifies that this Param is to be treated as a different Param.

    Returns GNParam

    The current GNParam, for chanining purposes.

toDoc

  • A OpenAPI representation of this Param.

    Parameters

    • name: string

      An optional Name to give the Param.

    Returns DocParam

    An OpenAPI 3.0 formatted, plain-object version of a GNParam.