@defra/forms-model 3.0.537 → 3.0.538
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/__snapshots__/index.snap.js +160 -0
- package/dist/module/form/form-audit/__snapshots__/index.snap.js.map +1 -0
- package/dist/types/form/form-audit/__snapshots__/index.snap.d.ts +213 -0
- package/dist/types/form/form-audit/__snapshots__/index.snap.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/form/form-audit/__snapshots__/index.snap.js +173 -0
@@ -0,0 +1,160 @@
|
|
1
|
+
import { AuditEventMessageCategory, AuditEventMessageSchemaVersion, AuditEventMessageSource } from "../enums.js";
|
2
|
+
const CREATED_BY = {
|
3
|
+
displayName: 'Enrique Chase',
|
4
|
+
id: 'f50ceeed-b7a4-47cf-a498-094efc99f8bc'
|
5
|
+
};
|
6
|
+
const CREATED_AT = new Date('2025-07-26T00:00:00.000Z');
|
7
|
+
const MESSAGE_CREATED_AT = new Date('2025-07-26T12:00:00.000Z');
|
8
|
+
const FORM_ID = '689b7ab1d0eeac9711a7fb33';
|
9
|
+
const SLUG = 'audit-form';
|
10
|
+
export const FORM_ORGANISATION_UPDATED = {
|
11
|
+
category: AuditEventMessageCategory.FORM,
|
12
|
+
createdAt: CREATED_AT,
|
13
|
+
createdBy: CREATED_BY,
|
14
|
+
data: {
|
15
|
+
changes: {
|
16
|
+
new: {
|
17
|
+
organisation: 'Defra'
|
18
|
+
},
|
19
|
+
previous: {
|
20
|
+
organisation: 'Natural England'
|
21
|
+
}
|
22
|
+
},
|
23
|
+
formId: FORM_ID,
|
24
|
+
slug: SLUG
|
25
|
+
},
|
26
|
+
entityId: FORM_ID,
|
27
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
28
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
29
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
30
|
+
type: 'FORM_ORGANISATION_UPDATED'
|
31
|
+
};
|
32
|
+
export const FORM_DRAFT_CREATED_FROM_LIVE = {
|
33
|
+
category: AuditEventMessageCategory.FORM,
|
34
|
+
createdAt: CREATED_AT,
|
35
|
+
createdBy: CREATED_BY,
|
36
|
+
entityId: FORM_ID,
|
37
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
38
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
39
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
40
|
+
type: 'FORM_DRAFT_CREATED_FROM_LIVE'
|
41
|
+
};
|
42
|
+
export const FORM_CREATED = {
|
43
|
+
category: AuditEventMessageCategory.FORM,
|
44
|
+
createdAt: CREATED_AT,
|
45
|
+
createdBy: CREATED_BY,
|
46
|
+
data: {
|
47
|
+
formId: FORM_ID,
|
48
|
+
organisation: 'Defra',
|
49
|
+
slug: SLUG,
|
50
|
+
teamEmail: 'forms@example.uk',
|
51
|
+
teamName: 'Forms',
|
52
|
+
title: 'My Audit Event Form'
|
53
|
+
},
|
54
|
+
entityId: FORM_ID,
|
55
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
56
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
57
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
58
|
+
type: 'FORM_CREATED'
|
59
|
+
};
|
60
|
+
export const FORM_DRAFT_DELETED = {
|
61
|
+
category: AuditEventMessageCategory.FORM,
|
62
|
+
createdAt: CREATED_AT,
|
63
|
+
createdBy: CREATED_BY,
|
64
|
+
data: {
|
65
|
+
formId: FORM_ID,
|
66
|
+
slug: SLUG
|
67
|
+
},
|
68
|
+
entityId: FORM_ID,
|
69
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
70
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
71
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
72
|
+
type: 'FORM_DRAFT_DELETED'
|
73
|
+
};
|
74
|
+
export const REPLACE_DRAFT = {
|
75
|
+
category: AuditEventMessageCategory.FORM,
|
76
|
+
createdAt: CREATED_AT,
|
77
|
+
createdBy: CREATED_BY,
|
78
|
+
data: {
|
79
|
+
formId: FORM_ID,
|
80
|
+
payload: undefined,
|
81
|
+
requestType: 'REPLACE_DRAFT',
|
82
|
+
s3Meta: {
|
83
|
+
fileId: '3HL4kqtJlcpXrof3W3Zz4YBdvdz2FJ9n',
|
84
|
+
filename: '6883d8667a2a64da10af4312.json',
|
85
|
+
s3Key: 'audit-definitions/6883d8667a2a64da10af4312.json'
|
86
|
+
},
|
87
|
+
slug: SLUG
|
88
|
+
},
|
89
|
+
entityId: FORM_ID,
|
90
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
91
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
92
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
93
|
+
type: 'FORM_UPDATED'
|
94
|
+
};
|
95
|
+
export const FORM_MIGRATED = {
|
96
|
+
category: AuditEventMessageCategory.FORM,
|
97
|
+
createdAt: CREATED_AT,
|
98
|
+
createdBy: CREATED_BY,
|
99
|
+
entityId: FORM_ID,
|
100
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
101
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
102
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
103
|
+
type: 'FORM_MIGRATED'
|
104
|
+
};
|
105
|
+
export const FORM_TITLE_UPDATED = {
|
106
|
+
category: AuditEventMessageCategory.FORM,
|
107
|
+
createdAt: CREATED_AT,
|
108
|
+
createdBy: CREATED_BY,
|
109
|
+
data: {
|
110
|
+
changes: {
|
111
|
+
new: {
|
112
|
+
title: 'My Audit Event Form'
|
113
|
+
},
|
114
|
+
previous: {
|
115
|
+
title: 'Old form title'
|
116
|
+
}
|
117
|
+
},
|
118
|
+
formId: FORM_ID,
|
119
|
+
slug: SLUG
|
120
|
+
},
|
121
|
+
entityId: FORM_ID,
|
122
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
123
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
124
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
125
|
+
type: 'FORM_TITLE_UPDATED'
|
126
|
+
};
|
127
|
+
export const FORM_UPDATED = {
|
128
|
+
category: AuditEventMessageCategory.FORM,
|
129
|
+
createdAt: CREATED_AT,
|
130
|
+
createdBy: CREATED_BY,
|
131
|
+
data: {
|
132
|
+
formId: FORM_ID,
|
133
|
+
payload: {
|
134
|
+
components: [],
|
135
|
+
id: 'ffefd409-f3f4-49fe-882e-6e89f44631b1',
|
136
|
+
next: [],
|
137
|
+
path: '/page-one',
|
138
|
+
title: 'Page One'
|
139
|
+
},
|
140
|
+
requestType: 'CREATE_PAGE',
|
141
|
+
s3Meta: undefined,
|
142
|
+
slug: SLUG
|
143
|
+
},
|
144
|
+
entityId: FORM_ID,
|
145
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
146
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
147
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
148
|
+
type: 'FORM_UPDATED'
|
149
|
+
};
|
150
|
+
export const FORM_LIVE_CREATED_FROM_DRAFT = {
|
151
|
+
category: AuditEventMessageCategory.FORM,
|
152
|
+
createdAt: CREATED_AT,
|
153
|
+
createdBy: CREATED_BY,
|
154
|
+
entityId: FORM_ID,
|
155
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
156
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
157
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
158
|
+
type: 'FORM_LIVE_CREATED_FROM_DRAFT'
|
159
|
+
};
|
160
|
+
//# sourceMappingURL=index.snap.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.snap.js","names":["AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageSource","CREATED_BY","displayName","id","CREATED_AT","Date","MESSAGE_CREATED_AT","FORM_ID","SLUG","FORM_ORGANISATION_UPDATED","category","FORM","createdAt","createdBy","data","changes","new","organisation","previous","formId","slug","entityId","messageCreatedAt","schemaVersion","V1","source","FORMS_MANAGER","type","FORM_DRAFT_CREATED_FROM_LIVE","FORM_CREATED","teamEmail","teamName","title","FORM_DRAFT_DELETED","REPLACE_DRAFT","payload","undefined","requestType","s3Meta","fileId","filename","s3Key","FORM_MIGRATED","FORM_TITLE_UPDATED","FORM_UPDATED","components","next","path","FORM_LIVE_CREATED_FROM_DRAFT"],"sources":["../../../../../src/form/form-audit/__snapshots__/index.snap.js"],"sourcesContent":["import {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageSource\n} from '~/src/form/form-audit/enums.js'\n\nconst CREATED_BY = {\n displayName: 'Enrique Chase',\n id: 'f50ceeed-b7a4-47cf-a498-094efc99f8bc'\n}\nconst CREATED_AT = new Date('2025-07-26T00:00:00.000Z')\nconst MESSAGE_CREATED_AT = new Date('2025-07-26T12:00:00.000Z')\nconst FORM_ID = '689b7ab1d0eeac9711a7fb33'\nconst SLUG = 'audit-form'\n\nexport const FORM_ORGANISATION_UPDATED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n changes: {\n new: {\n organisation: 'Defra'\n },\n previous: {\n organisation: 'Natural England'\n }\n },\n formId: FORM_ID,\n slug: SLUG\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_ORGANISATION_UPDATED'\n}\n\nexport const FORM_DRAFT_CREATED_FROM_LIVE = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_DRAFT_CREATED_FROM_LIVE'\n}\n\nexport const FORM_CREATED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n formId: FORM_ID,\n organisation: 'Defra',\n slug: SLUG,\n teamEmail: 'forms@example.uk',\n teamName: 'Forms',\n title: 'My Audit Event Form'\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_CREATED'\n}\n\nexport const FORM_DRAFT_DELETED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n formId: FORM_ID,\n slug: SLUG\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_DRAFT_DELETED'\n}\n\nexport const REPLACE_DRAFT = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n formId: FORM_ID,\n payload: undefined,\n requestType: 'REPLACE_DRAFT',\n s3Meta: {\n fileId: '3HL4kqtJlcpXrof3W3Zz4YBdvdz2FJ9n',\n filename: '6883d8667a2a64da10af4312.json',\n s3Key: 'audit-definitions/6883d8667a2a64da10af4312.json'\n },\n slug: SLUG\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_UPDATED'\n}\n\nexport const FORM_MIGRATED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_MIGRATED'\n}\n\nexport const FORM_TITLE_UPDATED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n changes: {\n new: {\n title: 'My Audit Event Form'\n },\n previous: {\n title: 'Old form title'\n }\n },\n formId: FORM_ID,\n slug: SLUG\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_TITLE_UPDATED'\n}\n\nexport const FORM_UPDATED = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n data: {\n formId: FORM_ID,\n payload: {\n components: [],\n id: 'ffefd409-f3f4-49fe-882e-6e89f44631b1',\n next: [],\n path: '/page-one',\n title: 'Page One'\n },\n requestType: 'CREATE_PAGE',\n s3Meta: undefined,\n slug: SLUG\n },\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_UPDATED'\n}\n\nexport const FORM_LIVE_CREATED_FROM_DRAFT = {\n category: AuditEventMessageCategory.FORM,\n createdAt: CREATED_AT,\n createdBy: CREATED_BY,\n entityId: FORM_ID,\n messageCreatedAt: MESSAGE_CREATED_AT,\n schemaVersion: AuditEventMessageSchemaVersion.V1,\n source: AuditEventMessageSource.FORMS_MANAGER,\n type: 'FORM_LIVE_CREATED_FROM_DRAFT'\n}\n"],"mappings":"AAAA,SACEA,yBAAyB,EACzBC,8BAA8B,EAC9BC,uBAAuB;AAGzB,MAAMC,UAAU,GAAG;EACjBC,WAAW,EAAE,eAAe;EAC5BC,EAAE,EAAE;AACN,CAAC;AACD,MAAMC,UAAU,GAAG,IAAIC,IAAI,CAAC,0BAA0B,CAAC;AACvD,MAAMC,kBAAkB,GAAG,IAAID,IAAI,CAAC,0BAA0B,CAAC;AAC/D,MAAME,OAAO,GAAG,0BAA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,4BAA4B,GAAG;EAC1CtC,QAAQ,EAAEZ,yBAAyB,CAACa,IAAI;EACxCC,SAAS,EAAER,UAAU;EACrBS,SAAS,EAAEZ,UAAU;EACrBoB,QAAQ,EAAEd,OAAO;EACjBe,gBAAgB,EAAEhB,kBAAkB;EACpCiB,aAAa,EAAExB,8BAA8B,CAACyB,EAAE;EAChDC,MAAM,EAAEzB,uBAAuB,CAAC0B,aAAa;EAC7CC,IAAI,EAAE;AACR,CAAC","ignoreList":[]}
|
@@ -0,0 +1,213 @@
|
|
1
|
+
export namespace FORM_ORGANISATION_UPDATED {
|
2
|
+
export let category: AuditEventMessageCategory;
|
3
|
+
export { CREATED_AT as createdAt };
|
4
|
+
export { CREATED_BY as createdBy };
|
5
|
+
export namespace data {
|
6
|
+
export namespace changes {
|
7
|
+
export namespace _new {
|
8
|
+
let organisation: string;
|
9
|
+
}
|
10
|
+
export { _new as new };
|
11
|
+
export namespace previous {
|
12
|
+
let organisation_1: string;
|
13
|
+
export { organisation_1 as organisation };
|
14
|
+
}
|
15
|
+
}
|
16
|
+
export { FORM_ID as formId };
|
17
|
+
export { SLUG as slug };
|
18
|
+
}
|
19
|
+
export { FORM_ID as entityId };
|
20
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
21
|
+
export let schemaVersion: AuditEventMessageSchemaVersion;
|
22
|
+
export let source: AuditEventMessageSource;
|
23
|
+
export let type: string;
|
24
|
+
}
|
25
|
+
export namespace FORM_DRAFT_CREATED_FROM_LIVE {
|
26
|
+
let category_1: AuditEventMessageCategory;
|
27
|
+
export { category_1 as category };
|
28
|
+
export { CREATED_AT as createdAt };
|
29
|
+
export { CREATED_BY as createdBy };
|
30
|
+
export { FORM_ID as entityId };
|
31
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
32
|
+
let schemaVersion_1: AuditEventMessageSchemaVersion;
|
33
|
+
export { schemaVersion_1 as schemaVersion };
|
34
|
+
let source_1: AuditEventMessageSource;
|
35
|
+
export { source_1 as source };
|
36
|
+
let type_1: string;
|
37
|
+
export { type_1 as type };
|
38
|
+
}
|
39
|
+
export namespace FORM_CREATED {
|
40
|
+
let category_2: AuditEventMessageCategory;
|
41
|
+
export { category_2 as category };
|
42
|
+
export { CREATED_AT as createdAt };
|
43
|
+
export { CREATED_BY as createdBy };
|
44
|
+
export namespace data_1 {
|
45
|
+
export { FORM_ID as formId };
|
46
|
+
let organisation_2: string;
|
47
|
+
export { organisation_2 as organisation };
|
48
|
+
export { SLUG as slug };
|
49
|
+
export let teamEmail: string;
|
50
|
+
export let teamName: string;
|
51
|
+
export let title: string;
|
52
|
+
}
|
53
|
+
export { data_1 as data };
|
54
|
+
export { FORM_ID as entityId };
|
55
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
56
|
+
let schemaVersion_2: AuditEventMessageSchemaVersion;
|
57
|
+
export { schemaVersion_2 as schemaVersion };
|
58
|
+
let source_2: AuditEventMessageSource;
|
59
|
+
export { source_2 as source };
|
60
|
+
let type_2: string;
|
61
|
+
export { type_2 as type };
|
62
|
+
}
|
63
|
+
export namespace FORM_DRAFT_DELETED {
|
64
|
+
let category_3: AuditEventMessageCategory;
|
65
|
+
export { category_3 as category };
|
66
|
+
export { CREATED_AT as createdAt };
|
67
|
+
export { CREATED_BY as createdBy };
|
68
|
+
export namespace data_2 {
|
69
|
+
export { FORM_ID as formId };
|
70
|
+
export { SLUG as slug };
|
71
|
+
}
|
72
|
+
export { data_2 as data };
|
73
|
+
export { FORM_ID as entityId };
|
74
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
75
|
+
let schemaVersion_3: AuditEventMessageSchemaVersion;
|
76
|
+
export { schemaVersion_3 as schemaVersion };
|
77
|
+
let source_3: AuditEventMessageSource;
|
78
|
+
export { source_3 as source };
|
79
|
+
let type_3: string;
|
80
|
+
export { type_3 as type };
|
81
|
+
}
|
82
|
+
export namespace REPLACE_DRAFT {
|
83
|
+
let category_4: AuditEventMessageCategory;
|
84
|
+
export { category_4 as category };
|
85
|
+
export { CREATED_AT as createdAt };
|
86
|
+
export { CREATED_BY as createdBy };
|
87
|
+
export namespace data_3 {
|
88
|
+
export { FORM_ID as formId };
|
89
|
+
export let payload: undefined;
|
90
|
+
export let requestType: string;
|
91
|
+
export namespace s3Meta {
|
92
|
+
let fileId: string;
|
93
|
+
let filename: string;
|
94
|
+
let s3Key: string;
|
95
|
+
}
|
96
|
+
export { SLUG as slug };
|
97
|
+
}
|
98
|
+
export { data_3 as data };
|
99
|
+
export { FORM_ID as entityId };
|
100
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
101
|
+
let schemaVersion_4: AuditEventMessageSchemaVersion;
|
102
|
+
export { schemaVersion_4 as schemaVersion };
|
103
|
+
let source_4: AuditEventMessageSource;
|
104
|
+
export { source_4 as source };
|
105
|
+
let type_4: string;
|
106
|
+
export { type_4 as type };
|
107
|
+
}
|
108
|
+
export namespace FORM_MIGRATED {
|
109
|
+
let category_5: AuditEventMessageCategory;
|
110
|
+
export { category_5 as category };
|
111
|
+
export { CREATED_AT as createdAt };
|
112
|
+
export { CREATED_BY as createdBy };
|
113
|
+
export { FORM_ID as entityId };
|
114
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
115
|
+
let schemaVersion_5: AuditEventMessageSchemaVersion;
|
116
|
+
export { schemaVersion_5 as schemaVersion };
|
117
|
+
let source_5: AuditEventMessageSource;
|
118
|
+
export { source_5 as source };
|
119
|
+
let type_5: string;
|
120
|
+
export { type_5 as type };
|
121
|
+
}
|
122
|
+
export namespace FORM_TITLE_UPDATED {
|
123
|
+
let category_6: AuditEventMessageCategory;
|
124
|
+
export { category_6 as category };
|
125
|
+
export { CREATED_AT as createdAt };
|
126
|
+
export { CREATED_BY as createdBy };
|
127
|
+
export namespace data_4 {
|
128
|
+
export namespace changes_1 {
|
129
|
+
export namespace _new_1 {
|
130
|
+
let title_1: string;
|
131
|
+
export { title_1 as title };
|
132
|
+
}
|
133
|
+
export { _new_1 as new };
|
134
|
+
export namespace previous_1 {
|
135
|
+
let title_2: string;
|
136
|
+
export { title_2 as title };
|
137
|
+
}
|
138
|
+
export { previous_1 as previous };
|
139
|
+
}
|
140
|
+
export { changes_1 as changes };
|
141
|
+
export { FORM_ID as formId };
|
142
|
+
export { SLUG as slug };
|
143
|
+
}
|
144
|
+
export { data_4 as data };
|
145
|
+
export { FORM_ID as entityId };
|
146
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
147
|
+
let schemaVersion_6: AuditEventMessageSchemaVersion;
|
148
|
+
export { schemaVersion_6 as schemaVersion };
|
149
|
+
let source_6: AuditEventMessageSource;
|
150
|
+
export { source_6 as source };
|
151
|
+
let type_6: string;
|
152
|
+
export { type_6 as type };
|
153
|
+
}
|
154
|
+
export namespace FORM_UPDATED {
|
155
|
+
let category_7: AuditEventMessageCategory;
|
156
|
+
export { category_7 as category };
|
157
|
+
export { CREATED_AT as createdAt };
|
158
|
+
export { CREATED_BY as createdBy };
|
159
|
+
export namespace data_5 {
|
160
|
+
export { FORM_ID as formId };
|
161
|
+
export namespace payload_1 {
|
162
|
+
export let components: never[];
|
163
|
+
export let id: string;
|
164
|
+
export let next: never[];
|
165
|
+
export let path: string;
|
166
|
+
let title_3: string;
|
167
|
+
export { title_3 as title };
|
168
|
+
}
|
169
|
+
export { payload_1 as payload };
|
170
|
+
let requestType_1: string;
|
171
|
+
export { requestType_1 as requestType };
|
172
|
+
let s3Meta_1: undefined;
|
173
|
+
export { s3Meta_1 as s3Meta };
|
174
|
+
export { SLUG as slug };
|
175
|
+
}
|
176
|
+
export { data_5 as data };
|
177
|
+
export { FORM_ID as entityId };
|
178
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
179
|
+
let schemaVersion_7: AuditEventMessageSchemaVersion;
|
180
|
+
export { schemaVersion_7 as schemaVersion };
|
181
|
+
let source_7: AuditEventMessageSource;
|
182
|
+
export { source_7 as source };
|
183
|
+
let type_7: string;
|
184
|
+
export { type_7 as type };
|
185
|
+
}
|
186
|
+
export namespace FORM_LIVE_CREATED_FROM_DRAFT {
|
187
|
+
let category_8: AuditEventMessageCategory;
|
188
|
+
export { category_8 as category };
|
189
|
+
export { CREATED_AT as createdAt };
|
190
|
+
export { CREATED_BY as createdBy };
|
191
|
+
export { FORM_ID as entityId };
|
192
|
+
export { MESSAGE_CREATED_AT as messageCreatedAt };
|
193
|
+
let schemaVersion_8: AuditEventMessageSchemaVersion;
|
194
|
+
export { schemaVersion_8 as schemaVersion };
|
195
|
+
let source_8: AuditEventMessageSource;
|
196
|
+
export { source_8 as source };
|
197
|
+
let type_8: string;
|
198
|
+
export { type_8 as type };
|
199
|
+
}
|
200
|
+
import { AuditEventMessageCategory } from '../../../form/form-audit/enums.js';
|
201
|
+
declare const CREATED_AT: Date;
|
202
|
+
declare namespace CREATED_BY {
|
203
|
+
export let displayName: string;
|
204
|
+
let id_1: string;
|
205
|
+
export { id_1 as id };
|
206
|
+
}
|
207
|
+
declare const FORM_ID: "689b7ab1d0eeac9711a7fb33";
|
208
|
+
declare const SLUG: "audit-form";
|
209
|
+
declare const MESSAGE_CREATED_AT: Date;
|
210
|
+
import { AuditEventMessageSchemaVersion } from '../../../form/form-audit/enums.js';
|
211
|
+
import { AuditEventMessageSource } from '../../../form/form-audit/enums.js';
|
212
|
+
export {};
|
213
|
+
//# sourceMappingURL=index.snap.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.snap.d.ts","sourceRoot":"","sources":["../../../../../src/form/form-audit/__snapshots__/index.snap.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAIO,gCAAgC;AAMvC,+BAAuD;;;;;;AAEvD,uBAAgB,0BAA0B,CAAA;AAC1C,oBAAa,YAAY,CAAA;AAFzB,uCAA+D;+CAPxD,gCAAgC;wCAAhC,gCAAgC"}
|
package/package.json
CHANGED
@@ -0,0 +1,173 @@
|
|
1
|
+
import {
|
2
|
+
AuditEventMessageCategory,
|
3
|
+
AuditEventMessageSchemaVersion,
|
4
|
+
AuditEventMessageSource
|
5
|
+
} from '~/src/form/form-audit/enums.js'
|
6
|
+
|
7
|
+
const CREATED_BY = {
|
8
|
+
displayName: 'Enrique Chase',
|
9
|
+
id: 'f50ceeed-b7a4-47cf-a498-094efc99f8bc'
|
10
|
+
}
|
11
|
+
const CREATED_AT = new Date('2025-07-26T00:00:00.000Z')
|
12
|
+
const MESSAGE_CREATED_AT = new Date('2025-07-26T12:00:00.000Z')
|
13
|
+
const FORM_ID = '689b7ab1d0eeac9711a7fb33'
|
14
|
+
const SLUG = 'audit-form'
|
15
|
+
|
16
|
+
export const FORM_ORGANISATION_UPDATED = {
|
17
|
+
category: AuditEventMessageCategory.FORM,
|
18
|
+
createdAt: CREATED_AT,
|
19
|
+
createdBy: CREATED_BY,
|
20
|
+
data: {
|
21
|
+
changes: {
|
22
|
+
new: {
|
23
|
+
organisation: 'Defra'
|
24
|
+
},
|
25
|
+
previous: {
|
26
|
+
organisation: 'Natural England'
|
27
|
+
}
|
28
|
+
},
|
29
|
+
formId: FORM_ID,
|
30
|
+
slug: SLUG
|
31
|
+
},
|
32
|
+
entityId: FORM_ID,
|
33
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
34
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
35
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
36
|
+
type: 'FORM_ORGANISATION_UPDATED'
|
37
|
+
}
|
38
|
+
|
39
|
+
export const FORM_DRAFT_CREATED_FROM_LIVE = {
|
40
|
+
category: AuditEventMessageCategory.FORM,
|
41
|
+
createdAt: CREATED_AT,
|
42
|
+
createdBy: CREATED_BY,
|
43
|
+
entityId: FORM_ID,
|
44
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
45
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
46
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
47
|
+
type: 'FORM_DRAFT_CREATED_FROM_LIVE'
|
48
|
+
}
|
49
|
+
|
50
|
+
export const FORM_CREATED = {
|
51
|
+
category: AuditEventMessageCategory.FORM,
|
52
|
+
createdAt: CREATED_AT,
|
53
|
+
createdBy: CREATED_BY,
|
54
|
+
data: {
|
55
|
+
formId: FORM_ID,
|
56
|
+
organisation: 'Defra',
|
57
|
+
slug: SLUG,
|
58
|
+
teamEmail: 'forms@example.uk',
|
59
|
+
teamName: 'Forms',
|
60
|
+
title: 'My Audit Event Form'
|
61
|
+
},
|
62
|
+
entityId: FORM_ID,
|
63
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
64
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
65
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
66
|
+
type: 'FORM_CREATED'
|
67
|
+
}
|
68
|
+
|
69
|
+
export const FORM_DRAFT_DELETED = {
|
70
|
+
category: AuditEventMessageCategory.FORM,
|
71
|
+
createdAt: CREATED_AT,
|
72
|
+
createdBy: CREATED_BY,
|
73
|
+
data: {
|
74
|
+
formId: FORM_ID,
|
75
|
+
slug: SLUG
|
76
|
+
},
|
77
|
+
entityId: FORM_ID,
|
78
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
79
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
80
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
81
|
+
type: 'FORM_DRAFT_DELETED'
|
82
|
+
}
|
83
|
+
|
84
|
+
export const REPLACE_DRAFT = {
|
85
|
+
category: AuditEventMessageCategory.FORM,
|
86
|
+
createdAt: CREATED_AT,
|
87
|
+
createdBy: CREATED_BY,
|
88
|
+
data: {
|
89
|
+
formId: FORM_ID,
|
90
|
+
payload: undefined,
|
91
|
+
requestType: 'REPLACE_DRAFT',
|
92
|
+
s3Meta: {
|
93
|
+
fileId: '3HL4kqtJlcpXrof3W3Zz4YBdvdz2FJ9n',
|
94
|
+
filename: '6883d8667a2a64da10af4312.json',
|
95
|
+
s3Key: 'audit-definitions/6883d8667a2a64da10af4312.json'
|
96
|
+
},
|
97
|
+
slug: SLUG
|
98
|
+
},
|
99
|
+
entityId: FORM_ID,
|
100
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
101
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
102
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
103
|
+
type: 'FORM_UPDATED'
|
104
|
+
}
|
105
|
+
|
106
|
+
export const FORM_MIGRATED = {
|
107
|
+
category: AuditEventMessageCategory.FORM,
|
108
|
+
createdAt: CREATED_AT,
|
109
|
+
createdBy: CREATED_BY,
|
110
|
+
entityId: FORM_ID,
|
111
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
112
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
113
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
114
|
+
type: 'FORM_MIGRATED'
|
115
|
+
}
|
116
|
+
|
117
|
+
export const FORM_TITLE_UPDATED = {
|
118
|
+
category: AuditEventMessageCategory.FORM,
|
119
|
+
createdAt: CREATED_AT,
|
120
|
+
createdBy: CREATED_BY,
|
121
|
+
data: {
|
122
|
+
changes: {
|
123
|
+
new: {
|
124
|
+
title: 'My Audit Event Form'
|
125
|
+
},
|
126
|
+
previous: {
|
127
|
+
title: 'Old form title'
|
128
|
+
}
|
129
|
+
},
|
130
|
+
formId: FORM_ID,
|
131
|
+
slug: SLUG
|
132
|
+
},
|
133
|
+
entityId: FORM_ID,
|
134
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
135
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
136
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
137
|
+
type: 'FORM_TITLE_UPDATED'
|
138
|
+
}
|
139
|
+
|
140
|
+
export const FORM_UPDATED = {
|
141
|
+
category: AuditEventMessageCategory.FORM,
|
142
|
+
createdAt: CREATED_AT,
|
143
|
+
createdBy: CREATED_BY,
|
144
|
+
data: {
|
145
|
+
formId: FORM_ID,
|
146
|
+
payload: {
|
147
|
+
components: [],
|
148
|
+
id: 'ffefd409-f3f4-49fe-882e-6e89f44631b1',
|
149
|
+
next: [],
|
150
|
+
path: '/page-one',
|
151
|
+
title: 'Page One'
|
152
|
+
},
|
153
|
+
requestType: 'CREATE_PAGE',
|
154
|
+
s3Meta: undefined,
|
155
|
+
slug: SLUG
|
156
|
+
},
|
157
|
+
entityId: FORM_ID,
|
158
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
159
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
160
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
161
|
+
type: 'FORM_UPDATED'
|
162
|
+
}
|
163
|
+
|
164
|
+
export const FORM_LIVE_CREATED_FROM_DRAFT = {
|
165
|
+
category: AuditEventMessageCategory.FORM,
|
166
|
+
createdAt: CREATED_AT,
|
167
|
+
createdBy: CREATED_BY,
|
168
|
+
entityId: FORM_ID,
|
169
|
+
messageCreatedAt: MESSAGE_CREATED_AT,
|
170
|
+
schemaVersion: AuditEventMessageSchemaVersion.V1,
|
171
|
+
source: AuditEventMessageSource.FORMS_MANAGER,
|
172
|
+
type: 'FORM_LIVE_CREATED_FROM_DRAFT'
|
173
|
+
}
|