@defra/forms-model 3.0.601 → 3.0.602

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.
@@ -0,0 +1,72 @@
1
+ import { AuditEventMessageType } from "./enums.js";
2
+
3
+ /**
4
+ * Field configuration for audit events with change tracking.
5
+ * Used by change detection logic to compare previous and new values.
6
+ */
7
+
8
+ /**
9
+ * Support contact field configuration for change detection.
10
+ */
11
+
12
+ /**
13
+ * Creates a field configuration for audit events.
14
+ */
15
+ function createFieldConfig(label, verb, fieldName) {
16
+ return {
17
+ label,
18
+ verb,
19
+ prevPath: `changes.previous.${fieldName}`,
20
+ newPath: `changes.new.${fieldName}`
21
+ };
22
+ }
23
+
24
+ /**
25
+ * Creates a support contact field configuration.
26
+ */
27
+ function createSupportContactField(label, contactPath) {
28
+ return {
29
+ label,
30
+ prevPath: `changes.previous.contact.${contactPath}`,
31
+ newPath: `changes.new.contact.${contactPath}`
32
+ };
33
+ }
34
+
35
+ /**
36
+ * Field configurations for audit events with change tracking.
37
+ * Maps event types to their data paths and display labels.
38
+ */
39
+ export const fieldConfigs = {
40
+ [AuditEventMessageType.FORM_TITLE_UPDATED]: createFieldConfig('the form name', 'Updated', 'title'),
41
+ [AuditEventMessageType.FORM_ORGANISATION_UPDATED]: createFieldConfig('the lead organisation', 'Changed', 'organisation'),
42
+ [AuditEventMessageType.FORM_TEAM_NAME_UPDATED]: createFieldConfig('the team name', 'Changed', 'teamName'),
43
+ [AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED]: createFieldConfig('the shared team address', 'Updated', 'teamEmail'),
44
+ [AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED]: createFieldConfig('where submitted forms are sent', 'Updated', 'notificationEmail'),
45
+ [AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED]: createFieldConfig('the privacy notice link', 'Updated', 'privacyNoticeUrl'),
46
+ [AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED]: createFieldConfig('the next steps guidance', 'Updated', 'submissionGuidance'),
47
+ [AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED]: createFieldConfig('the support phone number', 'Updated', 'phone'),
48
+ [AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED]: createFieldConfig('the support email address', 'Updated', 'address'),
49
+ [AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED]: createFieldConfig('the support contact link', 'Updated', 'url')
50
+ };
51
+
52
+ /**
53
+ * Support contact field configurations for change detection.
54
+ * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.
55
+ */
56
+ export const supportContactFields = [createSupportContactField('phone number', 'phone'), createSupportContactField('email address', 'email.address'), createSupportContactField('online contact link', 'online.url')];
57
+
58
+ /**
59
+ * Event types that are always considered valid (don't need change comparison).
60
+ * These events represent actions rather than field updates.
61
+ */
62
+ export const alwaysValidEvents = new Set([AuditEventMessageType.FORM_CREATED, AuditEventMessageType.FORM_UPDATED, AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT, AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE, AuditEventMessageType.FORM_DRAFT_DELETED, AuditEventMessageType.FORM_MIGRATED, AuditEventMessageType.FORM_JSON_UPLOADED, AuditEventMessageType.FORM_JSON_DOWNLOADED, AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED, AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED]);
63
+
64
+ /**
65
+ * Type guard to check if an audit record is consolidated.
66
+ * @param record - The audit record to check
67
+ * @returns True if the record has consolidation metadata
68
+ */
69
+ export function isConsolidatedRecord(record) {
70
+ return 'consolidatedCount' in record && record.consolidatedCount > 1;
71
+ }
72
+ //# sourceMappingURL=consolidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consolidation.js","names":["AuditEventMessageType","createFieldConfig","label","verb","fieldName","prevPath","newPath","createSupportContactField","contactPath","fieldConfigs","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","supportContactFields","alwaysValidEvents","Set","FORM_CREATED","FORM_UPDATED","FORM_LIVE_CREATED_FROM_DRAFT","FORM_DRAFT_CREATED_FROM_LIVE","FORM_DRAFT_DELETED","FORM_MIGRATED","FORM_JSON_UPLOADED","FORM_JSON_DOWNLOADED","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","isConsolidatedRecord","record","consolidatedCount"],"sources":["../../../../src/form/form-audit/consolidation.ts"],"sourcesContent":["import { AuditEventMessageType } from '~/src/form/form-audit/enums.js'\nimport {\n type AuditRecord,\n type ConsolidatedAuditRecord\n} from '~/src/form/form-audit/types.js'\n\n/**\n * Field configuration for audit events with change tracking.\n * Used by change detection logic to compare previous and new values.\n */\nexport interface FieldConfig {\n label: string\n verb: 'Updated' | 'Changed'\n prevPath: string\n newPath: string\n}\n\n/**\n * Support contact field configuration for change detection.\n */\nexport interface SupportContactFieldConfig {\n label: string\n prevPath: string\n newPath: string\n}\n\n/**\n * Creates a field configuration for audit events.\n */\nfunction createFieldConfig(\n label: string,\n verb: 'Updated' | 'Changed',\n fieldName: string\n): FieldConfig {\n return {\n label,\n verb,\n prevPath: `changes.previous.${fieldName}`,\n newPath: `changes.new.${fieldName}`\n }\n}\n\n/**\n * Creates a support contact field configuration.\n */\nfunction createSupportContactField(\n label: string,\n contactPath: string\n): SupportContactFieldConfig {\n return {\n label,\n prevPath: `changes.previous.contact.${contactPath}`,\n newPath: `changes.new.contact.${contactPath}`\n }\n}\n\n/**\n * Field configurations for audit events with change tracking.\n * Maps event types to their data paths and display labels.\n */\nexport const fieldConfigs: Record<string, FieldConfig> = {\n [AuditEventMessageType.FORM_TITLE_UPDATED]: createFieldConfig(\n 'the form name',\n 'Updated',\n 'title'\n ),\n [AuditEventMessageType.FORM_ORGANISATION_UPDATED]: createFieldConfig(\n 'the lead organisation',\n 'Changed',\n 'organisation'\n ),\n [AuditEventMessageType.FORM_TEAM_NAME_UPDATED]: createFieldConfig(\n 'the team name',\n 'Changed',\n 'teamName'\n ),\n [AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED]: createFieldConfig(\n 'the shared team address',\n 'Updated',\n 'teamEmail'\n ),\n [AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED]: createFieldConfig(\n 'where submitted forms are sent',\n 'Updated',\n 'notificationEmail'\n ),\n [AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED]: createFieldConfig(\n 'the privacy notice link',\n 'Updated',\n 'privacyNoticeUrl'\n ),\n [AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED]: createFieldConfig(\n 'the next steps guidance',\n 'Updated',\n 'submissionGuidance'\n ),\n [AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED]: createFieldConfig(\n 'the support phone number',\n 'Updated',\n 'phone'\n ),\n [AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED]: createFieldConfig(\n 'the support email address',\n 'Updated',\n 'address'\n ),\n [AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED]: createFieldConfig(\n 'the support contact link',\n 'Updated',\n 'url'\n )\n}\n\n/**\n * Support contact field configurations for change detection.\n * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.\n */\nexport const supportContactFields: SupportContactFieldConfig[] = [\n createSupportContactField('phone number', 'phone'),\n createSupportContactField('email address', 'email.address'),\n createSupportContactField('online contact link', 'online.url')\n]\n\n/**\n * Event types that are always considered valid (don't need change comparison).\n * These events represent actions rather than field updates.\n */\nexport const alwaysValidEvents = new Set<string>([\n AuditEventMessageType.FORM_CREATED,\n AuditEventMessageType.FORM_UPDATED,\n AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,\n AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,\n AuditEventMessageType.FORM_DRAFT_DELETED,\n AuditEventMessageType.FORM_MIGRATED,\n AuditEventMessageType.FORM_JSON_UPLOADED,\n AuditEventMessageType.FORM_JSON_DOWNLOADED,\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n])\n\n/**\n * Type guard to check if an audit record is consolidated.\n * @param record - The audit record to check\n * @returns True if the record has consolidation metadata\n */\nexport function isConsolidatedRecord(\n record: AuditRecord | ConsolidatedAuditRecord\n): record is ConsolidatedAuditRecord {\n return 'consolidatedCount' in record && record.consolidatedCount > 1\n}\n"],"mappings":"AAAA,SAASA,qBAAqB;;AAM9B;AACA;AACA;AACA;;AAQA;AACA;AACA;;AAOA;AACA;AACA;AACA,SAASC,iBAAiBA,CACxBC,KAAa,EACbC,IAA2B,EAC3BC,SAAiB,EACJ;EACb,OAAO;IACLF,KAAK;IACLC,IAAI;IACJE,QAAQ,EAAE,oBAAoBD,SAAS,EAAE;IACzCE,OAAO,EAAE,eAAeF,SAAS;EACnC,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAASG,yBAAyBA,CAChCL,KAAa,EACbM,WAAmB,EACQ;EAC3B,OAAO;IACLN,KAAK;IACLG,QAAQ,EAAE,4BAA4BG,WAAW,EAAE;IACnDF,OAAO,EAAE,uBAAuBE,WAAW;EAC7C,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAyC,GAAG;EACvD,CAACT,qBAAqB,CAACU,kBAAkB,GAAGT,iBAAiB,CAC3D,eAAe,EACf,SAAS,EACT,OACF,CAAC;EACD,CAACD,qBAAqB,CAACW,yBAAyB,GAAGV,iBAAiB,CAClE,uBAAuB,EACvB,SAAS,EACT,cACF,CAAC;EACD,CAACD,qBAAqB,CAACY,sBAAsB,GAAGX,iBAAiB,CAC/D,eAAe,EACf,SAAS,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AAC+B,+BAA+B,EACrD/B,qBAAqB,CAACgC,yBAAyB,CAChD,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAClCC,MAA6C,EACV;EACnC,OAAO,mBAAmB,IAAIA,MAAM,IAAIA,MAAM,CAACC,iBAAiB,GAAG,CAAC;AACtE","ignoreList":[]}
@@ -1 +1 @@
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 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 type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\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 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\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"],"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 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 type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\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 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\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":[]}
@@ -24,4 +24,5 @@ export * from "./utils/helpers.js";
24
24
  export * from "./utils/markdown.js";
25
25
  export * from "./form/form-audit/index.js";
26
26
  export * from "./form/form-audit/enums.js";
27
+ export * from "./form/form-audit/consolidation.js";
27
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-definition/helpers.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/form-submission/enums.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/roles.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\nexport type * from '~/src/manage/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-definition/helpers.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/form-submission/enums.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/roles.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\nexport * from '~/src/form/form-audit/consolidation.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\nexport type * from '~/src/manage/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ import { type AuditRecord, type ConsolidatedAuditRecord } from '../../form/form-audit/types.js';
2
+ /**
3
+ * Field configuration for audit events with change tracking.
4
+ * Used by change detection logic to compare previous and new values.
5
+ */
6
+ export interface FieldConfig {
7
+ label: string;
8
+ verb: 'Updated' | 'Changed';
9
+ prevPath: string;
10
+ newPath: string;
11
+ }
12
+ /**
13
+ * Support contact field configuration for change detection.
14
+ */
15
+ export interface SupportContactFieldConfig {
16
+ label: string;
17
+ prevPath: string;
18
+ newPath: string;
19
+ }
20
+ /**
21
+ * Field configurations for audit events with change tracking.
22
+ * Maps event types to their data paths and display labels.
23
+ */
24
+ export declare const fieldConfigs: Record<string, FieldConfig>;
25
+ /**
26
+ * Support contact field configurations for change detection.
27
+ * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.
28
+ */
29
+ export declare const supportContactFields: SupportContactFieldConfig[];
30
+ /**
31
+ * Event types that are always considered valid (don't need change comparison).
32
+ * These events represent actions rather than field updates.
33
+ */
34
+ export declare const alwaysValidEvents: Set<string>;
35
+ /**
36
+ * Type guard to check if an audit record is consolidated.
37
+ * @param record - The audit record to check
38
+ * @returns True if the record has consolidation metadata
39
+ */
40
+ export declare function isConsolidatedRecord(record: AuditRecord | ConsolidatedAuditRecord): record is ConsolidatedAuditRecord;
41
+ //# sourceMappingURL=consolidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consolidation.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/consolidation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAA;AAEvC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAgCD;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAmDpD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,yBAAyB,EAI3D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAW5B,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,GAAG,uBAAuB,GAC5C,MAAM,IAAI,uBAAuB,CAEnC"}
@@ -319,4 +319,16 @@ export type AuditRecord = AuditMessage & AuditInputMeta;
319
319
  export interface MessageBody {
320
320
  Message: string;
321
321
  }
322
+ /**
323
+ * Consolidated audit record that represents multiple grouped events.
324
+ * Combines AuditRecord with consolidation metadata.
325
+ */
326
+ export type ConsolidatedAuditRecord = AuditRecord & {
327
+ /** Number of events consolidated into this record */
328
+ consolidatedCount: number;
329
+ /** Timestamp of the earliest event in the group */
330
+ consolidatedFrom: Date;
331
+ /** Timestamp of the latest event in the group */
332
+ consolidatedTo: Date;
333
+ };
322
334
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC/B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAE5E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAA;IACX,GAAG,EAAE,CAAC,CAAA;CACP;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,uBAAuB;IACt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AAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,aAAa,CAAA;AAE3D,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAA;AAEvD,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAClD,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAA;IACzB,mDAAmD;IACnD,gBAAgB,EAAE,IAAI,CAAA;IACtB,iDAAiD;IACjD,cAAc,EAAE,IAAI,CAAA;CACrB,CAAA"}
@@ -24,6 +24,7 @@ export * from './utils/helpers.js';
24
24
  export * from './utils/markdown.js';
25
25
  export * from './form/form-audit/index.js';
26
26
  export * from './form/form-audit/enums.js';
27
+ export * from './form/form-audit/consolidation.js';
27
28
  export type * from './common/types.js';
28
29
  export type * from './common/pagination/types.js';
29
30
  export type * from './common/search/types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA;AACnD,cAAc,uCAAuC,CAAA;AACrD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAA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AyB,CAAA;AACvC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wCAAwC,CAAA;AAEtD,mBAAmB,uBAAuB,CAAA;AAC1C,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,8BAA8B,CAAA;AACjD,mBAAmB,+BAA+B,CAAA;AAClD,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA;AACtD,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,yCAAyC,CAAA;AAC5D,mBAAmB,iCAAiC,CAAA;AACpD,mBAAmB,wCAAwC,CAAA;AAC3D,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,uBAAuB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/forms-model",
3
- "version": "3.0.601",
3
+ "version": "3.0.602",
4
4
  "description": "A hapi plugin providing the model for Defra forms",
5
5
  "homepage": "https://github.com/DEFRA/forms-designer/tree/main/model#readme",
6
6
  "types": "dist/types/index.d.ts",
@@ -0,0 +1,150 @@
1
+ import { AuditEventMessageType } from '~/src/form/form-audit/enums.js'
2
+ import {
3
+ type AuditRecord,
4
+ type ConsolidatedAuditRecord
5
+ } from '~/src/form/form-audit/types.js'
6
+
7
+ /**
8
+ * Field configuration for audit events with change tracking.
9
+ * Used by change detection logic to compare previous and new values.
10
+ */
11
+ export interface FieldConfig {
12
+ label: string
13
+ verb: 'Updated' | 'Changed'
14
+ prevPath: string
15
+ newPath: string
16
+ }
17
+
18
+ /**
19
+ * Support contact field configuration for change detection.
20
+ */
21
+ export interface SupportContactFieldConfig {
22
+ label: string
23
+ prevPath: string
24
+ newPath: string
25
+ }
26
+
27
+ /**
28
+ * Creates a field configuration for audit events.
29
+ */
30
+ function createFieldConfig(
31
+ label: string,
32
+ verb: 'Updated' | 'Changed',
33
+ fieldName: string
34
+ ): FieldConfig {
35
+ return {
36
+ label,
37
+ verb,
38
+ prevPath: `changes.previous.${fieldName}`,
39
+ newPath: `changes.new.${fieldName}`
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Creates a support contact field configuration.
45
+ */
46
+ function createSupportContactField(
47
+ label: string,
48
+ contactPath: string
49
+ ): SupportContactFieldConfig {
50
+ return {
51
+ label,
52
+ prevPath: `changes.previous.contact.${contactPath}`,
53
+ newPath: `changes.new.contact.${contactPath}`
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Field configurations for audit events with change tracking.
59
+ * Maps event types to their data paths and display labels.
60
+ */
61
+ export const fieldConfigs: Record<string, FieldConfig> = {
62
+ [AuditEventMessageType.FORM_TITLE_UPDATED]: createFieldConfig(
63
+ 'the form name',
64
+ 'Updated',
65
+ 'title'
66
+ ),
67
+ [AuditEventMessageType.FORM_ORGANISATION_UPDATED]: createFieldConfig(
68
+ 'the lead organisation',
69
+ 'Changed',
70
+ 'organisation'
71
+ ),
72
+ [AuditEventMessageType.FORM_TEAM_NAME_UPDATED]: createFieldConfig(
73
+ 'the team name',
74
+ 'Changed',
75
+ 'teamName'
76
+ ),
77
+ [AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED]: createFieldConfig(
78
+ 'the shared team address',
79
+ 'Updated',
80
+ 'teamEmail'
81
+ ),
82
+ [AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED]: createFieldConfig(
83
+ 'where submitted forms are sent',
84
+ 'Updated',
85
+ 'notificationEmail'
86
+ ),
87
+ [AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED]: createFieldConfig(
88
+ 'the privacy notice link',
89
+ 'Updated',
90
+ 'privacyNoticeUrl'
91
+ ),
92
+ [AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED]: createFieldConfig(
93
+ 'the next steps guidance',
94
+ 'Updated',
95
+ 'submissionGuidance'
96
+ ),
97
+ [AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED]: createFieldConfig(
98
+ 'the support phone number',
99
+ 'Updated',
100
+ 'phone'
101
+ ),
102
+ [AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED]: createFieldConfig(
103
+ 'the support email address',
104
+ 'Updated',
105
+ 'address'
106
+ ),
107
+ [AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED]: createFieldConfig(
108
+ 'the support contact link',
109
+ 'Updated',
110
+ 'url'
111
+ )
112
+ }
113
+
114
+ /**
115
+ * Support contact field configurations for change detection.
116
+ * Used when checking FORM_SUPPORT_CONTACT_UPDATED events.
117
+ */
118
+ export const supportContactFields: SupportContactFieldConfig[] = [
119
+ createSupportContactField('phone number', 'phone'),
120
+ createSupportContactField('email address', 'email.address'),
121
+ createSupportContactField('online contact link', 'online.url')
122
+ ]
123
+
124
+ /**
125
+ * Event types that are always considered valid (don't need change comparison).
126
+ * These events represent actions rather than field updates.
127
+ */
128
+ export const alwaysValidEvents = new Set<string>([
129
+ AuditEventMessageType.FORM_CREATED,
130
+ AuditEventMessageType.FORM_UPDATED,
131
+ AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,
132
+ AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,
133
+ AuditEventMessageType.FORM_DRAFT_DELETED,
134
+ AuditEventMessageType.FORM_MIGRATED,
135
+ AuditEventMessageType.FORM_JSON_UPLOADED,
136
+ AuditEventMessageType.FORM_JSON_DOWNLOADED,
137
+ AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,
138
+ AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED
139
+ ])
140
+
141
+ /**
142
+ * Type guard to check if an audit record is consolidated.
143
+ * @param record - The audit record to check
144
+ * @returns True if the record has consolidation metadata
145
+ */
146
+ export function isConsolidatedRecord(
147
+ record: AuditRecord | ConsolidatedAuditRecord
148
+ ): record is ConsolidatedAuditRecord {
149
+ return 'consolidatedCount' in record && record.consolidatedCount > 1
150
+ }
@@ -470,3 +470,16 @@ export type AuditRecord = AuditMessage & AuditInputMeta
470
470
  export interface MessageBody {
471
471
  Message: string
472
472
  }
473
+
474
+ /**
475
+ * Consolidated audit record that represents multiple grouped events.
476
+ * Combines AuditRecord with consolidation metadata.
477
+ */
478
+ export type ConsolidatedAuditRecord = AuditRecord & {
479
+ /** Number of events consolidated into this record */
480
+ consolidatedCount: number
481
+ /** Timestamp of the earliest event in the group */
482
+ consolidatedFrom: Date
483
+ /** Timestamp of the latest event in the group */
484
+ consolidatedTo: Date
485
+ }
package/src/index.ts CHANGED
@@ -24,6 +24,7 @@ export * from '~/src/utils/helpers.js'
24
24
  export * from '~/src/utils/markdown.js'
25
25
  export * from '~/src/form/form-audit/index.js'
26
26
  export * from '~/src/form/form-audit/enums.js'
27
+ export * from '~/src/form/form-audit/consolidation.js'
27
28
 
28
29
  export type * from '~/src/common/types.js'
29
30
  export type * from '~/src/common/pagination/types.js'