-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05fe2df
commit f5b402f
Showing
6 changed files
with
137 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,36 @@ | ||
import {DateTime, URL, UUID} from './../utils'; | ||
|
||
export interface Metadata { | ||
/** | ||
* @id #DigitalPlanningMetadata | ||
* @description Details of the digital planning service which sent this application | ||
*/ | ||
export type Metadata = BaseMetadata | PlanXMetadata; | ||
|
||
/** | ||
* @id #BaseMetadata | ||
* @description Minimum metadata expected for any application | ||
*/ | ||
export interface BaseMetadata { | ||
/** | ||
* @description UK Local Authority that this application is being submitted to | ||
*/ | ||
organisation: string; // @todo align to DLUHC Planning Application API curie | ||
/** | ||
* @id #DigitalPlanningMetadata | ||
* @description Details of the digital planning service which sent the application | ||
* @description Unique identifier for this application | ||
*/ | ||
id: UUID; // @todo align to DLUHC Planning Application API reference | ||
submittedAt: DateTime; | ||
schema: URL; | ||
} | ||
|
||
/** | ||
* @id #PlanXMetadata | ||
* @description Additional metadata associated with applications submitted via PlanX | ||
*/ | ||
export interface PlanXMetadata extends BaseMetadata { | ||
source: 'PlanX'; | ||
service: { | ||
flowId: UUID | string; // @todo temp fix for failing UUID validation, sort out and tighten | ||
name: string; | ||
owner: string; | ||
url: URL; | ||
}; | ||
session: { | ||
/** | ||
* @default PlanX | ||
*/ | ||
source: 'PlanX'; | ||
id: UUID | string; | ||
createdAt: DateTime; | ||
submittedAt?: DateTime; | ||
}; | ||
schema: { | ||
flowId: UUID; | ||
url: URL; | ||
}; | ||
} |