Members
(constant) associatedEntityDiagrams
Datasets whose "missing associated entity" issue is a back reference to another dataset in the same collection, and the relationship diagram that explains that reference.
diagram is the slug used to build the diagram URL in the specification repo
(docs/specification/{diagram}/diagram.svg). It is stated explicitly rather than derived from
the dataset's collection because the two do not always agree: plan-timetable sits in the
local-plan collection but its diagram lives under plan.
parentDataset is the dataset the reference points at, and field is the back reference field
on the dataset itself. The diagram is only shown against that field's guidance.
listed-building-outline is deliberately absent: its associated entity is Historic England's
List Entry Number rather than a Planning Data dataset, so there is no relationship to diagram.
(constant) datasetStatusEnum
The values of this enum should match values of the 'status' column
in the query in fetchLpaOverview middleware
- Source:
(constant) diagramSlugs
The distinct diagrams referenced above, which is what we need to download.
(constant) diagramsPath
Path the downloaded diagrams are served from, relative to the public directory.
(constant) fetchLocalAuthorities
Fetches a list of local authority names from a specified dataset.
This function queries a dataset for local authorities, extracting a distinct list of names. It performs an HTTP GET request to retrieve the data, then processes the response to return only the names of the local authorities.
(constant) fieldToColumnMapping
- Source:
(constant) generatePaginatedGeoJsonLinks
- Source:
(constant) getDeadlineHistory
Calculates the deadline date and its historical dates (last year's deadline, two years ago's deadline) based on the provided deadline string.
- Source:
Example
const deadline = 'XXXX-03-15T14:30:00Z';
const deadlines = getDeadlineHistory(deadline);
console.log(deadlines);
// Output:
// {
// deadlineDate: <Date>,
// lastYearDeadline: <Date>,
// twoYearsAgoDeadline: <Date>
// }
(constant) getIssueDetails
Middleware. Renders the issue details page with the list of issues, entry data, and organisation and dataset details.
(constant) getIssueField
Returns a data in a format used by the govukSummaryList component.
(constant) getRequestData
Fetches a request and wraps it in a ResultData model.
Note the error handling: a 404 is rethrown unchanged so callers can tell "no such
request" apart from a genuine failure and redirect instead of erroring (the submit
wizard's guards rely on this). Every other failure is wrapped in a generic Error
with the original attached as cause.
Uses a hardcoded 15s timeout — config.asyncRequestApi.requestTimeout is declared in
config but not read here.
- Source:
(constant) invalidSchemaPaths
Extract invalid schema paths from a validation error
- Source:
(constant) isFeatureEnabled
- Source:
(constant) makeDatasetSlugToReadableNameFilter
Creates a filter function that takes a dataset slug as input and returns its corresponding readable name. The filter function uses a provided dataset name mapping to look up the readable name.
(constant) postCheckRequest
Creates a request from an already-built params object, without the field mapping
postUrlRequest and postFileRequest do. Used when resubmitting a check with user
supplied column mappings, where the params are copied from the original request.
- Source:
(constant) postFileRequest
Creates a check_file request for a file already uploaded to S3.
- Source:
(constant) postUrlRequest
Creates a check_url request for a user supplied endpoint URL.
Only requests of this type can go on to be provided — the submit wizard checks
type === 'check_url' before it will accept a request.
- Source:
(constant) prepareDatasetEndpointIssueTemplateParams
(constant) prepareGetOrganisationsTemplateParams
Middleware. Updates req with templateParams.
(constant) prepareTask
Middleware. Updates req.locals with task, field and issueType
(constant) proto
We wanto to override nunjucks.render() with a function that validates the params against a schema.
- Source:
(constant) render
Render a template with validation in non-production environments
If validation error is raised, it's logged and re-thrown.
Motivation: we want to ensure in development/test environments, that the data passed to our templates is valid. This will help us ensure that we're testing the right thing.
Note: Relies on config.environment
- Source:
(constant) requiredDatasets :Array.<RequiredDataset>
Type:
- Array.<RequiredDataset>
- Source:
(constant) show404ifNoIssues
(constant) splitByLeading
Makes sure the 'reference' and 'name' columns come first.
- Source:
(constant) statusToTagClassMapping
maps dataset status (as returned by fetchLpaOverview middleware to a
CSS class used by the govuk-tag component
- Source:
(constant) taskStatus :Object
Type:
- Object
- Source:
(constant) templateSchema
This acts as a registry of template -> schema for convenience.
- Source:
(constant) types
Types of logging events.
Use as a value for 'type' entry of info objects
- Source:
(constant) validDocumentationUrl
Validates the documentation ("source webpage") URL given during provide.
Stricter than validUrl, and encodes policy rather than syntax — it must be:
- http or https
- on a
gov.ukororg.ukhostname - a webpage, not a data file: paths ending
.csv,.json,.xml,.geojson,.zipor.xlsare rejected
The intent is that this URL points at the page which links to the endpoint, so a
human can find the data in context. datasetDetailsController separately rejects a
documentation URL equal to the endpoint URL.
- Source:
(constant) validEmail
True if the address is on a gov.uk or org.uk domain (including subdomains).
Narrower than a general email check by design: provide requests are expected to come from a public body, so a personal address is rejected at the form.
- Source:
(constant) validUrl
True if the string parses as a URL with an http or https protocol.
Deliberately permissive — this is the format check only. Whether the URL is reachable,
blocked or too large is decided later by the HEAD request in SubmitUrlController.
- Source:
(constant) validateGeomType
Conditional required rule for the geometry type field.
Unlike the other validators in this module it does not return a boolean. It returns
the list of hmpo validators to apply to the field, given the rest of the form's values —
['required'] when the dataset needs a geometry type, [] when it does not, which
makes the field optional rather than failing it.
- Source:
Methods
addInternalNoteToIssue(issueKey, note) → {Promise}
Adds an internal note (non-public comment) to an existing JIRA Service Desk issue.
Parameters:
| Name | Type | Description |
|---|---|---|
issueKey |
string | The key of the issue to which the note will be added. |
note |
string | The internal note body text. |
- Source:
Throws:
-
- Throws an error if JIRA_URL, JIRA_API_KEY, or JIRA_SERVICE_DESK_ID are not set.
- Type
- Error
Returns:
- A promise that resolves to the response of the JIRA API.
- Type
- Promise
aggregateIssues(req, res, next)
Aggregate issues by issue_type into tasks
Updates req with aggregatedTasks: Map<string, task> (keys are composites of issue type and field),
and tasks array.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
* | request |
res |
* | response |
next |
* | next function |
- Source:
attachFileToIssue(issueKey, file) → {Promise}
Attaches a file to an existing JIRA issue.
Parameters:
| Name | Type | Description |
|---|---|---|
issueKey |
string | The key of the issue to which the file will be attached. |
file |
File | The file to be attached to the issue. |
- Source:
Throws:
-
- Throws an error if JIRA_URL, JIRA_API_KEY, or JIRA_SERVICE_DESK_ID are not set.
- Type
- Error
Returns:
- A promise that resolves to the response of the JIRA API.
- Type
- Promise
availableDatasets(dataSubjects) → {Array.<Dataset>}
Gets the list of available datasets sorted by display text
Parameters:
| Name | Type | Description |
|---|---|---|
dataSubjects |
Object | Data subjects configuration object |
- Source:
Returns:
Array of available datasets sorted by text property
- Type
- Array.<Dataset>
(async) buildColumnMappingOptions()
Build the options object passed to the column-mapping template. Returns UI-friendly data including expected mapping rows, selectable uploaded columns and any validation errors so the view can render the mapping form.
checkToolDeepLink(organisation, dataset) → {string}
Returns the deep link to the check tool for a given dataset and organisation
Parameters:
| Name | Type | Description |
|---|---|---|
organisation |
Object | |
dataset |
Object |
- Source:
Returns:
- Type
- string
createCustomerRequest(summary, description, requestTypeId) → {Promise}
Creates a customer request in JIRA Service Desk.
Parameters:
| Name | Type | Description |
|---|---|---|
summary |
string | The summary of the customer request. |
description |
string | The description of the customer request. |
requestTypeId |
string | The ID of the request type. |
- Source:
Throws:
-
- Throws an error if JIRA_URL, JIRA_API_KEY, or JIRA_SERVICE_DESK_ID are not set.
- Type
- Error
Returns:
- A promise that resolves to the response of the JIRA API.
- Type
- Promise
diagramAltText(dataset, entry) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
dataset |
string | |
entry |
DiagramEntry |
- Source:
Returns:
- Type
- string
endpointSubmissionFormToolDeepLink(organisation, dataset, requestIdopt) → {string}
Returns the deep link to the endpoint submission form for a given dataset and organisation
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
organisation |
Object | ||
dataset |
Object | ||
requestId |
string |
<optional> |
Returns:
- Type
- string
(async) fetchDatasetTypology(req, res, next)
Middleware to fetch typology of dataset.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
* | request object |
res |
* | response object |
next |
* | next middleware function |
- Source:
fetchResponseDetails(req, res, next) → {Promise.<void>}
Parameters:
| Name | Type | Description |
|---|---|---|
req |
RequestWithDetails | Request object |
res |
Object | Response object |
next |
function | Next middleware function |
- Source:
Returns:
- Type
- Promise.<void>
(async) fetchResponseDetails(pageOffsetopt, limitopt, optsopt) → {Promise.<ResponseDetails>}
Fetches check results details, optionally filtered by issue (type and field), or severity (but not both).
Parameters:
| Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pageOffset |
number |
<optional> |
0 | Zero based page offset |
||||||||||||||||||||||||
limit |
number |
<optional> |
50 | Results per page limit |
||||||||||||||||||||||||
opts |
Object |
<optional> |
Filter options Properties
|
- Source:
Returns:
Response details
- Type
- Promise.<ResponseDetails>
formatData(columns, rows) → {Array.<object>}
Formats an array of rows into an easier to access format, where each row is an object with column names as keys.
Parameters:
| Name | Type | Description |
|---|---|---|
columns |
Array.<string> | An array of column names |
rows |
Array.<Array.<any>> | A 2D array of row data, where each inner array represents a row |
- Source:
Returns:
- An array of objects, where each object represents a row with column names as keys
- Type
- Array.<object>
getBlockingTasks(req, res, next)
Middleware. Updates req.locals with tasksBlocking and potentially updates
req.aggregatedTasks map with entries for missing columns.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
req |
Object | Express request object Properties
|
||||||
res |
Object | Response object |
||||||
next |
function | Next middleware function |
- Source:
getColumnFieldLog() → {Array.<any>}
- Source:
Returns:
- Type
- Array.<any>
getColumnFieldLog() → {Array.<Object>}
- Source:
Returns:
- Type
- Array.<Object>
getDatasets()
Map of dataset identifiers to their configuration objects
- Source:
getFields() → {Array.<string>}
Returns a collection of field names, where each name is either a column name from input data or field name from the column field log. The resulting collection includes fields that the submitted data might be missing.
Note: fields are converted_row.column | columnFieldLog.field
- Source:
Returns:
- Type
- Array.<string>
getFileNameOrUrlAndCheckedTime(req, res, next)
Middleware to extract file name, URL, and checked time from the request data.
Updates req.locals.uploadInfo with the extracted information.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
module:express~Request | The request object. |
res |
module:express~Response | The response object. |
next |
module:express~NextFunction | The next middleware function. |
- Source:
(async) getGeometries() → {Array.<any>|undefined}
Returns array of geometries when available, undefined otherwise.
- Source:
Returns:
- Type
- Array.<any> | undefined
getIssueTasks() → {Array.<{issue-type: string, field: string, count: number, severity: string, responsibility: string, summary: string}>}
Returns issue tasks from the task-log, filtering out internal issues and
normalising the shape ready for aggregateIssues.
- Source:
Returns:
- Type
- Array.<{issue-type: string, field: string, count: number, severity: string, responsibility: string, summary: string}>
getLastPage(req) → (nullable) {string}
Attempts to infer how we ended up on this page.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
- Source:
Returns:
- Type
- string
getNavigationLinks(currentUrl, links) → {Array.<object>}
Returns navigation links based on the provided page names and current URL.
Parameters:
| Name | Type | Description |
|---|---|---|
currentUrl |
string | The current URL. |
links |
Array.<string> | An array of page names for the links. |
- Source:
Returns:
An array of navigation link objects.
- Type
- Array.<object>
getPagination(pageNumber, optsopt) → {PaginationResult}
Get pagination details for the current response
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
pageNumber |
number | ||
opts |
PaginationOptions |
<optional> |
Pagination options |
- Source:
Returns:
Pagination result object
- Type
- PaginationResult
getRowsWithVerboseColumns(filterNonErrorsopt) → {Array.<object>}
Returns an array of rows with verbose columns, optionally filtering out rows without errors.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
filterNonErrors |
boolean |
<optional> |
false | If true, only return rows that have at least one error. |
- Source:
Returns:
An array of rows with verbose columns, each containing:
entryNumber: the entry number of the rowhasErrors: a boolean indicating whether the row has any errorscolumns: an array of verbose column details, each containing:key: the column keyvalue: the column valuecolumn: the column namefield: the field nameerror: an error message if data was missing
- Type
- Array.<object>
getSpecificationSubject(datasetOrSubject) → {string}
Get the specification identifier for a dataset or subject.
local-plan data uses the shared plan specification.
Parameters:
| Name | Type | Description |
|---|---|---|
datasetOrSubject |
string | Dataset or subject from the check request. |
Returns:
Specification identifier.
- Type
- string
getStatus(req, res) → {Promise.<object>}
Retrieves the status of a request by result ID.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
express.Request | The Express request object, with the |
res |
express.Response | The Express response object. |
- Source:
Returns:
Returns a JSON object with the request data if successful. If an error occurs, returns a JSON object with an error message and sets the HTTP status code to 500.
- Type
- Promise.<object>
getTasksByLevel(req, level, status)
Parameters:
| Name | Type | Description |
|---|---|---|
req |
* | request |
level |
number | criteria level |
status |
Status | status meta data |
- Source:
getVerboseColumns(row, columnFieldLog) → {Array.<Object>}
Returns an array of verbose column objects from a given row and column field log.
If either the column field log or issue logs are missing, returns a fallback array with warnings logged for missing data.
Parameters:
| Name | Type | Description |
|---|---|---|
row |
Object | The row object containing converted row data and issue logs. |
columnFieldLog |
Object | The column field log object. |
- Source:
Returns:
An array of verbose column objects, each containing:
key: the column keyvalue: the column valuecolumn: the column namefield: the field nameerror: an error message if data was missing
- Type
- Array.<Object>
hasBlockingNonColumnMappingTasks(requestData) → {Promise.<boolean>}
True if the request has issues serious enough that column mapping would not help.
"Serious" means an externally-owned issue at quality criteria level 2, excluding
missing column and missing-field — those are precisely the issues column mapping
exists to fix. Levels come from the issue_type table on datasette.
Parameters:
| Name | Type | Description |
|---|---|---|
requestData |
default |
- Source:
Returns:
- Type
- Promise.<boolean>
initialiseMessages()
Reads messages from CSV files and populates messages map.
- Source:
initiateJsHiddenChecks()
Initiates checks for elements with the class 'js-hidden' and updates their display and visibility styles accordingly.
When an element gains the 'js-hidden' class, its display and visibility styles are set to 'none' and 'hidden', respectively. When an element loses the 'js-hidden' class, its display and visibility styles are reset to their default values.
This function also hides any elements that already have the 'js-hidden' class when it is called.
- Source:
lpaOverviewQuery(lpa, params) → {string}
Generates a query for LPA overview data
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lpa |
string | The LPA identifier |
|||||||||||||||||||||||||
params |
Object | Query parameters Properties
|
- Source:
Returns:
The generated SQL query
- Type
- string
makeDatasetsLookup(dataSubjects) → {Map}
Flattens the nested dataSubjects object into a two-dimensional Map for quick lookup. Each entry in the returned Map uses the dataSet's value as the key and an object containing the dataSet properties along with its parent dataSubject key.
Parameters:
| Name | Type | Description |
|---|---|---|
dataSubjects |
Object | An object where each key is a dataSubject and its value contains a dataSets array. |
- Source:
Returns:
A Map where each key is a dataSet value and each value is the corresponding dataSet object with an added dataSubject property.
- Type
- Map
makeTaskParam(req, options) → {Object}
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
req |
Object | Express request object |
||||||||||||||||||||
options |
Object | Task options Properties
|
- Source:
Returns:
Task parameter object
- Type
- Object
maybeSetReferrer(req, sessionData)
Potentially updates sessionData with 'referrer'
Parameters:
| Name | Type | Description |
|---|---|---|
req |
||
sessionData |
maybeSetReferrer(req, sessionData)
Potentially updates sessionData with 'referrer'
Parameters:
| Name | Type | Description |
|---|---|---|
req |
||
sessionData |
(async) postRequest(formData) → {Promise.<string>}
POSTs a requeset to the 'publish' API.
Parameters:
| Name | Type | Description |
|---|---|---|
formData |
* |
- Source:
Returns:
uuid - unique id of the uploaded file
- Type
- Promise.<string>
(async) prepareColumnMappingContext()
Prepare the low-level data required to build the column mapping UI.
- Fetches response details and the column-field detection log from
requestData. - Builds
columnMappingRows(combined auto-detected + user overrides). - Resolves
specFieldsfrom the dataset andrequiredFieldsfrom config.
prepareEntity(req, res, next)
Updates req with entry object.
- takes an issueEntity (based on current
pageNumber) - selects
issuesfor that entity - creates a map of field names to objects (in shape required by govuk component)
- decorates (with some HTML markup) data in those objects if the field has issues
- potentially extracts geometry from the entity
Parameters:
| Name | Type | Description |
|---|---|---|
req |
Object | request object |
res |
Object | response object |
next |
function | next function |
(async) queryPlatformAPI(url, params) → {Promise.<Object>}
Generic query function for Platform API
Parameters:
| Name | Type | Description |
|---|---|---|
url |
string | The full URL to query |
params |
Object | Query parameters for logging |
- Source:
Returns:
- Raw response data from Platform API
- Type
- Promise.<Object>
readableDatasetName(slug) → {string}
Turns a dataset slug into the wording used in the alt text, e.g. 'plan-timetable' -> 'plan timetable'.
Deliberately not datasetSlugToReadableName: that is async, backed by datasette/redis, and returns title cased display names. Plain de-hyphenation matches the wording already used in the issue messages and reads naturally mid-sentence.
Parameters:
| Name | Type | Description |
|---|---|---|
slug |
string |
- Source:
Returns:
- Type
- string
referencePopup(options) → {string}
Contents of a popup element shows when user clicks on a geometry (point or polygon).
Parameters:
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
Returns:
- Type
- string
renewSubmittedEndpoint()
Renew the TTL of an owned reservation to prevent expiry during long operations. Only extends if the reservation's stored token still matches the provided token, preventing renewal of locks that were already released or acquired by someone else. Returns true if renewal succeeded, false otherwise.
- Source:
requiresGeometryTypeToBeSelected(req) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
req |
Object |
- Source:
Returns:
- Type
- boolean
requiresGeometryTypeToBeSelectedViaDeepLink(req) → {boolean}
Parameters:
| Name | Type | Description |
|---|---|---|
req |
Object | The HTTP request object. |
- Source:
Returns:
- Type
- boolean
reserveSubmittedEndpoint()
Atomically reserve an endpoint before starting the external submission work. Returns an ownership token when acquired, false when another request owns the reservation, or null when Redis is unavailable and submission should fail open.
- Source:
schemaIssues(error) → {Array.<Object>|Array.<string>|string}
Takes an Error and if it's a ValiError, returns an array of issue summaries (with paths). Empty array otherwise.
Useful to show the schema issues in a consise way.
Parameters:
| Name | Type | Description |
|---|---|---|
error |
Error | The error to check for schema issues |
- Source:
Returns:
-
Array of issue objects with path and message properties
- Type
- Array.<Object>
-
returns[].path - The path to the issue
- Type
- Array.<string>
-
returns[].message - The error message
- Type
- string
setPagination()
settleSubmittedEndpoint()
Keep an owned submission marker for the supplied TTL, or release it when the TTL is zero. The token comparison prevents one request from changing another request's reservation.
- Source:
setupNunjucks(config) → {Object}
Setup Nunjucks template engine with custom configuration
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | Configuration object Properties
|
- Source:
Returns:
Configured Nunjucks instance
- Type
- Object
setupTableParams(req, res, next) → {void}
Parameters:
| Name | Type | Description |
|---|---|---|
req |
RequestWithDetails | Request object |
res |
Object | Response object |
next |
function | Next middleware function |
- Source:
Returns:
- Type
- void
shouldShowColumnMapping(requestData, uniqueDatasetFieldsopt) → {Promise.<boolean>}
Decides whether to offer the user the column-mapping step after a check.
The step is only worth showing when the user has spare uploaded columns that could be
mapped to dataset fields the pipeline did not recognise. Returns false — i.e. skip the
step — on any of:
- the request has not finished, or failed
- the dataset is statutory (mappings are not offered for these)
- there are blocking issues that column mapping would not fix
(see
hasBlockingNonColumnMappingTasks) - the user already supplied a column mapping — a resubmitted request never asks again
- every expected field is already mapped
- there are no unused uploaded columns left to map from
geometry and point are treated as interchangeable: if one is mapped, the other is
not counted as missing.
Any thrown error is swallowed and treated as false, so a failure here can never block
the results page.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
requestData |
default | ||
uniqueDatasetFields |
Array.<string> |
<optional> |
restricts consideration to these fields when given |
- Source:
Returns:
- Type
- Promise.<boolean>
updateSessionFromRequestData(req)
Middleware. Repairs the check wizard session from the request being viewed.
This is what makes a results URL shareable. Someone arriving at
/check/results/:id/1 from a link — rather than by walking the wizard — has no
request_id or upload-method in session, so the confirmation page would not offer
them the "Provide your data" button. Setting both here means the handover to submit
works identically whichever way the page was reached.
upload-method is only set for check_url requests: a file check has no endpoint to
provide, so it must not gain the button.
Parameters:
| Name | Type | Description |
|---|---|---|
req |
object | expects |
- Source:
validationErrorMessage(error, template)
Creates an error message from the given error
Parameters:
| Name | Type | Description |
|---|---|---|
error |
ValiError | validation error |
template |
string | template name |
- Source:
Returns:
string
wasEndpointRecentlySubmitted()
Check whether an endpoint is currently being processed or was submitted recently. Redis failures return false so the existing Datasette duplicate check can still run.
- Source:
withAssociatedEntityDiagram(fieldSpecificationopt, datasetopt) → {FieldSpecification|undefined}
Appends the relationship diagram to a field's guidance, for datasets whose reference back to another dataset can raise a 'missing associated entity' issue.
The diagram is attached to the back reference field rather than to a particular issue type, so it is also shown for e.g. a missing value on the same field - the relationship is worth explaining either way. Returns the specification unchanged when the dataset or field doesn't have a diagram.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
fieldSpecification |
FieldSpecification |
<optional> |
|
dataset |
string |
<optional> |
- Source:
Returns:
- Type
- FieldSpecification | undefined
wizardBackLink(url, deepLinkInfo) → {string|undefined}
If we arrived at the page via deep from another page, we'll use that page as the back link.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | current page URL |
||||||||||||
deepLinkInfo |
Object | deep link info from the session Properties
|
- Source:
Returns:
back link URL
- Type
- string | undefined
Type Definitions
ConfigSchema
Type:
- Object
- Source:
Dataset
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
status |
string | One of: 'Not submitted', 'Error', 'Needs improving', 'Warning', 'Live' |
|
endpoint |
string | ||
issue_count |
number | ||
error |
string |
<nullable> |
- Source:
Dataset
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
string | Dataset value/identifier |
|
text |
string | Display text for the dataset |
|
available |
boolean | Whether the dataset is available |
|
dataSubject |
string | The data subject this dataset belongs to |
|
requiresGeometryTypeSelection |
boolean |
<optional> |
Whether geometry type selection is required |
- Source:
DatasetInfo
Properties:
| Name | Type | Description |
|---|---|---|
name |
string | Full name of the dataset |
dataset |
string | Short name of the dataset (aka 'slug') |
- Source:
DetailsOptions
Type:
- Object
Properties:
| Name | Type | Attributes | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
severity |
string |
<optional> |
Severity filter |
|||||||||
issue |
Object |
<optional> |
Issue filter Properties
|
- Source:
DiagramEntry
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
diagram |
string | slug of the diagram in the specification repo |
parentDataset |
string | the dataset the reference points at |
field |
string | the back reference field on the dataset itself |
- Source:
FieldSpecification
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
field |
string | ||
guidance |
string |
<optional> |
- Source:
Issue
Properties:
| Name | Type | Description |
|---|---|---|
status |
string | |
issue_type |
string | |
field |
string |
- Source:
LeadingTrailingSplit
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
leading |
Array.<string> | |
trailing |
Array.<string> |
- Source:
LpaOverview
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
datasets |
Object.<string, Dataset> | Map of dataset names to Dataset objects |
- Source:
MapGeometry
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
geo |
string | ||
reference |
string |
<optional> |
|
name |
string |
<optional> |
- Source:
MapOptions
Options for creating a Map instance.
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
containerId |
string | Required - The ID of the HTML container element for the map. |
|
data |
Array.<string> | Array.<MapGeometry> | Required - An array of URLs or WKT geometries to be added to the map. |
|
boundaryGeoJsonUrl |
string |
<optional> |
Optional - The URL of the boundary GeoJSON to be added to the map. |
interactive |
boolean |
<optional> |
Optional - Indicates whether the map should be interactive. Default is true. |
wktFormat |
boolean |
<optional> |
Optional - Indicates whether the data is in WKT format. Default is false. |
limitMaxZoom |
boolean |
<optional> |
Optional - Indicates whether to limit the maximum zoom level when fitting bounds. Default is false. |
boundingBox |
Array.<number> |
<optional> |
Optional - The bounding box coordinates [minX, minY, maxX, maxY] to set the initial view of the map. |
- Source:
OrgInfo
Properties:
| Name | Type | Description |
|---|---|---|
name |
string | Full name of the organisation |
organisation |
string |
- Source:
PaginationItem
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
href |
string | Link URL |
|
ellipsis |
boolean |
<optional> |
Whether this is an ellipsis item |
- Source:
PaginationOptions
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
hash |
string |
<optional> |
Hash option (should include the '#' character) |
href |
function |
<optional> |
Function to generate href (item: number) => string |
- Source:
PaginationResult
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
totalResults |
number | Total number of results |
offset |
number | Current offset |
limit |
number | Results per page limit |
currentPage |
number | Current page number |
nextPage |
number | null | Next page number or null |
previousPage |
number | null | Previous page number or null |
totalPages |
number | Total number of pages |
items |
Array.<{href: string}> | Pagination items with hrefs |
- Source:
RequestWithDetails
Type:
- Object
Properties:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parsedParams |
Object | |||||||||||||||||||||
locals |
Object | Request locals Properties
|
- Source:
RequiredDataset
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
dataset |
string | The dataset identifier |
deadline |
string | The deadline pattern in ISO format with YYYY placeholder |
noticePeriod |
number | Number of months before deadline to show notice |
- Source:
Source
Properties:
| Name | Type | Description |
|---|---|---|
endpoint |
string | |
endpoint_url |
string | |
status |
number | null | |
exception |
string | |
latest_log_entry_date |
string | |
resource_start_date |
string | |
documentation_url |
string |
- Source:
Status
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
text |
string | Status text |
link |
boolean | Whether status has a link |
colour |
string | Status color |
- Source:
SummaryItem
Type:
- Object
Properties:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
key |
Object |
Properties
|
|||||||||
value |
Object |
Properties
|
|||||||||
classes |
string |
TaskMessageOptions
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
issue_type |
string | Type of issue |
|
num_issues |
number | Number of issues |
|
rowCount |
number | Total row count |
|
field |
string | Field name |
|
format |
'html' | 'text' |
<optional> |
Output format |
dataset |
string |
<optional> |
Dataset name for dataset-specific messages |
- Source: