@defra/forms-model 3.0.704 → 3.0.706
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-submission/index.js +13 -0
- package/dist/module/form/form-submission/index.js.map +1 -1
- package/dist/module/manage/dead-letter-queues.js +2 -1
- package/dist/module/manage/dead-letter-queues.js.map +1 -1
- package/dist/types/form/form-submission/index.d.ts +1 -0
- package/dist/types/form/form-submission/index.d.ts.map +1 -1
- package/dist/types/manage/dead-letter-queues.d.ts +2 -1
- package/dist/types/manage/dead-letter-queues.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-submission/index.ts +16 -0
- package/src/manage/dead-letter-queues.ts +2 -1
|
@@ -82,4 +82,17 @@ export const submissionMessageSchema = Joi.object().keys({
|
|
|
82
82
|
messageCreatedAt: Joi.date().required().description('ISO timestamp when the message was published'),
|
|
83
83
|
data: saveAndExitMessageData
|
|
84
84
|
});
|
|
85
|
+
export const notifyEmailMessageSchema = Joi.object().keys({
|
|
86
|
+
source: Joi.string().required(),
|
|
87
|
+
reason: Joi.string().required(),
|
|
88
|
+
formId: Joi.string().allow(''),
|
|
89
|
+
referenceNumber: Joi.string().allow(''),
|
|
90
|
+
templateId: Joi.string().required(),
|
|
91
|
+
emailAddress: Joi.string().email().required(),
|
|
92
|
+
personalisation: Joi.object({
|
|
93
|
+
subject: Joi.string().required(),
|
|
94
|
+
body: Joi.string().required()
|
|
95
|
+
}),
|
|
96
|
+
notifyReplyToId: Joi.string().optional()
|
|
97
|
+
}).label('NotifyEmailData');
|
|
85
98
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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,GAAG,CAACW,MAAM,CAAC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AAM,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
|
+
{"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","notifyEmailMessageSchema","reason","formId","templateId","emailAddress","personalisation","subject","body","notifyReplyToId"],"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\nexport const notifyEmailMessageSchema = Joi.object()\n .keys({\n source: Joi.string().required(),\n reason: Joi.string().required(),\n formId: Joi.string().allow(''),\n referenceNumber: Joi.string().allow(''),\n templateId: Joi.string().required(),\n emailAddress: Joi.string().email().required(),\n personalisation: Joi.object({\n subject: Joi.string().required(),\n body: Joi.string().required()\n }),\n notifyReplyToId: Joi.string().optional()\n })\n .label('NotifyEmailData')\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,GAAG,CAACW,MAAM,CAAC,CAAC,CACfC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C,CAAC;EAC9DC,KAAK,EAAEd,GAAG,CAACW,MAAM,CAAC,CAAC,CAChBC,QAAQ,CAAC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AC9B,CAAC,CAAC;EACF6D,eAAe,EAAEzE,GAAG,CAACW,MAAM,CAAC,CAAC,CAAC2B,QAAQ,CAAC;AACzC,CAAC,CAAC,CACDrB,KAAK,CAAC,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export let DeadLetterQueues = /*#__PURE__*/function (DeadLetterQueues) {
|
|
2
2
|
DeadLetterQueues["AuditApi"] = "audit-api";
|
|
3
3
|
DeadLetterQueues["NewlsCwtListener"] = "newls-cwt-listener";
|
|
4
|
-
DeadLetterQueues["
|
|
4
|
+
DeadLetterQueues["NotifyEmailListener"] = "notify-email-listener";
|
|
5
|
+
DeadLetterQueues["NotifySubmissionListener"] = "notify-submission-listener";
|
|
5
6
|
DeadLetterQueues["SharepointListener"] = "sharepoint-listener";
|
|
6
7
|
DeadLetterQueues["SubmissionsApiFormSubmissions"] = "submissions-api (form submissions)";
|
|
7
8
|
DeadLetterQueues["SubmissionsApiSaveAndExit"] = "submissions-api (save-and-exit)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-letter-queues.js","names":["DeadLetterQueues"],"sources":["../../../src/manage/dead-letter-queues.ts"],"sourcesContent":["export enum DeadLetterQueues {\n AuditApi = 'audit-api',\n NewlsCwtListener = 'newls-cwt-listener',\n
|
|
1
|
+
{"version":3,"file":"dead-letter-queues.js","names":["DeadLetterQueues"],"sources":["../../../src/manage/dead-letter-queues.ts"],"sourcesContent":["export enum DeadLetterQueues {\n AuditApi = 'audit-api',\n NewlsCwtListener = 'newls-cwt-listener',\n NotifyEmailListener = 'notify-email-listener',\n NotifySubmissionListener = 'notify-submission-listener',\n SharepointListener = 'sharepoint-listener',\n SubmissionsApiFormSubmissions = 'submissions-api (form submissions)',\n SubmissionsApiSaveAndExit = 'submissions-api (save-and-exit)'\n}\n"],"mappings":"AAAA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA","ignoreList":[]}
|
|
@@ -27,4 +27,5 @@ export declare const formSubmitConditionEvaluationSchema: Joi.ObjectSchema<Submi
|
|
|
27
27
|
export declare const formSubmitPayloadSchema: Joi.ObjectSchema<SubmitPayload>;
|
|
28
28
|
export declare const saveAndExitMessageData: Joi.ObjectSchema<SaveAndExitMessageData>;
|
|
29
29
|
export declare const submissionMessageSchema: Joi.ObjectSchema<SaveAndExitMessage>;
|
|
30
|
+
export declare const notifyEmailMessageSchema: Joi.ObjectSchema<any>;
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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;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
|
+
{"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;AAEF,eAAO,MAAM,wBAAwB,uBAcV,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare enum DeadLetterQueues {
|
|
2
2
|
AuditApi = "audit-api",
|
|
3
3
|
NewlsCwtListener = "newls-cwt-listener",
|
|
4
|
-
|
|
4
|
+
NotifyEmailListener = "notify-email-listener",
|
|
5
|
+
NotifySubmissionListener = "notify-submission-listener",
|
|
5
6
|
SharepointListener = "sharepoint-listener",
|
|
6
7
|
SubmissionsApiFormSubmissions = "submissions-api (form submissions)",
|
|
7
8
|
SubmissionsApiSaveAndExit = "submissions-api (save-and-exit)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dead-letter-queues.d.ts","sourceRoot":"","sources":["../../../src/manage/dead-letter-queues.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,gBAAgB,uBAAuB;IACvC,
|
|
1
|
+
{"version":3,"file":"dead-letter-queues.d.ts","sourceRoot":"","sources":["../../../src/manage/dead-letter-queues.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,gBAAgB,uBAAuB;IACvC,mBAAmB,0BAA0B;IAC7C,wBAAwB,+BAA+B;IACvD,kBAAkB,wBAAwB;IAC1C,6BAA6B,uCAAuC;IACpE,yBAAyB,oCAAoC;CAC9D"}
|
package/package.json
CHANGED
|
@@ -196,3 +196,19 @@ export const submissionMessageSchema = Joi.object<SaveAndExitMessage>().keys({
|
|
|
196
196
|
.description('ISO timestamp when the message was published'),
|
|
197
197
|
data: saveAndExitMessageData
|
|
198
198
|
})
|
|
199
|
+
|
|
200
|
+
export const notifyEmailMessageSchema = Joi.object()
|
|
201
|
+
.keys({
|
|
202
|
+
source: Joi.string().required(),
|
|
203
|
+
reason: Joi.string().required(),
|
|
204
|
+
formId: Joi.string().allow(''),
|
|
205
|
+
referenceNumber: Joi.string().allow(''),
|
|
206
|
+
templateId: Joi.string().required(),
|
|
207
|
+
emailAddress: Joi.string().email().required(),
|
|
208
|
+
personalisation: Joi.object({
|
|
209
|
+
subject: Joi.string().required(),
|
|
210
|
+
body: Joi.string().required()
|
|
211
|
+
}),
|
|
212
|
+
notifyReplyToId: Joi.string().optional()
|
|
213
|
+
})
|
|
214
|
+
.label('NotifyEmailData')
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export enum DeadLetterQueues {
|
|
2
2
|
AuditApi = 'audit-api',
|
|
3
3
|
NewlsCwtListener = 'newls-cwt-listener',
|
|
4
|
-
|
|
4
|
+
NotifyEmailListener = 'notify-email-listener',
|
|
5
|
+
NotifySubmissionListener = 'notify-submission-listener',
|
|
5
6
|
SharepointListener = 'sharepoint-listener',
|
|
6
7
|
SubmissionsApiFormSubmissions = 'submissions-api (form submissions)',
|
|
7
8
|
SubmissionsApiSaveAndExit = 'submissions-api (save-and-exit)'
|