@defra/forms-model 3.0.613 → 3.0.615
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 -2
- package/dist/module/form/form-audit/index.js.map +1 -1
- package/dist/module/form/form-audit/types.js.map +1 -1
- package/dist/module/form/form-definition/index.js +2 -1
- 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-editor/index.js +1 -0
- package/dist/module/form/form-editor/index.js.map +1 -1
- package/dist/module/form/form-editor/preview/controller/summary-page-controller.js +4 -1
- package/dist/module/form/form-editor/preview/controller/summary-page-controller.js.map +1 -1
- package/dist/module/form/form-editor/types.js.map +1 -1
- package/dist/module/form/form-metadata/index.js +13 -1
- package/dist/module/form/form-metadata/index.js.map +1 -1
- package/dist/module/form/form-metadata/types.js.map +1 -1
- package/dist/types/form/form-audit/index.d.ts.map +1 -1
- package/dist/types/form/form-audit/types.d.ts +2 -0
- package/dist/types/form/form-audit/types.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 +2 -1
- package/dist/types/form/form-definition/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/index.d.ts +1 -0
- package/dist/types/form/form-editor/index.d.ts.map +1 -1
- package/dist/types/form/form-editor/preview/controller/summary-page-controller.d.ts.map +1 -1
- package/dist/types/form/form-editor/types.d.ts +5 -0
- package/dist/types/form/form-editor/types.d.ts.map +1 -1
- package/dist/types/form/form-metadata/index.d.ts +5 -1
- package/dist/types/form/form-metadata/index.d.ts.map +1 -1
- package/dist/types/form/form-metadata/types.d.ts +9 -1
- package/dist/types/form/form-metadata/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/form-definition-schema.json +6 -3
- package/schemas/form-definition-v2-schema.json +6 -3
- package/schemas/form-metadata-input-schema.json +66 -4
- package/schemas/form-metadata-schema.json +66 -4
- package/src/form/form-audit/index.ts +13 -1
- package/src/form/form-audit/types.ts +2 -0
- package/src/form/form-definition/index.ts +2 -1
- package/src/form/form-definition/types.ts +2 -1
- package/src/form/form-editor/index.ts +4 -0
- package/src/form/form-editor/preview/controller/summary-page-controller.js +19 -11
- package/src/form/form-editor/types.ts +10 -0
- package/src/form/form-metadata/index.ts +19 -1
- package/src/form/form-metadata/types.ts +12 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
import { AuditEventMessageCategory, AuditEventMessageSchemaVersion, AuditEventMessageSource, AuditEventMessageType, FormDefinitionRequestType } from "./enums.js";
|
|
3
|
-
import { contactSchema, emailAddressSchema, emailResponseTimeSchema, idSchema, notificationEmailAddressSchema, onlineTextSchema, onlineUrlSchema, organisationSchema, phoneSchema, privacyNoticeUrlSchema, slugSchema, submissionGuidanceSchema, teamEmailSchema, teamNameSchema, titleSchema } from "../form-metadata/index.js";
|
|
3
|
+
import { contactSchema, emailAddressSchema, emailResponseTimeSchema, idSchema, notificationEmailAddressSchema, onlineTextSchema, onlineUrlSchema, organisationSchema, phoneSchema, privacyNoticeTextSchema, privacyNoticeTypeSchema, privacyNoticeUrlSchema, slugSchema, submissionGuidanceSchema, teamEmailSchema, teamNameSchema, titleSchema } from "../form-metadata/index.js";
|
|
4
4
|
export const formMessageDataBase = Joi.object({
|
|
5
5
|
formId: idSchema,
|
|
6
6
|
slug: slugSchema,
|
|
@@ -52,7 +52,17 @@ export const formSupportEmailChanges = Joi.object().keys({
|
|
|
52
52
|
responseTime: emailResponseTimeSchema.optional()
|
|
53
53
|
}).description('Changes schema for FORM_SUPPORT_EMAIL_UPDATED event');
|
|
54
54
|
export const formPrivacyNoticeChanges = Joi.object().keys({
|
|
55
|
-
|
|
55
|
+
privacyNoticeType: privacyNoticeTypeSchema,
|
|
56
|
+
privacyNoticeText: Joi.when('privacyNoticeType', {
|
|
57
|
+
is: 'text',
|
|
58
|
+
then: privacyNoticeTextSchema,
|
|
59
|
+
otherwise: privacyNoticeTextSchema.allow('')
|
|
60
|
+
}),
|
|
61
|
+
privacyNoticeUrl: Joi.when('privacyNoticeType', {
|
|
62
|
+
is: 'link',
|
|
63
|
+
then: privacyNoticeUrlSchema,
|
|
64
|
+
otherwise: privacyNoticeUrlSchema.allow('')
|
|
65
|
+
})
|
|
56
66
|
}).required().description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event');
|
|
57
67
|
export const formNotificationEmailChanges = Joi.object().keys({
|
|
58
68
|
notificationEmail: notificationEmailAddressSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageSource","AuditEventMessageType","FormDefinitionRequestType","contactSchema","emailAddressSchema","emailResponseTimeSchema","idSchema","notificationEmailAddressSchema","onlineTextSchema","onlineUrlSchema","organisationSchema","phoneSchema","privacyNoticeUrlSchema","slugSchema","submissionGuidanceSchema","teamEmailSchema","teamNameSchema","titleSchema","formMessageDataBase","object","formId","slug","payload","optional","required","description","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formDefinitionS3Meta","keys","fileId","string","filename","s3Key","formUpdatedMessageData","requestType","valid","Object","values","s3Meta","formsBackupRequestedMessageData","totalForms","number","integer","min","durationMs","formTitleChanges","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportContactChanges","contact","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formSupportEmailChanges","address","responseTime","formPrivacyNoticeChanges","privacyNoticeUrl","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","entitlementMessageData","userId","displayName","email","roles","array","items","formFileDownloadedMessageData","fileLink","excelGenerationMessageData","formName","authenticationMessageData","auditUserSchema","id","formChangesMessageData","schema","changes","previous","new","messageSchema","schemaVersion","category","source","type","entityId","traceId","createdAt","date","createdBy","data","when","switch","is","trim","FORM_CREATED","then","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_SUPPORT_CONTACT_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_JSON_UPLOADED","FORM_UPDATED","ENTITLEMENT_CREATED","ENTITLEMENT_UPDATED","ENTITLEMENT_DELETED","FORM_DRAFT_DELETED","FORM_JSON_DOWNLOADED","AUTHENTICATION_LOGIN","AUTHENTICATION_LOGOUT_MANUAL","AUTHENTICATION_LOGOUT_AUTO","AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE","FORM_FILE_DOWNLOAD_SUCCESS","FORM_FILE_DOWNLOAD_FAILURE","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","PLATFORM_CSAT_EXCEL_REQUESTED","FORMS_BACKUP_REQUESTED","otherwise","forbidden","messageCreatedAt","auditEvent","message","auditRecord","messageId","uuid","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageSource,\n AuditEventMessageType,\n FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type AuthenticationMessageData,\n type ChangesMessageData,\n type EntitlementMessageData,\n type ExcelGenerationMessageData,\n type FormCreatedMessageData,\n type FormDefinitionS3Meta,\n type FormFileDownloadedMessageData,\n type FormMessageChangesData,\n type FormMessageDataBase,\n type FormNotificationEmailChanges,\n type FormNotificationEmailUpdatedMessageData,\n type FormOrganisationChanges,\n type FormOrganisationUpdatedMessageData,\n type FormPrivacyNoticeChanges,\n type FormPrivacyNoticeUpdatedMessageData,\n type FormSubmissionGuidanceChanges,\n type FormSubmissionGuidanceUpdatedMessageData,\n type FormSupportContactChanges,\n type FormSupportContactUpdatedMessageData,\n type FormSupportEmailChanges,\n type FormSupportEmailUpdatedMessageData,\n type FormSupportOnlineChanges,\n type FormSupportOnlineUpdatedMessageData,\n type FormSupportPhoneChanges,\n type FormSupportPhoneUpdatedMessageData,\n type FormTeamEmailChanges,\n type FormTeamEmailUpdatedMessageData,\n type FormTeamNameChanges,\n type FormTeamNameUpdatedMessageData,\n type FormTitleChanges,\n type FormTitleUpdatedMessageData,\n type FormUpdatedMessageData,\n type FormUploadedChanges,\n type FormUploadedMessageData,\n type FormsBackupRequestedMessageData\n} from '~/src/form/form-audit/types.js'\nimport {\n contactSchema,\n emailAddressSchema,\n emailResponseTimeSchema,\n idSchema,\n notificationEmailAddressSchema,\n onlineTextSchema,\n onlineUrlSchema,\n organisationSchema,\n phoneSchema,\n privacyNoticeUrlSchema,\n slugSchema,\n submissionGuidanceSchema,\n teamEmailSchema,\n teamNameSchema,\n titleSchema\n} from '~/src/form/form-metadata/index.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: idSchema,\n slug: slugSchema,\n payload: Joi.object().optional()\n})\n .required()\n .description('The base data object for Form Messages')\n\nexport const formCreatedMessageData = formMessageDataBase\n .append<FormCreatedMessageData>({\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Message data schema for when a form is created')\n\nexport const formDefinitionS3Meta = Joi.object<FormDefinitionS3Meta>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n s3Key: Joi.string().required()\n })\n .description('Schema for form data S3 object in message')\n\nexport const formUpdatedMessageData = formMessageDataBase\n .append<FormUpdatedMessageData>({\n requestType: Joi.string()\n .valid(...Object.values(FormDefinitionRequestType))\n .required(),\n s3Meta: formDefinitionS3Meta.optional()\n })\n .required()\n\nexport const formsBackupRequestedMessageData =\n Joi.object<FormsBackupRequestedMessageData>().keys({\n totalForms: Joi.number().integer().min(0).required(),\n durationMs: Joi.number().min(0).required()\n })\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: titleSchema\n })\n .required()\n .description('Changes schema for FORM_TITLE_UPDATED event')\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: organisationSchema\n })\n .required()\n .description('Changes schema for FORM_ORGANISATION_UPDATED event')\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: teamNameSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_NAME_UPDATED event')\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_EMAIL_UPDATED event')\n\nexport const formSupportContactChanges = Joi.object<FormSupportContactChanges>()\n .keys({\n contact: contactSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_CONTACT_UPDATED event')\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: phoneSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_PHONE_UPDATED event')\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: onlineUrlSchema.optional(),\n text: onlineTextSchema.optional()\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_ONLINE_UPDATED event')\n\nexport const formSupportEmailChanges = Joi.object<FormSupportEmailChanges>()\n .keys({\n address: emailAddressSchema.optional(),\n responseTime: emailResponseTimeSchema.optional()\n })\n .description('Changes schema for FORM_SUPPORT_EMAIL_UPDATED event')\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeUrl: privacyNoticeUrlSchema\n })\n .required()\n .description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event')\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: notificationEmailAddressSchema\n })\n .required()\n .description('Changes schema for FORM_NOTIFICATION_EMAIL_UPDATED event')\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: submissionGuidanceSchema\n })\n .required()\n .description('Changes schema for FORM_SUBMISSION_GUIDANCE_UPDATED event')\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n .description('Changes schema for FORM_JSON_UPLOADED event')\n\nexport const entitlementMessageData = Joi.object<EntitlementMessageData>().keys(\n {\n userId: Joi.string().required(),\n displayName: Joi.string().required(),\n email: Joi.string().email().required(),\n roles: Joi.array().items(Joi.string())\n }\n)\n\nexport const formFileDownloadedMessageData =\n Joi.object<FormFileDownloadedMessageData>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n fileLink: Joi.string().required()\n })\n .required()\n .description(\n 'Schema for FORM_FILE_DOWNLOAD_SUCCESS and FORM_FILE_DOWNLOAD_FAILURE events'\n )\n\nexport const excelGenerationMessageData =\n Joi.object<ExcelGenerationMessageData>()\n .keys({\n formId: Joi.string().required(),\n formName: Joi.string().required(),\n notificationEmail: Joi.string().email().required()\n })\n .required()\n .description(\n 'Schema for Excel generation audit events (submissions and CSAT)'\n )\n\nexport const authenticationMessageData =\n Joi.object<AuthenticationMessageData>().keys({\n userId: Joi.string().required(),\n displayName: Joi.string().required()\n })\n\nexport const auditUserSchema = Joi.object<AuditUser>()\n .keys({\n id: Joi.string().required(),\n displayName: Joi.string().required()\n })\n .description('Schema for CREATED_BY audit event')\n\nexport function formChangesMessageData<T, U extends FormMessageChangesData>(\n schema: ObjectSchema<T>\n): ObjectSchema<U> {\n return formMessageDataBase.append<U>({\n changes: Joi.object<ChangesMessageData<T>>()\n .keys({\n previous: schema,\n new: schema\n })\n .description('Changes schema')\n })\n}\n\nexport const messageSchema = Joi.object<AuditMessage>()\n .keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(AuditEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the AuditMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(AuditEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(AuditEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(AuditEventMessageType))\n .description('Event type'),\n entityId: Joi.string()\n .required()\n .description('The id of the entity the category relates to'),\n traceId: Joi.string()\n .optional()\n .description(\n 'Trace id of the event - to link events across multiple services'\n ),\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 createdBy: auditUserSchema\n .required()\n .description('The user who performed the action being audited'),\n data: Joi.when('type', {\n switch: [\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_CREATED),\n then: formCreatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TITLE_UPDATED),\n then: formChangesMessageData<\n FormTitleChanges,\n FormTitleUpdatedMessageData\n >(formTitleChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_ORGANISATION_UPDATED),\n then: formChangesMessageData<\n FormOrganisationChanges,\n FormOrganisationUpdatedMessageData\n >(formOrganisationChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_NAME_UPDATED),\n then: formChangesMessageData<\n FormTeamNameChanges,\n FormTeamNameUpdatedMessageData\n >(formTeamNameChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormTeamEmailChanges,\n FormTeamEmailUpdatedMessageData\n >(formTeamEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),\n then: formChangesMessageData<\n FormSupportContactChanges,\n FormSupportContactUpdatedMessageData\n >(formSupportContactChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED),\n then: formChangesMessageData<\n FormSupportPhoneChanges,\n FormSupportPhoneUpdatedMessageData\n >(formSupportPhoneChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormSupportEmailChanges,\n FormSupportEmailUpdatedMessageData\n >(formSupportEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED),\n then: formChangesMessageData<\n FormSupportOnlineChanges,\n FormSupportOnlineUpdatedMessageData\n >(formSupportOnlineChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED),\n then: formChangesMessageData<\n FormPrivacyNoticeChanges,\n FormPrivacyNoticeUpdatedMessageData\n >(formPrivacyNoticeChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormNotificationEmailChanges,\n FormNotificationEmailUpdatedMessageData\n >(formNotificationEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED),\n then: formChangesMessageData<\n FormSubmissionGuidanceChanges,\n FormSubmissionGuidanceUpdatedMessageData\n >(formSubmissionGuidanceChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_UPLOADED),\n then: formChangesMessageData<\n FormUploadedChanges,\n FormUploadedMessageData\n >(formUploadedChanges)\n },\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_UPDATED),\n then: formUpdatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.ENTITLEMENT_CREATED,\n AuditEventMessageType.ENTITLEMENT_UPDATED,\n AuditEventMessageType.ENTITLEMENT_DELETED\n ),\n then: entitlementMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_DRAFT_DELETED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_DOWNLOADED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.AUTHENTICATION_LOGIN,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n ),\n then: authenticationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS,\n AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n ),\n then: formFileDownloadedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED,\n AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n ),\n then: excelGenerationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORMS_BACKUP_REQUESTED),\n then: formsBackupRequestedMessageData\n }\n ],\n otherwise: Joi.forbidden()\n }).description('The data/payload of the audit message'),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published')\n })\n .required()\n .description('The audit message issued by the publishing service')\n\nexport const auditEvent = Joi.object<AuditEvent>()\n .keys({\n message: messageSchema\n })\n .description('The Body of the audit event')\n\nexport const auditRecord = messageSchema\n .append<AuditRecord>({\n id: idSchema,\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n })\n .description('The audit record persisted into the DB')\n"],"mappings":"AAAA,OAAOA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Aa,CACrChE,MAAM,CAAc;EACnB0D,EAAE,EAAE/E,QAAQ;EACZwI,SAAS,EAAEjJ,GAAG,CAACsC,MAAM,CAAC,CAAC,CAAC4G,IAAI,CAAC,CAAC,CAACvH,QAAQ,CAAC,CAAC;EACzCwE,QAAQ,EAAEnG,GAAG,CAACsC,MAAM,CAAC,CAAC,CAACX,QAAQ,CAAC,CAAC;EACjCwH,eAAe,EAAEnJ,GAAG,CAACsG,IAAI,CAAC,CAAC,CAAC3E,QAAQ,CAAC;AACvC,CAAC,CAAC,CACDC,WAAW,CAAC,wCAAwC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageSource","AuditEventMessageType","FormDefinitionRequestType","contactSchema","emailAddressSchema","emailResponseTimeSchema","idSchema","notificationEmailAddressSchema","onlineTextSchema","onlineUrlSchema","organisationSchema","phoneSchema","privacyNoticeTextSchema","privacyNoticeTypeSchema","privacyNoticeUrlSchema","slugSchema","submissionGuidanceSchema","teamEmailSchema","teamNameSchema","titleSchema","formMessageDataBase","object","formId","slug","payload","optional","required","description","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formDefinitionS3Meta","keys","fileId","string","filename","s3Key","formUpdatedMessageData","requestType","valid","Object","values","s3Meta","formsBackupRequestedMessageData","totalForms","number","integer","min","durationMs","formTitleChanges","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportContactChanges","contact","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formSupportEmailChanges","address","responseTime","formPrivacyNoticeChanges","privacyNoticeType","privacyNoticeText","when","is","then","otherwise","allow","privacyNoticeUrl","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","entitlementMessageData","userId","displayName","email","roles","array","items","formFileDownloadedMessageData","fileLink","excelGenerationMessageData","formName","authenticationMessageData","auditUserSchema","id","formChangesMessageData","schema","changes","previous","new","messageSchema","schemaVersion","category","source","type","entityId","traceId","createdAt","date","createdBy","data","switch","trim","FORM_CREATED","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_SUPPORT_CONTACT_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_JSON_UPLOADED","FORM_UPDATED","ENTITLEMENT_CREATED","ENTITLEMENT_UPDATED","ENTITLEMENT_DELETED","FORM_DRAFT_DELETED","FORM_JSON_DOWNLOADED","AUTHENTICATION_LOGIN","AUTHENTICATION_LOGOUT_MANUAL","AUTHENTICATION_LOGOUT_AUTO","AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE","FORM_FILE_DOWNLOAD_SUCCESS","FORM_FILE_DOWNLOAD_FAILURE","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","PLATFORM_CSAT_EXCEL_REQUESTED","FORMS_BACKUP_REQUESTED","forbidden","messageCreatedAt","auditEvent","message","auditRecord","messageId","uuid","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageSource,\n AuditEventMessageType,\n FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type AuthenticationMessageData,\n type ChangesMessageData,\n type EntitlementMessageData,\n type ExcelGenerationMessageData,\n type FormCreatedMessageData,\n type FormDefinitionS3Meta,\n type FormFileDownloadedMessageData,\n type FormMessageChangesData,\n type FormMessageDataBase,\n type FormNotificationEmailChanges,\n type FormNotificationEmailUpdatedMessageData,\n type FormOrganisationChanges,\n type FormOrganisationUpdatedMessageData,\n type FormPrivacyNoticeChanges,\n type FormPrivacyNoticeUpdatedMessageData,\n type FormSubmissionGuidanceChanges,\n type FormSubmissionGuidanceUpdatedMessageData,\n type FormSupportContactChanges,\n type FormSupportContactUpdatedMessageData,\n type FormSupportEmailChanges,\n type FormSupportEmailUpdatedMessageData,\n type FormSupportOnlineChanges,\n type FormSupportOnlineUpdatedMessageData,\n type FormSupportPhoneChanges,\n type FormSupportPhoneUpdatedMessageData,\n type FormTeamEmailChanges,\n type FormTeamEmailUpdatedMessageData,\n type FormTeamNameChanges,\n type FormTeamNameUpdatedMessageData,\n type FormTitleChanges,\n type FormTitleUpdatedMessageData,\n type FormUpdatedMessageData,\n type FormUploadedChanges,\n type FormUploadedMessageData,\n type FormsBackupRequestedMessageData\n} from '~/src/form/form-audit/types.js'\nimport {\n contactSchema,\n emailAddressSchema,\n emailResponseTimeSchema,\n idSchema,\n notificationEmailAddressSchema,\n onlineTextSchema,\n onlineUrlSchema,\n organisationSchema,\n phoneSchema,\n privacyNoticeTextSchema,\n privacyNoticeTypeSchema,\n privacyNoticeUrlSchema,\n slugSchema,\n submissionGuidanceSchema,\n teamEmailSchema,\n teamNameSchema,\n titleSchema\n} from '~/src/form/form-metadata/index.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: idSchema,\n slug: slugSchema,\n payload: Joi.object().optional()\n})\n .required()\n .description('The base data object for Form Messages')\n\nexport const formCreatedMessageData = formMessageDataBase\n .append<FormCreatedMessageData>({\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Message data schema for when a form is created')\n\nexport const formDefinitionS3Meta = Joi.object<FormDefinitionS3Meta>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n s3Key: Joi.string().required()\n })\n .description('Schema for form data S3 object in message')\n\nexport const formUpdatedMessageData = formMessageDataBase\n .append<FormUpdatedMessageData>({\n requestType: Joi.string()\n .valid(...Object.values(FormDefinitionRequestType))\n .required(),\n s3Meta: formDefinitionS3Meta.optional()\n })\n .required()\n\nexport const formsBackupRequestedMessageData =\n Joi.object<FormsBackupRequestedMessageData>().keys({\n totalForms: Joi.number().integer().min(0).required(),\n durationMs: Joi.number().min(0).required()\n })\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: titleSchema\n })\n .required()\n .description('Changes schema for FORM_TITLE_UPDATED event')\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: organisationSchema\n })\n .required()\n .description('Changes schema for FORM_ORGANISATION_UPDATED event')\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: teamNameSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_NAME_UPDATED event')\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_EMAIL_UPDATED event')\n\nexport const formSupportContactChanges = Joi.object<FormSupportContactChanges>()\n .keys({\n contact: contactSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_CONTACT_UPDATED event')\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: phoneSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_PHONE_UPDATED event')\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: onlineUrlSchema.optional(),\n text: onlineTextSchema.optional()\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_ONLINE_UPDATED event')\n\nexport const formSupportEmailChanges = Joi.object<FormSupportEmailChanges>()\n .keys({\n address: emailAddressSchema.optional(),\n responseTime: emailResponseTimeSchema.optional()\n })\n .description('Changes schema for FORM_SUPPORT_EMAIL_UPDATED event')\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeType: privacyNoticeTypeSchema,\n privacyNoticeText: Joi.when('privacyNoticeType', {\n is: 'text',\n then: privacyNoticeTextSchema,\n otherwise: privacyNoticeTextSchema.allow('')\n }),\n privacyNoticeUrl: Joi.when('privacyNoticeType', {\n is: 'link',\n then: privacyNoticeUrlSchema,\n otherwise: privacyNoticeUrlSchema.allow('')\n })\n })\n .required()\n .description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event')\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: notificationEmailAddressSchema\n })\n .required()\n .description('Changes schema for FORM_NOTIFICATION_EMAIL_UPDATED event')\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: submissionGuidanceSchema\n })\n .required()\n .description('Changes schema for FORM_SUBMISSION_GUIDANCE_UPDATED event')\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n .description('Changes schema for FORM_JSON_UPLOADED event')\n\nexport const entitlementMessageData = Joi.object<EntitlementMessageData>().keys(\n {\n userId: Joi.string().required(),\n displayName: Joi.string().required(),\n email: Joi.string().email().required(),\n roles: Joi.array().items(Joi.string())\n }\n)\n\nexport const formFileDownloadedMessageData =\n Joi.object<FormFileDownloadedMessageData>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n fileLink: Joi.string().required()\n })\n .required()\n .description(\n 'Schema for FORM_FILE_DOWNLOAD_SUCCESS and FORM_FILE_DOWNLOAD_FAILURE events'\n )\n\nexport const excelGenerationMessageData =\n Joi.object<ExcelGenerationMessageData>()\n .keys({\n formId: Joi.string().required(),\n formName: Joi.string().required(),\n notificationEmail: Joi.string().email().required()\n })\n .required()\n .description(\n 'Schema for Excel generation audit events (submissions and CSAT)'\n )\n\nexport const authenticationMessageData =\n Joi.object<AuthenticationMessageData>().keys({\n userId: Joi.string().required(),\n displayName: Joi.string().required()\n })\n\nexport const auditUserSchema = Joi.object<AuditUser>()\n .keys({\n id: Joi.string().required(),\n displayName: Joi.string().required()\n })\n .description('Schema for CREATED_BY audit event')\n\nexport function formChangesMessageData<T, U extends FormMessageChangesData>(\n schema: ObjectSchema<T>\n): ObjectSchema<U> {\n return formMessageDataBase.append<U>({\n changes: Joi.object<ChangesMessageData<T>>()\n .keys({\n previous: schema,\n new: schema\n })\n .description('Changes schema')\n })\n}\n\nexport const messageSchema = Joi.object<AuditMessage>()\n .keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(AuditEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the AuditMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(AuditEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(AuditEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(AuditEventMessageType))\n .description('Event type'),\n entityId: Joi.string()\n .required()\n .description('The id of the entity the category relates to'),\n traceId: Joi.string()\n .optional()\n .description(\n 'Trace id of the event - to link events across multiple services'\n ),\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 createdBy: auditUserSchema\n .required()\n .description('The user who performed the action being audited'),\n data: Joi.when('type', {\n switch: [\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_CREATED),\n then: formCreatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TITLE_UPDATED),\n then: formChangesMessageData<\n FormTitleChanges,\n FormTitleUpdatedMessageData\n >(formTitleChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_ORGANISATION_UPDATED),\n then: formChangesMessageData<\n FormOrganisationChanges,\n FormOrganisationUpdatedMessageData\n >(formOrganisationChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_NAME_UPDATED),\n then: formChangesMessageData<\n FormTeamNameChanges,\n FormTeamNameUpdatedMessageData\n >(formTeamNameChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormTeamEmailChanges,\n FormTeamEmailUpdatedMessageData\n >(formTeamEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),\n then: formChangesMessageData<\n FormSupportContactChanges,\n FormSupportContactUpdatedMessageData\n >(formSupportContactChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED),\n then: formChangesMessageData<\n FormSupportPhoneChanges,\n FormSupportPhoneUpdatedMessageData\n >(formSupportPhoneChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormSupportEmailChanges,\n FormSupportEmailUpdatedMessageData\n >(formSupportEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED),\n then: formChangesMessageData<\n FormSupportOnlineChanges,\n FormSupportOnlineUpdatedMessageData\n >(formSupportOnlineChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED),\n then: formChangesMessageData<\n FormPrivacyNoticeChanges,\n FormPrivacyNoticeUpdatedMessageData\n >(formPrivacyNoticeChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormNotificationEmailChanges,\n FormNotificationEmailUpdatedMessageData\n >(formNotificationEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED),\n then: formChangesMessageData<\n FormSubmissionGuidanceChanges,\n FormSubmissionGuidanceUpdatedMessageData\n >(formSubmissionGuidanceChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_UPLOADED),\n then: formChangesMessageData<\n FormUploadedChanges,\n FormUploadedMessageData\n >(formUploadedChanges)\n },\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_UPDATED),\n then: formUpdatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.ENTITLEMENT_CREATED,\n AuditEventMessageType.ENTITLEMENT_UPDATED,\n AuditEventMessageType.ENTITLEMENT_DELETED\n ),\n then: entitlementMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_DRAFT_DELETED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_DOWNLOADED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.AUTHENTICATION_LOGIN,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n ),\n then: authenticationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS,\n AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n ),\n then: formFileDownloadedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED,\n AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n ),\n then: excelGenerationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORMS_BACKUP_REQUESTED),\n then: formsBackupRequestedMessageData\n }\n ],\n otherwise: Joi.forbidden()\n }).description('The data/payload of the audit message'),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published')\n })\n .required()\n .description('The audit message issued by the publishing service')\n\nexport const auditEvent = Joi.object<AuditEvent>()\n .keys({\n message: messageSchema\n })\n .description('The Body of the audit event')\n\nexport const auditRecord = messageSchema\n .append<AuditRecord>({\n id: idSchema,\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n })\n .description('The audit record persisted into the DB')\n"],"mappings":"AAAA,OAAOA,GAAG,MAA6B,KAAK;AAE5C,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,qBAAqB,EACrBC,yBAAyB;AA2C3B,SACEC,aAAa,EACbC,kBAAkB,EAClBC,uBAAuB,EACvBC,QAAQ,EACRC,8BAA8B,EAC9BC,gBAAgB,EAChBC,eAAe,EACfC,kBAAkB,EAClBC,WAAW,EACXC,uBAAuB,EACvBC,uBAAuB,EACvBC,sBAAsB,EACtBC,UAAU,EACVC,wBAAwB,EACxBC,eAAe,EACfC,cAAc,EACdC,WAAW;AAGb,OAAO,MAAMC,mBAAmB,GAAGvB,GAAG,CAACwB,MAAM,CAAsB;EACjEC,MAAM,EAAEhB,QAAQ;EAChBiB,IAAI,EAAER,UAAU;EAChBS,OAAO,EAAE3B,GAAG,CAACwB,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC;AACjC,CAAC,CAAC,CACCC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,wCAAwC,CAAC;AAExD,OAAO,MAAMC,sBAAsB,GAAGR,mBAAmB,CACtDS,MAAM,CAAyB;EAC9BC,KAAK,EAAEX,WAAW;EAClBY,YAAY,EAAErB,kBAAkB;EAChCsB,QAAQ,EAAEd,cAAc;EACxBe,SAAS,EAAEhB;AACb,CAAC,CAAC,CACDS,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,gDAAgD,CAAC;AAEhE,OAAO,MAAMO,oBAAoB,GAAGrC,GAAG,CAACwB,MAAM,C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-audit/types.ts"],"sourcesContent":["import {\n type AuditEventMessageCategory,\n type AuditEventMessageSchemaVersion,\n type AuditEventMessageSource,\n type AuditEventMessageType,\n type FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport { type FormMetadataContact } from '~/src/form/form-metadata/types.js'\n\nexport interface FormMessageDataBase {\n formId: string\n slug: string\n payload?: unknown\n}\n\nexport interface ChangesMessageData<T> {\n previous: T\n new: T\n}\n\nexport interface FormCreatedMessageData extends FormMessageDataBase {\n title: string\n organisation: string\n teamName: string\n teamEmail: string\n}\n\nexport interface FormTitleChanges {\n title: string\n}\n\nexport interface FormOrganisationChanges {\n organisation: string\n}\n\nexport interface FormTeamNameChanges {\n teamName: string\n}\n\nexport interface FormTeamEmailChanges {\n teamEmail: string\n}\n\nexport interface FormSupportContactChanges {\n contact?: FormMetadataContact\n}\n\nexport interface FormSupportPhoneChanges {\n phone?: string\n}\n\nexport interface FormSupportEmailChanges {\n address?: string\n responseTime?: string\n}\n\nexport interface FormSupportOnlineChanges {\n url?: string\n text?: string\n}\n\nexport interface FormPrivacyNoticeChanges {\n privacyNoticeUrl?: string\n}\n\nexport interface FormNotificationEmailChanges {\n notificationEmail?: string\n}\n\nexport interface FormSubmissionGuidanceChanges {\n submissionGuidance?: string\n}\n\nexport interface FormUploadedChanges {\n value: string\n}\n\nexport interface FormTitleUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTitleChanges>\n}\n\nexport interface FormOrganisationUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormOrganisationChanges>\n}\n\nexport interface FormTeamNameUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTeamNameChanges>\n}\n\nexport interface FormTeamEmailUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTeamEmailChanges>\n}\n\nexport interface FormSupportContactUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportContactChanges>\n}\n\nexport interface FormSupportPhoneUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportPhoneChanges>\n}\n\nexport interface FormSupportEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportEmailChanges>\n}\n\nexport interface FormSupportOnlineUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportOnlineChanges>\n}\n\nexport interface FormPrivacyNoticeUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormPrivacyNoticeChanges>\n}\n\nexport interface FormNotificationEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormNotificationEmailChanges>\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSubmissionGuidanceChanges>\n}\n\nexport interface FormUploadedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormUploadedChanges>\n}\n\nexport interface FormFileDownloadedMessageData {\n fileId: string\n filename: string\n fileLink: string\n}\n\nexport interface ExcelGenerationMessageData {\n formId: string\n formName: string\n notificationEmail: string\n}\n\nexport interface FormDefinitionS3Meta {\n fileId: string\n filename: string\n s3Key: string\n}\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n requestType: FormDefinitionRequestType\n s3Meta?: FormDefinitionS3Meta\n}\n\nexport type FormMessageChangesData =\n | FormTitleUpdatedMessageData\n | FormOrganisationUpdatedMessageData\n | FormTeamNameUpdatedMessageData\n | FormTeamEmailUpdatedMessageData\n | FormSupportContactUpdatedMessageData\n | FormSupportPhoneUpdatedMessageData\n | FormSupportEmailUpdatedMessageData\n | FormSupportOnlineUpdatedMessageData\n | FormPrivacyNoticeUpdatedMessageData\n | FormNotificationEmailUpdatedMessageData\n | FormSubmissionGuidanceUpdatedMessageData\n | FormUploadedMessageData\n\nexport type FormMessageActivitiesData =\n | FormCreatedMessageData\n | FormMessageDataBase\n | FormFileDownloadedMessageData\n\nexport interface EntitlementMessageData {\n userId: string\n displayName: string\n email: string\n roles: string[]\n}\n\nexport interface AuthenticationMessageData {\n userId: string\n displayName: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport interface FormsBackupRequestedMessageData {\n totalForms: number\n durationMs: number\n}\n\nexport type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\n | FormFileDownloadedMessageData\n | FormsBackupRequestedMessageData\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n source: AuditEventMessageSource\n type: AuditEventMessageType\n entityId: string\n traceId?: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface ManagerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_MANAGER\n}\nexport interface DesignerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_DESIGNER\n}\n\nexport interface EntitlementMessageBase extends MessageBase {\n source: AuditEventMessageSource.ENTITLEMENT\n}\n\nexport interface AuthenticationMessageBase extends MessageBase {\n source: AuditEventMessageSource.AUTHENTICATION\n}\n\nexport interface FormCreatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportContactUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED\n data: FormSupportContactUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n data: FormMessageDataBase\n}\n\nexport interface FormFileDownloadSuccessMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormFileDownloadFailureMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\n data: FormUpdatedMessageData\n}\n\nexport interface EntitlementCreatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_CREATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementUpdatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_UPDATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementDeletedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_DELETED\n data: EntitlementMessageData\n}\n\nexport interface AuthenticationLoginMessage extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGIN\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutManualMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutAutoMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutDifferentDeviceMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n data: AuthenticationMessageData\n}\n\nexport interface FormSubmissionExcelRequestedMessage\n extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface PlatformCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormsBackupRequestedMessage extends DesignerMessageBase {\n type: AuditEventMessageType.FORMS_BACKUP_REQUESTED\n data: FormsBackupRequestedMessageData\n}\n\nexport type AuditMessage =\n | FormCreatedMessage\n | FormTitleUpdatedMessage\n | FormOrganisationUpdatedMessage\n | FormTeamNameUpdatedMessage\n | FormTeamEmailUpdatedMessage\n | FormSupportContactUpdatedMessage\n | FormSupportPhoneUpdatedMessage\n | FormSupportEmailUpdatedMessage\n | FormSupportOnlineUpdatedMessage\n | FormPrivacyNoticeUpdatedMessage\n | FormNotificationEmailUpdatedMessage\n | FormSubmissionGuidanceUpdatedMessage\n | FormUploadedMessage\n | FormDownloadedMessage\n | FormFileDownloadSuccessMessage\n | FormFileDownloadFailureMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n | EntitlementCreatedMessage\n | EntitlementUpdatedMessage\n | EntitlementDeletedMessage\n | AuthenticationLoginMessage\n | AuthenticationLogoutManualMessage\n | AuthenticationLogoutAutoMessage\n | AuthenticationLogoutDifferentDeviceMessage\n | FormSubmissionExcelRequestedMessage\n | FormCsatExcelRequestedMessage\n | PlatformCsatExcelRequestedMessage\n | FormsBackupRequestedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport interface AuditMetaBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface AuditInputMeta extends AuditMetaBase {\n id: string\n}\n\nexport type AuditRecordInput = AuditMessage & AuditMetaBase\n\nexport type AuditRecord = AuditMessage & AuditInputMeta\n\nexport interface MessageBody {\n Message: string\n}\n\n/**\n * Consolidated audit record that represents multiple grouped events.\n * Combines AuditRecord with consolidation metadata.\n */\nexport type ConsolidatedAuditRecord = AuditRecord & {\n /** Number of events consolidated into this record */\n consolidatedCount: number\n /** Timestamp of the earliest event in the group */\n consolidatedFrom: Date\n /** Timestamp of the latest event in the group */\n consolidatedTo: Date\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-audit/types.ts"],"sourcesContent":["import {\n type AuditEventMessageCategory,\n type AuditEventMessageSchemaVersion,\n type AuditEventMessageSource,\n type AuditEventMessageType,\n type FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport { type FormMetadataContact } from '~/src/form/form-metadata/types.js'\n\nexport interface FormMessageDataBase {\n formId: string\n slug: string\n payload?: unknown\n}\n\nexport interface ChangesMessageData<T> {\n previous: T\n new: T\n}\n\nexport interface FormCreatedMessageData extends FormMessageDataBase {\n title: string\n organisation: string\n teamName: string\n teamEmail: string\n}\n\nexport interface FormTitleChanges {\n title: string\n}\n\nexport interface FormOrganisationChanges {\n organisation: string\n}\n\nexport interface FormTeamNameChanges {\n teamName: string\n}\n\nexport interface FormTeamEmailChanges {\n teamEmail: string\n}\n\nexport interface FormSupportContactChanges {\n contact?: FormMetadataContact\n}\n\nexport interface FormSupportPhoneChanges {\n phone?: string\n}\n\nexport interface FormSupportEmailChanges {\n address?: string\n responseTime?: string\n}\n\nexport interface FormSupportOnlineChanges {\n url?: string\n text?: string\n}\n\nexport interface FormPrivacyNoticeChanges {\n privacyNoticeType?: string\n privacyNoticeText?: string\n privacyNoticeUrl?: string\n}\n\nexport interface FormNotificationEmailChanges {\n notificationEmail?: string\n}\n\nexport interface FormSubmissionGuidanceChanges {\n submissionGuidance?: string\n}\n\nexport interface FormUploadedChanges {\n value: string\n}\n\nexport interface FormTitleUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTitleChanges>\n}\n\nexport interface FormOrganisationUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormOrganisationChanges>\n}\n\nexport interface FormTeamNameUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTeamNameChanges>\n}\n\nexport interface FormTeamEmailUpdatedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormTeamEmailChanges>\n}\n\nexport interface FormSupportContactUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportContactChanges>\n}\n\nexport interface FormSupportPhoneUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportPhoneChanges>\n}\n\nexport interface FormSupportEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportEmailChanges>\n}\n\nexport interface FormSupportOnlineUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSupportOnlineChanges>\n}\n\nexport interface FormPrivacyNoticeUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormPrivacyNoticeChanges>\n}\n\nexport interface FormNotificationEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormNotificationEmailChanges>\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSubmissionGuidanceChanges>\n}\n\nexport interface FormUploadedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormUploadedChanges>\n}\n\nexport interface FormFileDownloadedMessageData {\n fileId: string\n filename: string\n fileLink: string\n}\n\nexport interface ExcelGenerationMessageData {\n formId: string\n formName: string\n notificationEmail: string\n}\n\nexport interface FormDefinitionS3Meta {\n fileId: string\n filename: string\n s3Key: string\n}\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n requestType: FormDefinitionRequestType\n s3Meta?: FormDefinitionS3Meta\n}\n\nexport type FormMessageChangesData =\n | FormTitleUpdatedMessageData\n | FormOrganisationUpdatedMessageData\n | FormTeamNameUpdatedMessageData\n | FormTeamEmailUpdatedMessageData\n | FormSupportContactUpdatedMessageData\n | FormSupportPhoneUpdatedMessageData\n | FormSupportEmailUpdatedMessageData\n | FormSupportOnlineUpdatedMessageData\n | FormPrivacyNoticeUpdatedMessageData\n | FormNotificationEmailUpdatedMessageData\n | FormSubmissionGuidanceUpdatedMessageData\n | FormUploadedMessageData\n\nexport type FormMessageActivitiesData =\n | FormCreatedMessageData\n | FormMessageDataBase\n | FormFileDownloadedMessageData\n\nexport interface EntitlementMessageData {\n userId: string\n displayName: string\n email: string\n roles: string[]\n}\n\nexport interface AuthenticationMessageData {\n userId: string\n displayName: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport interface FormsBackupRequestedMessageData {\n totalForms: number\n durationMs: number\n}\n\nexport type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\n | FormFileDownloadedMessageData\n | FormsBackupRequestedMessageData\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n source: AuditEventMessageSource\n type: AuditEventMessageType\n entityId: string\n traceId?: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface ManagerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_MANAGER\n}\nexport interface DesignerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_DESIGNER\n}\n\nexport interface EntitlementMessageBase extends MessageBase {\n source: AuditEventMessageSource.ENTITLEMENT\n}\n\nexport interface AuthenticationMessageBase extends MessageBase {\n source: AuditEventMessageSource.AUTHENTICATION\n}\n\nexport interface FormCreatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportContactUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED\n data: FormSupportContactUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n data: FormMessageDataBase\n}\n\nexport interface FormFileDownloadSuccessMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormFileDownloadFailureMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\n data: FormUpdatedMessageData\n}\n\nexport interface EntitlementCreatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_CREATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementUpdatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_UPDATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementDeletedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_DELETED\n data: EntitlementMessageData\n}\n\nexport interface AuthenticationLoginMessage extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGIN\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutManualMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutAutoMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutDifferentDeviceMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n data: AuthenticationMessageData\n}\n\nexport interface FormSubmissionExcelRequestedMessage\n extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface PlatformCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormsBackupRequestedMessage extends DesignerMessageBase {\n type: AuditEventMessageType.FORMS_BACKUP_REQUESTED\n data: FormsBackupRequestedMessageData\n}\n\nexport type AuditMessage =\n | FormCreatedMessage\n | FormTitleUpdatedMessage\n | FormOrganisationUpdatedMessage\n | FormTeamNameUpdatedMessage\n | FormTeamEmailUpdatedMessage\n | FormSupportContactUpdatedMessage\n | FormSupportPhoneUpdatedMessage\n | FormSupportEmailUpdatedMessage\n | FormSupportOnlineUpdatedMessage\n | FormPrivacyNoticeUpdatedMessage\n | FormNotificationEmailUpdatedMessage\n | FormSubmissionGuidanceUpdatedMessage\n | FormUploadedMessage\n | FormDownloadedMessage\n | FormFileDownloadSuccessMessage\n | FormFileDownloadFailureMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n | EntitlementCreatedMessage\n | EntitlementUpdatedMessage\n | EntitlementDeletedMessage\n | AuthenticationLoginMessage\n | AuthenticationLogoutManualMessage\n | AuthenticationLogoutAutoMessage\n | AuthenticationLogoutDifferentDeviceMessage\n | FormSubmissionExcelRequestedMessage\n | FormCsatExcelRequestedMessage\n | PlatformCsatExcelRequestedMessage\n | FormsBackupRequestedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport interface AuditMetaBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface AuditInputMeta extends AuditMetaBase {\n id: string\n}\n\nexport type AuditRecordInput = AuditMessage & AuditMetaBase\n\nexport type AuditRecord = AuditMessage & AuditInputMeta\n\nexport interface MessageBody {\n Message: string\n}\n\n/**\n * Consolidated audit record that represents multiple grouped events.\n * Combines AuditRecord with consolidation metadata.\n */\nexport type ConsolidatedAuditRecord = AuditRecord & {\n /** Number of events consolidated into this record */\n consolidatedCount: number\n /** Timestamp of the earliest event in the group */\n consolidatedFrom: Date\n /** Timestamp of the latest event in the group */\n consolidatedTo: Date\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -406,7 +406,8 @@ const phaseBannerSchema = Joi.object().description('Phase banner configuration s
|
|
|
406
406
|
phase: Joi.string().trim().valid('alpha', 'beta').description('Development phase of the service (alpha or beta)')
|
|
407
407
|
});
|
|
408
408
|
const optionsSchema = Joi.object({
|
|
409
|
-
showReferenceNumber: Joi.boolean().default(false)
|
|
409
|
+
showReferenceNumber: Joi.boolean().default(false),
|
|
410
|
+
disableUserFeedback: Joi.boolean().default(false)
|
|
410
411
|
}).description('Options for the form');
|
|
411
412
|
const outputSchema = Joi.object().description('Configuration for form submission output').keys({
|
|
412
413
|
audience: Joi.string().trim().valid('human', 'machine').required().description('Target audience for the output (human readable or machine processable)'),
|