Options
All
  • Public
  • Public/Protected
  • All
Menu
     

Interface Method

RouteAU-specific config-properties based on the QueryGN interface.

Hierarchy

Index

Describer Properties

Handler Properties

Restrictive Properties

Describer Properties

Optional Scheme

Scheme: String

A RegexP, string-representation of the Route Path.

Optional Merge

Merge: boolean | HMETHOD

A flag the specifies whether or not, and if so, how to prepend the path-parameters of the last parent-Endpoint referenced in Sub (along with the merge of its own parent; if applicable) to the path-name/parameters of this Endpoint:

  • If true, the Scheme from the parent-Endpoint will be prepended to this Scheme of this Endpoint.
  • If set as an HMETHOD, then the system will use the Scheme defined in the parent-Endpoint's CBRouteAU/CBRouteDB definition of the same HMETHOD. Otherwise, it choose the first Scheme found within each parent.
  • Defined in a method (see: Uses below), and set to true, then the system will look for that method deinition within the parent and choose that Scheme. Otherwise, the first Scheme found is chosen.

Example:

({
  User: {
    Actions: {
      Password: new RouteDB({
        Merge: true,
        Subs: ['settings','privacy'], // Child of "Settings"
        GET: () => ({ ... }), // Merge to "Privacy.GET"
        // ^ Resolves to "/user/:uid/settings/privacy/:prv_id/password"
      }),
      Email: new RouteDB({
        Merge: 'POST', // Merge to "Privacy.POST"
        Subs: ['settings','privacy'], // Child of "Settings"
        GET: () => ({ ... }),
        // ^ Resolves to "/user/:uid/settings/privacy/email"
      }),
      Privacy: new RouteDB({
        Scheme: '/:prv_id/', // Defult for any Method defined within
        Subs: ['settings'], // Child of "Settings".
        Merge: true,
        GET: () => ({ ... }),
        // ^ Merge to "Settings.GET",
        // ^ Resolves to "/user/:uid/settings/privacy/:prv_id"
        POST: () => ({ Scheme: '/' })
        // ^ Merge to "Settings.GET", Scheme redefined to "/"
        // ^ Resolves to "/user/:uid/settings/privacy"
      }),
      Settings: new RouteDB({
        Merge: true,
        GET: () => ({ ... }),
        // ^ Sub not defined, is child of "/"
        // ^ Resolves to "/user/:uid/settings"
      }),
      "/": new RouteDB({
        Scheme: '/:uid/',
        GET: () => ({ ... }),
        // ^ Resolves to "/user/:uid"
      }),
    }
  }
});

Uses:

Optional Limits

Limits: String[]

A list of Limits to subscribe to.

Optional Doc

Doc: Doc

The documentation for Methods in this Route.

Handler Properties

Proc

Proc: CLProcs

The collection of handlers for an Auth.Method.

Restrictive Properties

Optional Private

Private: boolean

true, if this Endpoint is restricted to Admins.