GitHub

DaffExternallyResolvableUrl

import { DaffExternallyResolvableUrl } from '@daffodil/external-router'

A DaffExternallyResolvableUrl describes the relationship between a "type" of route as determined by an external platform and a URI.

interface DaffExternallyResolvableUrl {
  url: string
  type: string
  code: number
  data: DaffRouteData
}

Properties

url
string

The URL that will be used for the path of the route inserted into the Angular routing config. Should not contain URL fragments, query parameters, or leading slashes.

type
string

The type of the route

code
number

The HTTP status code for the resolvable route.

data
DaffRouteData

Additional route data. Note that this is not guaranteed to come from the driver, its only available when the driver makes it available.

Examples

export const resolvableRoute: DaffExternallyResolvableUrl = {
 id: "id-of-resource",
    url: "some/path/to-a-resource",
    type: "RESOURCE_TYPE"
}