@defra/forms-model 3.0.710 → 3.0.713
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -2
- package/dist/module/form/form-submission/types.js.map +1 -1
- package/dist/types/form/form-submission/types.d.ts +5 -5
- package/dist/types/form/form-submission/types.d.ts.map +1 -1
- package/package.json +40 -5
- package/schemas/query-options-schema-manager.json +99 -0
- package/schemas/query-options-schema-ui.json +100 -0
- package/schemas/search-options-schema-manager.json +64 -0
- package/schemas/search-options-schema-ui.json +65 -0
- package/src/form/form-submission/types.ts +6 -6
package/README.md
CHANGED
|
@@ -138,13 +138,53 @@ Available schema files include:
|
|
|
138
138
|
|
|
139
139
|
##### Common Schemas
|
|
140
140
|
|
|
141
|
-
- `search-options-schema.json` - Search options validation
|
|
142
|
-
- `
|
|
141
|
+
- `search-options-schema-ui.json` - Search options validation (forms-designer)
|
|
142
|
+
- `search-options-schema-manager.json` - Search options validation (forms-manager)
|
|
143
|
+
- `query-options-schema-ui.json` - Query options validation (forms-designer)
|
|
144
|
+
- `query-options-schema-manager.json` - Query options validation (forms-manager)
|
|
143
145
|
- `pagination-options-schema.json` - Pagination options validation
|
|
144
146
|
- `sorting-options-schema.json` - Sorting options validation
|
|
145
147
|
|
|
146
148
|
## Development
|
|
147
149
|
|
|
150
|
+
This package was previously developed as the `model` workspace of [forms-designer](https://github.com/DEFRA/forms-designer).
|
|
151
|
+
|
|
152
|
+
### Setup
|
|
153
|
+
|
|
154
|
+
```shell
|
|
155
|
+
nvm use
|
|
156
|
+
npm install
|
|
157
|
+
npm run build
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Common commands
|
|
161
|
+
|
|
162
|
+
| Command | Description |
|
|
163
|
+
| ---------------- | ---------------------------------------------------------------- |
|
|
164
|
+
| `npm run build` | Build the type declarations, JavaScript modules and JSON schemas |
|
|
165
|
+
| `npm run lint` | Run EditorConfig, ESLint and TypeScript checks |
|
|
166
|
+
| `npm run format` | Format files with Prettier |
|
|
167
|
+
| `npm test` | Run the unit tests with coverage |
|
|
168
|
+
|
|
169
|
+
### Testing changes in a consuming service
|
|
170
|
+
|
|
171
|
+
To test unpublished changes in a consuming service (for example forms-designer), build this package and link it:
|
|
172
|
+
|
|
173
|
+
```shell
|
|
174
|
+
# In forms-model
|
|
175
|
+
npm run build
|
|
176
|
+
npm link
|
|
177
|
+
|
|
178
|
+
# In the consuming service
|
|
179
|
+
npm link @defra/forms-model
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Run `npm run build` in forms-model after each change so that the consuming service picks up the new `dist` output. Run `npm unlink @defra/forms-model && npm install` in the consuming service to return to the published version.
|
|
183
|
+
|
|
184
|
+
### Publishing
|
|
185
|
+
|
|
186
|
+
Merging to `main` with changes to `src/`, `scripts/`, `babel.config.*` or `.browserslistrc` runs the [Publish](.github/workflows/publish.yml) workflow, which increments the patch version and publishes the package to npm.
|
|
187
|
+
|
|
148
188
|
### Test Coverage
|
|
149
189
|
|
|
150
190
|
Unit test coverage threshold, code coverage below which build will fail is set by using jest config, at the moment line coverage threshold is set as 92%, see [jest.config.js](jest.config.js)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type ConditionEvaluationOutcome,\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitConditionEvaluationSchema,\n formSubmitConditionReferenceSchema,\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * A component referenced by a condition, and whether the user had answered it\n * when the condition was evaluated.\n *\n * An unanswered question is not absent from the runner's evaluation context -\n * it is present as `null` - so conditions still return a boolean for questions\n * that were skipped or never reached. Negative operators (\"is not\", \"is shorter\n * than\") return `true` in that case. Without knowing which referenced questions\n * were answered, a consumer cannot tell a real match from a vacuous one.\n * @see {@link formSubmitConditionReferenceSchema}\n */\nexport interface SubmitConditionReference {\n /**\n * The id of the referenced component\n */\n componentId: string\n\n /**\n * The name of the referenced component, as used in the submitted records\n */\n componentName: string\n\n /**\n * Whether the referenced component held an answer at the point of evaluation\n */\n answered: boolean\n}\n\n/**\n * The recorded outcome of a single condition at the point of submission.\n * V2 forms only - V1 conditions are not captured.\n * @see {@link formSubmitConditionEvaluationSchema}\n */\nexport interface SubmitConditionEvaluation {\n /**\n * The id of the condition, as authored in the V2 form definition\n */\n conditionId: string\n\n /**\n * The result of evaluating the condition\n */\n outcome: ConditionEvaluationOutcome\n\n /**\n * Every component the condition depends on, including those reached through\n * nested condition references, and whether each was answered\n */\n references: SubmitConditionReference[]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The currently-selected language at the point of submission\n */\n language?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SaveAndExitV2MessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state:
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-submission/types.ts"],"sourcesContent":["import { type FormStatus } from '~/src/common/enums.js'\nimport {\n type ConditionEvaluationOutcome,\n type SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n formSubmitConditionEvaluationSchema,\n formSubmitConditionReferenceSchema,\n formSubmitPayloadSchema,\n formSubmitRecordSchema,\n formSubmitRecordsetSchema\n} from '~/src/form/form-submission/index.js'\n\n/**\n * Interface for an individual submit record\n * @see {@link formSubmitRecordSchema}\n */\nexport interface SubmitRecord {\n /**\n * The field name\n */\n name: string\n\n /**\n * The field title\n */\n title: string\n\n /**\n * The field display value\n */\n value: string\n}\n\n/**\n * Interface for an individual submit recordset (e.g. a repeater question set)\n * @see {@link formSubmitRecordsetSchema}\n */\nexport interface SubmitRecordset {\n /**\n * The name of the recordset\n */\n name: string\n\n /**\n * The title of the recordset\n */\n title: string\n\n /**\n * The record items\n */\n value: SubmitRecord[][]\n}\n\n/**\n * A component referenced by a condition, and whether the user had answered it\n * when the condition was evaluated.\n *\n * An unanswered question is not absent from the runner's evaluation context -\n * it is present as `null` - so conditions still return a boolean for questions\n * that were skipped or never reached. Negative operators (\"is not\", \"is shorter\n * than\") return `true` in that case. Without knowing which referenced questions\n * were answered, a consumer cannot tell a real match from a vacuous one.\n * @see {@link formSubmitConditionReferenceSchema}\n */\nexport interface SubmitConditionReference {\n /**\n * The id of the referenced component\n */\n componentId: string\n\n /**\n * The name of the referenced component, as used in the submitted records\n */\n componentName: string\n\n /**\n * Whether the referenced component held an answer at the point of evaluation\n */\n answered: boolean\n}\n\n/**\n * The recorded outcome of a single condition at the point of submission.\n * V2 forms only - V1 conditions are not captured.\n * @see {@link formSubmitConditionEvaluationSchema}\n */\nexport interface SubmitConditionEvaluation {\n /**\n * The id of the condition, as authored in the V2 form definition\n */\n conditionId: string\n\n /**\n * The result of evaluating the condition\n */\n outcome: ConditionEvaluationOutcome\n\n /**\n * Every component the condition depends on, including those reached through\n * nested condition references, and whether each was answered\n */\n references: SubmitConditionReference[]\n}\n\n/**\n * Interface for the submission-api `/submit` payload\n * @see {@link formSubmitPayloadSchema}\n */\nexport interface SubmitPayload {\n /**\n * The retrieval key for files created in the submission\n */\n retrievalKey: string\n\n /**\n * The id of the user session\n */\n sessionId: string\n\n /**\n * The reference number of the user session\n */\n referenceNumber?: string\n\n /**\n * The currently-selected language at the point of submission\n */\n language?: string\n\n /**\n * The main form anwsers\n */\n main: SubmitRecord[]\n\n /**\n * The repeaters form answers\n */\n repeaters: SubmitRecordset[]\n}\n\n/**\n * Interface for the submission-api `/submit` response payload\n */\nexport interface SubmitResponsePayload {\n message: string\n result: {\n files: {\n main: string\n repeaters: Record<string, string>\n }\n }\n}\n\nexport interface SaveAndExitMessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n}\n\nexport interface SavedState {\n $$__referenceNumber: string\n [key: string]: any\n}\n\nexport interface SaveAndExitV2MessageData {\n magicLinkGroupId?: string\n form: {\n id: string\n title: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n}\n\nexport interface SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type:\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitMessageData\n}\n\nexport interface SaveAndExitV2Message {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2\n data: SaveAndExitV2MessageData\n}\n\nexport interface SaveAndExitRecord {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n security: {\n question: SecurityQuestionsEnum\n answer: string\n }\n state: object\n invalidPasswordAttempts: number\n createdAt: Date\n}\n\nexport interface SaveAndExitV2Record {\n magicLinkId: string\n magicLinkGroupId?: string\n form: {\n id: string\n status: FormStatus\n isPreview: boolean\n baseUrl: string\n }\n email: string\n auth: {\n sub: string\n issuer: string\n }\n state: SavedState\n createdAt: Date\n}\n\nexport type RunnerMessage = SaveAndExitMessage\n\nexport interface RunnerRecordBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface RunnerRecordInputMeta extends RunnerRecordBase {\n id: string\n}\n\nexport type RunnerRecordInput = RunnerMessage & RunnerRecordBase\n\nexport type RunnerRecord = RunnerMessage & RunnerRecordInputMeta\n"],"mappings":"","ignoreList":[]}
|
|
@@ -139,6 +139,10 @@ export interface SaveAndExitMessageData {
|
|
|
139
139
|
};
|
|
140
140
|
state: object;
|
|
141
141
|
}
|
|
142
|
+
export interface SavedState {
|
|
143
|
+
$$__referenceNumber: string;
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
}
|
|
142
146
|
export interface SaveAndExitV2MessageData {
|
|
143
147
|
magicLinkGroupId?: string;
|
|
144
148
|
form: {
|
|
@@ -153,7 +157,7 @@ export interface SaveAndExitV2MessageData {
|
|
|
153
157
|
sub: string;
|
|
154
158
|
issuer: string;
|
|
155
159
|
};
|
|
156
|
-
state:
|
|
160
|
+
state: SavedState;
|
|
157
161
|
}
|
|
158
162
|
export interface SaveAndExitMessage {
|
|
159
163
|
schemaVersion: SubmissionEventMessageSchemaVersion;
|
|
@@ -173,10 +177,6 @@ export interface SaveAndExitV2Message {
|
|
|
173
177
|
type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2;
|
|
174
178
|
data: SaveAndExitV2MessageData;
|
|
175
179
|
}
|
|
176
|
-
export interface SavedState {
|
|
177
|
-
$$__referenceNumber: string;
|
|
178
|
-
[key: string]: any;
|
|
179
|
-
}
|
|
180
180
|
export interface SaveAndExitRecord {
|
|
181
181
|
magicLinkId: string;
|
|
182
182
|
magicLinkGroupId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAChC,MAAM,qCAAqC,CAAA;AAS5C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,K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AQ,EAAE;QACR,QAAQ,EAAE,qBAAqB,CAAA;QAC/B,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,OAAO,CAAA;QAClB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAA;QACX,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAChC,MAAM,qCAAqC,CAAA;AAS5C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,YAAY,EAAE,EAAE,CAAA;CACxB;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,MA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"description": "A hapi plugin providing the model for Defra forms",
|
|
5
|
-
"homepage": "https://github.com/DEFRA/forms-
|
|
5
|
+
"homepage": "https://github.com/DEFRA/forms-model#readme",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
7
7
|
"main": "dist/module/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "git+https://github.com/DEFRA/forms-
|
|
23
|
-
"directory": "model"
|
|
22
|
+
"url": "git+https://github.com/DEFRA/forms-model.git"
|
|
24
23
|
},
|
|
25
24
|
"license": "OGL-UK-3.0",
|
|
26
25
|
"sideEffects": false,
|
|
@@ -30,7 +29,16 @@
|
|
|
30
29
|
"build:node": "babel --delete-dir-on-start --extensions \".ts,.js\" --ignore \"**/*.test.*\" --copy-files --no-copy-ignored --source-maps --out-dir ./dist/module ./src",
|
|
31
30
|
"build:types": "tsc --build --force tsconfig.build.json && tsc-alias --project tsconfig.build.json",
|
|
32
31
|
"build:schemas": "node scripts/generate-schemas.js",
|
|
32
|
+
"format": "npm run format:check -- --write",
|
|
33
|
+
"format:check": "prettier --cache --cache-location .cache/prettier --cache-strategy content --check \"**/*.{cjs,js,json,md,mjs,ts}\"",
|
|
34
|
+
"lint": "npm run lint:editorconfig && npm run lint:js && npm run lint:types",
|
|
35
|
+
"lint:editorconfig": "editorconfig-checker",
|
|
36
|
+
"lint:fix": "npm run lint:js -- --fix",
|
|
37
|
+
"lint:js": "eslint --cache --cache-location .cache/eslint --cache-strategy content --color .",
|
|
38
|
+
"lint:types": "tsc --build tsconfig.json",
|
|
39
|
+
"prepare": "husky || true",
|
|
33
40
|
"test": "jest --color --coverage --verbose",
|
|
41
|
+
"test:changed": "jest --coverage --changedSince=origin/main --coverageReporters=text",
|
|
34
42
|
"test:watch": "jest --color --watch"
|
|
35
43
|
},
|
|
36
44
|
"dependencies": {
|
|
@@ -41,10 +49,34 @@
|
|
|
41
49
|
"uuid": "^11.1.0"
|
|
42
50
|
},
|
|
43
51
|
"devDependencies": {
|
|
52
|
+
"@babel/cli": "^7.29.7",
|
|
53
|
+
"@babel/core": "^7.29.7",
|
|
54
|
+
"@babel/preset-env": "^7.29.7",
|
|
55
|
+
"@babel/preset-typescript": "^7.29.7",
|
|
56
|
+
"@types/jest": "^29.5.14",
|
|
57
|
+
"@types/node": "^25.9.1",
|
|
44
58
|
"@types/slug": "^5.0.9",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
60
|
+
"@typescript-eslint/parser": "^8.27.0",
|
|
61
|
+
"babel-plugin-module-resolver": "^5.0.3",
|
|
62
|
+
"babel-plugin-replace-import-extension": "^1.1.5",
|
|
63
|
+
"babel-plugin-transform-import-meta": "^2.3.3",
|
|
64
|
+
"editorconfig-checker": "^6.2.0",
|
|
65
|
+
"eslint": "^9.39.3",
|
|
66
|
+
"eslint-config-prettier": "^10.1.8",
|
|
67
|
+
"eslint-plugin-jest": "^29.15.2",
|
|
68
|
+
"eslint-plugin-jsdoc": "^63.0.1",
|
|
69
|
+
"globals": "^17.6.0",
|
|
70
|
+
"husky": "^9.1.7",
|
|
71
|
+
"jest": "^29.7.0",
|
|
45
72
|
"joi": "^17.13.4",
|
|
46
73
|
"joi-to-json": "^4.3.2",
|
|
47
|
-
"
|
|
74
|
+
"lint-staged": "^17.0.7",
|
|
75
|
+
"neostandard": "^0.12.2",
|
|
76
|
+
"prettier": "^3.8.3",
|
|
77
|
+
"tsc-alias": "^1.8.11",
|
|
78
|
+
"typescript": "^5.8.2",
|
|
79
|
+
"typescript-eslint": "^8.56.1"
|
|
48
80
|
},
|
|
49
81
|
"peerDependencies": {
|
|
50
82
|
"joi": "^17.0.0"
|
|
@@ -52,5 +84,8 @@
|
|
|
52
84
|
"engines": {
|
|
53
85
|
"node": "^24.19.0",
|
|
54
86
|
"npm": "^11.17.0 || >=12.0.2"
|
|
87
|
+
},
|
|
88
|
+
"allowScripts": {
|
|
89
|
+
"unrs-resolver": true
|
|
55
90
|
}
|
|
56
91
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"page": {
|
|
5
|
+
"type": "number",
|
|
6
|
+
"description": "Current page number, starting from 1",
|
|
7
|
+
"default": 1,
|
|
8
|
+
"exclusiveMinimum": 0,
|
|
9
|
+
"minimum": 1,
|
|
10
|
+
"title": "Page"
|
|
11
|
+
},
|
|
12
|
+
"perPage": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"description": "Number of items to display per page, between 1 and 200",
|
|
15
|
+
"default": 24,
|
|
16
|
+
"exclusiveMinimum": 0,
|
|
17
|
+
"minimum": 1,
|
|
18
|
+
"maximum": 200,
|
|
19
|
+
"title": "Per Page"
|
|
20
|
+
},
|
|
21
|
+
"sortBy": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Field to sort results by",
|
|
24
|
+
"enum": [
|
|
25
|
+
"updatedAt",
|
|
26
|
+
"title"
|
|
27
|
+
],
|
|
28
|
+
"title": "Sort By"
|
|
29
|
+
},
|
|
30
|
+
"order": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Sort order (ascending or descending)",
|
|
33
|
+
"enum": [
|
|
34
|
+
"asc",
|
|
35
|
+
"desc"
|
|
36
|
+
],
|
|
37
|
+
"title": "Order"
|
|
38
|
+
},
|
|
39
|
+
"title": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Search by form title, empty string matches all",
|
|
42
|
+
"default": "",
|
|
43
|
+
"maxLength": 255,
|
|
44
|
+
"title": "Title"
|
|
45
|
+
},
|
|
46
|
+
"author": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Search by form author, empty string matches all",
|
|
49
|
+
"default": "",
|
|
50
|
+
"maxLength": 100,
|
|
51
|
+
"title": "Author"
|
|
52
|
+
},
|
|
53
|
+
"organisations": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"description": "Filter by organisation(s), empty array matches all",
|
|
56
|
+
"default": [],
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": [
|
|
60
|
+
"Animal and Plant Health Agency – APHA",
|
|
61
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
|
62
|
+
"Defra",
|
|
63
|
+
"Environment Agency",
|
|
64
|
+
"Forestry Commission",
|
|
65
|
+
"Marine Management Organisation – MMO",
|
|
66
|
+
"Natural England",
|
|
67
|
+
"Rural Payments Agency – RPA",
|
|
68
|
+
"Veterinary Medicines Directorate – VMD"
|
|
69
|
+
],
|
|
70
|
+
"title": "Organisations Item"
|
|
71
|
+
},
|
|
72
|
+
"title": "Organisations"
|
|
73
|
+
},
|
|
74
|
+
"offline": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Filter by forms that are offline",
|
|
77
|
+
"title": "Offline"
|
|
78
|
+
},
|
|
79
|
+
"status": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"description": "Filter by form status(es), empty array matches all",
|
|
82
|
+
"default": [],
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"draft",
|
|
87
|
+
"live"
|
|
88
|
+
],
|
|
89
|
+
"title": "Status Item"
|
|
90
|
+
},
|
|
91
|
+
"title": "Status"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"additionalProperties": false,
|
|
95
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
96
|
+
"title": "Query Options Schema Manager",
|
|
97
|
+
"description": "JSON Schema for validating Query Options Schema Manager in Defra forms",
|
|
98
|
+
"$id": "@defra/forms-model/schemas/query-options-schema-manager.json"
|
|
99
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"page": {
|
|
5
|
+
"type": "number",
|
|
6
|
+
"description": "Current page number, starting from 1",
|
|
7
|
+
"default": 1,
|
|
8
|
+
"exclusiveMinimum": 0,
|
|
9
|
+
"minimum": 1,
|
|
10
|
+
"title": "Page"
|
|
11
|
+
},
|
|
12
|
+
"perPage": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"description": "Number of items to display per page, between 1 and 200",
|
|
15
|
+
"default": 24,
|
|
16
|
+
"exclusiveMinimum": 0,
|
|
17
|
+
"minimum": 1,
|
|
18
|
+
"maximum": 200,
|
|
19
|
+
"title": "Per Page"
|
|
20
|
+
},
|
|
21
|
+
"sortBy": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Field to sort results by",
|
|
24
|
+
"enum": [
|
|
25
|
+
"updatedAt",
|
|
26
|
+
"title"
|
|
27
|
+
],
|
|
28
|
+
"title": "Sort By"
|
|
29
|
+
},
|
|
30
|
+
"order": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Sort order (ascending or descending)",
|
|
33
|
+
"enum": [
|
|
34
|
+
"asc",
|
|
35
|
+
"desc"
|
|
36
|
+
],
|
|
37
|
+
"title": "Order"
|
|
38
|
+
},
|
|
39
|
+
"title": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Search by form title, empty string matches all",
|
|
42
|
+
"default": "",
|
|
43
|
+
"maxLength": 255,
|
|
44
|
+
"title": "Title"
|
|
45
|
+
},
|
|
46
|
+
"author": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Search by form author, empty string matches all",
|
|
49
|
+
"default": "",
|
|
50
|
+
"maxLength": 100,
|
|
51
|
+
"title": "Author"
|
|
52
|
+
},
|
|
53
|
+
"organisations": {
|
|
54
|
+
"type": "array",
|
|
55
|
+
"description": "Filter by organisation(s), empty array matches all",
|
|
56
|
+
"default": [],
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"enum": [
|
|
60
|
+
"Animal and Plant Health Agency – APHA",
|
|
61
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
|
62
|
+
"Defra",
|
|
63
|
+
"Environment Agency",
|
|
64
|
+
"Forestry Commission",
|
|
65
|
+
"Marine Management Organisation – MMO",
|
|
66
|
+
"Natural England",
|
|
67
|
+
"Rural Payments Agency – RPA",
|
|
68
|
+
"Veterinary Medicines Directorate – VMD"
|
|
69
|
+
],
|
|
70
|
+
"title": "Organisations Item"
|
|
71
|
+
},
|
|
72
|
+
"title": "Organisations"
|
|
73
|
+
},
|
|
74
|
+
"offline": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Filter by forms that are offline",
|
|
77
|
+
"title": "Offline"
|
|
78
|
+
},
|
|
79
|
+
"status": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"description": "Filter by form status(es), empty array matches all",
|
|
82
|
+
"default": [],
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"draft",
|
|
87
|
+
"live",
|
|
88
|
+
"offline"
|
|
89
|
+
],
|
|
90
|
+
"title": "Status Item"
|
|
91
|
+
},
|
|
92
|
+
"title": "Status"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"additionalProperties": false,
|
|
96
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
97
|
+
"title": "Query Options Schema Ui",
|
|
98
|
+
"description": "JSON Schema for validating Query Options Schema Ui in Defra forms",
|
|
99
|
+
"$id": "@defra/forms-model/schemas/query-options-schema-ui.json"
|
|
100
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"title": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"description": "Search by form title, empty string matches all",
|
|
7
|
+
"default": "",
|
|
8
|
+
"maxLength": 255,
|
|
9
|
+
"title": "Title"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Search by form author, empty string matches all",
|
|
14
|
+
"default": "",
|
|
15
|
+
"maxLength": 100,
|
|
16
|
+
"title": "Author"
|
|
17
|
+
},
|
|
18
|
+
"organisations": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"description": "Filter by organisation(s), empty array matches all",
|
|
21
|
+
"default": [],
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"Animal and Plant Health Agency – APHA",
|
|
26
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
|
27
|
+
"Defra",
|
|
28
|
+
"Environment Agency",
|
|
29
|
+
"Forestry Commission",
|
|
30
|
+
"Marine Management Organisation – MMO",
|
|
31
|
+
"Natural England",
|
|
32
|
+
"Rural Payments Agency – RPA",
|
|
33
|
+
"Veterinary Medicines Directorate – VMD"
|
|
34
|
+
],
|
|
35
|
+
"title": "Organisations Item"
|
|
36
|
+
},
|
|
37
|
+
"title": "Organisations"
|
|
38
|
+
},
|
|
39
|
+
"offline": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Filter by forms that are offline",
|
|
42
|
+
"title": "Offline"
|
|
43
|
+
},
|
|
44
|
+
"status": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Filter by form status(es), empty array matches all",
|
|
47
|
+
"default": [],
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": [
|
|
51
|
+
"draft",
|
|
52
|
+
"live"
|
|
53
|
+
],
|
|
54
|
+
"title": "Status Item"
|
|
55
|
+
},
|
|
56
|
+
"title": "Status"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
61
|
+
"title": "Search Options Schema Manager",
|
|
62
|
+
"description": "JSON Schema for validating Search Options Schema Manager in Defra forms",
|
|
63
|
+
"$id": "@defra/forms-model/schemas/search-options-schema-manager.json"
|
|
64
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"title": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"description": "Search by form title, empty string matches all",
|
|
7
|
+
"default": "",
|
|
8
|
+
"maxLength": 255,
|
|
9
|
+
"title": "Title"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Search by form author, empty string matches all",
|
|
14
|
+
"default": "",
|
|
15
|
+
"maxLength": 100,
|
|
16
|
+
"title": "Author"
|
|
17
|
+
},
|
|
18
|
+
"organisations": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"description": "Filter by organisation(s), empty array matches all",
|
|
21
|
+
"default": [],
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"Animal and Plant Health Agency – APHA",
|
|
26
|
+
"Centre for Environment, Fisheries and Aquaculture Science – Cefas",
|
|
27
|
+
"Defra",
|
|
28
|
+
"Environment Agency",
|
|
29
|
+
"Forestry Commission",
|
|
30
|
+
"Marine Management Organisation – MMO",
|
|
31
|
+
"Natural England",
|
|
32
|
+
"Rural Payments Agency – RPA",
|
|
33
|
+
"Veterinary Medicines Directorate – VMD"
|
|
34
|
+
],
|
|
35
|
+
"title": "Organisations Item"
|
|
36
|
+
},
|
|
37
|
+
"title": "Organisations"
|
|
38
|
+
},
|
|
39
|
+
"offline": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Filter by forms that are offline",
|
|
42
|
+
"title": "Offline"
|
|
43
|
+
},
|
|
44
|
+
"status": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"description": "Filter by form status(es), empty array matches all",
|
|
47
|
+
"default": [],
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": [
|
|
51
|
+
"draft",
|
|
52
|
+
"live",
|
|
53
|
+
"offline"
|
|
54
|
+
],
|
|
55
|
+
"title": "Status Item"
|
|
56
|
+
},
|
|
57
|
+
"title": "Status"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
62
|
+
"title": "Search Options Schema Ui",
|
|
63
|
+
"description": "JSON Schema for validating Search Options Schema Ui in Defra forms",
|
|
64
|
+
"$id": "@defra/forms-model/schemas/search-options-schema-ui.json"
|
|
65
|
+
}
|
|
@@ -174,6 +174,11 @@ export interface SaveAndExitMessageData {
|
|
|
174
174
|
state: object
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
export interface SavedState {
|
|
178
|
+
$$__referenceNumber: string
|
|
179
|
+
[key: string]: any
|
|
180
|
+
}
|
|
181
|
+
|
|
177
182
|
export interface SaveAndExitV2MessageData {
|
|
178
183
|
magicLinkGroupId?: string
|
|
179
184
|
form: {
|
|
@@ -188,7 +193,7 @@ export interface SaveAndExitV2MessageData {
|
|
|
188
193
|
sub: string
|
|
189
194
|
issuer: string
|
|
190
195
|
}
|
|
191
|
-
state:
|
|
196
|
+
state: SavedState
|
|
192
197
|
}
|
|
193
198
|
|
|
194
199
|
export interface SaveAndExitMessage {
|
|
@@ -213,11 +218,6 @@ export interface SaveAndExitV2Message {
|
|
|
213
218
|
data: SaveAndExitV2MessageData
|
|
214
219
|
}
|
|
215
220
|
|
|
216
|
-
export interface SavedState {
|
|
217
|
-
$$__referenceNumber: string
|
|
218
|
-
[key: string]: any
|
|
219
|
-
}
|
|
220
|
-
|
|
221
221
|
export interface SaveAndExitRecord {
|
|
222
222
|
magicLinkId: string
|
|
223
223
|
magicLinkGroupId?: string
|