@defra/forms-model 3.0.518 → 3.0.520
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/enums.js +1 -0
- package/dist/module/form/form-audit/enums.js.map +1 -1
- package/dist/module/form/form-audit/index.js +11 -4
- 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/index.js.map +1 -1
- package/dist/module/manage/types.js +2 -0
- package/dist/module/manage/types.js.map +1 -0
- package/dist/module/manage/users.js.map +1 -1
- package/dist/types/form/form-audit/enums.d.ts +1 -0
- package/dist/types/form/form-audit/enums.d.ts.map +1 -1
- package/dist/types/form/form-audit/index.d.ts +2 -1
- package/dist/types/form/form-audit/index.d.ts.map +1 -1
- package/dist/types/form/form-audit/types.d.ts +14 -2
- package/dist/types/form/form-audit/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/manage/types.d.ts +35 -0
- package/dist/types/manage/types.d.ts.map +1 -0
- package/dist/types/manage/users.d.ts +3 -3
- package/dist/types/manage/users.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/form/form-audit/enums.ts +1 -0
- package/src/form/form-audit/index.ts +22 -3
- package/src/form/form-audit/types.ts +18 -0
- package/src/index.ts +1 -0
- package/src/manage/types.ts +39 -0
- package/src/manage/users.ts +3 -3
@@ -20,6 +20,7 @@ export let AuditEventMessageType = /*#__PURE__*/function (AuditEventMessageType)
|
|
20
20
|
AuditEventMessageType["FORM_ORGANISATION_UPDATED"] = "FORM_ORGANISATION_UPDATED";
|
21
21
|
AuditEventMessageType["FORM_TEAM_NAME_UPDATED"] = "FORM_TEAM_NAME_UPDATED";
|
22
22
|
AuditEventMessageType["FORM_TEAM_EMAIL_UPDATED"] = "FORM_TEAM_EMAIL_UPDATED";
|
23
|
+
AuditEventMessageType["FORM_SUPPORT_CONTACT_UPDATED"] = "FORM_SUPPORT_CONTACT_UPDATED";
|
23
24
|
AuditEventMessageType["FORM_SUPPORT_PHONE_UPDATED"] = "FORM_SUPPORT_PHONE_UPDATED";
|
24
25
|
AuditEventMessageType["FORM_SUPPORT_EMAIL_UPDATED"] = "FORM_SUPPORT_EMAIL_UPDATED";
|
25
26
|
AuditEventMessageType["FORM_SUPPORT_ONLINE_UPDATED"] = "FORM_SUPPORT_ONLINE_UPDATED";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.js","names":["AuditEventMessageSchemaVersion","AuditEventMessageCategory","AuditEventMessageSubCategory","AuditEventMessageType"],"sources":["../../../../src/form/form-audit/enums.ts"],"sourcesContent":["export enum AuditEventMessageSchemaVersion {\n V1 = 1\n}\n\nexport enum AuditEventMessageCategory {\n FORM = 'FORM',\n ENTITLEMENT = 'ENTITLEMENT'\n}\n\nexport enum AuditEventMessageSubCategory {\n FORM_METADATA = 'FORM_METADATA',\n FORM_DEFINITION = 'FORM_DEFINITION',\n FORM_SUBMISSION = 'FORM_SUBMISSION'\n}\n\nexport enum AuditEventMessageType {\n FORM_CREATED = 'FORM_CREATED',\n FORM_PUBLISHED = 'FORM_PUBLISHED',\n FORM_TITLE_UPDATED = 'FORM_TITLE_UPDATED',\n FORM_ORGANISATION_UPDATED = 'FORM_ORGANISATION_UPDATED',\n FORM_TEAM_NAME_UPDATED = 'FORM_TEAM_NAME_UPDATED',\n FORM_TEAM_EMAIL_UPDATED = 'FORM_TEAM_EMAIL_UPDATED',\n FORM_SUPPORT_PHONE_UPDATED = 'FORM_SUPPORT_PHONE_UPDATED',\n FORM_SUPPORT_EMAIL_UPDATED = 'FORM_SUPPORT_EMAIL_UPDATED',\n FORM_SUPPORT_ONLINE_UPDATED = 'FORM_SUPPORT_ONLINE_UPDATED',\n FORM_PRIVACY_NOTICE_UPDATED = 'FORM_PRIVACY_NOTICE_UPDATED',\n FORM_NOTIFICATION_EMAIL_UPDATED = 'FORM_NOTIFICATION_EMAIL_UPDATED',\n FORM_SUBMISSION_GUIDANCE_UPDATED = 'FORM_SUBMISSION_GUIDANCE_UPDATED',\n FORM_JSON_UPLOADED = 'FORM_JSON_UPLOADED',\n FORM_JSON_DOWNLOADED = 'FORM_JSON_DOWNLOADED',\n FORM_DRAFT_CREATED_FROM_LIVE = 'FORM_DRAFT_CREATED_FROM_LIVE',\n FORM_LIVE_CREATED_FROM_DRAFT = 'FORM_LIVE_CREATED_FROM_DRAFT',\n FORM_DRAFT_DELETED = 'FORM_DRAFT_DELETED',\n FORM_MIGRATED = 'FORM_MIGRATED',\n FORM_UPDATED = 'FORM_UPDATED'\n}\n"],"mappings":"AAAA,WAAYA,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AAI1C,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AAKrC,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAMxC,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA","ignoreList":[]}
|
1
|
+
{"version":3,"file":"enums.js","names":["AuditEventMessageSchemaVersion","AuditEventMessageCategory","AuditEventMessageSubCategory","AuditEventMessageType"],"sources":["../../../../src/form/form-audit/enums.ts"],"sourcesContent":["export enum AuditEventMessageSchemaVersion {\n V1 = 1\n}\n\nexport enum AuditEventMessageCategory {\n FORM = 'FORM',\n ENTITLEMENT = 'ENTITLEMENT'\n}\n\nexport enum AuditEventMessageSubCategory {\n FORM_METADATA = 'FORM_METADATA',\n FORM_DEFINITION = 'FORM_DEFINITION',\n FORM_SUBMISSION = 'FORM_SUBMISSION'\n}\n\nexport enum AuditEventMessageType {\n FORM_CREATED = 'FORM_CREATED',\n FORM_PUBLISHED = 'FORM_PUBLISHED',\n FORM_TITLE_UPDATED = 'FORM_TITLE_UPDATED',\n FORM_ORGANISATION_UPDATED = 'FORM_ORGANISATION_UPDATED',\n FORM_TEAM_NAME_UPDATED = 'FORM_TEAM_NAME_UPDATED',\n FORM_TEAM_EMAIL_UPDATED = 'FORM_TEAM_EMAIL_UPDATED',\n FORM_SUPPORT_CONTACT_UPDATED = 'FORM_SUPPORT_CONTACT_UPDATED',\n FORM_SUPPORT_PHONE_UPDATED = 'FORM_SUPPORT_PHONE_UPDATED',\n FORM_SUPPORT_EMAIL_UPDATED = 'FORM_SUPPORT_EMAIL_UPDATED',\n FORM_SUPPORT_ONLINE_UPDATED = 'FORM_SUPPORT_ONLINE_UPDATED',\n FORM_PRIVACY_NOTICE_UPDATED = 'FORM_PRIVACY_NOTICE_UPDATED',\n FORM_NOTIFICATION_EMAIL_UPDATED = 'FORM_NOTIFICATION_EMAIL_UPDATED',\n FORM_SUBMISSION_GUIDANCE_UPDATED = 'FORM_SUBMISSION_GUIDANCE_UPDATED',\n FORM_JSON_UPLOADED = 'FORM_JSON_UPLOADED',\n FORM_JSON_DOWNLOADED = 'FORM_JSON_DOWNLOADED',\n FORM_DRAFT_CREATED_FROM_LIVE = 'FORM_DRAFT_CREATED_FROM_LIVE',\n FORM_LIVE_CREATED_FROM_DRAFT = 'FORM_LIVE_CREATED_FROM_DRAFT',\n FORM_DRAFT_DELETED = 'FORM_DRAFT_DELETED',\n FORM_MIGRATED = 'FORM_MIGRATED',\n FORM_UPDATED = 'FORM_UPDATED'\n}\n"],"mappings":"AAAA,WAAYA,8BAA8B,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AAI1C,WAAYC,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AAKrC,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAMxC,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA","ignoreList":[]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import Joi from 'joi';
|
2
2
|
import { AuditEventMessageCategory, AuditEventMessageSchemaVersion, AuditEventMessageType } from "./enums.js";
|
3
|
+
import { contactSchema } from "../form-metadata/index.js";
|
3
4
|
export const formMessageDataBase = Joi.object({
|
4
5
|
formId: Joi.string().required(),
|
5
6
|
slug: Joi.string().required()
|
@@ -25,6 +26,9 @@ export const formTeamNameChanges = Joi.object().keys({
|
|
25
26
|
export const formTeamEmailChanges = Joi.object().keys({
|
26
27
|
teamEmail: Joi.string().required()
|
27
28
|
}).required();
|
29
|
+
export const formSupportContactChanges = Joi.object().keys({
|
30
|
+
contact: contactSchema
|
31
|
+
}).required();
|
28
32
|
export const formSupportPhoneChanges = Joi.object().keys({
|
29
33
|
phone: Joi.string().required()
|
30
34
|
}).required();
|
@@ -33,13 +37,13 @@ export const formSupportOnlineChanges = Joi.object().keys({
|
|
33
37
|
text: Joi.string().required()
|
34
38
|
}).required();
|
35
39
|
export const formPrivacyNoticeChanges = Joi.object().keys({
|
36
|
-
privacyNoticeUrl: Joi.string()
|
40
|
+
privacyNoticeUrl: Joi.string()
|
37
41
|
}).required();
|
38
42
|
export const formNotificationEmailChanges = Joi.object().keys({
|
39
|
-
notificationEmail: Joi.string()
|
43
|
+
notificationEmail: Joi.string()
|
40
44
|
}).required();
|
41
45
|
export const formSubmissionGuidanceChanges = Joi.object().keys({
|
42
|
-
submissionGuidance: Joi.string()
|
46
|
+
submissionGuidance: Joi.string()
|
43
47
|
}).required();
|
44
48
|
export const formUploadedChanges = Joi.object().keys({
|
45
49
|
value: Joi.string().required()
|
@@ -61,7 +65,7 @@ export const auditUserSchema = Joi.object().keys({
|
|
61
65
|
displayName: Joi.string().required()
|
62
66
|
});
|
63
67
|
export const validCategories = [AuditEventMessageCategory.FORM, AuditEventMessageCategory.ENTITLEMENT];
|
64
|
-
export const validTypes = [AuditEventMessageType.FORM_CREATED, AuditEventMessageType.FORM_PUBLISHED, AuditEventMessageType.FORM_TITLE_UPDATED, AuditEventMessageType.FORM_ORGANISATION_UPDATED, AuditEventMessageType.FORM_TEAM_NAME_UPDATED, AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED, AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED, AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED, AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED, AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED, AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED, AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED, AuditEventMessageType.FORM_UPDATED, AuditEventMessageType.FORM_JSON_UPLOADED, AuditEventMessageType.FORM_JSON_DOWNLOADED, AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE, AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT, AuditEventMessageType.FORM_DRAFT_DELETED, AuditEventMessageType.FORM_MIGRATED];
|
68
|
+
export const validTypes = [AuditEventMessageType.FORM_CREATED, AuditEventMessageType.FORM_PUBLISHED, AuditEventMessageType.FORM_TITLE_UPDATED, AuditEventMessageType.FORM_ORGANISATION_UPDATED, AuditEventMessageType.FORM_TEAM_NAME_UPDATED, AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED, AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED, AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED, AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED, AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED, AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED, AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED, AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED, AuditEventMessageType.FORM_UPDATED, AuditEventMessageType.FORM_JSON_UPLOADED, AuditEventMessageType.FORM_JSON_DOWNLOADED, AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE, AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT, AuditEventMessageType.FORM_DRAFT_DELETED, AuditEventMessageType.FORM_MIGRATED];
|
65
69
|
export const validMessageSchemaVersions = [AuditEventMessageSchemaVersion.V1];
|
66
70
|
export const messageSchema = Joi.object().keys({
|
67
71
|
entityId: Joi.string().required(),
|
@@ -86,6 +90,9 @@ export const messageSchema = Joi.object().keys({
|
|
86
90
|
}, {
|
87
91
|
is: Joi.string().trim().valid(AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED),
|
88
92
|
then: formChangesMessageData(formTeamEmailChanges)
|
93
|
+
}, {
|
94
|
+
is: Joi.string().trim().valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),
|
95
|
+
then: formChangesMessageData(formSupportContactChanges)
|
89
96
|
}, {
|
90
97
|
is: Joi.string().trim().valid(AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED),
|
91
98
|
then: formChangesMessageData(formSupportPhoneChanges)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageType","formMessageDataBase","object","formId","string","required","slug","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formUpdatedMessageData","description","trim","formTitleChanges","keys","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formPrivacyNoticeChanges","privacyNoticeUrl","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","formSupportEmailChanges","address","email","responseTime","formChangesMessageData","schema","changes","previous","new","auditUserSchema","id","uuid","displayName","validCategories","FORM","ENTITLEMENT","validTypes","FORM_CREATED","FORM_PUBLISHED","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_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_UPDATED","FORM_JSON_UPLOADED","FORM_JSON_DOWNLOADED","FORM_DRAFT_CREATED_FROM_LIVE","FORM_LIVE_CREATED_FROM_DRAFT","FORM_DRAFT_DELETED","FORM_MIGRATED","validMessageSchemaVersions","V1","messageSchema","entityId","schemaVersion","valid","type","category","createdAt","date","createdBy","data","when","switch","is","then","messageCreatedAt","auditEvent","message","auditRecord","messageId","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type ChangesMessageData,\n type FormCreatedMessageData,\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 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} from '~/src/form/form-audit/types.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: Joi.string().required(),\n slug: Joi.string().required()\n})\n\nexport const formCreatedMessageData =\n formMessageDataBase.append<FormCreatedMessageData>({\n title: Joi.string().required(),\n organisation: Joi.string().required(),\n teamName: Joi.string().required(),\n teamEmail: Joi.string().required()\n })\n\nexport const formUpdatedMessageData =\n formMessageDataBase.append<FormUpdatedMessageData>({\n description: Joi.string().trim().required()\n })\n\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: Joi.string().required()\n })\n .required()\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: Joi.string().required()\n })\n .required()\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: Joi.string().required()\n })\n .required()\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: Joi.string().required()\n })\n .required()\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: Joi.string().required()\n })\n .required()\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: Joi.string().required(),\n text: Joi.string().required()\n })\n .required()\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeUrl: Joi.string().required()\n })\n .required()\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: Joi.string().required()\n })\n .required()\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: Joi.string().required()\n })\n .required()\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n\nexport const formSupportEmailChanges =\n Joi.object<FormSupportEmailChanges>().keys({\n address: Joi.string().email().required(),\n responseTime: Joi.string().required()\n })\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>>().keys({\n previous: schema,\n new: schema\n })\n })\n}\n\nexport const auditUserSchema = Joi.object<AuditUser>().keys({\n id: Joi.string().uuid().required(),\n displayName: Joi.string().required()\n})\n\nexport const validCategories = [\n AuditEventMessageCategory.FORM,\n AuditEventMessageCategory.ENTITLEMENT\n]\n\nexport const validTypes = [\n AuditEventMessageType.FORM_CREATED,\n AuditEventMessageType.FORM_PUBLISHED,\n AuditEventMessageType.FORM_TITLE_UPDATED,\n AuditEventMessageType.FORM_ORGANISATION_UPDATED,\n AuditEventMessageType.FORM_TEAM_NAME_UPDATED,\n AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED,\n AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED,\n AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED,\n AuditEventMessageType.FORM_UPDATED,\n AuditEventMessageType.FORM_JSON_UPLOADED,\n AuditEventMessageType.FORM_JSON_DOWNLOADED,\n AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,\n AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,\n AuditEventMessageType.FORM_DRAFT_DELETED,\n AuditEventMessageType.FORM_MIGRATED\n]\n\nexport const validMessageSchemaVersions = [AuditEventMessageSchemaVersion.V1]\n\nexport const messageSchema = Joi.object<AuditMessage>().keys({\n entityId: Joi.string().required(),\n schemaVersion: Joi.string()\n .valid(...validMessageSchemaVersions)\n .required(),\n type: Joi.string().valid(...validTypes),\n category: Joi.string()\n .valid(...validCategories)\n .required(),\n createdAt: Joi.date().required(),\n createdBy: auditUserSchema.required(),\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().trim().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_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().trim().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 }),\n messageCreatedAt: Joi.date().required()\n})\n\nexport const auditEvent = Joi.object<AuditEvent>().keys({\n message: messageSchema\n})\n\nexport const auditRecord = messageSchema.append<AuditRecord>({\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAA6B,KAAK;AAE5C,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,qBAAqB;AAoCvB,OAAO,MAAMC,mBAAmB,GAAGJ,GAAG,CAACK,MAAM,CAAsB;EACjEC,MAAM,EAAEN,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/BC,IAAI,EAAET,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC9B,CAAC,CAAC;AAEF,OAAO,MAAME,sBAAsB,GACjCN,mBAAmB,CAACO,MAAM,CAAyB;EACjDC,KAAK,EAAEZ,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9BK,YAAY,EAAEb,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACrCM,QAAQ,EAAEd,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACjCO,SAAS,EAAEf,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACnC,CAAC,CAAC;AAEJ,OAAO,MAAMQ,sBAAsB,GACjCZ,mBAAmB,CAACO,MAAM,CAAyB;EACjDM,WAAW,EAAEjB,GAAG,CAACO,MAAM,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAACV,QAAQ,CAAC;AAC5C,CAAC,CAAC;AAEJ,OAAO,MAAMW,gBAAgB,GAAGnB,GAAG,CAACK,MAAM,CAAmB,CAAC,CAC3De,IAAI,CAAC;EACJR,KAAK,EAAEZ,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC/B,CAAC,CAAC,CACDA,QAAQ,CAAC,CAAC;AAEb,OAAO,MAAMa,uBAAuB,GAAGrB,GAAG,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ACO,MAAM,CAAC,CAAC,CACbW,IAAI,CAAC,CAAC,CACN4D,KAAK,CAAC3E,qBAAqB,CAAC8D,gCAAgC,CAAC;MAChEuB,IAAI,EAAE/C,sBAAsB,CAG1BR,6BAA6B;IACjC,CAAC,EACD;MACEsD,EAAE,EAAEvF,GAAG,CAACO,MAAM,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAAC4D,KAAK,CAAC3E,qBAAqB,CAACgE,kBAAkB,CAAC;MACvEqB,IAAI,EAAE/C,sBAAsB,CAG1BN,mBAAmB;IACvB,CAAC,EACD;MACEoD,EAAE,EAAEvF,GAAG,CAACO,MAAM,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAAC4D,KAAK,CAAC3E,qBAAqB,CAAC+D,YAAY,CAAC;MACjEsB,IAAI,EAAExE;IACR,CAAC;EAEL,CAAC,CAAC;EACFyE,gBAAgB,EAAEzF,GAAG,CAACkF,IAAI,CAAC,CAAC,CAAC1E,QAAQ,CAAC;AACxC,CAAC,CAAC;AAEF,OAAO,MAAMkF,UAAU,GAAG1F,GAAG,CAACK,MAAM,CAAa,CAAC,CAACe,IAAI,CAAC;EACtDuE,OAAO,EAAEhB;AACX,CAAC,CAAC;AAEF,OAAO,MAAMiB,WAAW,GAAGjB,aAAa,CAAChE,MAAM,CAAc;EAC3DkF,SAAS,EAAE7F,GAAG,CAACO,MAAM,CAAC,CAAC,CAACyC,IAAI,CAAC,CAAC,CAACxC,QAAQ,CAAC,CAAC;EACzCoE,QAAQ,EAAE5E,GAAG,CAACO,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACjCsF,eAAe,EAAE9F,GAAG,CAACkF,IAAI,CAAC,CAAC,CAAC1E,QAAQ,CAAC;AACvC,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageType","contactSchema","formMessageDataBase","object","formId","string","required","slug","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formUpdatedMessageData","description","trim","formTitleChanges","keys","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportContactChanges","contact","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formPrivacyNoticeChanges","privacyNoticeUrl","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","formSupportEmailChanges","address","email","responseTime","formChangesMessageData","schema","changes","previous","new","auditUserSchema","id","uuid","displayName","validCategories","FORM","ENTITLEMENT","validTypes","FORM_CREATED","FORM_PUBLISHED","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_UPDATED","FORM_JSON_UPLOADED","FORM_JSON_DOWNLOADED","FORM_DRAFT_CREATED_FROM_LIVE","FORM_LIVE_CREATED_FROM_DRAFT","FORM_DRAFT_DELETED","FORM_MIGRATED","validMessageSchemaVersions","V1","messageSchema","entityId","schemaVersion","valid","type","category","createdAt","date","createdBy","data","when","switch","is","then","messageCreatedAt","auditEvent","message","auditRecord","messageId","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type ChangesMessageData,\n type FormCreatedMessageData,\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} from '~/src/form/form-audit/types.js'\nimport { contactSchema } from '~/src/form/form-metadata/index.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: Joi.string().required(),\n slug: Joi.string().required()\n})\n\nexport const formCreatedMessageData =\n formMessageDataBase.append<FormCreatedMessageData>({\n title: Joi.string().required(),\n organisation: Joi.string().required(),\n teamName: Joi.string().required(),\n teamEmail: Joi.string().required()\n })\n\nexport const formUpdatedMessageData =\n formMessageDataBase.append<FormUpdatedMessageData>({\n description: Joi.string().trim().required()\n })\n\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: Joi.string().required()\n })\n .required()\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: Joi.string().required()\n })\n .required()\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: Joi.string().required()\n })\n .required()\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: Joi.string().required()\n })\n .required()\n\nexport const formSupportContactChanges = Joi.object<FormSupportContactChanges>()\n .keys({\n contact: contactSchema\n })\n .required()\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: Joi.string().required()\n })\n .required()\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: Joi.string().required(),\n text: Joi.string().required()\n })\n .required()\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeUrl: Joi.string()\n })\n .required()\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: Joi.string()\n })\n .required()\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: Joi.string()\n })\n .required()\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n\nexport const formSupportEmailChanges =\n Joi.object<FormSupportEmailChanges>().keys({\n address: Joi.string().email().required(),\n responseTime: Joi.string().required()\n })\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>>().keys({\n previous: schema,\n new: schema\n })\n })\n}\n\nexport const auditUserSchema = Joi.object<AuditUser>().keys({\n id: Joi.string().uuid().required(),\n displayName: Joi.string().required()\n})\n\nexport const validCategories = [\n AuditEventMessageCategory.FORM,\n AuditEventMessageCategory.ENTITLEMENT\n]\n\nexport const validTypes = [\n AuditEventMessageType.FORM_CREATED,\n AuditEventMessageType.FORM_PUBLISHED,\n AuditEventMessageType.FORM_TITLE_UPDATED,\n AuditEventMessageType.FORM_ORGANISATION_UPDATED,\n AuditEventMessageType.FORM_TEAM_NAME_UPDATED,\n AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED,\n AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED,\n AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED,\n AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED,\n AuditEventMessageType.FORM_UPDATED,\n AuditEventMessageType.FORM_JSON_UPLOADED,\n AuditEventMessageType.FORM_JSON_DOWNLOADED,\n AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE,\n AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT,\n AuditEventMessageType.FORM_DRAFT_DELETED,\n AuditEventMessageType.FORM_MIGRATED\n]\n\nexport const validMessageSchemaVersions = [AuditEventMessageSchemaVersion.V1]\n\nexport const messageSchema = Joi.object<AuditMessage>().keys({\n entityId: Joi.string().required(),\n schemaVersion: Joi.string()\n .valid(...validMessageSchemaVersions)\n .required(),\n type: Joi.string().valid(...validTypes),\n category: Joi.string()\n .valid(...validCategories)\n .required(),\n createdAt: Joi.date().required(),\n createdBy: auditUserSchema.required(),\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().trim().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().trim().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 }),\n messageCreatedAt: Joi.date().required()\n})\n\nexport const auditEvent = Joi.object<AuditEvent>().keys({\n message: messageSchema\n})\n\nexport const auditRecord = messageSchema.append<AuditRecord>({\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n})\n"],"mappings":"AAAA,OAAOA,GAAG,MAA6B,KAAK;AAE5C,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,qBAAqB;AAqCvB,SAASC,aAAa;AAEtB,OAAO,MAAMC,mBAAmB,GAAGL,GAAG,CAACM,MAAM,CAAsB;EACjEC,MAAM,EAAEP,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC/BC,IAAI,EAAEV,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AAC9B,CAAC,CAAC;AAEF,OAAO,MAAME,sBAAsB,GACjCN,mBAAmB,CAACO,MAAM,CAAyB;EACjDC,KAAK,EAAEb,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC9BK,YAAY,EAAEd,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACrCM,QAAQ,EAAEf,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACjCO,SAAS,EAAEhB,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC;AACnC,CAAC,CAAC;AAEJ,OAAO,MAAMQ,sBAAsB,GACjCZ,mBAAmB,CAACO,MAAM,CAAyB;EACjDM,WAAW,EAAElB,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACW,IAAI,CAAC,CAAC,CAACV,QAAQ,CAAC;AAC5C,CAAC,CAAC;AAEJ,OAAO,MAAMW,gBAAgB,GAAGpB,GAAG,CAACM,MAAM,CAAmB,CAAC,CAC3De,IAAI,CAAC;EACJR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EhB;AACX,CAAC,CAAC;AAEF,OAAO,MAAMiB,WAAW,GAAGjB,aAAa,CAACnE,MAAM,CAAc;EAC3DqF,SAAS,EAAEjG,GAAG,CAACQ,MAAM,CAAC,CAAC,CAAC2C,IAAI,CAAC,CAAC,CAAC1C,QAAQ,CAAC,CAAC;EACzCuE,QAAQ,EAAEhF,GAAG,CAACQ,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EACjCyF,eAAe,EAAElG,GAAG,CAACsF,IAAI,CAAC,CAAC,CAAC7E,QAAQ,CAAC;AACvC,CAAC,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 AuditEventMessageType\n} from '~/src/form/form-audit/enums.js'\n\nexport interface FormMessageDataBase {\n formId: string\n slug: string\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 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 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 type FormMessageChangesData =\n | FormTitleUpdatedMessageData\n | FormOrganisationUpdatedMessageData\n | FormTeamNameUpdatedMessageData\n | FormTeamEmailUpdatedMessageData\n | FormSupportPhoneUpdatedMessageData\n | FormSupportEmailUpdatedMessageData\n | FormSupportOnlineUpdatedMessageData\n | FormPrivacyNoticeUpdatedMessageData\n | FormNotificationEmailUpdatedMessageData\n | FormSubmissionGuidanceUpdatedMessageData\n | FormUploadedMessageData\n\nexport type FormMessageActivitiesData =\n | FormCreatedMessageData\n | FormUpdatedMessageData\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n description: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport type MessageData = FormMessageChangesData | FormMessageActivitiesData\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n type: AuditEventMessageType\n entityId: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface FormCreatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n}\n\nexport interface FormPublishedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PUBLISHED\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\n}\n\nexport type AuditMessage =\n | FormCreatedMessage\n | FormTitleUpdatedMessage\n | FormOrganisationUpdatedMessage\n | FormTeamNameUpdatedMessage\n | FormTeamEmailUpdatedMessage\n | FormSupportPhoneUpdatedMessage\n | FormSupportEmailUpdatedMessage\n | FormSupportOnlineUpdatedMessage\n | FormPrivacyNoticeUpdatedMessage\n | FormNotificationEmailUpdatedMessage\n | FormSubmissionGuidanceUpdatedMessage\n | FormUploadedMessage\n | FormDownloadedMessage\n | FormPublishedMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport type AuditRecord = AuditMessage & {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface MessageBody {\n Message: string\n}\n"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-audit/types.ts"],"sourcesContent":["import {\n type AuditEventMessageCategory,\n type AuditEventMessageSchemaVersion,\n type AuditEventMessageType\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}\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 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 | FormUpdatedMessageData\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n description: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport type MessageData = FormMessageChangesData | FormMessageActivitiesData\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n type: AuditEventMessageType\n entityId: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface FormCreatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportContactUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED\n data: FormSupportContactUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n}\n\nexport interface FormPublishedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PUBLISHED\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends MessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\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 | FormPublishedMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport type AuditRecord = AuditMessage & {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface MessageBody {\n Message: string\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/module/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from '~/src/common/enums.js'\nexport * from '~/src/common/random-id.js'\nexport * from '~/src/common/schema.js'\nexport * from '~/src/common/pagination/index.js'\nexport * from '~/src/common/search/index.js'\nexport * from '~/src/common/sorting/index.js'\nexport * from '~/src/components/index.js'\nexport * from '~/src/conditions/index.js'\nexport * from '~/src/form/form-definition/index.js'\nexport * from '~/src/form/form-definition/types.js'\nexport * from '~/src/form/form-metadata/index.js'\nexport * from '~/src/form/form-submission/index.js'\nexport * from '~/src/form/utils/index.js'\nexport * from '~/src/form/form-editor/index.js'\nexport * from '~/src/form/form-editor/preview/index.js'\nexport * from '~/src/form/form-manager/types.js'\nexport * from '~/src/form/form-manager/errors.js'\nexport * from '~/src/manage/users.js'\nexport * from '~/src/pages/index.js'\nexport * from '~/src/utils/helpers.js'\nexport * from '~/src/utils/markdown.js'\nexport * from '~/src/form/form-audit/index.js'\nexport * from '~/src/form/form-audit/enums.js'\n\nexport type * from '~/src/common/types.js'\nexport type * from '~/src/common/pagination/types.js'\nexport type * from '~/src/common/search/types.js'\nexport type * from '~/src/common/sorting/types.js'\nexport type * from '~/src/components/types.js'\nexport type * from '~/src/conditions/types.js'\nexport type * from '~/src/form/form-definition/types.js'\nexport type * from '~/src/form/form-metadata/types.js'\nexport type * from '~/src/form/form-submission/types.js'\nexport type * from '~/src/form/form-editor/preview/types.js'\nexport type * from '~/src/form/form-editor/types.js'\nexport type * from '~/src/form/form-editor/macros/types.js'\nexport type * from '~/src/form/form-audit/types.js'\nexport type * from '~/src/manage/types.js'\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/manage/types.ts"],"sourcesContent":["/**\n * Interface for `EntitlementRole`\n */\nexport interface EntitlementRole {\n /**\n * The display name\n */\n name: string\n\n /**\n * The code value\n */\n code: string\n\n /**\n * The description\n */\n description: string\n}\n\n/**\n * Interface for `ManageUser`\n */\nexport interface ManageUser {\n /**\n * The object id of the user\n */\n userId: string\n\n /**\n * The email address of the user\n */\n emailAddress: string\n\n /**\n * The role assigned to the user\n */\n userRole: string\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"users.js","names":[],"sources":["../../../src/manage/users.ts"],"sourcesContent":["export interface EntitlementUser {\n /**\n * The id of the user\n */\n userId: string\n\n /**\n * The full name of the user\n */\n
|
1
|
+
{"version":3,"file":"users.js","names":[],"sources":["../../../src/manage/users.ts"],"sourcesContent":["export interface EntitlementUser {\n /**\n * The id of the user\n */\n userId: string\n\n /**\n * The display name (full name) of the user\n */\n displayName: string\n\n /**\n * The email addresss of the user\n */\n email: string\n\n /**\n * The roles assigned to the user\n */\n roles: string[]\n\n /**\n * The scopes assigned to the user\n */\n scopes: string[]\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -17,6 +17,7 @@ export declare enum AuditEventMessageType {
|
|
17
17
|
FORM_ORGANISATION_UPDATED = "FORM_ORGANISATION_UPDATED",
|
18
18
|
FORM_TEAM_NAME_UPDATED = "FORM_TEAM_NAME_UPDATED",
|
19
19
|
FORM_TEAM_EMAIL_UPDATED = "FORM_TEAM_EMAIL_UPDATED",
|
20
|
+
FORM_SUPPORT_CONTACT_UPDATED = "FORM_SUPPORT_CONTACT_UPDATED",
|
20
21
|
FORM_SUPPORT_PHONE_UPDATED = "FORM_SUPPORT_PHONE_UPDATED",
|
21
22
|
FORM_SUPPORT_EMAIL_UPDATED = "FORM_SUPPORT_EMAIL_UPDATED",
|
22
23
|
FORM_SUPPORT_ONLINE_UPDATED = "FORM_SUPPORT_ONLINE_UPDATED",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,8BAA8B;IACxC,EAAE,IAAI;CACP;AAED,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED,oBAAY,4BAA4B;IACtC,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;CACpC;AAED,oBAAY,qBAAqB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,yBAAyB,8BAA8B;IACvD,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,0BAA0B,+BAA+B;IACzD,0BAA0B,+BAA+B;IACzD,2BAA2B,gCAAgC;IAC3D,2BAA2B,gCAAgC;IAC3D,+BAA+B,oCAAoC;IACnE,gCAAgC,qCAAqC;IACrE,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;IAC7C,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAC9B"}
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,8BAA8B;IACxC,EAAE,IAAI;CACP;AAED,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAED,oBAAY,4BAA4B;IACtC,aAAa,kBAAkB;IAC/B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;CACpC;AAED,oBAAY,qBAAqB;IAC/B,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,kBAAkB,uBAAuB;IACzC,yBAAyB,8BAA8B;IACvD,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,4BAA4B,iCAAiC;IAC7D,0BAA0B,+BAA+B;IACzD,0BAA0B,+BAA+B;IACzD,2BAA2B,gCAAgC;IAC3D,2BAA2B,gCAAgC;IAC3D,+BAA+B,oCAAoC;IACnE,gCAAgC,qCAAqC;IACrE,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;IAC7C,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAC9B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import Joi, { type ObjectSchema } from 'joi';
|
2
2
|
import { AuditEventMessageCategory, AuditEventMessageSchemaVersion, AuditEventMessageType } from '../../form/form-audit/enums.js';
|
3
|
-
import { type AuditEvent, type AuditMessage, type AuditRecord, type AuditUser, type FormCreatedMessageData, type FormMessageChangesData, type FormMessageDataBase, type FormNotificationEmailChanges, type FormOrganisationChanges, type FormPrivacyNoticeChanges, type FormSubmissionGuidanceChanges, type FormSupportEmailChanges, type FormSupportOnlineChanges, type FormSupportPhoneChanges, type FormTeamEmailChanges, type FormTeamNameChanges, type FormTitleChanges, type FormUpdatedMessageData, type FormUploadedChanges } from '../../form/form-audit/types.js';
|
3
|
+
import { type AuditEvent, type AuditMessage, type AuditRecord, type AuditUser, type FormCreatedMessageData, type FormMessageChangesData, type FormMessageDataBase, type FormNotificationEmailChanges, type FormOrganisationChanges, type FormPrivacyNoticeChanges, type FormSubmissionGuidanceChanges, type FormSupportContactChanges, type FormSupportEmailChanges, type FormSupportOnlineChanges, type FormSupportPhoneChanges, type FormTeamEmailChanges, type FormTeamNameChanges, type FormTitleChanges, type FormUpdatedMessageData, type FormUploadedChanges } from '../../form/form-audit/types.js';
|
4
4
|
export declare const formMessageDataBase: Joi.ObjectSchema<FormMessageDataBase>;
|
5
5
|
export declare const formCreatedMessageData: Joi.ObjectSchema<FormCreatedMessageData>;
|
6
6
|
export declare const formUpdatedMessageData: Joi.ObjectSchema<FormUpdatedMessageData>;
|
@@ -8,6 +8,7 @@ export declare const formTitleChanges: Joi.ObjectSchema<FormTitleChanges>;
|
|
8
8
|
export declare const formOrganisationChanges: Joi.ObjectSchema<FormOrganisationChanges>;
|
9
9
|
export declare const formTeamNameChanges: Joi.ObjectSchema<FormTeamNameChanges>;
|
10
10
|
export declare const formTeamEmailChanges: Joi.ObjectSchema<FormTeamEmailChanges>;
|
11
|
+
export declare const formSupportContactChanges: Joi.ObjectSchema<FormSupportContactChanges>;
|
11
12
|
export declare const formSupportPhoneChanges: Joi.ObjectSchema<FormSupportPhoneChanges>;
|
12
13
|
export declare const formSupportOnlineChanges: Joi.ObjectSchema<FormSupportOnlineChanges>;
|
13
14
|
export declare const formPrivacyNoticeChanges: Joi.ObjectSchema<FormPrivacyNoticeChanges>;
|
@@ -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;AAE5C,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,6BAA6B,EAElC,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAE5B,KAAK,oBAAoB,EAEzB,KAAK,mBAAmB,EAExB,KAAK,gBAAgB,EAErB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EAEzB,MAAM,gCAAgC,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAE5C,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAEjC,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,6BAA6B,EAElC,KAAK,yBAAyB,EAE9B,KAAK,uBAAuB,EAE5B,KAAK,wBAAwB,EAE7B,KAAK,uBAAuB,EAE5B,KAAK,oBAAoB,EAEzB,KAAK,mBAAmB,E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
import { type FormMetadataContact } from '../../form/form-metadata/types.js';
|
2
3
|
export interface FormMessageDataBase {
|
3
4
|
formId: string;
|
4
5
|
slug: string;
|
@@ -25,6 +26,9 @@ export interface FormTeamNameChanges {
|
|
25
26
|
export interface FormTeamEmailChanges {
|
26
27
|
teamEmail: string;
|
27
28
|
}
|
29
|
+
export interface FormSupportContactChanges {
|
30
|
+
contact?: FormMetadataContact;
|
31
|
+
}
|
28
32
|
export interface FormSupportPhoneChanges {
|
29
33
|
phone?: string;
|
30
34
|
}
|
@@ -60,6 +64,9 @@ export interface FormTeamNameUpdatedMessageData extends FormMessageDataBase {
|
|
60
64
|
export interface FormTeamEmailUpdatedMessageData extends FormMessageDataBase {
|
61
65
|
changes: ChangesMessageData<FormTeamEmailChanges>;
|
62
66
|
}
|
67
|
+
export interface FormSupportContactUpdatedMessageData extends FormMessageDataBase {
|
68
|
+
changes: ChangesMessageData<FormSupportContactChanges>;
|
69
|
+
}
|
63
70
|
export interface FormSupportPhoneUpdatedMessageData extends FormMessageDataBase {
|
64
71
|
changes: ChangesMessageData<FormSupportPhoneChanges>;
|
65
72
|
}
|
@@ -81,7 +88,7 @@ export interface FormSubmissionGuidanceUpdatedMessageData extends FormMessageDat
|
|
81
88
|
export interface FormUploadedMessageData extends FormMessageDataBase {
|
82
89
|
changes: ChangesMessageData<FormUploadedChanges>;
|
83
90
|
}
|
84
|
-
export type FormMessageChangesData = FormTitleUpdatedMessageData | FormOrganisationUpdatedMessageData | FormTeamNameUpdatedMessageData | FormTeamEmailUpdatedMessageData | FormSupportPhoneUpdatedMessageData | FormSupportEmailUpdatedMessageData | FormSupportOnlineUpdatedMessageData | FormPrivacyNoticeUpdatedMessageData | FormNotificationEmailUpdatedMessageData | FormSubmissionGuidanceUpdatedMessageData | FormUploadedMessageData;
|
91
|
+
export type FormMessageChangesData = FormTitleUpdatedMessageData | FormOrganisationUpdatedMessageData | FormTeamNameUpdatedMessageData | FormTeamEmailUpdatedMessageData | FormSupportContactUpdatedMessageData | FormSupportPhoneUpdatedMessageData | FormSupportEmailUpdatedMessageData | FormSupportOnlineUpdatedMessageData | FormPrivacyNoticeUpdatedMessageData | FormNotificationEmailUpdatedMessageData | FormSubmissionGuidanceUpdatedMessageData | FormUploadedMessageData;
|
85
92
|
export type FormMessageActivitiesData = FormCreatedMessageData | FormUpdatedMessageData;
|
86
93
|
export interface FormUpdatedMessageData extends FormMessageDataBase {
|
87
94
|
description: string;
|
@@ -126,6 +133,11 @@ export interface FormTeamEmailUpdatedMessage extends MessageBase {
|
|
126
133
|
type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED;
|
127
134
|
data: FormTeamEmailUpdatedMessageData;
|
128
135
|
}
|
136
|
+
export interface FormSupportContactUpdatedMessage extends MessageBase {
|
137
|
+
category: AuditEventMessageCategory.FORM;
|
138
|
+
type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED;
|
139
|
+
data: FormSupportContactUpdatedMessageData;
|
140
|
+
}
|
129
141
|
export interface FormSupportPhoneUpdatedMessage extends MessageBase {
|
130
142
|
category: AuditEventMessageCategory.FORM;
|
131
143
|
type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED;
|
@@ -189,7 +201,7 @@ export interface FormUpdatedMessage extends MessageBase {
|
|
189
201
|
category: AuditEventMessageCategory.FORM;
|
190
202
|
type: AuditEventMessageType.FORM_UPDATED;
|
191
203
|
}
|
192
|
-
export type AuditMessage = FormCreatedMessage | FormTitleUpdatedMessage | FormOrganisationUpdatedMessage | FormTeamNameUpdatedMessage | FormTeamEmailUpdatedMessage | FormSupportPhoneUpdatedMessage | FormSupportEmailUpdatedMessage | FormSupportOnlineUpdatedMessage | FormPrivacyNoticeUpdatedMessage | FormNotificationEmailUpdatedMessage | FormSubmissionGuidanceUpdatedMessage | FormUploadedMessage | FormDownloadedMessage | FormPublishedMessage | FormDraftCreatedFromLiveMessage | FormLiveCreatedFromDraftMessage | FormDraftDeletedMessage | FormMigratedMessage | FormUpdatedMessage;
|
204
|
+
export type AuditMessage = FormCreatedMessage | FormTitleUpdatedMessage | FormOrganisationUpdatedMessage | FormTeamNameUpdatedMessage | FormTeamEmailUpdatedMessage | FormSupportContactUpdatedMessage | FormSupportPhoneUpdatedMessage | FormSupportEmailUpdatedMessage | FormSupportOnlineUpdatedMessage | FormPrivacyNoticeUpdatedMessage | FormNotificationEmailUpdatedMessage | FormSubmissionGuidanceUpdatedMessage | FormUploadedMessage | FormDownloadedMessage | FormPublishedMessage | FormDraftCreatedFromLiveMessage | FormLiveCreatedFromDraftMessage | FormDraftDeletedMessage | FormMigratedMessage | FormUpdatedMessage;
|
193
205
|
export interface AuditEvent {
|
194
206
|
message: AuditMessage;
|
195
207
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/form-audit/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACnC,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAE5E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAA;IACX,GAAG,EAAE,CAAC,CAAA;CACP;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAA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BAA8B,GAC9B,8BAA8B,GAC9B,+BAA+B,GAC/B,+BAA+B,GAC/B,mCAAmC,GACnC,oCAAoC,GACpC,mBAAmB,GACnB,qBAAqB,GACrB,oBAAoB,GACpB,+BAA+B,GAC/B,+BAA+B,GAC/B,uBAAuB,GACvB,mBAAmB,GACnB,kBAAkB,CAAA;AAEtB,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG;IACvC,SAAS,EAAE,MAAM,CAAA;IACjB,eAAe,EAAE,IAAI,CAAA;CACtB,CAAA;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/types/index.d.ts
CHANGED
@@ -34,4 +34,5 @@ export type * from './form/form-editor/preview/types.js';
|
|
34
34
|
export type * from './form/form-editor/types.js';
|
35
35
|
export type * from './form/form-editor/macros/types.js';
|
36
36
|
export type * from './form/form-audit/types.js';
|
37
|
+
export type * from './manage/types.js';
|
37
38
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,qCAAqC,CAAA;AACnD,cAAc,qCAAqC,CAAA;AACnD,cAAc,mCAAmC,CAAA;AACjD,cAAc,qCAAqC,CAAA;AACnD,cAAc,2BAA2B,CAAA;AACzC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,yCAAyC,CAAA;AACvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAu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uB,CAAA;AAC1C,mBAAmB,kCAAkC,CAAA;AACrD,mBAAmB,8BAA8B,CAAA;AACjD,mBAAmB,+BAA+B,CAAA;AAClD,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,2BAA2B,CAAA;AAC9C,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,mCAAmC,CAAA;AACtD,mBAAmB,qCAAqC,CAAA;AACxD,mBAAmB,yCAAyC,CAAA;AAC5D,mBAAmB,iCAAiC,CAAA;AACpD,mBAAmB,wCAAwC,CAAA;AAC3D,mBAAmB,gCAAgC,CAAA;AACnD,mBAAmB,uBAAuB,CAAA"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/**
|
2
|
+
* Interface for `EntitlementRole`
|
3
|
+
*/
|
4
|
+
export interface EntitlementRole {
|
5
|
+
/**
|
6
|
+
* The display name
|
7
|
+
*/
|
8
|
+
name: string;
|
9
|
+
/**
|
10
|
+
* The code value
|
11
|
+
*/
|
12
|
+
code: string;
|
13
|
+
/**
|
14
|
+
* The description
|
15
|
+
*/
|
16
|
+
description: string;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Interface for `ManageUser`
|
20
|
+
*/
|
21
|
+
export interface ManageUser {
|
22
|
+
/**
|
23
|
+
* The object id of the user
|
24
|
+
*/
|
25
|
+
userId: string;
|
26
|
+
/**
|
27
|
+
* The email address of the user
|
28
|
+
*/
|
29
|
+
emailAddress: string;
|
30
|
+
/**
|
31
|
+
* The role assigned to the user
|
32
|
+
*/
|
33
|
+
userRole: string;
|
34
|
+
}
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/manage/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB"}
|
@@ -4,13 +4,13 @@ export interface EntitlementUser {
|
|
4
4
|
*/
|
5
5
|
userId: string;
|
6
6
|
/**
|
7
|
-
* The full name of the user
|
7
|
+
* The display name (full name) of the user
|
8
8
|
*/
|
9
|
-
|
9
|
+
displayName: string;
|
10
10
|
/**
|
11
11
|
* The email addresss of the user
|
12
12
|
*/
|
13
|
-
|
13
|
+
email: string;
|
14
14
|
/**
|
15
15
|
* The roles assigned to the user
|
16
16
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/manage/users.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/manage/users.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB"}
|
package/package.json
CHANGED
@@ -20,6 +20,7 @@ export enum AuditEventMessageType {
|
|
20
20
|
FORM_ORGANISATION_UPDATED = 'FORM_ORGANISATION_UPDATED',
|
21
21
|
FORM_TEAM_NAME_UPDATED = 'FORM_TEAM_NAME_UPDATED',
|
22
22
|
FORM_TEAM_EMAIL_UPDATED = 'FORM_TEAM_EMAIL_UPDATED',
|
23
|
+
FORM_SUPPORT_CONTACT_UPDATED = 'FORM_SUPPORT_CONTACT_UPDATED',
|
23
24
|
FORM_SUPPORT_PHONE_UPDATED = 'FORM_SUPPORT_PHONE_UPDATED',
|
24
25
|
FORM_SUPPORT_EMAIL_UPDATED = 'FORM_SUPPORT_EMAIL_UPDATED',
|
25
26
|
FORM_SUPPORT_ONLINE_UPDATED = 'FORM_SUPPORT_ONLINE_UPDATED',
|
@@ -22,6 +22,8 @@ import {
|
|
22
22
|
type FormPrivacyNoticeUpdatedMessageData,
|
23
23
|
type FormSubmissionGuidanceChanges,
|
24
24
|
type FormSubmissionGuidanceUpdatedMessageData,
|
25
|
+
type FormSupportContactChanges,
|
26
|
+
type FormSupportContactUpdatedMessageData,
|
25
27
|
type FormSupportEmailChanges,
|
26
28
|
type FormSupportEmailUpdatedMessageData,
|
27
29
|
type FormSupportOnlineChanges,
|
@@ -38,6 +40,7 @@ import {
|
|
38
40
|
type FormUploadedChanges,
|
39
41
|
type FormUploadedMessageData
|
40
42
|
} from '~/src/form/form-audit/types.js'
|
43
|
+
import { contactSchema } from '~/src/form/form-metadata/index.js'
|
41
44
|
|
42
45
|
export const formMessageDataBase = Joi.object<FormMessageDataBase>({
|
43
46
|
formId: Joi.string().required(),
|
@@ -81,6 +84,12 @@ export const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()
|
|
81
84
|
})
|
82
85
|
.required()
|
83
86
|
|
87
|
+
export const formSupportContactChanges = Joi.object<FormSupportContactChanges>()
|
88
|
+
.keys({
|
89
|
+
contact: contactSchema
|
90
|
+
})
|
91
|
+
.required()
|
92
|
+
|
84
93
|
export const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()
|
85
94
|
.keys({
|
86
95
|
phone: Joi.string().required()
|
@@ -96,21 +105,21 @@ export const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()
|
|
96
105
|
|
97
106
|
export const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()
|
98
107
|
.keys({
|
99
|
-
privacyNoticeUrl: Joi.string()
|
108
|
+
privacyNoticeUrl: Joi.string()
|
100
109
|
})
|
101
110
|
.required()
|
102
111
|
|
103
112
|
export const formNotificationEmailChanges =
|
104
113
|
Joi.object<FormNotificationEmailChanges>()
|
105
114
|
.keys({
|
106
|
-
notificationEmail: Joi.string()
|
115
|
+
notificationEmail: Joi.string()
|
107
116
|
})
|
108
117
|
.required()
|
109
118
|
|
110
119
|
export const formSubmissionGuidanceChanges =
|
111
120
|
Joi.object<FormSubmissionGuidanceChanges>()
|
112
121
|
.keys({
|
113
|
-
submissionGuidance: Joi.string()
|
122
|
+
submissionGuidance: Joi.string()
|
114
123
|
})
|
115
124
|
.required()
|
116
125
|
|
@@ -154,6 +163,7 @@ export const validTypes = [
|
|
154
163
|
AuditEventMessageType.FORM_ORGANISATION_UPDATED,
|
155
164
|
AuditEventMessageType.FORM_TEAM_NAME_UPDATED,
|
156
165
|
AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED,
|
166
|
+
AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED,
|
157
167
|
AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED,
|
158
168
|
AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED,
|
159
169
|
AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED,
|
@@ -222,6 +232,15 @@ export const messageSchema = Joi.object<AuditMessage>().keys({
|
|
222
232
|
FormTeamEmailUpdatedMessageData
|
223
233
|
>(formTeamEmailChanges)
|
224
234
|
},
|
235
|
+
{
|
236
|
+
is: Joi.string()
|
237
|
+
.trim()
|
238
|
+
.valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),
|
239
|
+
then: formChangesMessageData<
|
240
|
+
FormSupportContactChanges,
|
241
|
+
FormSupportContactUpdatedMessageData
|
242
|
+
>(formSupportContactChanges)
|
243
|
+
},
|
225
244
|
{
|
226
245
|
is: Joi.string()
|
227
246
|
.trim()
|
@@ -3,6 +3,7 @@ import {
|
|
3
3
|
type AuditEventMessageSchemaVersion,
|
4
4
|
type AuditEventMessageType
|
5
5
|
} from '~/src/form/form-audit/enums.js'
|
6
|
+
import { type FormMetadataContact } from '~/src/form/form-metadata/types.js'
|
6
7
|
|
7
8
|
export interface FormMessageDataBase {
|
8
9
|
formId: string
|
@@ -37,6 +38,10 @@ export interface FormTeamEmailChanges {
|
|
37
38
|
teamEmail: string
|
38
39
|
}
|
39
40
|
|
41
|
+
export interface FormSupportContactChanges {
|
42
|
+
contact?: FormMetadataContact
|
43
|
+
}
|
44
|
+
|
40
45
|
export interface FormSupportPhoneChanges {
|
41
46
|
phone?: string
|
42
47
|
}
|
@@ -84,6 +89,11 @@ export interface FormTeamEmailUpdatedMessageData extends FormMessageDataBase {
|
|
84
89
|
changes: ChangesMessageData<FormTeamEmailChanges>
|
85
90
|
}
|
86
91
|
|
92
|
+
export interface FormSupportContactUpdatedMessageData
|
93
|
+
extends FormMessageDataBase {
|
94
|
+
changes: ChangesMessageData<FormSupportContactChanges>
|
95
|
+
}
|
96
|
+
|
87
97
|
export interface FormSupportPhoneUpdatedMessageData
|
88
98
|
extends FormMessageDataBase {
|
89
99
|
changes: ChangesMessageData<FormSupportPhoneChanges>
|
@@ -123,6 +133,7 @@ export type FormMessageChangesData =
|
|
123
133
|
| FormOrganisationUpdatedMessageData
|
124
134
|
| FormTeamNameUpdatedMessageData
|
125
135
|
| FormTeamEmailUpdatedMessageData
|
136
|
+
| FormSupportContactUpdatedMessageData
|
126
137
|
| FormSupportPhoneUpdatedMessageData
|
127
138
|
| FormSupportEmailUpdatedMessageData
|
128
139
|
| FormSupportOnlineUpdatedMessageData
|
@@ -187,6 +198,12 @@ export interface FormTeamEmailUpdatedMessage extends MessageBase {
|
|
187
198
|
data: FormTeamEmailUpdatedMessageData
|
188
199
|
}
|
189
200
|
|
201
|
+
export interface FormSupportContactUpdatedMessage extends MessageBase {
|
202
|
+
category: AuditEventMessageCategory.FORM
|
203
|
+
type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED
|
204
|
+
data: FormSupportContactUpdatedMessageData
|
205
|
+
}
|
206
|
+
|
190
207
|
export interface FormSupportPhoneUpdatedMessage extends MessageBase {
|
191
208
|
category: AuditEventMessageCategory.FORM
|
192
209
|
type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED
|
@@ -270,6 +287,7 @@ export type AuditMessage =
|
|
270
287
|
| FormOrganisationUpdatedMessage
|
271
288
|
| FormTeamNameUpdatedMessage
|
272
289
|
| FormTeamEmailUpdatedMessage
|
290
|
+
| FormSupportContactUpdatedMessage
|
273
291
|
| FormSupportPhoneUpdatedMessage
|
274
292
|
| FormSupportEmailUpdatedMessage
|
275
293
|
| FormSupportOnlineUpdatedMessage
|
package/src/index.ts
CHANGED
@@ -35,3 +35,4 @@ export type * from '~/src/form/form-editor/preview/types.js'
|
|
35
35
|
export type * from '~/src/form/form-editor/types.js'
|
36
36
|
export type * from '~/src/form/form-editor/macros/types.js'
|
37
37
|
export type * from '~/src/form/form-audit/types.js'
|
38
|
+
export type * from '~/src/manage/types.js'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* Interface for `EntitlementRole`
|
3
|
+
*/
|
4
|
+
export interface EntitlementRole {
|
5
|
+
/**
|
6
|
+
* The display name
|
7
|
+
*/
|
8
|
+
name: string
|
9
|
+
|
10
|
+
/**
|
11
|
+
* The code value
|
12
|
+
*/
|
13
|
+
code: string
|
14
|
+
|
15
|
+
/**
|
16
|
+
* The description
|
17
|
+
*/
|
18
|
+
description: string
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Interface for `ManageUser`
|
23
|
+
*/
|
24
|
+
export interface ManageUser {
|
25
|
+
/**
|
26
|
+
* The object id of the user
|
27
|
+
*/
|
28
|
+
userId: string
|
29
|
+
|
30
|
+
/**
|
31
|
+
* The email address of the user
|
32
|
+
*/
|
33
|
+
emailAddress: string
|
34
|
+
|
35
|
+
/**
|
36
|
+
* The role assigned to the user
|
37
|
+
*/
|
38
|
+
userRole: string
|
39
|
+
}
|
package/src/manage/users.ts
CHANGED
@@ -5,14 +5,14 @@ export interface EntitlementUser {
|
|
5
5
|
userId: string
|
6
6
|
|
7
7
|
/**
|
8
|
-
* The full name of the user
|
8
|
+
* The display name (full name) of the user
|
9
9
|
*/
|
10
|
-
|
10
|
+
displayName: string
|
11
11
|
|
12
12
|
/**
|
13
13
|
* The email addresss of the user
|
14
14
|
*/
|
15
|
-
|
15
|
+
email: string
|
16
16
|
|
17
17
|
/**
|
18
18
|
* The roles assigned to the user
|