@defra/forms-model 3.0.703 → 3.0.704
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/dist/module/form/form-audit/index.js +12 -0
- package/dist/module/form/form-audit/index.js.map +1 -1
- package/dist/module/form/form-definition/helpers.js +20 -0
- package/dist/module/form/form-definition/helpers.js.map +1 -1
- package/dist/module/form/form-definition/index.js +29 -17
- package/dist/module/form/form-definition/index.js.map +1 -1
- package/dist/module/form/form-definition/types.js.map +1 -1
- package/dist/module/form/form-manager/errors.js +6 -1
- package/dist/module/form/form-manager/errors.js.map +1 -1
- package/dist/module/form/form-manager/types.js +13 -0
- package/dist/module/form/form-manager/types.js.map +1 -1
- package/dist/module/form/form-submission/enums.js +25 -0
- package/dist/module/form/form-submission/enums.js.map +1 -1
- package/dist/module/form/form-submission/index.js +21 -1
- package/dist/module/form/form-submission/index.js.map +1 -1
- package/dist/module/form/form-submission/types.js.map +1 -1
- package/dist/types/form/form-audit/index.d.ts +7 -0
- package/dist/types/form/form-audit/index.d.ts.map +1 -1
- package/dist/types/form/form-definition/helpers.d.ts +15 -1
- package/dist/types/form/form-definition/helpers.d.ts.map +1 -1
- package/dist/types/form/form-definition/index.d.ts.map +1 -1
- package/dist/types/form/form-definition/types.d.ts +5 -0
- package/dist/types/form/form-definition/types.d.ts.map +1 -1
- package/dist/types/form/form-manager/errors.d.ts.map +1 -1
- package/dist/types/form/form-manager/types.d.ts +2 -0
- package/dist/types/form/form-manager/types.d.ts.map +1 -1
- package/dist/types/form/form-submission/enums.d.ts +23 -0
- package/dist/types/form/form-submission/enums.d.ts.map +1 -1
- package/dist/types/form/form-submission/index.d.ts +11 -1
- package/dist/types/form/form-submission/index.d.ts.map +1 -1
- package/dist/types/form/form-submission/types.d.ts +46 -1
- package/dist/types/form/form-submission/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/schemas/form-definition-schema.json +2 -0
- package/schemas/form-definition-v2-schema.json +63 -36
- package/src/form/form-audit/index.ts +32 -0
- package/src/form/form-definition/helpers.ts +32 -1
- package/src/form/form-definition/index.ts +66 -21
- package/src/form/form-definition/types.ts +5 -0
- package/src/form/form-manager/errors.ts +7 -1
- package/src/form/form-manager/types.ts +13 -0
- package/src/form/form-submission/enums.ts +26 -0
- package/src/form/form-submission/index.ts +49 -0
- package/src/form/form-submission/types.ts +54 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["FormDefinitionErrorType","FormDefinitionError","formDefinitionErrors","UniquePagePath","key","type","Unique","UniquePageId","UniquePageComponentId","UniquePageComponentName","UniqueSectionId","UniqueSectionName","UniqueSectionTitle","UniqueListId","UniqueListTitle","UniqueListName","UniqueConditionDisplayName","UniqueConditionId","UniqueListItemId","UniqueListItemText","UniqueListItemValue","RefPageCondition","Ref","RefConditionComponentId","RefConditionListId","RefConditionItemId","RefConditionConditionId","RefPageComponentList","IncompatibleConditionComponentType","Incompatible","IncompatibleQuestionRegex","Other","Type"],"sources":["../../../../src/form/form-manager/types.ts"],"sourcesContent":["import { type Context } from 'joi'\n\nimport { type Repeat, type Section } from '~/src/form/form-definition/types.js'\nimport { type ControllerType } from '~/src/pages/enums.js'\n\nexport interface PatchPageFields {\n title?: string\n path?: string\n controller?: ControllerType | null\n repeat?: Repeat\n condition?: string | null\n}\n\nexport interface AddComponentQueryOptions {\n prepend?: boolean\n}\n\nexport type SectionAssignmentItem = Omit<Section, 'name'> & {\n name?: string\n pageIds: string[]\n}\n\n// Enum of error types that can be raised through validating the form definition\nexport enum FormDefinitionErrorType {\n Unique = 'unique', // Unique constraint\n Ref = 'ref', // Referential integrity\n Type = 'type', // General schema type error\n Incompatible = 'incompatible' // Data values/types that are not compatible\n}\n\n// Enum for errors that can exist in a form definition\nexport enum FormDefinitionError {\n UniquePageId = 'unique_page_id',\n UniquePagePath = 'unique_page_path',\n UniquePageComponentId = 'unique_page_component_id',\n UniquePageComponentName = 'unique_page_component_name',\n UniqueSectionId = 'unique_section_id',\n UniqueSectionName = 'unique_section_name',\n UniqueSectionTitle = 'unique_section_title',\n UniqueListId = 'unique_list_id',\n UniqueListTitle = 'unique_list_title',\n UniqueListName = 'unique_list_name',\n UniqueConditionId = 'unique_condition_id',\n UniqueConditionDisplayName = 'unique_condition_displayname',\n UniqueListItemId = 'unique_list_item_id',\n UniqueListItemText = 'unique_list_item_text',\n UniqueListItemValue = 'unique_list_item_value',\n RefPageCondition = 'ref_page_condition',\n RefConditionComponentId = 'ref_condition_component_id',\n RefConditionListId = 'ref_condition_list_id',\n RefConditionItemId = 'ref_condition_item_id',\n RefConditionConditionId = 'ref_condition_condition_id',\n RefPageComponentList = 'ref_page_component_list',\n IncompatibleConditionComponentType = 'incompatible_condition_component_type',\n IncompatibleQuestionRegex = 'incompatible_question_regex',\n Other = 'other'\n}\n\nexport interface ErrorMatchValue {\n key: string\n type: FormDefinitionErrorType\n}\n\nexport type FormDefinitionErrors = Record<FormDefinitionError, ErrorMatchValue>\n\n// The errors that can exist in the form definition\nexport const formDefinitionErrors: FormDefinitionErrors = {\n [FormDefinitionError.UniquePagePath]: {\n key: 'path',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageComponentId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageComponentName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionTitle]: {\n key: 'title',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListTitle]: {\n key: 'title',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueConditionDisplayName]: {\n key: 'displayName',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueConditionId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemText]: {\n key: 'text',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemValue]: {\n key: 'value',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.RefPageCondition]: {\n key: 'condition',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionComponentId]: {\n key: 'componentId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionListId]: {\n key: 'listId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionItemId]: {\n key: 'itemId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionConditionId]: {\n key: 'conditionId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefPageComponentList]: {\n key: 'list',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.IncompatibleConditionComponentType]: {\n key: 'componentId',\n type: FormDefinitionErrorType.Incompatible\n },\n [FormDefinitionError.IncompatibleQuestionRegex]: {\n key: 'regex',\n type: FormDefinitionErrorType.Incompatible\n },\n [FormDefinitionError.Other]: {\n key: '',\n type: FormDefinitionErrorType.Type\n }\n}\n\nexport type FormDefinitionErrorCauseDetailPath = (string | number)[]\n\nexport interface FormDefinitionErrorCauseDetailUnique {\n path: FormDefinitionErrorCauseDetailPath\n pos: number\n dupePos: number\n}\n\nexport interface FormDefinitionErrorCauseDetailRef {\n path: FormDefinitionErrorCauseDetailPath\n}\n\nexport interface FormDefinitionErrorCauseDetailIncompatible {\n path: FormDefinitionErrorCauseDetailPath\n valueKey?: string\n incompatibleObject: {\n key?: string\n value?: unknown\n }\n reason: string\n}\n\nexport type FormDefinitionErrorCause =\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Unique\n message: string\n detail: FormDefinitionErrorCauseDetailUnique\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Ref\n message: string\n detail: FormDefinitionErrorCauseDetailRef\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Type\n message: string\n detail: Context | undefined\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Incompatible\n message: string\n detail: FormDefinitionErrorCauseDetailIncompatible\n }\n\nexport interface FormSecret {\n /**\n * The id of the form\n */\n formId: string\n\n /**\n * The name of the secret\n */\n secretName: string\n\n /**\n * The value of the secret\n */\n secretValue: string\n\n /**\n * The date the secret was created\n */\n createdAt: Date\n\n /**\n * The date the secret was renamed\n */\n renamedAt?: Date\n\n /**\n * The date the secret was last updated\n */\n updatedAt?: Date\n}\n"],"mappings":"AAsBA;AACA,WAAYA,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EACd;EADTA,uBAAuB;EAEpB;EAFHA,uBAAuB;EAGlB;EAHLA,uBAAuB,mCAIH;EAAA,OAJpBA,uBAAuB;AAAA;;AAOnC;AACA,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;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AkC,GAAG;IACxDxB,GAAG,EAAE,aAAa;IAClBC,IAAI,EAAEL,uBAAuB,CAAC6B;EAChC,CAAC;EACD,CAAC5B,mBAAmB,CAAC6B,yBAAyB,GAAG;IAC/C1B,GAAG,EAAE,OAAO;IACZC,IAAI,EAAEL,uBAAuB,CAAC6B;EAChC,CAAC;EACD,CAAC5B,mBAAmB,CAAC8B,KAAK,GAAG;IAC3B3B,GAAG,EAAE,EAAE;IACPC,IAAI,EAAEL,uBAAuB,CAACgC;EAChC;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":["FormDefinitionErrorType","FormDefinitionError","formDefinitionErrors","UniquePagePath","key","type","Unique","UniquePageId","UniquePageComponentId","UniquePageComponentName","UniqueSectionId","UniqueSectionName","UniqueSectionTitle","UniqueListId","UniqueListTitle","UniqueListName","UniqueConditionDisplayName","UniqueConditionId","UniqueListItemId","UniqueListItemText","UniqueListItemValue","UniqueOutput","RefPageCondition","Ref","RefConditionComponentId","RefConditionListId","RefConditionItemId","RefConditionConditionId","RefPageComponentList","RefOutputCondition","IncompatibleConditionComponentType","Incompatible","IncompatibleQuestionRegex","Other","Type"],"sources":["../../../../src/form/form-manager/types.ts"],"sourcesContent":["import { type Context } from 'joi'\n\nimport { type Repeat, type Section } from '~/src/form/form-definition/types.js'\nimport { type ControllerType } from '~/src/pages/enums.js'\n\nexport interface PatchPageFields {\n title?: string\n path?: string\n controller?: ControllerType | null\n repeat?: Repeat\n condition?: string | null\n}\n\nexport interface AddComponentQueryOptions {\n prepend?: boolean\n}\n\nexport type SectionAssignmentItem = Omit<Section, 'name'> & {\n name?: string\n pageIds: string[]\n}\n\n// Enum of error types that can be raised through validating the form definition\nexport enum FormDefinitionErrorType {\n Unique = 'unique', // Unique constraint\n Ref = 'ref', // Referential integrity\n Type = 'type', // General schema type error\n Incompatible = 'incompatible' // Data values/types that are not compatible\n}\n\n// Enum for errors that can exist in a form definition\nexport enum FormDefinitionError {\n UniquePageId = 'unique_page_id',\n UniquePagePath = 'unique_page_path',\n UniquePageComponentId = 'unique_page_component_id',\n UniquePageComponentName = 'unique_page_component_name',\n UniqueSectionId = 'unique_section_id',\n UniqueSectionName = 'unique_section_name',\n UniqueSectionTitle = 'unique_section_title',\n UniqueListId = 'unique_list_id',\n UniqueListTitle = 'unique_list_title',\n UniqueListName = 'unique_list_name',\n UniqueConditionId = 'unique_condition_id',\n UniqueConditionDisplayName = 'unique_condition_displayname',\n UniqueListItemId = 'unique_list_item_id',\n UniqueListItemText = 'unique_list_item_text',\n UniqueListItemValue = 'unique_list_item_value',\n UniqueOutput = 'unique_output',\n RefPageCondition = 'ref_page_condition',\n RefConditionComponentId = 'ref_condition_component_id',\n RefConditionListId = 'ref_condition_list_id',\n RefConditionItemId = 'ref_condition_item_id',\n RefConditionConditionId = 'ref_condition_condition_id',\n RefPageComponentList = 'ref_page_component_list',\n RefOutputCondition = 'ref_output_condition',\n IncompatibleConditionComponentType = 'incompatible_condition_component_type',\n IncompatibleQuestionRegex = 'incompatible_question_regex',\n Other = 'other'\n}\n\nexport interface ErrorMatchValue {\n key: string\n type: FormDefinitionErrorType\n}\n\nexport type FormDefinitionErrors = Record<FormDefinitionError, ErrorMatchValue>\n\n// The errors that can exist in the form definition\nexport const formDefinitionErrors: FormDefinitionErrors = {\n [FormDefinitionError.UniquePagePath]: {\n key: 'path',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageComponentId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniquePageComponentName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueSectionTitle]: {\n key: 'title',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListTitle]: {\n key: 'title',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListName]: {\n key: 'name',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueConditionDisplayName]: {\n key: 'displayName',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueConditionId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemId]: {\n key: 'id',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemText]: {\n key: 'text',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueListItemValue]: {\n key: 'value',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.UniqueOutput]: {\n // Outputs are compared on a composite of their address, condition,\n // audience and version, so there is no single key to match on. An empty\n // key matches any unique constraint on the schema it is attached to.\n key: '',\n type: FormDefinitionErrorType.Unique\n },\n [FormDefinitionError.RefPageCondition]: {\n key: 'condition',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionComponentId]: {\n key: 'componentId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionListId]: {\n key: 'listId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionItemId]: {\n key: 'itemId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefConditionConditionId]: {\n key: 'conditionId',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefPageComponentList]: {\n key: 'list',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.RefOutputCondition]: {\n key: 'condition',\n type: FormDefinitionErrorType.Ref\n },\n [FormDefinitionError.IncompatibleConditionComponentType]: {\n key: 'componentId',\n type: FormDefinitionErrorType.Incompatible\n },\n [FormDefinitionError.IncompatibleQuestionRegex]: {\n key: 'regex',\n type: FormDefinitionErrorType.Incompatible\n },\n [FormDefinitionError.Other]: {\n key: '',\n type: FormDefinitionErrorType.Type\n }\n}\n\nexport type FormDefinitionErrorCauseDetailPath = (string | number)[]\n\nexport interface FormDefinitionErrorCauseDetailUnique {\n path: FormDefinitionErrorCauseDetailPath\n pos: number\n dupePos: number\n}\n\nexport interface FormDefinitionErrorCauseDetailRef {\n path: FormDefinitionErrorCauseDetailPath\n}\n\nexport interface FormDefinitionErrorCauseDetailIncompatible {\n path: FormDefinitionErrorCauseDetailPath\n valueKey?: string\n incompatibleObject: {\n key?: string\n value?: unknown\n }\n reason: string\n}\n\nexport type FormDefinitionErrorCause =\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Unique\n message: string\n detail: FormDefinitionErrorCauseDetailUnique\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Ref\n message: string\n detail: FormDefinitionErrorCauseDetailRef\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Type\n message: string\n detail: Context | undefined\n }\n | {\n id: FormDefinitionError\n type: FormDefinitionErrorType.Incompatible\n message: string\n detail: FormDefinitionErrorCauseDetailIncompatible\n }\n\nexport interface FormSecret {\n /**\n * The id of the form\n */\n formId: string\n\n /**\n * The name of the secret\n */\n secretName: string\n\n /**\n * The value of the secret\n */\n secretValue: string\n\n /**\n * The date the secret was created\n */\n createdAt: Date\n\n /**\n * The date the secret was renamed\n */\n renamedAt?: Date\n\n /**\n * The date the secret was last updated\n */\n updatedAt?: Date\n}\n"],"mappings":"AAsBA;AACA,WAAYA,uBAAuB,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EACd;EADTA,uBAAuB;EAEpB;EAFHA,uBAAuB;EAGlB;EAHLA,uBAAuB,mCAIH;EAAA,OAJpBA,uBAAuB;AAAA;;AAOnC;AACA,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;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ChC,CAAC;EACD,CAACtB,mBAAmB,CAACwB,kBAAkB,GAAG;IACxCrB,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAEL,uBAAuB,CAACuB;EAChC,CAAC;EACD,CAACtB,mBAAmB,CAACyB,kBAAkB,GAAG;IACxCtB,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAEL,uBAAuB,CAACuB;EAChC,CAAC;EACD,CAACtB,mBAAmB,CAAC0B,uBAAuB,GAAG;IAC7CvB,GAAG,EAAE,aAAa;IAClBC,IAAI,EAAEL,uBAAuB,CAACuB;EAChC,CAAC;EACD,CAACtB,mBAAmB,CAAC2B,oBAAoB,GAAG;IAC1CxB,GAAG,EAAE,MAAM;IACXC,IAAI,EAAEL,uBAAuB,CAACuB;EAChC,CAAC;EACD,CAACtB,mBAAmB,CAAC4B,kBAAkB,GAAG;IACxCzB,GAAG,EAAE,WAAW;IAChBC,IAAI,EAAEL,uBAAuB,CAACuB;EAChC,CAAC;EACD,CAACtB,mBAAmB,CAAC6B,kCAAkC,GAAG;IACxD1B,GAAG,EAAE,aAAa;IAClBC,IAAI,EAAEL,uBAAuB,CAAC+B;EAChC,CAAC;EACD,CAAC9B,mBAAmB,CAAC+B,yBAAyB,GAAG;IAC/C5B,GAAG,EAAE,OAAO;IACZC,IAAI,EAAEL,uBAAuB,CAAC+B;EAChC,CAAC;EACD,CAAC9B,mBAAmB,CAACgC,KAAK,GAAG;IAC3B7B,GAAG,EAAE,EAAE;IACPC,IAAI,EAAEL,uBAAuB,CAACkC;EAChC;AACF,CAAC","ignoreList":[]}
|
|
@@ -20,4 +20,29 @@ export let SubmissionEventMessageType = /*#__PURE__*/function (SubmissionEventMe
|
|
|
20
20
|
SubmissionEventMessageType["RUNNER_SAVE_AND_EXIT"] = "RUNNER_SAVE_AND_EXIT";
|
|
21
21
|
return SubmissionEventMessageType;
|
|
22
22
|
}({});
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The outcome of evaluating a single form condition.
|
|
26
|
+
*
|
|
27
|
+
* `Error` is deliberately distinct from `False`. The runner defaults a failed
|
|
28
|
+
* evaluation to `false` when routing, but for an audit record the two are not
|
|
29
|
+
* the same thing and a consumer must be able to tell them apart.
|
|
30
|
+
*/
|
|
31
|
+
export let ConditionEvaluationOutcome = /*#__PURE__*/function (ConditionEvaluationOutcome) {
|
|
32
|
+
/**
|
|
33
|
+
* The condition evaluated to `true`
|
|
34
|
+
*/
|
|
35
|
+
ConditionEvaluationOutcome["True"] = "true";
|
|
36
|
+
/**
|
|
37
|
+
* The condition evaluated to `false`
|
|
38
|
+
*/
|
|
39
|
+
ConditionEvaluationOutcome["False"] = "false";
|
|
40
|
+
/**
|
|
41
|
+
* Evaluation threw - most commonly because the condition references a
|
|
42
|
+
* component that is absent from the evaluation context, such as a component
|
|
43
|
+
* on a repeater page. The runner treats this as `false`.
|
|
44
|
+
*/
|
|
45
|
+
ConditionEvaluationOutcome["Error"] = "error";
|
|
46
|
+
return ConditionEvaluationOutcome;
|
|
47
|
+
}({});
|
|
23
48
|
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","names":["SecurityQuestionsEnum","SubmissionEventMessageSchemaVersion","SubmissionEventMessageCategory","SubmissionEventMessageSource","SubmissionEventMessageType"],"sources":["../../../../src/form/form-submission/enums.ts"],"sourcesContent":["export enum SecurityQuestionsEnum {\n MemorablePlace = 'memorable-place',\n CharacterName = 'character-name',\n AudioRecommendation = 'audio-recommendation'\n}\n\nexport enum SubmissionEventMessageSchemaVersion {\n V1 = 1\n}\n\nexport enum SubmissionEventMessageCategory {\n RUNNER = 'RUNNER'\n}\n\nexport enum SubmissionEventMessageSource {\n FORMS_RUNNER = 'FORMS_RUNNER'\n}\n\nexport enum SubmissionEventMessageType {\n RUNNER_SAVE_AND_EXIT = 'RUNNER_SAVE_AND_EXIT'\n}\n"],"mappings":"AAAA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAMjC,WAAYC,mCAAmC,0BAAnCA,mCAAmC;EAAnCA,mCAAmC,CAAnCA,mCAAmC;EAAA,OAAnCA,mCAAmC;AAAA;AAI/C,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AAI1C,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAIxC,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"enums.js","names":["SecurityQuestionsEnum","SubmissionEventMessageSchemaVersion","SubmissionEventMessageCategory","SubmissionEventMessageSource","SubmissionEventMessageType","ConditionEvaluationOutcome"],"sources":["../../../../src/form/form-submission/enums.ts"],"sourcesContent":["export enum SecurityQuestionsEnum {\n MemorablePlace = 'memorable-place',\n CharacterName = 'character-name',\n AudioRecommendation = 'audio-recommendation'\n}\n\nexport enum SubmissionEventMessageSchemaVersion {\n V1 = 1\n}\n\nexport enum SubmissionEventMessageCategory {\n RUNNER = 'RUNNER'\n}\n\nexport enum SubmissionEventMessageSource {\n FORMS_RUNNER = 'FORMS_RUNNER'\n}\n\nexport enum SubmissionEventMessageType {\n RUNNER_SAVE_AND_EXIT = 'RUNNER_SAVE_AND_EXIT'\n}\n\n/**\n * The outcome of evaluating a single form condition.\n *\n * `Error` is deliberately distinct from `False`. The runner defaults a failed\n * evaluation to `false` when routing, but for an audit record the two are not\n * the same thing and a consumer must be able to tell them apart.\n */\nexport enum ConditionEvaluationOutcome {\n /**\n * The condition evaluated to `true`\n */\n True = 'true',\n\n /**\n * The condition evaluated to `false`\n */\n False = 'false',\n\n /**\n * Evaluation threw - most commonly because the condition references a\n * component that is absent from the evaluation context, such as a component\n * on a repeater page. The runner treats this as `false`.\n */\n Error = 'error'\n}\n"],"mappings":"AAAA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAMjC,WAAYC,mCAAmC,0BAAnCA,mCAAmC;EAAnCA,mCAAmC,CAAnCA,mCAAmC;EAAA,OAAnCA,mCAAmC;AAAA;AAI/C,WAAYC,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AAI1C,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAIxC,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;;AAItC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYC,0BAA0B,0BAA1BA,0BAA0B;EACpC;AACF;AACA;EAHYA,0BAA0B;EAMpC;AACF;AACA;EARYA,0BAA0B;EAWpC;AACF;AACA;AACA;AACA;EAfYA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { FormStatus } from "../../common/enums.js";
|
|
3
|
-
import { SecurityQuestionsEnum, SubmissionEventMessageCategory, SubmissionEventMessageSchemaVersion, SubmissionEventMessageSource, SubmissionEventMessageType } from "./enums.js";
|
|
3
|
+
import { ConditionEvaluationOutcome, SecurityQuestionsEnum, SubmissionEventMessageCategory, SubmissionEventMessageSchemaVersion, SubmissionEventMessageSource, SubmissionEventMessageType } from "./enums.js";
|
|
4
4
|
/**
|
|
5
5
|
* Joi schema for `SubmitRecord` interface
|
|
6
6
|
* @see {@link SubmitRecord}
|
|
@@ -21,6 +21,26 @@ export const formSubmitRecordsetSchema = Joi.object({
|
|
|
21
21
|
value: Joi.array().items(Joi.array().items(formSubmitRecordSchema).required().label('FormSubmitRecordGroup')).required().description('Array of record arrays, each representing a repeated instance')
|
|
22
22
|
}).label('FormSubmitRecordset').description('Collection of repeated field values from a repeatable section');
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Joi schema for `SubmitConditionReference` interface
|
|
26
|
+
* @see {@link SubmitConditionReference}
|
|
27
|
+
*/
|
|
28
|
+
export const formSubmitConditionReferenceSchema = Joi.object({
|
|
29
|
+
componentId: Joi.string().required().description('Identifier of the component the condition depends on'),
|
|
30
|
+
componentName: Joi.string().required().description('Name of the component the condition depends on, matching the submitted record name'),
|
|
31
|
+
answered: Joi.boolean().required().description('Whether the component held an answer when the condition was evaluated')
|
|
32
|
+
}).label('FormSubmitConditionReference').description('A component a condition depends on, and its answered state');
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Joi schema for `SubmitConditionEvaluation` interface
|
|
36
|
+
* @see {@link SubmitConditionEvaluation}
|
|
37
|
+
*/
|
|
38
|
+
export const formSubmitConditionEvaluationSchema = Joi.object({
|
|
39
|
+
conditionId: Joi.string().required().description('Identifier of the condition in the V2 form definition'),
|
|
40
|
+
outcome: Joi.string().valid(...Object.values(ConditionEvaluationOutcome)).required().description('Result of evaluating the condition'),
|
|
41
|
+
references: Joi.array().items(formSubmitConditionReferenceSchema).required().description('Components the condition depends on, including those reached through nested condition references')
|
|
42
|
+
}).label('FormSubmitConditionEvaluation').description('Recorded outcome of a single condition at submission');
|
|
43
|
+
|
|
24
44
|
/**
|
|
25
45
|
* Joi schema for `SubmitPayload` interface
|
|
26
46
|
* @see {@link SubmitPayload}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","FormStatus","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","language","main","repeaters","saveAndExitMessageData","form","id","status","valid","Draft","Live","isPreview","boolean","baseUrl","email","security","question","Object","values","answer","state","magicLinkGroupId","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n language: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description(\n 'The currently-selected language at point of form submission'\n ),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: saveAndExitMessageData\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAU5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGP,GAAG,CAACQ,MAAM,CAAe;EAC7DC,IAAI,EAAET,GAAG,CAACU,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEb,GAAG,CAACU,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,oCAAoC,CAAC;EACpDE,KAAK,EAAEd,GAAG,CAACU,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVI,KAAK,CAAC,EAAE,CAAC,CACTH,WAAW,CAAC,kDAAkD;AACnE,CAAC,CAAC,CACCI,KAAK,CAAC,kBAAkB,CAAC,CACzBJ,WAAW,CAAC,6CAA6C,CAAC;;AAE7D;AACA;AACA;AACA;AACA,OAAO,MAAMK,yBAAyB,GAAGjB,GAAG,CAACQ,MAAM,CAAkB;EACnEC,IAAI,EAAET,GAAG,CAACU,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,uCAAuC,CAAC;EACvDC,KAAK,EAAEb,GAAG,CAACU,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,iDAAiD,CAAC;EACjEE,KAAK,EAAEd,GAAG,CAACkB,KAAK,CAAiB,CAAC,CAC/BC,KAAK,CACJnB,GAAG,CAACkB,KAAK,CAAe,CAAC,CACtBC,KAAK,CAACZ,sBAAsB,CAAC,CAC7BI,QAAQ,CAAC,CAAC,CACVK,KAAK,CAAC,uBAA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AuB,GAAG/C,GAAG,CAACQ,MAAM,CAAqB,CAAC,CAACa,IAAI,CAAC;EAC3E2B,aAAa,EAAEhD,GAAG,CAACU,MAAM,CAAC,CAAC,CACxBuB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACvC,mCAAmC,CAAC,CAAC,CAC5DO,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,qEACF,CAAC;EACHqC,QAAQ,EAAEjD,GAAG,CAACU,MAAM,CAAC,CAAC,CACnBuB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACxC,8BAA8B,CAAC,CAAC,CACvDQ,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,0DAA0D,CAAC;EAC1EsC,MAAM,EAAElD,GAAG,CAACU,MAAM,CAAC,CAAC,CACjBuB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACtC,4BAA4B,CAAC,CAAC,CACrDM,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,wCAAwC,CAAC;EACxDuC,IAAI,EAAEnD,GAAG,CAACU,MAAM,CAAC,CAAC,CACfuB,KAAK,CAAC,GAAGS,MAAM,CAACC,MAAM,CAACrC,0BAA0B,CAAC,CAAC,CACnDM,WAAW,CAAC,YAAY,CAAC;EAC5BwC,SAAS,EAAEpD,GAAG,CAACqD,IAAI,CAAC,CAAC,CAClB1C,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,8FACF,CAAC;EACH0C,gBAAgB,EAAEtD,GAAG,CAACqD,IAAI,CAAC,CAAC,CACzB1C,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9D2C,IAAI,EAAE1B;AACR,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","FormStatus","ConditionEvaluationOutcome","SecurityQuestionsEnum","SubmissionEventMessageCategory","SubmissionEventMessageSchemaVersion","SubmissionEventMessageSource","SubmissionEventMessageType","formSubmitRecordSchema","object","name","string","required","description","title","value","allow","label","formSubmitRecordsetSchema","array","items","formSubmitConditionReferenceSchema","componentId","componentName","answered","boolean","formSubmitConditionEvaluationSchema","conditionId","outcome","valid","Object","values","references","formSubmitPayloadSchema","keys","retrievalKey","sessionId","referenceNumber","optional","language","main","repeaters","saveAndExitMessageData","form","id","status","Draft","Live","isPreview","baseUrl","email","security","question","answer","state","magicLinkGroupId","submissionMessageSchema","schemaVersion","category","source","type","createdAt","date","messageCreatedAt","data"],"sources":["../../../../src/form/form-submission/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport { FormStatus } from '~/src/common/enums.js'\nimport {\n ConditionEvaluationOutcome,\n SecurityQuestionsEnum,\n SubmissionEventMessageCategory,\n SubmissionEventMessageSchemaVersion,\n SubmissionEventMessageSource,\n SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\n type SaveAndExitMessage,\n type SaveAndExitMessageData,\n type SubmitConditionEvaluation,\n type SubmitConditionReference,\n type SubmitPayload,\n type SubmitRecord,\n type SubmitRecordset\n} from '~/src/form/form-submission/types.js'\n\n/**\n * Joi schema for `SubmitRecord` interface\n * @see {@link SubmitRecord}\n */\nexport const formSubmitRecordSchema = Joi.object<SubmitRecord>({\n name: Joi.string()\n .required()\n .description('Field identifier matching the component name'),\n title: Joi.string()\n .required()\n .description('Human-readable label for the field'),\n value: Joi.string()\n .required()\n .allow('')\n .description('User-submitted value for the field, may be empty')\n})\n .label('FormSubmitRecord')\n .description('Individual field value in a form submission')\n\n/**\n * Joi schema for `SubmitRecordset` interface\n * @see {@link SubmitRecordset}\n */\nexport const formSubmitRecordsetSchema = Joi.object<SubmitRecordset>({\n name: Joi.string()\n .required()\n .description('Identifier for the repeatable section'),\n title: Joi.string()\n .required()\n .description('Human-readable title for the repeatable section'),\n value: Joi.array<SubmitRecord[]>()\n .items(\n Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .label('FormSubmitRecordGroup')\n )\n .required()\n .description(\n 'Array of record arrays, each representing a repeated instance'\n )\n})\n .label('FormSubmitRecordset')\n .description('Collection of repeated field values from a repeatable section')\n\n/**\n * Joi schema for `SubmitConditionReference` interface\n * @see {@link SubmitConditionReference}\n */\nexport const formSubmitConditionReferenceSchema =\n Joi.object<SubmitConditionReference>({\n componentId: Joi.string()\n .required()\n .description('Identifier of the component the condition depends on'),\n componentName: Joi.string()\n .required()\n .description(\n 'Name of the component the condition depends on, matching the submitted record name'\n ),\n answered: Joi.boolean()\n .required()\n .description(\n 'Whether the component held an answer when the condition was evaluated'\n )\n })\n .label('FormSubmitConditionReference')\n .description('A component a condition depends on, and its answered state')\n\n/**\n * Joi schema for `SubmitConditionEvaluation` interface\n * @see {@link SubmitConditionEvaluation}\n */\nexport const formSubmitConditionEvaluationSchema =\n Joi.object<SubmitConditionEvaluation>({\n conditionId: Joi.string()\n .required()\n .description('Identifier of the condition in the V2 form definition'),\n outcome: Joi.string()\n .valid(...Object.values(ConditionEvaluationOutcome))\n .required()\n .description('Result of evaluating the condition'),\n references: Joi.array<SubmitConditionReference>()\n .items(formSubmitConditionReferenceSchema)\n .required()\n .description(\n 'Components the condition depends on, including those reached through nested condition references'\n )\n })\n .label('FormSubmitConditionEvaluation')\n .description('Recorded outcome of a single condition at submission')\n\n/**\n * Joi schema for `SubmitPayload` interface\n * @see {@link SubmitPayload}\n */\nexport const formSubmitPayloadSchema = Joi.object<SubmitPayload>()\n .keys({\n retrievalKey: Joi.string()\n .required()\n .description('Unique key to retrieve this submission later'),\n sessionId: Joi.string()\n .required()\n .description('User session identifier for tracking and security'),\n referenceNumber: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description('Reference number for the form submission'),\n language: Joi.string()\n // TODO - make this required in later releases - optional for now to avoid release glitches\n .optional()\n .allow('')\n .description(\n 'The currently-selected language at point of form submission'\n ),\n main: Joi.array<SubmitRecord>()\n .items(formSubmitRecordSchema)\n .required()\n .description('Main (non-repeating) field values from the form'),\n repeaters: Joi.array<SubmitRecordset>()\n .items(formSubmitRecordsetSchema)\n .required()\n .description('Repeatable section values from the form')\n })\n .required()\n .label('FormSubmitPayload')\n .description('Complete form submission payload structure with all form data')\n\nexport const saveAndExitMessageData = Joi.object<SaveAndExitMessageData>()\n .keys({\n form: Joi.object({\n id: Joi.string().required(),\n title: Joi.string().required(),\n status: Joi.string().valid(FormStatus.Draft, FormStatus.Live).required(),\n isPreview: Joi.boolean().required(),\n baseUrl: Joi.string().required()\n }).label('SaveAndExitForm'),\n email: Joi.string().required(),\n security: Joi.object({\n question: Joi.string()\n .valid(...Object.values(SecurityQuestionsEnum))\n .required(),\n answer: Joi.string().required()\n }).label('SaveAndExitSecurity'),\n state: Joi.object().required(),\n magicLinkGroupId: Joi.string().optional()\n })\n .label('SaveAndExitMessageData')\n\nexport const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the SubmissionMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(SubmissionEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(SubmissionEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(SubmissionEventMessageType))\n .description('Event type'),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published'),\n data: saveAndExitMessageData\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAErB,SAASC,UAAU;AACnB,SACEC,0BAA0B,EAC1BC,qBAAqB,EACrBC,8BAA8B,EAC9BC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B;AAY5B;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGR,GAAG,CAACS,MAAM,CAAe;EAC7DC,IAAI,EAAEV,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,EAAE3D,GAAG,CAACW,MAAM,CAAC,CAAC,CACjBkB,KAAK,CAAC,GAAGC,MAAM,CAACC,MAAM,CAACzB,4BAA4B,CAAC,CAAC,CACrDM,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,wCAAwC,CAAC;EACxD+C,IAAI,EAAE5D,GAAG,CAACW,MAAM,CAAC,CAAC,CACfkB,KAAK,CAAC,GAAGC,MAAM,CAACC,MAAM,CAACxB,0BAA0B,CAAC,CAAC,CACnDM,WAAW,CAAC,YAAY,CAAC;EAC5BgD,SAAS,EAAE7D,GAAG,CAAC8D,IAAI,CAAC,CAAC,CAClBlD,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,8FACF,CAAC;EACHkD,gBAAgB,EAAE/D,GAAG,CAAC8D,IAAI,CAAC,CAAC,CACzBlD,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DmD,IAAI,EAAEtB;AACR,CAAC,CAAC","ignoreList":[]}
|
|
@@ -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 SecurityQuestionsEnum,\n type SubmissionEventMessageCategory,\n type SubmissionEventMessageSchemaVersion,\n type SubmissionEventMessageSource,\n type SubmissionEventMessageType\n} from '~/src/form/form-submission/enums.js'\nimport {\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 * 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 SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n data: SaveAndExitMessageData\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 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":[]}
|
|
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 SaveAndExitMessage {\n schemaVersion: SubmissionEventMessageSchemaVersion\n source: SubmissionEventMessageSource\n createdAt: Date\n messageCreatedAt: Date\n category: SubmissionEventMessageCategory.RUNNER\n type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT\n data: SaveAndExitMessageData\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 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":[]}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import Joi, { type ObjectSchema } from 'joi';
|
|
2
2
|
import { type AuditEvent, type AuditMessage, type AuditRecord, type AuditUser, type AuthenticationMessageData, type DlqActionMessageData, type EntitlementMessageData, type ExcelGenerationMessageData, type FormCreatedMessageData, type FormDefinitionS3Meta, type FormFileDownloadedMessageData, type FormMessageChangesData, type FormMessageDataBase, type FormNotificationEmailChanges, type FormOfflineChanges, type FormOrganisationChanges, type FormPrivacyNoticeChanges, type FormSecretBaseMessageData, type FormSubmissionGuidanceChanges, type FormSupportContactChanges, type FormSupportEmailChanges, type FormSupportOnlineChanges, type FormSupportPhoneChanges, type FormTeamEmailChanges, type FormTeamNameChanges, type FormTermsAndConditionsChanges, type FormTitleChanges, type FormUpdatedMessageData, type FormUploadedChanges, type FormsBackupRequestedMessageData } from '../../form/form-audit/types.js';
|
|
3
|
+
import { type Output } from '../../form/form-definition/types.js';
|
|
3
4
|
export declare const formMessageDataBase: Joi.ObjectSchema<FormMessageDataBase>;
|
|
4
5
|
export declare const formCreatedMessageData: Joi.ObjectSchema<FormCreatedMessageData>;
|
|
5
6
|
export declare const formDefinitionS3Meta: Joi.ObjectSchema<FormDefinitionS3Meta>;
|
|
7
|
+
/**
|
|
8
|
+
* Stands apart from the definition's own output schema, which resolves a
|
|
9
|
+
* condition against the sibling `conditions` array - a lookup that has no
|
|
10
|
+
* meaning on an audit message carrying the output on its own.
|
|
11
|
+
*/
|
|
12
|
+
export declare const formOutputMessageData: Joi.ObjectSchema<Output>;
|
|
6
13
|
export declare const formUpdatedMessageData: Joi.ObjectSchema<FormUpdatedMessageData>;
|
|
7
14
|
export declare const formsBackupRequestedMessageData: Joi.ObjectSchema<FormsBackupRequestedMessageData>;
|
|
8
15
|
export declare const formsSecretDeletedMessageData: Joi.ObjectSchema<FormSecretBaseMessageData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAS5C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAE9B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,kBAAkB,EAEvB,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAElC,KAAK,yBAAyB,EAE9B,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAE5B,KAAK,oBAAoB,EAEzB,KAAK,mBAAmB,EAGxB,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EAExB,KAAK,+BAA+B,EACrC,MAAM,gCAAgC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAS5C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAE9B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EAC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BAA6B,iDAMmC,CAAA;AAE7E,eAAO,MAAM,4BAA4B,gDAMmC,CAAA;AAE5E,eAAO,MAAM,6BAA6B,iDAMmC,CAAA;AAE7E,eAAO,MAAM,mBAAmB,uCAK6B,CAAA;AAE7D,eAAO,MAAM,kBAAkB,sCAKgC,CAAA;AAE/D,eAAO,MAAM,sBAAsB,0CAOlC,CAAA;AAED,eAAO,MAAM,6BAA6B,iDAUrC,CAAA;AAEL,eAAO,MAAM,0BAA0B,8CAUlC,CAAA;AAEL,eAAO,MAAM,yBAAyB,6CAIlC,CAAA;AAEJ,eAAO,MAAM,eAAe,6BAKuB,CAAA;AAEnD,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,SAAS,sBAAsB,EACxE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,CASjB;AAED,eAAO,MAAM,aAAa,gCA6P0C,CAAA;AAEpE,eAAO,MAAM,UAAU,8BAIsB,CAAA;AAE7C,eAAO,MAAM,WAAW,+BAOgC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentDef } from '../../components/types.js';
|
|
2
2
|
import { type ConditionListItemRefValueDataV2 } from '../../conditions/types.js';
|
|
3
|
-
import { type FormDefinition } from '../../form/form-definition/types.js';
|
|
3
|
+
import { type FormDefinition, type Output } from '../../form/form-definition/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* TypeGuard to check if something is a FormDefinition
|
|
6
6
|
* @param { unknown } definition
|
|
@@ -26,6 +26,20 @@ export declare function getConditionListItemIds(value: ConditionListItemRefValue
|
|
|
26
26
|
* @param definition - form definition
|
|
27
27
|
*/
|
|
28
28
|
export declare function getHiddenFields(definition: FormDefinition): ComponentDef[];
|
|
29
|
+
/**
|
|
30
|
+
* Builds the key identifying a submission email target. Two outputs sharing a
|
|
31
|
+
* key would send the same format of the same submission to the same inbox in
|
|
32
|
+
* the same circumstances, so one of them is redundant. Addresses are compared
|
|
33
|
+
* case-insensitively and a missing condition is treated as an empty one.
|
|
34
|
+
* @param output - submission email target
|
|
35
|
+
*/
|
|
36
|
+
export declare function getOutputKey(output: Partial<Output>): string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether two submission email targets are duplicates of one another
|
|
39
|
+
* @param output - submission email target
|
|
40
|
+
* @param otherOutput - submission email target to compare against
|
|
41
|
+
*/
|
|
42
|
+
export declare function isDuplicateOutput(output: Partial<Output>, otherOutput: Partial<Output>): boolean;
|
|
29
43
|
/**
|
|
30
44
|
* @param definition - form definition
|
|
31
45
|
* @returns {boolean}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,MAAM,EACZ,MAAM,qCAAqC,CAAA;AAI5C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,OAAO,GAClB,UAAU,IAAI,cAAc,CAW9B;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,kBAAkB,EAAE,OAAO,GAC1B,kBAAkB,IAAI,+BAA+B,CAUvD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,+BAA+B,GAAG,SAAS,GACjD,MAAM,EAAE,CAMV;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,kBAczD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAO5D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EACvB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,GAC3B,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,WAKpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,aAAa,EAAyB,MAAM,KAAK,CAAA;AAWxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,+BAA+B,EAOrC,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,EAAE,EAAE,KAAK,aAAa,EAAyB,MAAM,KAAK,CAAA;AAWxE,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAEL,KAAK,eAAe,EAIpB,KAAK,+BAA+B,EAOrC,MAAM,2BAA2B,CAAA;AAUlC,OAAO,EAGL,KAAK,kBAAkB,EAIvB,KAAK,cAAc,EAGnB,KAAK,IAAI,EAET,KAAK,IAAI,EAET,KAAK,MAAM,EAGX,KAAK,OAAO,EACb,MAAM,qCAAqC,CAAA;AA2C5C,eAAO,MAAM,mBAAmB,GAC9B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,+BAA+B,CAAC,iCA0CxD,CAAA;AAmOD,eAAO,MAAM,qBAAqB,uCAyD9B,CAAA;AAoDJ,eAAO,MAAM,wBAAwB,0CAwBU,CAAA;AAE/C,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,SAAS,aAAa,CAAC,MAAM,CAAC,iCAW/B,CAAA;AAED,eAAO,MAAM,eAAe,oCAgOZ,CAAA;AAEhB,eAAO,MAAM,iBAAiB,oCAciB,CAAA;AAE/C,eAAO,MAAM,wBAAwB,oCASsB,CAAA;AAE3D,eAAO,MAAM,yBAAyB,oCAMpC,CAAA;AAEF,eAAO,MAAM,sBAAsB,oCAWjC,CAAA;AAuDF,eAAO,MAAM,gBAAgB,8BASzB,CAAA;AAyCJ,eAAO,MAAM,0BAA0B,sEAWmB,CAAA;AAE1D;;;GAGG;AACH,eAAO,MAAM,UAAU,4BAmDnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAuCiB,CAAA;AAE1C,eAAO,MAAM,mBAAmB,4BAgBkB,CAAA;AAwDlD,eAAO,MAAM,UAAU,4BA8CnB,CAAA;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,4BAIiB,CAAA;AAE1C;;GAEG;AACH,eAAO,MAAM,gBAAgB,+BAIgB,CAAA;AA2G7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sCA4E7B,CAAA;AAEJ,eAAO,MAAM,sBAAsB,sCA2DY,CAAA;AAE/C,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,yCAAyC,CAAA;AAIhD,eAAO,MAAM,MAAM,sCAAuB,CAAA"}
|
|
@@ -150,6 +150,11 @@ export interface Output {
|
|
|
150
150
|
audience: OutputAudience;
|
|
151
151
|
version: string;
|
|
152
152
|
emailAddress: string;
|
|
153
|
+
/**
|
|
154
|
+
* Id of the condition determining whether submissions are sent to this
|
|
155
|
+
* output. V2 only - rejected by the V1 schema.
|
|
156
|
+
*/
|
|
157
|
+
condition?: string;
|
|
153
158
|
}
|
|
154
159
|
export interface FormOptions {
|
|
155
160
|
showReferenceNumber?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-definition/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE/E,oBAAY,MAAM;IAChB,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,oBAAY,aAAa;IACvB,EAAE,IAAI;IACN,EAAE,IAAI;CACP;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,MAAM,CAAC,EAAE,KAAK,CAAA;CACf;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,IAA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G;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,UAAU,EAAE,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,EAAE,CAAA;IACrD,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE;QACP,QAAQ,EAAE,cAAc,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/form/form-manager/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EACL,mBAAmB,EAGnB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,mBAAmB,GAAG,mBAAmB,EAAE,MAItC,QAAQ,GAAG,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/form/form-manager/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,KAAK,CAAA;AAE1C,OAAO,EACL,mBAAmB,EAGnB,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,YAAY,mBAAmB,GAAG,mBAAmB,EAAE,MAItC,QAAQ,GAAG,CAAC,WAAW,EAAE,sBAmD3C,CAAA;AAED;;GAEG;AACH,wBAAgB,SAAS,CACvB,eAAe,EAAE,eAAe,GAAG,SAAS,GAC3C,wBAAwB,EAAE,CA8D5B;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAqDpE,CAAA"}
|
|
@@ -37,12 +37,14 @@ export declare enum FormDefinitionError {
|
|
|
37
37
|
UniqueListItemId = "unique_list_item_id",
|
|
38
38
|
UniqueListItemText = "unique_list_item_text",
|
|
39
39
|
UniqueListItemValue = "unique_list_item_value",
|
|
40
|
+
UniqueOutput = "unique_output",
|
|
40
41
|
RefPageCondition = "ref_page_condition",
|
|
41
42
|
RefConditionComponentId = "ref_condition_component_id",
|
|
42
43
|
RefConditionListId = "ref_condition_list_id",
|
|
43
44
|
RefConditionItemId = "ref_condition_item_id",
|
|
44
45
|
RefConditionConditionId = "ref_condition_condition_id",
|
|
45
46
|
RefPageComponentList = "ref_page_component_list",
|
|
47
|
+
RefOutputCondition = "ref_output_condition",
|
|
46
48
|
IncompatibleConditionComponentType = "incompatible_condition_component_type",
|
|
47
49
|
IncompatibleQuestionRegex = "incompatible_question_regex",
|
|
48
50
|
Other = "other"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-manager/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,KAAK,CAAA;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M,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,wBAAwB,GAChC;IACE,EAAE,EAAE,mBAAmB,CAAA;IACvB,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,oCAAoC,CAAA;CAC7C,GACD;IACE,EAAE,EAAE,mBAAmB,CAAA;IACvB,IAAI,EAAE,uBAAuB,CAAC,GAAG,CAAA;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,iCAAiC,CAAA;CAC1C,GACD;IACE,EAAE,EAAE,mBAAmB,CAAA;IACvB,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAA;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,GACD;IACE,EAAE,EAAE,mBAAmB,CAAA;IACvB,IAAI,EAAE,uBAAuB,CAAC,YAAY,CAAA;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,0CAA0C,CAAA;CACnD,CAAA;AAEL,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAA;CACjB"}
|
|
@@ -15,4 +15,27 @@ export declare enum SubmissionEventMessageSource {
|
|
|
15
15
|
export declare enum SubmissionEventMessageType {
|
|
16
16
|
RUNNER_SAVE_AND_EXIT = "RUNNER_SAVE_AND_EXIT"
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The outcome of evaluating a single form condition.
|
|
20
|
+
*
|
|
21
|
+
* `Error` is deliberately distinct from `False`. The runner defaults a failed
|
|
22
|
+
* evaluation to `false` when routing, but for an audit record the two are not
|
|
23
|
+
* the same thing and a consumer must be able to tell them apart.
|
|
24
|
+
*/
|
|
25
|
+
export declare enum ConditionEvaluationOutcome {
|
|
26
|
+
/**
|
|
27
|
+
* The condition evaluated to `true`
|
|
28
|
+
*/
|
|
29
|
+
True = "true",
|
|
30
|
+
/**
|
|
31
|
+
* The condition evaluated to `false`
|
|
32
|
+
*/
|
|
33
|
+
False = "false",
|
|
34
|
+
/**
|
|
35
|
+
* Evaluation threw - most commonly because the condition references a
|
|
36
|
+
* component that is absent from the evaluation context, such as a component
|
|
37
|
+
* on a repeater page. The runner treats this as `false`.
|
|
38
|
+
*/
|
|
39
|
+
Error = "error"
|
|
40
|
+
}
|
|
18
41
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,mBAAmB,yBAAyB;CAC7C;AAED,oBAAY,mCAAmC;IAC7C,EAAE,IAAI;CACP;AAED,oBAAY,8BAA8B;IACxC,MAAM,WAAW;CAClB;AAED,oBAAY,4BAA4B;IACtC,YAAY,iBAAiB;CAC9B;AAED,oBAAY,0BAA0B;IACpC,oBAAoB,yBAAyB;CAC9C"}
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,cAAc,oBAAoB;IAClC,aAAa,mBAAmB;IAChC,mBAAmB,yBAAyB;CAC7C;AAED,oBAAY,mCAAmC;IAC7C,EAAE,IAAI;CACP;AAED,oBAAY,8BAA8B;IACxC,MAAM,WAAW;CAClB;AAED,oBAAY,4BAA4B;IACtC,YAAY,iBAAiB;CAC9B;AAED,oBAAY,0BAA0B;IACpC,oBAAoB,yBAAyB;CAC9C;AAED;;;;;;GAMG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,KAAK,UAAU;IAEf;;;;OAIG;IACH,KAAK,UAAU;CAChB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
|
-
import { type SaveAndExitMessage, type SaveAndExitMessageData, type SubmitPayload, type SubmitRecord, type SubmitRecordset } from '../../form/form-submission/types.js';
|
|
2
|
+
import { type SaveAndExitMessage, type SaveAndExitMessageData, type SubmitConditionEvaluation, type SubmitConditionReference, type SubmitPayload, type SubmitRecord, type SubmitRecordset } from '../../form/form-submission/types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Joi schema for `SubmitRecord` interface
|
|
5
5
|
* @see {@link SubmitRecord}
|
|
@@ -10,6 +10,16 @@ export declare const formSubmitRecordSchema: Joi.ObjectSchema<SubmitRecord>;
|
|
|
10
10
|
* @see {@link SubmitRecordset}
|
|
11
11
|
*/
|
|
12
12
|
export declare const formSubmitRecordsetSchema: Joi.ObjectSchema<SubmitRecordset>;
|
|
13
|
+
/**
|
|
14
|
+
* Joi schema for `SubmitConditionReference` interface
|
|
15
|
+
* @see {@link SubmitConditionReference}
|
|
16
|
+
*/
|
|
17
|
+
export declare const formSubmitConditionReferenceSchema: Joi.ObjectSchema<SubmitConditionReference>;
|
|
18
|
+
/**
|
|
19
|
+
* Joi schema for `SubmitConditionEvaluation` interface
|
|
20
|
+
* @see {@link SubmitConditionEvaluation}
|
|
21
|
+
*/
|
|
22
|
+
export declare const formSubmitConditionEvaluationSchema: Joi.ObjectSchema<SubmitConditionEvaluation>;
|
|
13
23
|
/**
|
|
14
24
|
* Joi schema for `SubmitPayload` interface
|
|
15
25
|
* @see {@link SubmitPayload}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-submission/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAWrB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,qCAAqC,CAAA;AAE5C;;;GAGG;AACH,eAAO,MAAM,sBAAsB,gCAa0B,CAAA;AAE7D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,mCAoByC,CAAA;AAE/E;;;GAGG;AACH,eAAO,MAAM,kCAAkC,4CAiB+B,CAAA;AAE9E;;;GAGG;AACH,eAAO,MAAM,mCAAmC,6CAiBwB,CAAA;AAExE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iCA+B2C,CAAA;AAE/E,eAAO,MAAM,sBAAsB,0CAmBD,CAAA;AAElC,eAAO,MAAM,uBAAuB,sCA2BlC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FormStatus } from '../../common/enums.js';
|
|
2
|
-
import { type SecurityQuestionsEnum, type SubmissionEventMessageCategory, type SubmissionEventMessageSchemaVersion, type SubmissionEventMessageSource, type SubmissionEventMessageType } from '../../form/form-submission/enums.js';
|
|
2
|
+
import { type ConditionEvaluationOutcome, type SecurityQuestionsEnum, type SubmissionEventMessageCategory, type SubmissionEventMessageSchemaVersion, type SubmissionEventMessageSource, type SubmissionEventMessageType } from '../../form/form-submission/enums.js';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for an individual submit record
|
|
5
5
|
* @see {@link formSubmitRecordSchema}
|
|
@@ -36,6 +36,51 @@ export interface SubmitRecordset {
|
|
|
36
36
|
*/
|
|
37
37
|
value: SubmitRecord[][];
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A component referenced by a condition, and whether the user had answered it
|
|
41
|
+
* when the condition was evaluated.
|
|
42
|
+
*
|
|
43
|
+
* An unanswered question is not absent from the runner's evaluation context -
|
|
44
|
+
* it is present as `null` - so conditions still return a boolean for questions
|
|
45
|
+
* that were skipped or never reached. Negative operators ("is not", "is shorter
|
|
46
|
+
* than") return `true` in that case. Without knowing which referenced questions
|
|
47
|
+
* were answered, a consumer cannot tell a real match from a vacuous one.
|
|
48
|
+
* @see {@link formSubmitConditionReferenceSchema}
|
|
49
|
+
*/
|
|
50
|
+
export interface SubmitConditionReference {
|
|
51
|
+
/**
|
|
52
|
+
* The id of the referenced component
|
|
53
|
+
*/
|
|
54
|
+
componentId: string;
|
|
55
|
+
/**
|
|
56
|
+
* The name of the referenced component, as used in the submitted records
|
|
57
|
+
*/
|
|
58
|
+
componentName: string;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the referenced component held an answer at the point of evaluation
|
|
61
|
+
*/
|
|
62
|
+
answered: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The recorded outcome of a single condition at the point of submission.
|
|
66
|
+
* V2 forms only - V1 conditions are not captured.
|
|
67
|
+
* @see {@link formSubmitConditionEvaluationSchema}
|
|
68
|
+
*/
|
|
69
|
+
export interface SubmitConditionEvaluation {
|
|
70
|
+
/**
|
|
71
|
+
* The id of the condition, as authored in the V2 form definition
|
|
72
|
+
*/
|
|
73
|
+
conditionId: string;
|
|
74
|
+
/**
|
|
75
|
+
* The result of evaluating the condition
|
|
76
|
+
*/
|
|
77
|
+
outcome: ConditionEvaluationOutcome;
|
|
78
|
+
/**
|
|
79
|
+
* Every component the condition depends on, including those reached through
|
|
80
|
+
* nested condition references, and whether each was answered
|
|
81
|
+
*/
|
|
82
|
+
references: SubmitConditionReference[];
|
|
83
|
+
}
|
|
39
84
|
/**
|
|
40
85
|
* Interface for the submission-api `/submit` payload
|
|
41
86
|
* @see {@link formSubmitPayloadSchema}
|
|
@@ -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,qBAAqB,EAC1B,KAAK,8BAA8B,EACnC,KAAK,mCAAmC,EACxC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAChC,MAAM,qCAAqC,CAAA;
|
|
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,MAAM,CAAA;IAEnB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,OAAO,E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AAE,0BAA0B,CAAC,oBAAoB,CAAA;IACrD,IAAI,EAAE,sBAAsB,CAAA;CAC7B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM,CAAA;QACV,MAAM,EAAE,UAAU,CAAA;QAClB,SAAS,EAAE,OAAO,CAAA;QAClB,OAAO,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE;QACR,QAAQ,EAAE,qBAAqB,CAAA;QAC/B,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,KAAK,EAAE,MAAM,CAAA;IACb,uBAAuB,EAAE,MAAM,CAAA;IAC/B,SAAS,EAAE,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAA;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,gBAAgB,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,qBAAqB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra/forms-model",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.704",
|
|
4
4
|
"description": "A hapi plugin providing the model for Defra forms",
|
|
5
5
|
"homepage": "https://github.com/DEFRA/forms-designer/tree/main/model#readme",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/slug": "^5.0.9",
|
|
45
|
-
"joi": "^17.13.
|
|
45
|
+
"joi": "^17.13.4",
|
|
46
46
|
"joi-to-json": "^4.3.2",
|
|
47
47
|
"tsc-alias": "^1.8.11"
|
|
48
48
|
},
|
|
@@ -1774,8 +1774,10 @@
|
|
|
1774
1774
|
"outputs": {
|
|
1775
1775
|
"type": "array",
|
|
1776
1776
|
"description": "One or more email targets/types for submission emails",
|
|
1777
|
+
"uniqueItems": true,
|
|
1777
1778
|
"items": {
|
|
1778
1779
|
"type": "object",
|
|
1780
|
+
"description": "Configuration for a single submission email target",
|
|
1779
1781
|
"properties": {
|
|
1780
1782
|
"emailAddress": {
|
|
1781
1783
|
"type": "string",
|