@defra/forms-model 3.0.614 → 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-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-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-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-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,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,sBAAsB,EACtBC,UAAU,EACVC,wBAAwB,EACxBC,eAAe,EACfC,cAAc,EACdC,WAAW;AAGb,OAAO,MAAMC,mBAAmB,GAAGrB,GAAG,CAACsB,MAAM,CAAsB;EACjEC,MAAM,EAAEd,QAAQ;EAChBe,IAAI,EAAER,UAAU;EAChBS,OAAO,EAAEzB,GAAG,CAACsB,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,EAAEnB,kBAAkB;EAChCoB,QAAQ,EAAEd,cAAc;EACxBe,SAAS,EAAEhB;AAC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3I,GAAG,CAAC4I,SAAS,CAAC;EAC3B,CAAC,CAAC,CAAChH,WAAW,CAAC,uCAAuC,CAAC;EACvDiH,gBAAgB,EAAE7I,GAAG,CAACsG,IAAI,CAAC,CAAC,CACzB3E,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,8CAA8C;AAC/D,CAAC,CAAC,CACDD,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,oDAAoD,CAAC;AAEpE,OAAO,MAAMkH,UAAU,GAAG9I,GAAG,CAACsB,MAAM,CAAa,CAAC,CAC/Cc,IAAI,CAAC;EACJ2G,OAAO,EAAEjD;AACX,CAAC,CAAC,CACDlE,WAAW,CAAC,6BAA6B,CAAC;AAE7C,OAAO,MAAMoH,WAAW,GAAGlD,aAAa,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;EAChBi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,WAAW,GAAG9C,aAAa,CACrCvE,MAAM,CAAc;EACnBiE,EAAE,EAAExF,QAAQ;EACZ6I,SAAS,EAAEtJ,GAAG,CAACwC,MAAM,CAAC,CAAC,CAAC+G,IAAI,CAAC,CAAC,CAAC1H,QAAQ,CAAC,CAAC;EACzC+E,QAAQ,EAAE5G,GAAG,CAACwC,MAAM,CAAC,CAAC,CAACX,QAAQ,CAAC,CAAC;EACjC2H,eAAe,EAAExJ,GAAG,CAAC+G,IAAI,CAAC,CAAC,CAAClF,QAAQ,CAAC;AACvC,CAAC,CAAC,CACDC,WAAW,CAAC,wCAAwC,CAAC","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 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":[]}
|
|
@@ -33,6 +33,8 @@ export const contactSchema = Joi.object().keys({
|
|
|
33
33
|
online: onlineSchema
|
|
34
34
|
}).description('Complete contact information for form-related inquiries');
|
|
35
35
|
export const submissionGuidanceSchema = Joi.string().trim().description('Guidance text shown to users when submitting the form');
|
|
36
|
+
export const privacyNoticeTypeSchema = Joi.string().valid('text', 'link').description('Type of privacy notice content');
|
|
37
|
+
export const privacyNoticeTextSchema = Joi.string().trim().description('URL to the privacy notice for this form');
|
|
36
38
|
export const privacyNoticeUrlSchema = Joi.string().uri({
|
|
37
39
|
scheme: ['http', 'https']
|
|
38
40
|
}).trim().description('URL to the privacy notice for this form');
|
|
@@ -47,7 +49,17 @@ export const formMetadataInputKeys = {
|
|
|
47
49
|
teamEmail: teamEmailSchema,
|
|
48
50
|
contact: contactSchema,
|
|
49
51
|
submissionGuidance: submissionGuidanceSchema,
|
|
50
|
-
|
|
52
|
+
privacyNoticeType: privacyNoticeTypeSchema.default('link'),
|
|
53
|
+
privacyNoticeText: Joi.when('privacyNoticeType', {
|
|
54
|
+
is: 'text',
|
|
55
|
+
then: privacyNoticeTextSchema,
|
|
56
|
+
otherwise: privacyNoticeTextSchema.allow('')
|
|
57
|
+
}),
|
|
58
|
+
privacyNoticeUrl: Joi.when('privacyNoticeType', {
|
|
59
|
+
is: 'link',
|
|
60
|
+
then: privacyNoticeUrlSchema,
|
|
61
|
+
otherwise: privacyNoticeUrlSchema.allow('')
|
|
62
|
+
}),
|
|
51
63
|
notificationEmail: notificationEmailAddressSchema
|
|
52
64
|
};
|
|
53
65
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","organisations","idSchema","string","hex","length","required","description","titleSchema","max","trim","slugSchema","pattern","name","organisationSchema","valid","teamNameSchema","teamEmailSchema","email","tlds","allow","phoneSchema","emailAddressSchema","emailResponseTimeSchema","emailSchema","object","keys","address","responseTime","onlineUrlSchema","uri","scheme","onlineTextSchema","onlineSchema","url","text","contactSchema","phone","online","submissionGuidanceSchema","privacyNoticeUrlSchema","notificationEmailAddressSchema","authoredAtSchema","date","iso","authorIdSchema","authorDisplayNameSchema","formMetadataInputKeys","title","organisation","teamName","teamEmail","contact","submissionGuidance","privacyNoticeUrl","notificationEmail","formMetadataInputSchema","formMetadataAuthorSchema","id","displayName","formMetadataStateSchema","createdAt","createdBy","updatedAt","updatedBy","formVersionMetadataSchema","versionNumber","number","integer","min","formMetadataSchema","append","slug","draft","live","versions","array","items","optional"],"sources":["../../../../src/form/form-metadata/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport {\n type FormMetadata,\n type FormMetadataAuthor,\n type FormMetadataContact,\n type FormMetadataContactEmail,\n type FormMetadataContactOnline,\n type FormMetadataInput,\n type FormMetadataState,\n type FormVersionMetadata\n} from '~/src/form/form-metadata/types.js'\n\nexport const organisations = [\n 'Animal and Plant Health Agency – APHA',\n 'Centre for Environment, Fisheries and Aquaculture Science – Cefas',\n 'Defra',\n 'Environment Agency',\n 'Forestry Commission',\n 'Marine Management Organisation – MMO',\n 'Natural England',\n 'Rural Payments Agency – RPA',\n 'Veterinary Medicines Directorate – VMD'\n]\n\nexport const idSchema = Joi.string()\n .hex()\n .length(24)\n .required()\n .description(\n 'Unique identifier for the form, 24-character hexadecimal string'\n )\n\nexport const titleSchema = Joi.string()\n .max(250)\n .trim()\n .required()\n .description('Title of the form, displayed to users')\n\nexport const slugSchema = Joi.string()\n .pattern(/^[a-z0-9-]+$/, { name: 'letters, numbers and hyphens only' })\n .required()\n .description('URL-friendly identifier used in form paths')\n\nexport const organisationSchema = Joi.string()\n .valid(...organisations)\n .required()\n .description('Defra organisation responsible for the form')\n\nexport const teamNameSchema = Joi.string()\n .max(100)\n .trim()\n .required()\n .description('Name of the team responsible for the form')\n\nexport const teamEmailSchema = Joi.string()\n .email({ tlds: { allow: ['uk'] } })\n .trim()\n .required()\n .description('Contact email for the team responsible for the form')\n\nexport const phoneSchema = Joi.string()\n .trim()\n .description('Phone number for form-related inquiries')\n\nexport const emailAddressSchema = Joi.string()\n .email()\n .trim()\n .required()\n .description('Email address for form-related inquiries')\n\nexport const emailResponseTimeSchema = Joi.string()\n .trim()\n .required()\n .description('Expected response time for email inquiries')\n\nexport const emailSchema = Joi.object<FormMetadataContactEmail>()\n .keys({\n address: emailAddressSchema,\n responseTime: emailResponseTimeSchema\n })\n .description('Email contact details including response expectations')\n\nexport const onlineUrlSchema = Joi.string()\n .uri({\n scheme: ['http', 'https']\n })\n .trim()\n .required()\n .description('URL for online contact method')\n\nexport const onlineTextSchema = Joi.string()\n .trim()\n .required()\n .description('Descriptive text for the online contact link')\n\nexport const onlineSchema = Joi.object<FormMetadataContactOnline>()\n .keys({\n url: onlineUrlSchema,\n text: onlineTextSchema\n })\n .description('Online contact details with URL and descriptive text')\n\nexport const contactSchema = Joi.object<FormMetadataContact>()\n .keys({\n phone: phoneSchema,\n email: emailSchema,\n online: onlineSchema\n })\n .description('Complete contact information for form-related inquiries')\n\nexport const submissionGuidanceSchema = Joi.string()\n .trim()\n .description('Guidance text shown to users when submitting the form')\n\nexport const privacyNoticeUrlSchema = Joi.string()\n .uri({\n scheme: ['http', 'https']\n })\n .trim()\n .description('URL to the privacy notice for this form')\n\nexport const notificationEmailAddressSchema = Joi.string()\n .email()\n .trim()\n .description('Email address to receive form submission notifications')\n\nexport const authoredAtSchema = Joi.date()\n .iso()\n .required()\n .description('ISO format timestamp of when an action occurred')\n\nexport const authorIdSchema = Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the author')\n\nexport const authorDisplayNameSchema = Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the author')\n\nexport const formMetadataInputKeys = {\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema,\n contact: contactSchema,\n submissionGuidance: submissionGuidanceSchema,\n privacyNoticeUrl: privacyNoticeUrlSchema,\n notificationEmail: notificationEmailAddressSchema\n}\n\n/**\n * Joi schema for `FormMetadataInput` interface\n * @see {@link FormMetadataInput}\n */\nexport const formMetadataInputSchema = Joi.object<FormMetadataInput>()\n .keys(formMetadataInputKeys)\n .required()\n .description('Input data for creating or updating form metadata')\n\n/**\n * Joi schema for `FormMetadataAuthor` interface\n * @see {@link FormMetadataAuthor}\n */\nexport const formMetadataAuthorSchema = Joi.object<FormMetadataAuthor>()\n .keys({\n id: authorIdSchema,\n displayName: authorDisplayNameSchema\n })\n .required()\n .description('Information about the author of a form or form change')\n\n/**\n * Joi schema for `FormMetadataState` interface\n * @see {@link FormMetadataState}\n */\nexport const formMetadataStateSchema = Joi.object<FormMetadataState>()\n .keys({\n createdAt: authoredAtSchema.description(\n 'When this version was first created'\n ),\n createdBy: formMetadataAuthorSchema.description('Who created this version'),\n updatedAt: authoredAtSchema.description(\n 'When this version was last updated'\n ),\n updatedBy: formMetadataAuthorSchema.description(\n 'Who last updated this version'\n )\n })\n .description('Metadata about a specific version state (draft or live)')\n\n/**\n * Joi schema for `FormVersionMetadata` interface\n * @see {@link FormVersionMetadata}\n */\nexport const formVersionMetadataSchema = Joi.object<FormVersionMetadata>()\n .keys({\n versionNumber: Joi.number()\n .integer()\n .min(1)\n .required()\n .description('The version number'),\n createdAt: authoredAtSchema.description('When this version was created')\n })\n .description('Metadata for a specific version of the form')\n\n/**\n * Joi schema for `FormMetadata` interface\n * @see {@link FormMetadata}\n */\nexport const formMetadataSchema = formMetadataInputSchema\n .append<FormMetadata>({\n id: idSchema,\n slug: slugSchema,\n draft: formMetadataStateSchema.description(\n 'Metadata for the draft version'\n ),\n live: formMetadataStateSchema.description(\n 'Metadata for the published version'\n ),\n createdAt: authoredAtSchema.description('When the form was first created'),\n createdBy: formMetadataAuthorSchema.description('Who created the form'),\n updatedAt: authoredAtSchema.description('When the form was last updated'),\n updatedBy: formMetadataAuthorSchema.description(\n 'Who last updated the form'\n ),\n versions: Joi.array()\n .items(formVersionMetadataSchema)\n .optional()\n .description('Version history for the form')\n })\n .description(\n 'Complete metadata for a form, including version information and authoring details'\n )\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAarB,OAAO,MAAMC,aAAa,GAAG,CAC3B,uCAAuC,EACvC,mEAAmE,EACnE,OAAO,EACP,oBAAoB,EACpB,qBAAqB,EACrB,sCAAsC,EACtC,iBAAiB,EACjB,6BAA6B,EAC7B,wCAAwC,CACzC;AAED,OAAO,MAAMC,QAAQ,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CACjCC,GAAG,CAAC,CAAC,CACLC,MAAM,CAAC,EAAE,CAAC,CACVC,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,iEACF,CAAC;AAEH,OAAO,MAAMC,WAAW,GAAGR,GAAG,CAACG,MAAM,CAAC,CAAC,CACpCM,GAAG,CAAC,GAAG,CAAC,CACRC,IAAI,CAAC,CAAC,CACNJ,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,uCAAuC,CAAC;AAEvD,OAAO,MAAMI,UAAU,GAAGX,GAAG,CAACG,MAAM,CAAC,CAAC,CACnCS,OAAO,CAAC,cAAc,EAAE;EAAEC,IAAI,EAAE;AAAoC,CAAC,CAAC,CACtEP,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,4CAA4C,CAAC;AAE5D,OAAO,MAAMO,kBAAkB,GAAGd,GAAG,CAACG,MAAM,CAAC,CAAC,CAC3CY,KAAK,CAAC,GAAGd,aAAa,CAAC,CACvBK,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,6CAA6C,CAAC;AAE7D,OA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AAC/C,CAAC,CAAC,CACDA,WAAW,CACV,mFACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","organisations","idSchema","string","hex","length","required","description","titleSchema","max","trim","slugSchema","pattern","name","organisationSchema","valid","teamNameSchema","teamEmailSchema","email","tlds","allow","phoneSchema","emailAddressSchema","emailResponseTimeSchema","emailSchema","object","keys","address","responseTime","onlineUrlSchema","uri","scheme","onlineTextSchema","onlineSchema","url","text","contactSchema","phone","online","submissionGuidanceSchema","privacyNoticeTypeSchema","privacyNoticeTextSchema","privacyNoticeUrlSchema","notificationEmailAddressSchema","authoredAtSchema","date","iso","authorIdSchema","authorDisplayNameSchema","formMetadataInputKeys","title","organisation","teamName","teamEmail","contact","submissionGuidance","privacyNoticeType","default","privacyNoticeText","when","is","then","otherwise","privacyNoticeUrl","notificationEmail","formMetadataInputSchema","formMetadataAuthorSchema","id","displayName","formMetadataStateSchema","createdAt","createdBy","updatedAt","updatedBy","formVersionMetadataSchema","versionNumber","number","integer","min","formMetadataSchema","append","slug","draft","live","versions","array","items","optional"],"sources":["../../../../src/form/form-metadata/index.ts"],"sourcesContent":["import Joi from 'joi'\n\nimport {\n type FormMetadata,\n type FormMetadataAuthor,\n type FormMetadataContact,\n type FormMetadataContactEmail,\n type FormMetadataContactOnline,\n type FormMetadataInput,\n type FormMetadataState,\n type FormVersionMetadata\n} from '~/src/form/form-metadata/types.js'\n\nexport const organisations = [\n 'Animal and Plant Health Agency – APHA',\n 'Centre for Environment, Fisheries and Aquaculture Science – Cefas',\n 'Defra',\n 'Environment Agency',\n 'Forestry Commission',\n 'Marine Management Organisation – MMO',\n 'Natural England',\n 'Rural Payments Agency – RPA',\n 'Veterinary Medicines Directorate – VMD'\n]\n\nexport const idSchema = Joi.string()\n .hex()\n .length(24)\n .required()\n .description(\n 'Unique identifier for the form, 24-character hexadecimal string'\n )\n\nexport const titleSchema = Joi.string()\n .max(250)\n .trim()\n .required()\n .description('Title of the form, displayed to users')\n\nexport const slugSchema = Joi.string()\n .pattern(/^[a-z0-9-]+$/, { name: 'letters, numbers and hyphens only' })\n .required()\n .description('URL-friendly identifier used in form paths')\n\nexport const organisationSchema = Joi.string()\n .valid(...organisations)\n .required()\n .description('Defra organisation responsible for the form')\n\nexport const teamNameSchema = Joi.string()\n .max(100)\n .trim()\n .required()\n .description('Name of the team responsible for the form')\n\nexport const teamEmailSchema = Joi.string()\n .email({ tlds: { allow: ['uk'] } })\n .trim()\n .required()\n .description('Contact email for the team responsible for the form')\n\nexport const phoneSchema = Joi.string()\n .trim()\n .description('Phone number for form-related inquiries')\n\nexport const emailAddressSchema = Joi.string()\n .email()\n .trim()\n .required()\n .description('Email address for form-related inquiries')\n\nexport const emailResponseTimeSchema = Joi.string()\n .trim()\n .required()\n .description('Expected response time for email inquiries')\n\nexport const emailSchema = Joi.object<FormMetadataContactEmail>()\n .keys({\n address: emailAddressSchema,\n responseTime: emailResponseTimeSchema\n })\n .description('Email contact details including response expectations')\n\nexport const onlineUrlSchema = Joi.string()\n .uri({\n scheme: ['http', 'https']\n })\n .trim()\n .required()\n .description('URL for online contact method')\n\nexport const onlineTextSchema = Joi.string()\n .trim()\n .required()\n .description('Descriptive text for the online contact link')\n\nexport const onlineSchema = Joi.object<FormMetadataContactOnline>()\n .keys({\n url: onlineUrlSchema,\n text: onlineTextSchema\n })\n .description('Online contact details with URL and descriptive text')\n\nexport const contactSchema = Joi.object<FormMetadataContact>()\n .keys({\n phone: phoneSchema,\n email: emailSchema,\n online: onlineSchema\n })\n .description('Complete contact information for form-related inquiries')\n\nexport const submissionGuidanceSchema = Joi.string()\n .trim()\n .description('Guidance text shown to users when submitting the form')\n\nexport const privacyNoticeTypeSchema = Joi.string()\n .valid('text', 'link')\n .description('Type of privacy notice content')\n\nexport const privacyNoticeTextSchema = Joi.string()\n .trim()\n .description('URL to the privacy notice for this form')\n\nexport const privacyNoticeUrlSchema = Joi.string()\n .uri({\n scheme: ['http', 'https']\n })\n .trim()\n .description('URL to the privacy notice for this form')\n\nexport const notificationEmailAddressSchema = Joi.string()\n .email()\n .trim()\n .description('Email address to receive form submission notifications')\n\nexport const authoredAtSchema = Joi.date()\n .iso()\n .required()\n .description('ISO format timestamp of when an action occurred')\n\nexport const authorIdSchema = Joi.string()\n .trim()\n .required()\n .description('Unique identifier for the author')\n\nexport const authorDisplayNameSchema = Joi.string()\n .trim()\n .required()\n .description('Human-readable name of the author')\n\nexport const formMetadataInputKeys = {\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema,\n contact: contactSchema,\n submissionGuidance: submissionGuidanceSchema,\n privacyNoticeType: privacyNoticeTypeSchema.default('link'),\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 notificationEmail: notificationEmailAddressSchema\n}\n\n/**\n * Joi schema for `FormMetadataInput` interface\n * @see {@link FormMetadataInput}\n */\nexport const formMetadataInputSchema = Joi.object<FormMetadataInput>()\n .keys(formMetadataInputKeys)\n .required()\n .description('Input data for creating or updating form metadata')\n\n/**\n * Joi schema for `FormMetadataAuthor` interface\n * @see {@link FormMetadataAuthor}\n */\nexport const formMetadataAuthorSchema = Joi.object<FormMetadataAuthor>()\n .keys({\n id: authorIdSchema,\n displayName: authorDisplayNameSchema\n })\n .required()\n .description('Information about the author of a form or form change')\n\n/**\n * Joi schema for `FormMetadataState` interface\n * @see {@link FormMetadataState}\n */\nexport const formMetadataStateSchema = Joi.object<FormMetadataState>()\n .keys({\n createdAt: authoredAtSchema.description(\n 'When this version was first created'\n ),\n createdBy: formMetadataAuthorSchema.description('Who created this version'),\n updatedAt: authoredAtSchema.description(\n 'When this version was last updated'\n ),\n updatedBy: formMetadataAuthorSchema.description(\n 'Who last updated this version'\n )\n })\n .description('Metadata about a specific version state (draft or live)')\n\n/**\n * Joi schema for `FormVersionMetadata` interface\n * @see {@link FormVersionMetadata}\n */\nexport const formVersionMetadataSchema = Joi.object<FormVersionMetadata>()\n .keys({\n versionNumber: Joi.number()\n .integer()\n .min(1)\n .required()\n .description('The version number'),\n createdAt: authoredAtSchema.description('When this version was created')\n })\n .description('Metadata for a specific version of the form')\n\n/**\n * Joi schema for `FormMetadata` interface\n * @see {@link FormMetadata}\n */\nexport const formMetadataSchema = formMetadataInputSchema\n .append<FormMetadata>({\n id: idSchema,\n slug: slugSchema,\n draft: formMetadataStateSchema.description(\n 'Metadata for the draft version'\n ),\n live: formMetadataStateSchema.description(\n 'Metadata for the published version'\n ),\n createdAt: authoredAtSchema.description('When the form was first created'),\n createdBy: formMetadataAuthorSchema.description('Who created the form'),\n updatedAt: authoredAtSchema.description('When the form was last updated'),\n updatedBy: formMetadataAuthorSchema.description(\n 'Who last updated the form'\n ),\n versions: Joi.array()\n .items(formVersionMetadataSchema)\n .optional()\n .description('Version history for the form')\n })\n .description(\n 'Complete metadata for a form, including version information and authoring details'\n )\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,KAAK;AAarB,OAAO,MAAMC,aAAa,GAAG,CAC3B,uCAAuC,EACvC,mEAAmE,EACnE,OAAO,EACP,oBAAoB,EACpB,qBAAqB,EACrB,sCAAsC,EACtC,iBAAiB,EACjB,6BAA6B,EAC7B,wCAAwC,CACzC;AAED,OAAO,MAAMC,QAAQ,GAAGF,GAAG,CAACG,MAAM,CAAC,CAAC,CACjCC,GAAG,CAAC,CAAC,CACLC,MAAM,CAAC,EAAE,CAAC,CACVC,QAAQ,CAAC,CAAC,CACVC,WAAW,CACV,iEACF,CAAC;AAEH,OAAO,MAAMC,WAAW,GAAGR,GAAG,CAACG,MAAM,CAAC,CAAC,CACpCM,GAAG,CAAC,GAAG,CAAC,CACRC,IAAI,CAAC,CAAC,CACNJ,QAAQ,CAAC,CAAC,CACVC,WAAW,C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../../src/form/form-metadata/types.ts"],"sourcesContent":["import { formMetadataSchema } from '~/src/form/form-metadata/index.js'\n\n/**\n * Interface for author (createdBy and updatedBy)\n */\nexport interface FormMetadataAuthor {\n /**\n * The ID of the user\n */\n id: string\n\n /**\n * The display name of the user\n */\n displayName: string\n}\n\n/**\n * Interface for metadata state (draft & live)\n */\nexport interface FormMetadataState {\n /**\n * The date the form state was created\n */\n createdAt: Date\n\n /**\n * The author who created the state\n */\n createdBy: FormMetadataAuthor\n\n /**\n * The date the form state was last updated\n */\n updatedAt: Date\n\n /**\n * The author who last updated the state\n */\n updatedBy: FormMetadataAuthor\n}\n\n/**\n * Interface for email contact details\n */\nexport interface FormMetadataContactEmail {\n /**\n * The email address details for support\n */\n address: string\n\n /**\n * How long it takes to receive a support response\n */\n responseTime: string\n}\n\n/**\n * Interface for online contact details\n */\nexport interface FormMetadataContactOnline {\n /**\n * The url of the online contact link\n */\n url: string\n\n /**\n * The text of the online contact link\n */\n text: string\n}\n\n/**\n * Interface for version metadata stored in form metadata\n */\nexport interface FormVersionMetadata {\n /**\n * The version number\n */\n versionNumber: number\n\n /**\n * When this version was created\n */\n createdAt: Date\n}\n\n/**\n * Interface for contact details (phone, email and online)\n */\nexport interface FormMetadataContact {\n /**\n * The phone details for support\n */\n phone?: string\n\n /**\n * The email details for support\n */\n email?: FormMetadataContactEmail\n\n /**\n * The online details for support\n */\n online?: FormMetadataContactOnline\n}\n\n/**\n * Interface for `formMetadataSchema` Joi schema\n * @see {@link formMetadataSchema}\n */\nexport interface FormMetadata {\n /**\n * The id of the form\n */\n id: string\n\n /**\n * The human-readable slug id of the form\n */\n slug: string\n\n /**\n * The human-readable title of the form\n */\n title: string\n\n /**\n * The organisation this form belongs to\n */\n organisation: string\n\n /**\n * The name of the team who own this form\n */\n teamName: string\n\n /**\n * The email of the team who own this form\n */\n teamEmail: string\n /**\n * The contact details of the form\n */\n contact?: FormMetadataContact\n\n /**\n * The guidance text displayed on the form submitted page\n */\n submissionGuidance?: string\n\n /**\n * The url of the privacy notice\n */\n privacyNoticeUrl?: string\n\n /**\n * Email address where form responses are sent\n */\n notificationEmail?: string\n\n /**\n * The draft state of the form\n */\n draft?: FormMetadataState\n\n /**\n * The live state of the form\n */\n live?: FormMetadataState\n\n /**\n * The author who created the form\n */\n createdBy: FormMetadataState['createdBy']\n\n /**\n * The date the form was created\n */\n createdAt: FormMetadataState['createdAt']\n\n /**\n * The author who last updated the form\n */\n updatedBy: FormMetadataState['updatedBy']\n\n /**\n * The date the form was last updated\n */\n updatedAt: FormMetadataState['updatedAt']\n\n /**\n * Version history for the form\n */\n versions?: FormVersionMetadata[]\n}\n\nexport type FormByIdInput = Pick<FormMetadata, 'id'>\nexport type FormByIDAndPageByIdInput = Pick<FormMetadata, 'id'> & {\n pageId: string\n}\nexport type FormByIDAndPageByIdAndComponentByIdInput = Pick<\n FormMetadata,\n 'id'\n> & {\n pageId: string\n componentId: string\n}\nexport type FormBySlugInput = Pick<FormMetadata, 'slug'>\nexport type FormMetadataDocument = Omit<FormMetadata, 'id'>\nexport type FormMetadataInput = Pick<\n FormMetadata,\n | 'title'\n | 'organisation'\n | 'teamName'\n | 'teamEmail'\n | 'contact'\n | 'submissionGuidance'\n | 'privacyNoticeUrl'\n | 'notificationEmail'\n>\n\nexport interface FormResponse {\n id: FormMetadata['id']\n slug: FormMetadata['slug']\n status: string\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-metadata/types.ts"],"sourcesContent":["import { formMetadataSchema } from '~/src/form/form-metadata/index.js'\n\n/**\n * Interface for author (createdBy and updatedBy)\n */\nexport interface FormMetadataAuthor {\n /**\n * The ID of the user\n */\n id: string\n\n /**\n * The display name of the user\n */\n displayName: string\n}\n\n/**\n * Interface for metadata state (draft & live)\n */\nexport interface FormMetadataState {\n /**\n * The date the form state was created\n */\n createdAt: Date\n\n /**\n * The author who created the state\n */\n createdBy: FormMetadataAuthor\n\n /**\n * The date the form state was last updated\n */\n updatedAt: Date\n\n /**\n * The author who last updated the state\n */\n updatedBy: FormMetadataAuthor\n}\n\n/**\n * Interface for email contact details\n */\nexport interface FormMetadataContactEmail {\n /**\n * The email address details for support\n */\n address: string\n\n /**\n * How long it takes to receive a support response\n */\n responseTime: string\n}\n\n/**\n * Interface for online contact details\n */\nexport interface FormMetadataContactOnline {\n /**\n * The url of the online contact link\n */\n url: string\n\n /**\n * The text of the online contact link\n */\n text: string\n}\n\n/**\n * Interface for version metadata stored in form metadata\n */\nexport interface FormVersionMetadata {\n /**\n * The version number\n */\n versionNumber: number\n\n /**\n * When this version was created\n */\n createdAt: Date\n}\n\n/**\n * Interface for contact details (phone, email and online)\n */\nexport interface FormMetadataContact {\n /**\n * The phone details for support\n */\n phone?: string\n\n /**\n * The email details for support\n */\n email?: FormMetadataContactEmail\n\n /**\n * The online details for support\n */\n online?: FormMetadataContactOnline\n}\n\n/**\n * Interface for `formMetadataSchema` Joi schema\n * @see {@link formMetadataSchema}\n */\nexport interface FormMetadata {\n /**\n * The id of the form\n */\n id: string\n\n /**\n * The human-readable slug id of the form\n */\n slug: string\n\n /**\n * The human-readable title of the form\n */\n title: string\n\n /**\n * The organisation this form belongs to\n */\n organisation: string\n\n /**\n * The name of the team who own this form\n */\n teamName: string\n\n /**\n * The email of the team who own this form\n */\n teamEmail: string\n /**\n * The contact details of the form\n */\n contact?: FormMetadataContact\n\n /**\n * The guidance text displayed on the form submitted page\n */\n submissionGuidance?: string\n\n /**\n * The url of the privacy notice\n */\n privacyNoticeUrl?: string\n\n /**\n * The text of the privacy notice\n */\n privacyNoticeText?: string\n\n /**\n * The type of the privacy notice (text or link)\n */\n privacyNoticeType?: string\n\n /**\n * Email address where form responses are sent\n */\n notificationEmail?: string\n\n /**\n * The draft state of the form\n */\n draft?: FormMetadataState\n\n /**\n * The live state of the form\n */\n live?: FormMetadataState\n\n /**\n * The author who created the form\n */\n createdBy: FormMetadataState['createdBy']\n\n /**\n * The date the form was created\n */\n createdAt: FormMetadataState['createdAt']\n\n /**\n * The author who last updated the form\n */\n updatedBy: FormMetadataState['updatedBy']\n\n /**\n * The date the form was last updated\n */\n updatedAt: FormMetadataState['updatedAt']\n\n /**\n * Version history for the form\n */\n versions?: FormVersionMetadata[]\n}\n\nexport type FormByIdInput = Pick<FormMetadata, 'id'>\nexport type FormByIDAndPageByIdInput = Pick<FormMetadata, 'id'> & {\n pageId: string\n}\nexport type FormByIDAndPageByIdAndComponentByIdInput = Pick<\n FormMetadata,\n 'id'\n> & {\n pageId: string\n componentId: string\n}\nexport type FormBySlugInput = Pick<FormMetadata, 'slug'>\nexport type FormMetadataDocument = Omit<FormMetadata, 'id'>\nexport type FormMetadataInput = Pick<\n FormMetadata,\n | 'title'\n | 'organisation'\n | 'teamName'\n | 'teamEmail'\n | 'contact'\n | 'submissionGuidance'\n | 'privacyNoticeType'\n | 'privacyNoticeText'\n | 'privacyNoticeUrl'\n | 'notificationEmail'\n>\n\nexport interface FormResponse {\n id: FormMetadata['id']\n slug: FormMetadata['slug']\n status: string\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAS5C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,yBAAyB,EAE9B,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,6BAA6B,EAElC,KAAK,yBAAyB,EAE9B,KAAK,uBAAu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MAAM,mBAAmB,uCAKiC,CAAA;AAEjE,eAAO,MAAM,oBAAoB,wCAKiC,CAAA;AAElE,eAAO,MAAM,yBAAyB,6CAKiC,CAAA;AAEvE,eAAO,MAAM,uBAAuB,2CAKiC,CAAA;AAErE,eAAO,MAAM,wBAAwB,4CAMiC,CAAA;AAEtE,eAAO,MAAM,uBAAuB,2CAKiC,CAAA;AAErE,eAAO,MAAM,wBAAwB,4CAeiC,CAAA;AAEtE,eAAO,MAAM,4BAA4B,gDAMmC,CAAA;AAE5E,eAAO,MAAM,6BAA6B,iDAMmC,CAAA;AAE7E,eAAO,MAAM,mBAAmB,uCAK6B,CAAA;AAE7D,eAAO,MAAM,sBAAsB,0CAOlC,CAAA;AAED,eAAO,MAAM,6BAA6B,iDAUrC,CAAA;AAEL,eAAO,MAAM,0BAA0B,8CAUlC,CAAA;AAEL,eAAO,MAAM,yBAAyB,6CAIlC,CAAA;AAEJ,eAAO,MAAM,eAAe,6BAKuB,CAAA;AAEnD,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,SAAS,sBAAsB,EACxE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GACtB,YAAY,CAAC,CAAC,CAAC,CASjB;AAED,eAAO,MAAM,aAAa,gCA2N0C,CAAA;AAEpE,eAAO,MAAM,UAAU,8BAIsB,CAAA;AAE7C,eAAO,MAAM,WAAW,+BAOgC,CAAA"}
|
|
@@ -42,6 +42,8 @@ export interface FormSupportOnlineChanges {
|
|
|
42
42
|
text?: string;
|
|
43
43
|
}
|
|
44
44
|
export interface FormPrivacyNoticeChanges {
|
|
45
|
+
privacyNoticeType?: string;
|
|
46
|
+
privacyNoticeText?: string;
|
|
45
47
|
privacyNoticeUrl?: string;
|
|
46
48
|
}
|
|
47
49
|
export interface FormNotificationEmailChanges {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/types.ts"],"names":[],"mappings":"AAAA,OAA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C,6BAA6B,GAC7B,iCAAiC,GACjC,2BAA2B,CAAA;AAE/B,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,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"}
|
|
@@ -16,6 +16,8 @@ export declare const onlineTextSchema: Joi.StringSchema<string>;
|
|
|
16
16
|
export declare const onlineSchema: Joi.ObjectSchema<FormMetadataContactOnline>;
|
|
17
17
|
export declare const contactSchema: Joi.ObjectSchema<FormMetadataContact>;
|
|
18
18
|
export declare const submissionGuidanceSchema: Joi.StringSchema<string>;
|
|
19
|
+
export declare const privacyNoticeTypeSchema: Joi.StringSchema<string>;
|
|
20
|
+
export declare const privacyNoticeTextSchema: Joi.StringSchema<string>;
|
|
19
21
|
export declare const privacyNoticeUrlSchema: Joi.StringSchema<string>;
|
|
20
22
|
export declare const notificationEmailAddressSchema: Joi.StringSchema<string>;
|
|
21
23
|
export declare const authoredAtSchema: Joi.DateSchema<Date>;
|
|
@@ -28,7 +30,9 @@ export declare const formMetadataInputKeys: {
|
|
|
28
30
|
teamEmail: Joi.StringSchema<string>;
|
|
29
31
|
contact: Joi.ObjectSchema<FormMetadataContact>;
|
|
30
32
|
submissionGuidance: Joi.StringSchema<string>;
|
|
31
|
-
|
|
33
|
+
privacyNoticeType: Joi.StringSchema<string>;
|
|
34
|
+
privacyNoticeText: Joi.AlternativesSchema<any>;
|
|
35
|
+
privacyNoticeUrl: Joi.AlternativesSchema<any>;
|
|
32
36
|
notificationEmail: Joi.StringSchema<string>;
|
|
33
37
|
};
|
|
34
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAA;AAErB,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,mCAAmC,CAAA;AAE1C,eAAO,MAAM,aAAa,UAUzB,CAAA;AAED,eAAO,MAAM,QAAQ,0BAMlB,CAAA;AAEH,eAAO,MAAM,WAAW,0BAI+B,CAAA;AAEvD,eAAO,MAAM,UAAU,0BAGqC,CAAA;AAE5D,eAAO,MAAM,kBAAkB,0BAG8B,CAAA;AAE7D,eAAO,MAAM,cAAc,0BAIgC,CAAA;AAE3D,eAAO,MAAM,eAAe,0BAIyC,CAAA;AAErE,eAAO,MAAM,WAAW,0BAEiC,CAAA;AAEzD,eAAO,MAAM,kBAAkB,0BAI2B,CAAA;AAE1D,eAAO,MAAM,uBAAuB,0BAGwB,CAAA;AAE5D,eAAO,MAAM,WAAW,4CAK+C,CAAA;AAEvE,eAAO,MAAM,eAAe,0BAMmB,CAAA;AAE/C,eAAO,MAAM,gBAAgB,0BAGiC,CAAA;AAE9D,eAAO,MAAM,YAAY,6CAK6C,CAAA;AAEtE,eAAO,MAAM,aAAa,uCAM+C,CAAA;AAEzE,eAAO,MAAM,wBAAwB,0BAEk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,0BAEY,CAAA;AAEhD,eAAO,MAAM,uBAAuB,0BAEqB,CAAA;AAEzD,eAAO,MAAM,sBAAsB,0BAKsB,CAAA;AAEzD,eAAO,MAAM,8BAA8B,0BAG6B,CAAA;AAExE,eAAO,MAAM,gBAAgB,sBAGoC,CAAA;AAEjE,eAAO,MAAM,cAAc,0BAGuB,CAAA;AAElD,eAAO,MAAM,uBAAuB,0BAGe,CAAA;AAEnD,eAAO,MAAM,qBAAqB;;;;;;;;;;;CAmBjC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,qCAG+B,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,sCAMkC,CAAA;AAEvE;;;GAGG;AACH,eAAO,MAAM,uBAAuB,qCAaqC,CAAA;AAEzE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,uCASuB,CAAA;AAE7D;;;GAGG;AACH,eAAO,MAAM,kBAAkB,gCAuB5B,CAAA"}
|
|
@@ -129,6 +129,14 @@ export interface FormMetadata {
|
|
|
129
129
|
* The url of the privacy notice
|
|
130
130
|
*/
|
|
131
131
|
privacyNoticeUrl?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The text of the privacy notice
|
|
134
|
+
*/
|
|
135
|
+
privacyNoticeText?: string;
|
|
136
|
+
/**
|
|
137
|
+
* The type of the privacy notice (text or link)
|
|
138
|
+
*/
|
|
139
|
+
privacyNoticeType?: string;
|
|
132
140
|
/**
|
|
133
141
|
* Email address where form responses are sent
|
|
134
142
|
*/
|
|
@@ -172,7 +180,7 @@ export type FormByIDAndPageByIdAndComponentByIdInput = Pick<FormMetadata, 'id'>
|
|
|
172
180
|
};
|
|
173
181
|
export type FormBySlugInput = Pick<FormMetadata, 'slug'>;
|
|
174
182
|
export type FormMetadataDocument = Omit<FormMetadata, 'id'>;
|
|
175
|
-
export type FormMetadataInput = Pick<FormMetadata, 'title' | 'organisation' | 'teamName' | 'teamEmail' | 'contact' | 'submissionGuidance' | 'privacyNoticeUrl' | 'notificationEmail'>;
|
|
183
|
+
export type FormMetadataInput = Pick<FormMetadata, 'title' | 'organisation' | 'teamName' | 'teamEmail' | 'contact' | 'submissionGuidance' | 'privacyNoticeType' | 'privacyNoticeText' | 'privacyNoticeUrl' | 'notificationEmail'>;
|
|
176
184
|
export interface FormResponse {
|
|
177
185
|
id: FormMetadata['id'];
|
|
178
186
|
slug: FormMetadata['slug'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;IAE7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,wBAAwB,CAAA;IAEhC;;OA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,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AACxD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACV,OAAO,GACP,cAAc,GACd,UAAU,GACV,WAAW,GACX,SAAS,GACT,oBAAoB,GACpB,kBAAkB,GAClB,mBAAmB,CACtB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-metadata/types.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;IAE7B;;OAEG;IACH,SAAS,EAAE,IAAI,CAAA;IAEf;;OAEG;IACH,SAAS,EAAE,kBAAkB,CAAA;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;GAEG;AAC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AE,iBAAiB,CAAC,WAAW,CAAC,CAAA;IAEzC;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACjC;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AACpD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG;IAChE,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AACD,MAAM,MAAM,wCAAwC,GAAG,IAAI,CACzD,YAAY,EACZ,IAAI,CACL,GAAG;IACF,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AACxD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAA;AAC3D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACV,OAAO,GACP,cAAc,GACd,UAAU,GACV,WAAW,GACX,SAAS,GACT,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,mBAAmB,CACtB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAC1B,MAAM,EAAE,MAAM,CAAA;CACf"}
|
package/package.json
CHANGED
|
@@ -100,11 +100,73 @@
|
|
|
100
100
|
"description": "Guidance text shown to users when submitting the form",
|
|
101
101
|
"title": "Submission Guidance"
|
|
102
102
|
},
|
|
103
|
-
"
|
|
103
|
+
"privacyNoticeType": {
|
|
104
104
|
"type": "string",
|
|
105
|
-
"description": "
|
|
106
|
-
"
|
|
107
|
-
"
|
|
105
|
+
"description": "Type of privacy notice content",
|
|
106
|
+
"default": "link",
|
|
107
|
+
"enum": [
|
|
108
|
+
"text",
|
|
109
|
+
"link"
|
|
110
|
+
],
|
|
111
|
+
"title": "Privacy Notice Type"
|
|
112
|
+
},
|
|
113
|
+
"privacyNoticeText": {
|
|
114
|
+
"type": [
|
|
115
|
+
"array",
|
|
116
|
+
"boolean",
|
|
117
|
+
"number",
|
|
118
|
+
"object",
|
|
119
|
+
"string",
|
|
120
|
+
"null"
|
|
121
|
+
],
|
|
122
|
+
"oneOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "URL to the privacy notice for this form",
|
|
126
|
+
"title": "Privacy Notice Text (string)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "URL to the privacy notice for this form",
|
|
131
|
+
"title": "Privacy Notice Text (string)"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"title": "Privacy Notice Text",
|
|
135
|
+
"description": "The privacy notice text value.",
|
|
136
|
+
"oneOfTitles": [
|
|
137
|
+
"Privacy Notice Text (string)",
|
|
138
|
+
"Privacy Notice Text (string)"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"privacyNoticeUrl": {
|
|
142
|
+
"type": [
|
|
143
|
+
"array",
|
|
144
|
+
"boolean",
|
|
145
|
+
"number",
|
|
146
|
+
"object",
|
|
147
|
+
"string",
|
|
148
|
+
"null"
|
|
149
|
+
],
|
|
150
|
+
"oneOf": [
|
|
151
|
+
{
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "URL to the privacy notice for this form",
|
|
154
|
+
"format": "uri",
|
|
155
|
+
"title": "Privacy Notice Url (string)"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "URL to the privacy notice for this form",
|
|
160
|
+
"format": "uri",
|
|
161
|
+
"title": "Privacy Notice Url (string)"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"title": "Privacy Notice Url",
|
|
165
|
+
"description": "The privacy notice url value.",
|
|
166
|
+
"oneOfTitles": [
|
|
167
|
+
"Privacy Notice Url (string)",
|
|
168
|
+
"Privacy Notice Url (string)"
|
|
169
|
+
]
|
|
108
170
|
},
|
|
109
171
|
"notificationEmail": {
|
|
110
172
|
"type": "string",
|
|
@@ -100,11 +100,73 @@
|
|
|
100
100
|
"description": "Guidance text shown to users when submitting the form",
|
|
101
101
|
"title": "Submission Guidance"
|
|
102
102
|
},
|
|
103
|
-
"
|
|
103
|
+
"privacyNoticeType": {
|
|
104
104
|
"type": "string",
|
|
105
|
-
"description": "
|
|
106
|
-
"
|
|
107
|
-
"
|
|
105
|
+
"description": "Type of privacy notice content",
|
|
106
|
+
"default": "link",
|
|
107
|
+
"enum": [
|
|
108
|
+
"text",
|
|
109
|
+
"link"
|
|
110
|
+
],
|
|
111
|
+
"title": "Privacy Notice Type"
|
|
112
|
+
},
|
|
113
|
+
"privacyNoticeText": {
|
|
114
|
+
"type": [
|
|
115
|
+
"array",
|
|
116
|
+
"boolean",
|
|
117
|
+
"number",
|
|
118
|
+
"object",
|
|
119
|
+
"string",
|
|
120
|
+
"null"
|
|
121
|
+
],
|
|
122
|
+
"oneOf": [
|
|
123
|
+
{
|
|
124
|
+
"type": "string",
|
|
125
|
+
"description": "URL to the privacy notice for this form",
|
|
126
|
+
"title": "Privacy Notice Text (string)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "URL to the privacy notice for this form",
|
|
131
|
+
"title": "Privacy Notice Text (string)"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"title": "Privacy Notice Text",
|
|
135
|
+
"description": "The privacy notice text value.",
|
|
136
|
+
"oneOfTitles": [
|
|
137
|
+
"Privacy Notice Text (string)",
|
|
138
|
+
"Privacy Notice Text (string)"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"privacyNoticeUrl": {
|
|
142
|
+
"type": [
|
|
143
|
+
"array",
|
|
144
|
+
"boolean",
|
|
145
|
+
"number",
|
|
146
|
+
"object",
|
|
147
|
+
"string",
|
|
148
|
+
"null"
|
|
149
|
+
],
|
|
150
|
+
"oneOf": [
|
|
151
|
+
{
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "URL to the privacy notice for this form",
|
|
154
|
+
"format": "uri",
|
|
155
|
+
"title": "Privacy Notice Url (string)"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "URL to the privacy notice for this form",
|
|
160
|
+
"format": "uri",
|
|
161
|
+
"title": "Privacy Notice Url (string)"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"title": "Privacy Notice Url",
|
|
165
|
+
"description": "The privacy notice url value.",
|
|
166
|
+
"oneOfTitles": [
|
|
167
|
+
"Privacy Notice Url (string)",
|
|
168
|
+
"Privacy Notice Url (string)"
|
|
169
|
+
]
|
|
108
170
|
},
|
|
109
171
|
"notificationEmail": {
|
|
110
172
|
"type": "string",
|
|
@@ -58,6 +58,8 @@ import {
|
|
|
58
58
|
onlineUrlSchema,
|
|
59
59
|
organisationSchema,
|
|
60
60
|
phoneSchema,
|
|
61
|
+
privacyNoticeTextSchema,
|
|
62
|
+
privacyNoticeTypeSchema,
|
|
61
63
|
privacyNoticeUrlSchema,
|
|
62
64
|
slugSchema,
|
|
63
65
|
submissionGuidanceSchema,
|
|
@@ -165,7 +167,17 @@ export const formSupportEmailChanges = Joi.object<FormSupportEmailChanges>()
|
|
|
165
167
|
|
|
166
168
|
export const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()
|
|
167
169
|
.keys({
|
|
168
|
-
|
|
170
|
+
privacyNoticeType: privacyNoticeTypeSchema,
|
|
171
|
+
privacyNoticeText: Joi.when('privacyNoticeType', {
|
|
172
|
+
is: 'text',
|
|
173
|
+
then: privacyNoticeTextSchema,
|
|
174
|
+
otherwise: privacyNoticeTextSchema.allow('')
|
|
175
|
+
}),
|
|
176
|
+
privacyNoticeUrl: Joi.when('privacyNoticeType', {
|
|
177
|
+
is: 'link',
|
|
178
|
+
then: privacyNoticeUrlSchema,
|
|
179
|
+
otherwise: privacyNoticeUrlSchema.allow('')
|
|
180
|
+
})
|
|
169
181
|
})
|
|
170
182
|
.required()
|
|
171
183
|
.description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event')
|
|
@@ -113,6 +113,14 @@ export const submissionGuidanceSchema = Joi.string()
|
|
|
113
113
|
.trim()
|
|
114
114
|
.description('Guidance text shown to users when submitting the form')
|
|
115
115
|
|
|
116
|
+
export const privacyNoticeTypeSchema = Joi.string()
|
|
117
|
+
.valid('text', 'link')
|
|
118
|
+
.description('Type of privacy notice content')
|
|
119
|
+
|
|
120
|
+
export const privacyNoticeTextSchema = Joi.string()
|
|
121
|
+
.trim()
|
|
122
|
+
.description('URL to the privacy notice for this form')
|
|
123
|
+
|
|
116
124
|
export const privacyNoticeUrlSchema = Joi.string()
|
|
117
125
|
.uri({
|
|
118
126
|
scheme: ['http', 'https']
|
|
@@ -147,7 +155,17 @@ export const formMetadataInputKeys = {
|
|
|
147
155
|
teamEmail: teamEmailSchema,
|
|
148
156
|
contact: contactSchema,
|
|
149
157
|
submissionGuidance: submissionGuidanceSchema,
|
|
150
|
-
|
|
158
|
+
privacyNoticeType: privacyNoticeTypeSchema.default('link'),
|
|
159
|
+
privacyNoticeText: Joi.when('privacyNoticeType', {
|
|
160
|
+
is: 'text',
|
|
161
|
+
then: privacyNoticeTextSchema,
|
|
162
|
+
otherwise: privacyNoticeTextSchema.allow('')
|
|
163
|
+
}),
|
|
164
|
+
privacyNoticeUrl: Joi.when('privacyNoticeType', {
|
|
165
|
+
is: 'link',
|
|
166
|
+
then: privacyNoticeUrlSchema,
|
|
167
|
+
otherwise: privacyNoticeUrlSchema.allow('')
|
|
168
|
+
}),
|
|
151
169
|
notificationEmail: notificationEmailAddressSchema
|
|
152
170
|
}
|
|
153
171
|
|
|
@@ -154,6 +154,16 @@ export interface FormMetadata {
|
|
|
154
154
|
*/
|
|
155
155
|
privacyNoticeUrl?: string
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
* The text of the privacy notice
|
|
159
|
+
*/
|
|
160
|
+
privacyNoticeText?: string
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The type of the privacy notice (text or link)
|
|
164
|
+
*/
|
|
165
|
+
privacyNoticeType?: string
|
|
166
|
+
|
|
157
167
|
/**
|
|
158
168
|
* Email address where form responses are sent
|
|
159
169
|
*/
|
|
@@ -216,6 +226,8 @@ export type FormMetadataInput = Pick<
|
|
|
216
226
|
| 'teamEmail'
|
|
217
227
|
| 'contact'
|
|
218
228
|
| 'submissionGuidance'
|
|
229
|
+
| 'privacyNoticeType'
|
|
230
|
+
| 'privacyNoticeText'
|
|
219
231
|
| 'privacyNoticeUrl'
|
|
220
232
|
| 'notificationEmail'
|
|
221
233
|
>
|