@defra/forms-model 3.0.622 → 3.0.624
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/__stubs__/components.js +11 -0
- package/dist/module/__stubs__/components.js.map +1 -1
- package/dist/module/components/component-types.js +7 -0
- package/dist/module/components/component-types.js.map +1 -1
- package/dist/module/components/enums.js +1 -0
- package/dist/module/components/enums.js.map +1 -1
- package/dist/module/components/types.js.map +1 -1
- package/dist/module/form/form-audit/index.js +8 -0
- package/dist/module/form/form-audit/index.js.map +1 -1
- package/dist/module/form/form-audit/types.js.map +1 -1
- package/dist/module/form/form-editor/index.js +2 -0
- package/dist/module/form/form-editor/index.js.map +1 -1
- package/dist/module/form/form-editor/types.js.map +1 -1
- package/dist/module/form/form-manager/types.js +0 -5
- package/dist/module/form/form-manager/types.js.map +1 -1
- package/dist/types/__stubs__/components.d.ts +2 -1
- package/dist/types/__stubs__/components.d.ts.map +1 -1
- package/dist/types/components/component-types.d.ts.map +1 -1
- package/dist/types/components/enums.d.ts +2 -1
- package/dist/types/components/enums.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +7 -1
- package/dist/types/components/types.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 +2 -1
- package/dist/types/form/form-audit/types.d.ts.map +1 -1
- package/dist/types/form/form-editor/index.d.ts +2 -0
- package/dist/types/form/form-editor/index.d.ts.map +1 -1
- package/dist/types/form/form-editor/types.d.ts +13 -2
- package/dist/types/form/form-editor/types.d.ts.map +1 -1
- package/dist/types/form/form-manager/types.d.ts +0 -4
- package/dist/types/form/form-manager/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__stubs__/components.ts +15 -0
- package/src/components/component-types.ts +9 -1
- package/src/components/enums.ts +2 -1
- package/src/components/types.ts +8 -0
- package/src/form/form-audit/index.ts +15 -0
- package/src/form/form-audit/types.ts +2 -1
- package/src/form/form-editor/index.ts +5 -0
- package/src/form/form-editor/types.ts +19 -0
- package/src/form/form-manager/types.ts +0 -4
|
@@ -352,4 +352,15 @@ export function buildOsGridRefFieldComponent(partialComponent = {}) {
|
|
|
352
352
|
type: ComponentType.OsGridRefField
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
+
export function buildGeospatialFieldComponent(partialComponent = {}) {
|
|
356
|
+
return {
|
|
357
|
+
id: '8ea12a71-83d0-43d9-9761-dcb3208a30d1',
|
|
358
|
+
name: 'GeospatialField',
|
|
359
|
+
title: 'Geospatial features of the site',
|
|
360
|
+
hint: 'Add points, lines and polygons to describe features of the site',
|
|
361
|
+
options: {},
|
|
362
|
+
...partialComponent,
|
|
363
|
+
type: ComponentType.GeospatialField
|
|
364
|
+
};
|
|
365
|
+
}
|
|
355
366
|
//# sourceMappingURL=components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","names":["ComponentType","buildTextFieldComponent","partialTextField","id","name","title","hint","options","schema","type","TextField","buildMultilineTextFieldComponent","partialMultilineTextField","MultilineTextField","buildYesNoFieldComponent","partialYesNoField","YesNoField","buildDeclarationFieldComponent","partialDeclarationField","content","DeclarationField","buildMonthYearFieldComponent","partialMonthYearField","MonthYearField","buildSelectFieldComponent","partialSelectField","list","SelectField","buildUkAddressFieldComponent","partialUkAddressField","UkAddressField","buildTelephoneNumberFieldComponent","partialTelephoneNumberField","TelephoneNumberField","buildEmailAddressFieldComponent","partialEmailAddressField","EmailAddressField","buildHtmlComponent","partialHtml","Html","buildInsetTextComponent","partialInsetText","InsetText","buildDetailsComponent","partialDetails","Details","buildListComponent","partialList","List","buildMarkdownComponent","partialMarkdown","Markdown","buildFileUploadComponent","partialFileUploadField","FileUploadField","buildAutoCompleteComponent","partialAutoCompleteField","AutocompleteField","buildRadioComponent","partialListComponent","RadiosField","buildCheckboxComponent","CheckboxesField","buildPaymentComponent","partialComponent","amount","description","PaymentField","buildListItem","partialListItem","text","value","buildList","items","buildNumberFieldComponent","NumberField","buildDateComponent","DatePartsField","buildRadiosComponent","buildEastingNorthingFieldComponent","EastingNorthingField","buildLatLongFieldComponent","LatLongField","buildNationalGridFieldNumberFieldComponent","NationalGridFieldNumberField","buildOsGridRefFieldComponent","OsGridRefField"],"sources":["../../../src/__stubs__/components.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type AutocompleteFieldComponent,\n type CheckboxesFieldComponent,\n type DatePartsFieldComponent,\n type DeclarationFieldComponent,\n type DetailsComponent,\n type EastingNorthingFieldComponent,\n type EmailAddressFieldComponent,\n type FileUploadFieldComponent,\n type HtmlComponent,\n type InsetTextComponent,\n type LatLongFieldComponent,\n type ListComponent,\n type MarkdownComponent,\n type MonthYearFieldComponent,\n type MultilineTextFieldComponent,\n type NationalGridFieldNumberFieldComponent,\n type NumberFieldComponent,\n type OsGridRefFieldComponent,\n type PaymentFieldComponent,\n type RadiosFieldComponent,\n type SelectFieldComponent,\n type TelephoneNumberFieldComponent,\n type TextFieldComponent,\n type UkAddressFieldComponent,\n type YesNoFieldComponent\n} from '~/src/components/types.js'\nimport { type Item, type List } from '~/src/form/form-definition/types.js'\n\n/**\n * @param {Partial<TextFieldComponent>} partialTextField\n * @returns {TextFieldComponent}\n */\nexport function buildTextFieldComponent(\n partialTextField: Partial<TextFieldComponent> = {}\n): TextFieldComponent {\n return {\n id: '407dd0d7-cce9-4f43-8e1f-7d89cb698875',\n name: 'TextField',\n title: 'Text field',\n hint: '',\n options: {},\n schema: {},\n ...partialTextField,\n type: ComponentType.TextField\n }\n}\n\nexport function buildMultilineTextFieldComponent(\n partialMultilineTextField: Partial<MultilineTextFieldComponent> = {}\n): MultilineTextFieldComponent {\n return {\n id: '72671f23-552e-4504-a06a-693e240880d5',\n name: 'MuTeCo',\n options: {},\n schema: {},\n title: 'Multiline TextField Component',\n ...partialMultilineTextField,\n type: ComponentType.MultilineTextField\n }\n}\n\nexport function buildYesNoFieldComponent(\n partialYesNoField: Partial<YesNoFieldComponent> = {}\n): YesNoFieldComponent {\n return {\n title: 'YesNo Field Component',\n id: 'be7f849c-47d8-4f1f-ba15-ab939dc70914',\n name: 'YesNoFieldComponent',\n options: {},\n ...partialYesNoField,\n type: ComponentType.YesNoField\n }\n}\n\nexport function buildDeclarationFieldComponent(\n partialDeclarationField: Partial<DeclarationFieldComponent> = {}\n): DeclarationFieldComponent {\n return {\n title: 'Declaration',\n id: 'f2a8c9e1-3d4f-4b5a-8c6d-1e2f3a4b5c6d',\n name: 'DeclarationFieldComponent',\n content: '',\n options: {},\n ...partialDeclarationField,\n type: ComponentType.DeclarationField\n }\n}\nexport function buildMonthYearFieldComponent(\n partialMonthYearField: Partial<MonthYearFieldComponent> = {}\n): MonthYearFieldComponent {\n return {\n id: 'd4e99aca-6d13-4c1a-a623-9e9e5b27d46d',\n title: 'MonthYearFieldComponent',\n name: 'MonthYearFieldComponent',\n options: {},\n ...partialMonthYearField,\n type: ComponentType.MonthYearField\n }\n}\nexport function buildSelectFieldComponent(\n partialSelectField: Partial<SelectFieldComponent> = {}\n): SelectFieldComponent {\n return {\n id: '7f219cf6-3e16-4549-b8df-789506682147',\n list: '',\n name: '',\n options: {},\n title: '',\n ...partialSelectField,\n type: ComponentType.SelectField\n }\n}\nexport function buildUkAddressFieldComponent(\n partialUkAddressField: Partial<UkAddressFieldComponent> = {}\n): UkAddressFieldComponent {\n return {\n id: 'a7cb7440-9095-44cd-9136-2914232722c8',\n title: 'UkAddressFieldComponent',\n name: 'UkAddressFieldComponent',\n options: {},\n ...partialUkAddressField,\n type: ComponentType.UkAddressField\n }\n}\nexport function buildTelephoneNumberFieldComponent(\n partialTelephoneNumberField: Partial<TelephoneNumberFieldComponent> = {}\n): TelephoneNumberFieldComponent {\n return {\n id: '69907916-beac-4faa-b469-656dad5edced',\n title: 'TelephoneNumberFieldComponent',\n name: 'TelephoneNumberFieldComponent',\n options: {},\n ...partialTelephoneNumberField,\n type: ComponentType.TelephoneNumberField\n }\n}\nexport function buildEmailAddressFieldComponent(\n partialEmailAddressField: Partial<EmailAddressFieldComponent> = {}\n): EmailAddressFieldComponent {\n return {\n id: '9dcf0781-bf34-48c8-b13b-d13050dc34d9',\n title: 'EmailAddressFieldComponent',\n name: 'EmailAddressFieldComponent',\n options: {},\n ...partialEmailAddressField,\n type: ComponentType.EmailAddressField\n }\n}\n\nexport function buildHtmlComponent(\n partialHtml: Partial<HtmlComponent> = {}\n): HtmlComponent {\n return {\n id: 'bac683ce-149e-4740-95aa-8289b35bc327',\n title: 'HtmlComponent',\n name: 'HtmlComponent',\n options: {},\n content: '',\n ...partialHtml,\n type: ComponentType.Html\n }\n}\nexport function buildInsetTextComponent(\n partialInsetText: Partial<InsetTextComponent> = {}\n): InsetTextComponent {\n return {\n id: '6b717151-1e86-42b2-97a9-2201b0676e47',\n title: 'InsetText Component',\n name: 'InsetTextComponent',\n content: '',\n options: {},\n ...partialInsetText,\n type: ComponentType.InsetText\n }\n}\nexport function buildDetailsComponent(\n partialDetails: Partial<DetailsComponent> = {}\n): DetailsComponent {\n return {\n id: '245d54df-bb1e-488e-82f6-8f1e42c197e6',\n title: 'Details Component',\n name: 'DetailsComponent',\n content: '',\n options: {},\n ...partialDetails,\n type: ComponentType.Details\n }\n}\nexport function buildListComponent(\n partialList: Partial<ListComponent> = {}\n): ListComponent {\n return {\n id: '62f17168-c2ef-4978-bd42-bdaa5704e25f',\n title: 'List Component',\n name: 'ListComponent',\n list: '',\n options: {},\n ...partialList,\n type: ComponentType.List\n }\n}\nexport function buildMarkdownComponent(\n partialMarkdown: Partial<MarkdownComponent> = {}\n): MarkdownComponent {\n return {\n id: '4a2dc88c-be1a-4277-aff8-04220de2e778',\n title: 'Markdown Component',\n name: 'MarkdownComponent',\n options: {},\n content: '',\n ...partialMarkdown,\n type: ComponentType.Markdown\n }\n}\n\n/**\n * @param {Partial<FileUploadFieldComponent>} partialFileUploadField\n * @returns {FileUploadFieldComponent}\n */\nexport function buildFileUploadComponent(\n partialFileUploadField: Partial<FileUploadFieldComponent> = {}\n): FileUploadFieldComponent {\n return {\n name: 'FileUploadField',\n title: 'File Upload Field',\n options: {},\n schema: {},\n ...partialFileUploadField,\n type: ComponentType.FileUploadField\n }\n}\n\n/**\n *\n * @param {Partial<AutocompleteFieldComponent>} partialAutoCompleteField\n * @returns {AutocompleteFieldComponent}\n */\nexport function buildAutoCompleteComponent(\n partialAutoCompleteField: Partial<AutocompleteFieldComponent> = {}\n): AutocompleteFieldComponent {\n return {\n name: 'AutoCompleteField',\n title: 'What languages do you speak?',\n list: 'AutoCompleteList',\n options: {},\n ...partialAutoCompleteField,\n type: ComponentType.AutocompleteField\n }\n}\n\n/**\n * @param {Partial<RadiosFieldComponent>} partialListComponent\n * @returns {RadiosFieldComponent}\n */\nexport function buildRadioComponent(\n partialListComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n id: '34455d57-df37-4b69-a64f-6c3af0317ebe',\n name: 'RadioField',\n title: 'Which country do you live in?',\n list: 'RadioList',\n options: {},\n ...partialListComponent,\n type: ComponentType.RadiosField\n }\n}\n\n/**\n * @param {Partial<CheckboxesFieldComponent>} partialListComponent\n * @returns {CheckboxesFieldComponent}\n */\nexport function buildCheckboxComponent(\n partialListComponent: Partial<CheckboxesFieldComponent> = {}\n): CheckboxesFieldComponent {\n return {\n name: 'FellowshipOfTheRing',\n title: 'Which are your favourite characters from the fellowship?',\n list: 'CheckboxList',\n options: {},\n ...partialListComponent,\n type: ComponentType.CheckboxesField\n }\n}\n\n/**\n * @param {Partial<PaymentFieldComponent>} partialComponent\n * @returns {PaymentFieldComponent}\n */\nexport function buildPaymentComponent(\n partialComponent: Partial<PaymentFieldComponent> = {}\n): PaymentFieldComponent {\n return {\n name: 'Payment',\n title: 'Some payment',\n options: {\n amount: 125,\n description: 'Payment description'\n },\n ...partialComponent,\n type: ComponentType.PaymentField\n }\n}\n\n/**\n * Builder to create a stub List item\n * @param {Partial<Item>} partialListItem\n * @returns {Item}\n */\nexport function buildListItem(partialListItem: Partial<Item> = {}): Item {\n return {\n text: 'Javascript',\n value: 'javascript',\n ...partialListItem\n }\n}\n\n/**\n * @param {Partial<List>} partialList\n * @returns {List}\n */\nexport function buildList(partialList: Partial<List> = {}): List {\n return {\n title: 'Development language2',\n name: 'YhmNDD',\n type: 'string',\n items: [\n buildListItem({\n text: 'Javascript',\n value: 'javascript'\n }),\n buildListItem({\n text: 'TypeScript',\n value: 'typescript'\n }),\n buildListItem({\n text: 'Python',\n value: 'python'\n }),\n buildListItem({\n text: 'Haskell',\n value: 'haskell'\n }),\n buildListItem({\n text: 'Erlang',\n value: 'erlang'\n }),\n buildListItem({\n text: 'Java',\n value: 'java'\n })\n ],\n ...partialList\n }\n}\n\nexport function buildNumberFieldComponent(\n partialComponent: Partial<NumberFieldComponent> = {}\n): NumberFieldComponent {\n return {\n name: 'year',\n title: 'Year',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.NumberField\n }\n}\n\nexport function buildDateComponent(\n partialComponent: Partial<DatePartsFieldComponent> = {}\n): DatePartsFieldComponent {\n return {\n name: 'bcdefg',\n title: 'Default title',\n options: {},\n ...partialComponent,\n type: ComponentType.DatePartsField\n }\n}\n\nexport function buildRadiosComponent(\n partialComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n name: 'cdefgh',\n title: 'Default title',\n options: {},\n list: 'Default list Id ref',\n ...partialComponent,\n type: ComponentType.RadiosField\n }\n}\n\nexport function buildEastingNorthingFieldComponent(\n partialComponent: Partial<EastingNorthingFieldComponent> = {}\n): EastingNorthingFieldComponent {\n return {\n id: '1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p',\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.EastingNorthingField\n }\n}\n\nexport function buildLatLongFieldComponent(\n partialComponent: Partial<LatLongFieldComponent> = {}\n): LatLongFieldComponent {\n return {\n id: '2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q',\n name: 'LatLongField',\n title: 'Latitude and longitude',\n hint: 'For example, Latitude: 51.5074, Longitude: -0.1278',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.LatLongField\n }\n}\n\nexport function buildNationalGridFieldNumberFieldComponent(\n partialComponent: Partial<NationalGridFieldNumberFieldComponent> = {}\n): NationalGridFieldNumberFieldComponent {\n return {\n id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',\n options: {},\n ...partialComponent,\n type: ComponentType.NationalGridFieldNumberField\n }\n}\n\nexport function buildOsGridRefFieldComponent(\n partialComponent: Partial<OsGridRefFieldComponent> = {}\n): OsGridRefFieldComponent {\n return {\n id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {},\n ...partialComponent,\n type: ComponentType.OsGridRefField\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa;AA8BtB;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,gBAA6C,GAAG,CAAC,CAAC,EAC9B;EACpB,OAAO;IACLC,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,WAAW;IACjBC,KAAK,EAAE,YAAY;IACnBC,IAAI,EAAE,EAAE;IACRC,OAAO,EAAE,CAAC,CAAC;IACXC,MAAM,EAAE,CAAC,CAAC;IACV,GAAGN,gBAAgB;IACnBO,IAAI,EAAET,aAAa,CAACU;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,gCAAgCA,CAC9CC,yBAA+D,GAAG,CAAC,CAAC,EACvC;EAC7B,OAAO;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nB,gBAAgE,GAAG,CAAC,CAAC,EAC9B;EACvC,OAAO;IACL7D,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,8BAA8B;IACpCC,KAAK,EAAE,4BAA4B;IACnCC,IAAI,EAAE,+FAA+F;IACrGC,OAAO,EAAE,CAAC,CAAC;IACX,GAAGyD,gBAAgB;IACnBvD,IAAI,EAAET,aAAa,CAACoF;EACtB,CAAC;AACH;AAEA,OAAO,SAASC,4BAA4BA,CAC1CrB,gBAAkD,GAAG,CAAC,CAAC,EAC9B;EACzB,OAAO;IACL7D,EAAE,EAAE,sCAAsC;IAC1CC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,qCAAqC;IAC5CC,IAAI,EAAE,kHAAkH;IACxHC,OAAO,EAAE,CAAC,CAAC;IACX,GAAGyD,gBAAgB;IACnBvD,IAAI,EAAET,aAAa,CAACsF;EACtB,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"components.js","names":["ComponentType","buildTextFieldComponent","partialTextField","id","name","title","hint","options","schema","type","TextField","buildMultilineTextFieldComponent","partialMultilineTextField","MultilineTextField","buildYesNoFieldComponent","partialYesNoField","YesNoField","buildDeclarationFieldComponent","partialDeclarationField","content","DeclarationField","buildMonthYearFieldComponent","partialMonthYearField","MonthYearField","buildSelectFieldComponent","partialSelectField","list","SelectField","buildUkAddressFieldComponent","partialUkAddressField","UkAddressField","buildTelephoneNumberFieldComponent","partialTelephoneNumberField","TelephoneNumberField","buildEmailAddressFieldComponent","partialEmailAddressField","EmailAddressField","buildHtmlComponent","partialHtml","Html","buildInsetTextComponent","partialInsetText","InsetText","buildDetailsComponent","partialDetails","Details","buildListComponent","partialList","List","buildMarkdownComponent","partialMarkdown","Markdown","buildFileUploadComponent","partialFileUploadField","FileUploadField","buildAutoCompleteComponent","partialAutoCompleteField","AutocompleteField","buildRadioComponent","partialListComponent","RadiosField","buildCheckboxComponent","CheckboxesField","buildPaymentComponent","partialComponent","amount","description","PaymentField","buildListItem","partialListItem","text","value","buildList","items","buildNumberFieldComponent","NumberField","buildDateComponent","DatePartsField","buildRadiosComponent","buildEastingNorthingFieldComponent","EastingNorthingField","buildLatLongFieldComponent","LatLongField","buildNationalGridFieldNumberFieldComponent","NationalGridFieldNumberField","buildOsGridRefFieldComponent","OsGridRefField","buildGeospatialFieldComponent","GeospatialField"],"sources":["../../../src/__stubs__/components.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type AutocompleteFieldComponent,\n type CheckboxesFieldComponent,\n type DatePartsFieldComponent,\n type DeclarationFieldComponent,\n type DetailsComponent,\n type EastingNorthingFieldComponent,\n type EmailAddressFieldComponent,\n type FileUploadFieldComponent,\n type GeospatialFieldComponent,\n type HtmlComponent,\n type InsetTextComponent,\n type LatLongFieldComponent,\n type ListComponent,\n type MarkdownComponent,\n type MonthYearFieldComponent,\n type MultilineTextFieldComponent,\n type NationalGridFieldNumberFieldComponent,\n type NumberFieldComponent,\n type OsGridRefFieldComponent,\n type PaymentFieldComponent,\n type RadiosFieldComponent,\n type SelectFieldComponent,\n type TelephoneNumberFieldComponent,\n type TextFieldComponent,\n type UkAddressFieldComponent,\n type YesNoFieldComponent\n} from '~/src/components/types.js'\nimport { type Item, type List } from '~/src/form/form-definition/types.js'\n\n/**\n * @param {Partial<TextFieldComponent>} partialTextField\n * @returns {TextFieldComponent}\n */\nexport function buildTextFieldComponent(\n partialTextField: Partial<TextFieldComponent> = {}\n): TextFieldComponent {\n return {\n id: '407dd0d7-cce9-4f43-8e1f-7d89cb698875',\n name: 'TextField',\n title: 'Text field',\n hint: '',\n options: {},\n schema: {},\n ...partialTextField,\n type: ComponentType.TextField\n }\n}\n\nexport function buildMultilineTextFieldComponent(\n partialMultilineTextField: Partial<MultilineTextFieldComponent> = {}\n): MultilineTextFieldComponent {\n return {\n id: '72671f23-552e-4504-a06a-693e240880d5',\n name: 'MuTeCo',\n options: {},\n schema: {},\n title: 'Multiline TextField Component',\n ...partialMultilineTextField,\n type: ComponentType.MultilineTextField\n }\n}\n\nexport function buildYesNoFieldComponent(\n partialYesNoField: Partial<YesNoFieldComponent> = {}\n): YesNoFieldComponent {\n return {\n title: 'YesNo Field Component',\n id: 'be7f849c-47d8-4f1f-ba15-ab939dc70914',\n name: 'YesNoFieldComponent',\n options: {},\n ...partialYesNoField,\n type: ComponentType.YesNoField\n }\n}\n\nexport function buildDeclarationFieldComponent(\n partialDeclarationField: Partial<DeclarationFieldComponent> = {}\n): DeclarationFieldComponent {\n return {\n title: 'Declaration',\n id: 'f2a8c9e1-3d4f-4b5a-8c6d-1e2f3a4b5c6d',\n name: 'DeclarationFieldComponent',\n content: '',\n options: {},\n ...partialDeclarationField,\n type: ComponentType.DeclarationField\n }\n}\nexport function buildMonthYearFieldComponent(\n partialMonthYearField: Partial<MonthYearFieldComponent> = {}\n): MonthYearFieldComponent {\n return {\n id: 'd4e99aca-6d13-4c1a-a623-9e9e5b27d46d',\n title: 'MonthYearFieldComponent',\n name: 'MonthYearFieldComponent',\n options: {},\n ...partialMonthYearField,\n type: ComponentType.MonthYearField\n }\n}\nexport function buildSelectFieldComponent(\n partialSelectField: Partial<SelectFieldComponent> = {}\n): SelectFieldComponent {\n return {\n id: '7f219cf6-3e16-4549-b8df-789506682147',\n list: '',\n name: '',\n options: {},\n title: '',\n ...partialSelectField,\n type: ComponentType.SelectField\n }\n}\nexport function buildUkAddressFieldComponent(\n partialUkAddressField: Partial<UkAddressFieldComponent> = {}\n): UkAddressFieldComponent {\n return {\n id: 'a7cb7440-9095-44cd-9136-2914232722c8',\n title: 'UkAddressFieldComponent',\n name: 'UkAddressFieldComponent',\n options: {},\n ...partialUkAddressField,\n type: ComponentType.UkAddressField\n }\n}\nexport function buildTelephoneNumberFieldComponent(\n partialTelephoneNumberField: Partial<TelephoneNumberFieldComponent> = {}\n): TelephoneNumberFieldComponent {\n return {\n id: '69907916-beac-4faa-b469-656dad5edced',\n title: 'TelephoneNumberFieldComponent',\n name: 'TelephoneNumberFieldComponent',\n options: {},\n ...partialTelephoneNumberField,\n type: ComponentType.TelephoneNumberField\n }\n}\nexport function buildEmailAddressFieldComponent(\n partialEmailAddressField: Partial<EmailAddressFieldComponent> = {}\n): EmailAddressFieldComponent {\n return {\n id: '9dcf0781-bf34-48c8-b13b-d13050dc34d9',\n title: 'EmailAddressFieldComponent',\n name: 'EmailAddressFieldComponent',\n options: {},\n ...partialEmailAddressField,\n type: ComponentType.EmailAddressField\n }\n}\n\nexport function buildHtmlComponent(\n partialHtml: Partial<HtmlComponent> = {}\n): HtmlComponent {\n return {\n id: 'bac683ce-149e-4740-95aa-8289b35bc327',\n title: 'HtmlComponent',\n name: 'HtmlComponent',\n options: {},\n content: '',\n ...partialHtml,\n type: ComponentType.Html\n }\n}\nexport function buildInsetTextComponent(\n partialInsetText: Partial<InsetTextComponent> = {}\n): InsetTextComponent {\n return {\n id: '6b717151-1e86-42b2-97a9-2201b0676e47',\n title: 'InsetText Component',\n name: 'InsetTextComponent',\n content: '',\n options: {},\n ...partialInsetText,\n type: ComponentType.InsetText\n }\n}\nexport function buildDetailsComponent(\n partialDetails: Partial<DetailsComponent> = {}\n): DetailsComponent {\n return {\n id: '245d54df-bb1e-488e-82f6-8f1e42c197e6',\n title: 'Details Component',\n name: 'DetailsComponent',\n content: '',\n options: {},\n ...partialDetails,\n type: ComponentType.Details\n }\n}\nexport function buildListComponent(\n partialList: Partial<ListComponent> = {}\n): ListComponent {\n return {\n id: '62f17168-c2ef-4978-bd42-bdaa5704e25f',\n title: 'List Component',\n name: 'ListComponent',\n list: '',\n options: {},\n ...partialList,\n type: ComponentType.List\n }\n}\nexport function buildMarkdownComponent(\n partialMarkdown: Partial<MarkdownComponent> = {}\n): MarkdownComponent {\n return {\n id: '4a2dc88c-be1a-4277-aff8-04220de2e778',\n title: 'Markdown Component',\n name: 'MarkdownComponent',\n options: {},\n content: '',\n ...partialMarkdown,\n type: ComponentType.Markdown\n }\n}\n\n/**\n * @param {Partial<FileUploadFieldComponent>} partialFileUploadField\n * @returns {FileUploadFieldComponent}\n */\nexport function buildFileUploadComponent(\n partialFileUploadField: Partial<FileUploadFieldComponent> = {}\n): FileUploadFieldComponent {\n return {\n name: 'FileUploadField',\n title: 'File Upload Field',\n options: {},\n schema: {},\n ...partialFileUploadField,\n type: ComponentType.FileUploadField\n }\n}\n\n/**\n *\n * @param {Partial<AutocompleteFieldComponent>} partialAutoCompleteField\n * @returns {AutocompleteFieldComponent}\n */\nexport function buildAutoCompleteComponent(\n partialAutoCompleteField: Partial<AutocompleteFieldComponent> = {}\n): AutocompleteFieldComponent {\n return {\n name: 'AutoCompleteField',\n title: 'What languages do you speak?',\n list: 'AutoCompleteList',\n options: {},\n ...partialAutoCompleteField,\n type: ComponentType.AutocompleteField\n }\n}\n\n/**\n * @param {Partial<RadiosFieldComponent>} partialListComponent\n * @returns {RadiosFieldComponent}\n */\nexport function buildRadioComponent(\n partialListComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n id: '34455d57-df37-4b69-a64f-6c3af0317ebe',\n name: 'RadioField',\n title: 'Which country do you live in?',\n list: 'RadioList',\n options: {},\n ...partialListComponent,\n type: ComponentType.RadiosField\n }\n}\n\n/**\n * @param {Partial<CheckboxesFieldComponent>} partialListComponent\n * @returns {CheckboxesFieldComponent}\n */\nexport function buildCheckboxComponent(\n partialListComponent: Partial<CheckboxesFieldComponent> = {}\n): CheckboxesFieldComponent {\n return {\n name: 'FellowshipOfTheRing',\n title: 'Which are your favourite characters from the fellowship?',\n list: 'CheckboxList',\n options: {},\n ...partialListComponent,\n type: ComponentType.CheckboxesField\n }\n}\n\n/**\n * @param {Partial<PaymentFieldComponent>} partialComponent\n * @returns {PaymentFieldComponent}\n */\nexport function buildPaymentComponent(\n partialComponent: Partial<PaymentFieldComponent> = {}\n): PaymentFieldComponent {\n return {\n name: 'Payment',\n title: 'Some payment',\n options: {\n amount: 125,\n description: 'Payment description'\n },\n ...partialComponent,\n type: ComponentType.PaymentField\n }\n}\n\n/**\n * Builder to create a stub List item\n * @param {Partial<Item>} partialListItem\n * @returns {Item}\n */\nexport function buildListItem(partialListItem: Partial<Item> = {}): Item {\n return {\n text: 'Javascript',\n value: 'javascript',\n ...partialListItem\n }\n}\n\n/**\n * @param {Partial<List>} partialList\n * @returns {List}\n */\nexport function buildList(partialList: Partial<List> = {}): List {\n return {\n title: 'Development language2',\n name: 'YhmNDD',\n type: 'string',\n items: [\n buildListItem({\n text: 'Javascript',\n value: 'javascript'\n }),\n buildListItem({\n text: 'TypeScript',\n value: 'typescript'\n }),\n buildListItem({\n text: 'Python',\n value: 'python'\n }),\n buildListItem({\n text: 'Haskell',\n value: 'haskell'\n }),\n buildListItem({\n text: 'Erlang',\n value: 'erlang'\n }),\n buildListItem({\n text: 'Java',\n value: 'java'\n })\n ],\n ...partialList\n }\n}\n\nexport function buildNumberFieldComponent(\n partialComponent: Partial<NumberFieldComponent> = {}\n): NumberFieldComponent {\n return {\n name: 'year',\n title: 'Year',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.NumberField\n }\n}\n\nexport function buildDateComponent(\n partialComponent: Partial<DatePartsFieldComponent> = {}\n): DatePartsFieldComponent {\n return {\n name: 'bcdefg',\n title: 'Default title',\n options: {},\n ...partialComponent,\n type: ComponentType.DatePartsField\n }\n}\n\nexport function buildRadiosComponent(\n partialComponent: Partial<RadiosFieldComponent> = {}\n): RadiosFieldComponent {\n return {\n name: 'cdefgh',\n title: 'Default title',\n options: {},\n list: 'Default list Id ref',\n ...partialComponent,\n type: ComponentType.RadiosField\n }\n}\n\nexport function buildEastingNorthingFieldComponent(\n partialComponent: Partial<EastingNorthingFieldComponent> = {}\n): EastingNorthingFieldComponent {\n return {\n id: '1a2b3c4d-5e6f-7g8h-9i0j-1k2l3m4n5o6p',\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.EastingNorthingField\n }\n}\n\nexport function buildLatLongFieldComponent(\n partialComponent: Partial<LatLongFieldComponent> = {}\n): LatLongFieldComponent {\n return {\n id: '2b3c4d5e-6f7g-8h9i-0j1k-2l3m4n5o6p7q',\n name: 'LatLongField',\n title: 'Latitude and longitude',\n hint: 'For example, Latitude: 51.5074, Longitude: -0.1278',\n options: {},\n schema: {},\n ...partialComponent,\n type: ComponentType.LatLongField\n }\n}\n\nexport function buildNationalGridFieldNumberFieldComponent(\n partialComponent: Partial<NationalGridFieldNumberFieldComponent> = {}\n): NationalGridFieldNumberFieldComponent {\n return {\n id: '3c4d5e6f-7g8h-9i0j-1k2l-3m4n5o6p7q8r',\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',\n options: {},\n ...partialComponent,\n type: ComponentType.NationalGridFieldNumberField\n }\n}\n\nexport function buildOsGridRefFieldComponent(\n partialComponent: Partial<OsGridRefFieldComponent> = {}\n): OsGridRefFieldComponent {\n return {\n id: '4d5e6f7g-8h9i-0j1k-2l3m-4n5o6p7q8r9s',\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {},\n ...partialComponent,\n type: ComponentType.OsGridRefField\n }\n}\n\nexport function buildGeospatialFieldComponent(\n partialComponent: Partial<GeospatialFieldComponent> = {}\n): GeospatialFieldComponent {\n return {\n id: '8ea12a71-83d0-43d9-9761-dcb3208a30d1',\n name: 'GeospatialField',\n title: 'Geospatial features of the site',\n hint: 'Add points, lines and polygons to describe features of the site',\n options: {},\n ...partialComponent,\n type: ComponentType.GeospatialField\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa;AA+BtB;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CACrCC,gBAA6C,GAAG,CAAC,CAAC,EAC9B;EACpB,OAAO;IACLC,EAAE,EAAE,sCAAsC;IAC1CC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
170
|
description: 'payment desc'
|
|
171
171
|
}
|
|
172
|
+
}, {
|
|
173
|
+
name: 'GeospatialField',
|
|
174
|
+
title: 'Geospatial field',
|
|
175
|
+
type: ComponentType.GeospatialField,
|
|
176
|
+
hint: '',
|
|
177
|
+
options: {},
|
|
178
|
+
schema: {}
|
|
172
179
|
}]);
|
|
173
180
|
//# sourceMappingURL=component-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-types.js","names":["ComponentType","ComponentTypes","Object","freeze","name","title","type","TextField","hint","options","schema","MultilineTextField","YesNoField","DatePartsField","MonthYearField","SelectField","list","AutocompleteField","RadiosField","CheckboxesField","NumberField","UkAddressField","TelephoneNumberField","EmailAddressField","FileUploadField","Html","content","InsetText","Markdown","Details","List","DeclarationField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField","PaymentField","amount","description"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type PaymentFieldComponent\n} from '~/src/components/types.js'\n\n/**\n * Defaults for creating new components\n */\nexport const ComponentTypes: readonly ComponentDef[] = Object.freeze([\n {\n name: 'TextField',\n title: 'Text field',\n type: ComponentType.TextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n title: 'Multiline text field',\n type: ComponentType.MultilineTextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n title: 'Yes/No field',\n type: ComponentType.YesNoField,\n hint: '',\n options: {}\n },\n {\n name: 'DatePartsField',\n title: 'Date field',\n type: ComponentType.DatePartsField,\n hint: '',\n options: {}\n },\n {\n name: 'MonthYearField',\n title: 'Month & year field',\n type: ComponentType.MonthYearField,\n hint: '',\n options: {}\n },\n {\n name: 'SelectField',\n title: 'Select field',\n type: ComponentType.SelectField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'AutocompleteField',\n title: 'Autocomplete field',\n type: ComponentType.AutocompleteField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'RadiosField',\n title: 'Radios field',\n type: ComponentType.RadiosField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'CheckboxesField',\n title: 'Checkboxes field',\n type: ComponentType.CheckboxesField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'NumberField',\n title: 'Number field',\n type: ComponentType.NumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n title: 'UK address field',\n type: ComponentType.UkAddressField,\n hint: '',\n options: {}\n },\n {\n name: 'TelephoneNumberField',\n title: 'Telephone number field',\n type: ComponentType.TelephoneNumberField,\n hint: '',\n options: {}\n },\n {\n name: 'EmailAddressField',\n title: 'Email address field',\n type: ComponentType.EmailAddressField,\n hint: 'For example, ‘name@example.com’',\n options: {}\n },\n {\n name: 'FileUploadField',\n title: 'File upload field',\n type: ComponentType.FileUploadField,\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n title: 'Html',\n type: ComponentType.Html,\n content: '',\n options: {}\n },\n {\n name: 'InsetText',\n title: 'Inset text',\n type: ComponentType.InsetText,\n content: ''\n },\n {\n name: 'Markdown',\n title: 'Markdown',\n type: ComponentType.Markdown,\n content: '',\n options: {}\n },\n {\n name: 'Details',\n title: 'Details',\n type: ComponentType.Details,\n content: '',\n options: {}\n },\n {\n name: 'List',\n title: 'List',\n type: ComponentType.List,\n list: '',\n options: {}\n },\n {\n name: 'DeclarationField',\n title: 'Declaration',\n type: ComponentType.DeclarationField,\n hint: '',\n content: '',\n options: {}\n },\n {\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n type: ComponentType.EastingNorthingField,\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {}\n },\n {\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n type: ComponentType.OsGridRefField,\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {}\n },\n {\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n type: ComponentType.NationalGridFieldNumberField,\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',\n options: {}\n },\n {\n name: 'LatLongField',\n title: 'Latitude and longitude',\n type: ComponentType.LatLongField,\n hint: 'For Great Britain, the latitude will be a number between 49.850 and 60.859. The longitude will be a number between -13.687 and 1.767',\n options: {}\n },\n {\n name: 'HiddenField',\n title: 'Hidden field',\n type: ComponentType.HiddenField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'PaymentField',\n title: 'Payment field',\n type: ComponentType.PaymentField,\n hint: '',\n options: {\n amount: 1,\n description: 'payment desc'\n }\n } as PaymentFieldComponent\n])\n"],"mappings":"AAAA,SAASA,aAAa;AAMtB;AACA;AACA;AACA,OAAO,MAAMC,cAAuC,GAAGC,MAAM,CAACC,MAAM,CAAC,CACnE;EACEC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACO,SAAS;EAC7BC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAEN,aAAa,CAACW,kBAAkB;EACtCH,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEN,aAAa,CAACY,UAAU;EAC9BJ,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACa,cAAc;EAClCL,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EAC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TC,WAAW,EAAE;EACf;AACF,CAAC,CACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"component-types.js","names":["ComponentType","ComponentTypes","Object","freeze","name","title","type","TextField","hint","options","schema","MultilineTextField","YesNoField","DatePartsField","MonthYearField","SelectField","list","AutocompleteField","RadiosField","CheckboxesField","NumberField","UkAddressField","TelephoneNumberField","EmailAddressField","FileUploadField","Html","content","InsetText","Markdown","Details","List","DeclarationField","EastingNorthingField","OsGridRefField","NationalGridFieldNumberField","LatLongField","HiddenField","PaymentField","amount","description","GeospatialField"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport {\n type ComponentDef,\n type PaymentFieldComponent\n} from '~/src/components/types.js'\n\n/**\n * Defaults for creating new components\n */\nexport const ComponentTypes: readonly ComponentDef[] = Object.freeze([\n {\n name: 'TextField',\n title: 'Text field',\n type: ComponentType.TextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n title: 'Multiline text field',\n type: ComponentType.MultilineTextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n title: 'Yes/No field',\n type: ComponentType.YesNoField,\n hint: '',\n options: {}\n },\n {\n name: 'DatePartsField',\n title: 'Date field',\n type: ComponentType.DatePartsField,\n hint: '',\n options: {}\n },\n {\n name: 'MonthYearField',\n title: 'Month & year field',\n type: ComponentType.MonthYearField,\n hint: '',\n options: {}\n },\n {\n name: 'SelectField',\n title: 'Select field',\n type: ComponentType.SelectField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'AutocompleteField',\n title: 'Autocomplete field',\n type: ComponentType.AutocompleteField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'RadiosField',\n title: 'Radios field',\n type: ComponentType.RadiosField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'CheckboxesField',\n title: 'Checkboxes field',\n type: ComponentType.CheckboxesField,\n hint: '',\n list: '',\n options: {}\n },\n {\n name: 'NumberField',\n title: 'Number field',\n type: ComponentType.NumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n title: 'UK address field',\n type: ComponentType.UkAddressField,\n hint: '',\n options: {}\n },\n {\n name: 'TelephoneNumberField',\n title: 'Telephone number field',\n type: ComponentType.TelephoneNumberField,\n hint: '',\n options: {}\n },\n {\n name: 'EmailAddressField',\n title: 'Email address field',\n type: ComponentType.EmailAddressField,\n hint: 'For example, ‘name@example.com’',\n options: {}\n },\n {\n name: 'FileUploadField',\n title: 'File upload field',\n type: ComponentType.FileUploadField,\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n title: 'Html',\n type: ComponentType.Html,\n content: '',\n options: {}\n },\n {\n name: 'InsetText',\n title: 'Inset text',\n type: ComponentType.InsetText,\n content: ''\n },\n {\n name: 'Markdown',\n title: 'Markdown',\n type: ComponentType.Markdown,\n content: '',\n options: {}\n },\n {\n name: 'Details',\n title: 'Details',\n type: ComponentType.Details,\n content: '',\n options: {}\n },\n {\n name: 'List',\n title: 'List',\n type: ComponentType.List,\n list: '',\n options: {}\n },\n {\n name: 'DeclarationField',\n title: 'Declaration',\n type: ComponentType.DeclarationField,\n hint: '',\n content: '',\n options: {}\n },\n {\n name: 'EastingNorthingField',\n title: 'Easting and northing',\n type: ComponentType.EastingNorthingField,\n hint: 'For example, Easting: 248741, Northing: 63688',\n options: {}\n },\n {\n name: 'OsGridRefField',\n title: 'Ordnance Survey (OS) grid reference',\n type: ComponentType.OsGridRefField,\n hint: 'An OS grid reference number is made up of 2 letters followed by either 6, 8 or 10 numbers, for example, TQ123456',\n options: {}\n },\n {\n name: 'NationalGridFieldNumberField',\n title: 'National Grid field number',\n type: ComponentType.NationalGridFieldNumberField,\n hint: 'A National Grid field number is made up of 2 letters and 8 numbers, for example, NG 1234 5678',\n options: {}\n },\n {\n name: 'LatLongField',\n title: 'Latitude and longitude',\n type: ComponentType.LatLongField,\n hint: 'For Great Britain, the latitude will be a number between 49.850 and 60.859. The longitude will be a number between -13.687 and 1.767',\n options: {}\n },\n {\n name: 'HiddenField',\n title: 'Hidden field',\n type: ComponentType.HiddenField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'PaymentField',\n title: 'Payment field',\n type: ComponentType.PaymentField,\n hint: '',\n options: {\n amount: 1,\n description: 'payment desc'\n }\n } as PaymentFieldComponent,\n {\n name: 'GeospatialField',\n title: 'Geospatial field',\n type: ComponentType.GeospatialField,\n hint: '',\n options: {},\n schema: {}\n }\n])\n"],"mappings":"AAAA,SAASA,aAAa;AAMtB;AACA;AACA;AACA,OAAO,MAAMC,cAAuC,GAAGC,MAAM,CAACC,MAAM,CAAC,CACnE;EACEC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACO,SAAS;EAC7BC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,oBAAoB;EAC1BC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAEN,aAAa,CAACW,kBAAkB;EACtCH,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,YAAY;EAClBC,KAAK,EAAE,cAAc;EACrBC,IAAI,EAAEN,aAAa,CAACY,UAAU;EAC9BJ,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEN,aAAa,CAACa,cAAc;EAClCL,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC;AACZ,CAAC,EACD;EACEL,IAAI,EAAE,gBAAgB;EACtBC,KAAK,EAAE,oBAAoB;EAC3BC,IAAI,EAAEN,aAAa,CAACc,cAAc;EAClCN,IAAI,EAAE,EAAE;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,CAACwC,eAAe;EACnChC,IAAI,EAAE,EAAE;EACRC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,CACF,CAAC","ignoreList":[]}
|
|
@@ -25,6 +25,7 @@ export let ComponentType = /*#__PURE__*/function (ComponentType) {
|
|
|
25
25
|
ComponentType["LatLongField"] = "LatLongField";
|
|
26
26
|
ComponentType["HiddenField"] = "HiddenField";
|
|
27
27
|
ComponentType["PaymentField"] = "PaymentField";
|
|
28
|
+
ComponentType["GeospatialField"] = "GeospatialField";
|
|
28
29
|
return ComponentType;
|
|
29
30
|
}({});
|
|
30
31
|
export const PreviewTypeEnum = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","names":["ComponentType","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;
|
|
1
|
+
{"version":3,"file":"enums.js","names":["ComponentType","PreviewTypeEnum","Question","ListSortable"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List',\n Markdown = 'Markdown',\n FileUploadField = 'FileUploadField',\n DeclarationField = 'DeclarationField',\n EastingNorthingField = 'EastingNorthingField',\n OsGridRefField = 'OsGridRefField',\n NationalGridFieldNumberField = 'NationalGridFieldNumberField',\n LatLongField = 'LatLongField',\n HiddenField = 'HiddenField',\n PaymentField = 'PaymentField',\n GeospatialField = 'GeospatialField'\n}\n\nexport const PreviewTypeEnum = {\n ...ComponentType,\n Question: 'Question',\n ListSortable: 'ListSortable'\n} as Record<string, string>\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AA8BzB,OAAO,MAAMC,eAAe,GAAG;EAC7B,GAAGD,aAAa;EAChBE,QAAQ,EAAE,UAAU;EACpBC,YAAY,EAAE;AAChB,CAA2B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type LanguageMessages } from 'joi'\n\nimport {\n type ComponentType,\n type PreviewTypeEnum\n} from '~/src/components/enums.js'\nimport {\n type ListTypeContent,\n type ListTypeOption\n} from '~/src/form/form-definition/types.js'\n\nexport type ConditionalComponentType = Exclude<\n ConditionalComponentsDef['type'],\n ContentComponentsDef\n>\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\n\ninterface FormFieldBase {\n id?: string\n type: FormComponentsDef['type']\n shortDescription?: string\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n customValidationMessages?: LanguageMessages\n instructionText?: string\n }\n}\n\ninterface ListFieldBase extends FormFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.RadiosField\n | ComponentType.SelectField\n list: string\n options: FormFieldBase['options'] & {\n type?: ListTypeContent\n }\n}\n\ninterface ContentFieldBase {\n id?: string\n type:\n | ComponentType.Details\n | ComponentType.Html\n | ComponentType.Markdown\n | ComponentType.InsetText\n | ComponentType.List\n name: string\n title: string\n options?: {\n required?: undefined\n optionalText?: undefined\n }\n}\n\ninterface DateFieldBase extends FormFieldBase {\n type: ComponentType.DatePartsField | ComponentType.MonthYearField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n maxDaysInPast?: number\n maxDaysInFuture?: number\n }\n}\n\n// Text Fields\nexport interface TextFieldComponent extends FormFieldBase {\n type: ComponentType.TextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends FormFieldBase {\n type: ComponentType.EmailAddressField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends FormFieldBase {\n type: ComponentType.NumberField\n options: FormFieldBase['options'] & {\n prefix?: string\n suffix?: string\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n }\n schema: {\n max?: number\n min?: number\n precision?: number\n minPrecision?: number\n minLength?: number\n maxLength?: number\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends FormFieldBase {\n type: ComponentType.TelephoneNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface FileUploadFieldComponent extends FormFieldBase {\n type: ComponentType.FileUploadField\n name: string\n title: string\n hint?: string\n options: FormFieldBase['options'] & {\n accept?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n }\n}\n\nexport interface YesNoFieldComponent extends FormFieldBase {\n type: ComponentType.YesNoField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface DeclarationFieldComponent extends FormFieldBase {\n type: ComponentType.DeclarationField\n content: string\n options: FormFieldBase['options'] & {\n condition?: string\n declarationConfirmationLabel?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends FormFieldBase {\n type: ComponentType.MultilineTextField\n options: FormFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n }\n}\n\nexport interface UkAddressFieldComponent extends FormFieldBase {\n type: ComponentType.UkAddressField\n options: FormFieldBase['options'] & {\n hideTitle?: boolean\n usePostcodeLookup?: boolean\n }\n}\n\n// Precise Location Fields\nexport interface EastingNorthingFieldComponent extends FormFieldBase {\n type: ComponentType.EastingNorthingField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n easting?: {\n min?: number\n max?: number\n }\n northing?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface OsGridRefFieldComponent extends FormFieldBase {\n type: ComponentType.OsGridRefField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NationalGridFieldNumberFieldComponent extends FormFieldBase {\n type: ComponentType.NationalGridFieldNumberField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface LatLongFieldComponent extends FormFieldBase {\n type: ComponentType.LatLongField\n options: FormFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n schema?: {\n latitude?: {\n min?: number\n max?: number\n }\n longitude?: {\n min?: number\n max?: number\n }\n }\n}\n\nexport interface HiddenFieldComponent extends FormFieldBase {\n type: ComponentType.HiddenField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface PaymentFieldComponent extends FormFieldBase {\n type: ComponentType.PaymentField\n options: FormFieldBase['options'] & {\n amount: number\n description: string\n }\n}\n\nexport interface GeospatialFieldComponent extends FormFieldBase {\n type: ComponentType.GeospatialField\n options: FormFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MarkdownComponent extends ContentFieldBase {\n type: ComponentType.Markdown\n content: string\n options: ContentFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n content: string\n}\n\nexport interface ListComponent extends ContentFieldBase {\n type: ComponentType.List\n hint?: string\n list: string\n options: ContentFieldBase['options'] & {\n type?: ListTypeOption\n classes?: string\n hideTitle?: boolean\n bold?: boolean\n }\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n bold?: boolean\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & {\n autocomplete?: string\n condition?: string\n }\n}\n\nexport type ComponentDef = FormComponentsDef | ContentComponentsDef\n\n// Components that render form fields\nexport type FormComponentsDef =\n | InputFieldsComponentsDef\n | SelectionComponentsDef\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | MonthYearFieldComponent\n | DatePartsFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | DeclarationFieldComponent\n | EastingNorthingFieldComponent\n | OsGridRefFieldComponent\n | NationalGridFieldNumberFieldComponent\n | LatLongFieldComponent\n | HiddenFieldComponent\n | PaymentFieldComponent\n | GeospatialFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | MarkdownComponent\n | InsetTextComponent\n | ListComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | Exclude<SelectionComponentsDef, YesNoFieldComponent>\n | ListComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have condition support\nexport type ConditionalComponentsDef = Exclude<\n ComponentDef,\n | InsetTextComponent\n | ListComponent\n | MonthYearFieldComponent\n | UkAddressFieldComponent\n | FileUploadFieldComponent\n | PaymentFieldComponent\n>\n\nexport type PreviewType = keyof typeof PreviewTypeEnum\n"],"mappings":"","ignoreList":[]}
|
|
@@ -25,6 +25,11 @@ export const formsBackupRequestedMessageData = Joi.object().keys({
|
|
|
25
25
|
totalForms: Joi.number().integer().min(0).required(),
|
|
26
26
|
durationMs: Joi.number().min(0).required()
|
|
27
27
|
});
|
|
28
|
+
export const formsSecretSavedMessageData = Joi.object().keys({
|
|
29
|
+
formId: Joi.string().required(),
|
|
30
|
+
slug: Joi.string().required(),
|
|
31
|
+
secretName: Joi.string().required()
|
|
32
|
+
});
|
|
28
33
|
export const formTitleChanges = Joi.object().keys({
|
|
29
34
|
title: titleSchema
|
|
30
35
|
}).required().description('Changes schema for FORM_TITLE_UPDATED event');
|
|
@@ -184,6 +189,9 @@ export const messageSchema = Joi.object().keys({
|
|
|
184
189
|
}, {
|
|
185
190
|
is: Joi.string().trim().valid(AuditEventMessageType.FORMS_BACKUP_REQUESTED),
|
|
186
191
|
then: formsBackupRequestedMessageData
|
|
192
|
+
}, {
|
|
193
|
+
is: Joi.string().trim().valid(AuditEventMessageType.FORM_SECRET_SAVED),
|
|
194
|
+
then: formsSecretSavedMessageData
|
|
187
195
|
}],
|
|
188
196
|
otherwise: Joi.forbidden()
|
|
189
197
|
}).description('The data/payload of the audit message'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageSource","AuditEventMessageType","FormDefinitionRequestType","contactSchema","emailAddressSchema","emailResponseTimeSchema","idSchema","notificationEmailAddressSchema","onlineTextSchema","onlineUrlSchema","organisationSchema","phoneSchema","privacyNoticeTextSchema","privacyNoticeTypeSchema","privacyNoticeUrlSchema","slugSchema","submissionGuidanceSchema","teamEmailSchema","teamNameSchema","termsAndConditionsAgreedSchema","titleSchema","formMessageDataBase","object","formId","slug","payload","optional","required","description","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formDefinitionS3Meta","keys","fileId","string","filename","s3Key","formUpdatedMessageData","requestType","valid","Object","values","s3Meta","formsBackupRequestedMessageData","totalForms","number","integer","min","durationMs","formTitleChanges","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportContactChanges","contact","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formSupportEmailChanges","address","responseTime","formPrivacyNoticeChanges","privacyNoticeType","privacyNoticeText","when","is","then","otherwise","allow","privacyNoticeUrl","formTermsAndConditionsChanges","termsAndConditionsAgreed","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","entitlementMessageData","userId","displayName","email","roles","array","items","formFileDownloadedMessageData","fileLink","excelGenerationMessageData","formName","authenticationMessageData","auditUserSchema","id","formChangesMessageData","schema","changes","previous","new","messageSchema","schemaVersion","category","source","type","entityId","traceId","createdAt","date","createdBy","data","switch","trim","FORM_CREATED","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_SUPPORT_CONTACT_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_TERMS_AND_CONDITIONS_AGREED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_JSON_UPLOADED","FORM_UPDATED","ENTITLEMENT_CREATED","ENTITLEMENT_UPDATED","ENTITLEMENT_DELETED","FORM_DRAFT_DELETED","FORM_JSON_DOWNLOADED","AUTHENTICATION_LOGIN","AUTHENTICATION_LOGOUT_MANUAL","AUTHENTICATION_LOGOUT_AUTO","AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE","FORM_FILE_DOWNLOAD_SUCCESS","FORM_FILE_DOWNLOAD_FAILURE","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","PLATFORM_CSAT_EXCEL_REQUESTED","FORMS_BACKUP_REQUESTED","forbidden","messageCreatedAt","auditEvent","message","auditRecord","messageId","uuid","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageSource,\n AuditEventMessageType,\n FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type AuthenticationMessageData,\n type ChangesMessageData,\n type EntitlementMessageData,\n type ExcelGenerationMessageData,\n type FormCreatedMessageData,\n type FormDefinitionS3Meta,\n type FormFileDownloadedMessageData,\n type FormMessageChangesData,\n type FormMessageDataBase,\n type FormNotificationEmailChanges,\n type FormNotificationEmailUpdatedMessageData,\n type FormOrganisationChanges,\n type FormOrganisationUpdatedMessageData,\n type FormPrivacyNoticeChanges,\n type FormPrivacyNoticeUpdatedMessageData,\n type FormSubmissionGuidanceChanges,\n type FormSubmissionGuidanceUpdatedMessageData,\n type FormSupportContactChanges,\n type FormSupportContactUpdatedMessageData,\n type FormSupportEmailChanges,\n type FormSupportEmailUpdatedMessageData,\n type FormSupportOnlineChanges,\n type FormSupportOnlineUpdatedMessageData,\n type FormSupportPhoneChanges,\n type FormSupportPhoneUpdatedMessageData,\n type FormTeamEmailChanges,\n type FormTeamEmailUpdatedMessageData,\n type FormTeamNameChanges,\n type FormTeamNameUpdatedMessageData,\n type FormTermsAndConditionsAgreedMessageData,\n type FormTermsAndConditionsChanges,\n type FormTitleChanges,\n type FormTitleUpdatedMessageData,\n type FormUpdatedMessageData,\n type FormUploadedChanges,\n type FormUploadedMessageData,\n type FormsBackupRequestedMessageData\n} from '~/src/form/form-audit/types.js'\nimport {\n contactSchema,\n emailAddressSchema,\n emailResponseTimeSchema,\n idSchema,\n notificationEmailAddressSchema,\n onlineTextSchema,\n onlineUrlSchema,\n organisationSchema,\n phoneSchema,\n privacyNoticeTextSchema,\n privacyNoticeTypeSchema,\n privacyNoticeUrlSchema,\n slugSchema,\n submissionGuidanceSchema,\n teamEmailSchema,\n teamNameSchema,\n termsAndConditionsAgreedSchema,\n titleSchema\n} from '~/src/form/form-metadata/index.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: idSchema,\n slug: slugSchema,\n payload: Joi.object().optional()\n})\n .required()\n .description('The base data object for Form Messages')\n\nexport const formCreatedMessageData = formMessageDataBase\n .append<FormCreatedMessageData>({\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Message data schema for when a form is created')\n\nexport const formDefinitionS3Meta = Joi.object<FormDefinitionS3Meta>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n s3Key: Joi.string().required()\n })\n .description('Schema for form data S3 object in message')\n\nexport const formUpdatedMessageData = formMessageDataBase\n .append<FormUpdatedMessageData>({\n requestType: Joi.string()\n .valid(...Object.values(FormDefinitionRequestType))\n .required(),\n s3Meta: formDefinitionS3Meta.optional()\n })\n .required()\n\nexport const formsBackupRequestedMessageData =\n Joi.object<FormsBackupRequestedMessageData>().keys({\n totalForms: Joi.number().integer().min(0).required(),\n durationMs: Joi.number().min(0).required()\n })\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: titleSchema\n })\n .required()\n .description('Changes schema for FORM_TITLE_UPDATED event')\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: organisationSchema\n })\n .required()\n .description('Changes schema for FORM_ORGANISATION_UPDATED event')\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: teamNameSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_NAME_UPDATED event')\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_EMAIL_UPDATED event')\n\nexport const formSupportContactChanges = Joi.object<FormSupportContactChanges>()\n .keys({\n contact: contactSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_CONTACT_UPDATED event')\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: phoneSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_PHONE_UPDATED event')\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: onlineUrlSchema.optional(),\n text: onlineTextSchema.optional()\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_ONLINE_UPDATED event')\n\nexport const formSupportEmailChanges = Joi.object<FormSupportEmailChanges>()\n .keys({\n address: emailAddressSchema.optional(),\n responseTime: emailResponseTimeSchema.optional()\n })\n .description('Changes schema for FORM_SUPPORT_EMAIL_UPDATED event')\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeType: privacyNoticeTypeSchema,\n privacyNoticeText: Joi.when('privacyNoticeType', {\n is: 'text',\n then: privacyNoticeTextSchema,\n otherwise: privacyNoticeTextSchema.allow('')\n }),\n privacyNoticeUrl: Joi.when('privacyNoticeType', {\n is: 'link',\n then: privacyNoticeUrlSchema,\n otherwise: privacyNoticeUrlSchema.allow('')\n })\n })\n .required()\n .description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event')\n\nexport const formTermsAndConditionsChanges =\n Joi.object<FormTermsAndConditionsChanges>()\n .keys({\n termsAndConditionsAgreed: termsAndConditionsAgreedSchema\n })\n .required()\n .description('Changes schema for FORM_TERMS_AND_CONDITIONS_AGREED event')\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: notificationEmailAddressSchema\n })\n .required()\n .description('Changes schema for FORM_NOTIFICATION_EMAIL_UPDATED event')\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: submissionGuidanceSchema\n })\n .required()\n .description('Changes schema for FORM_SUBMISSION_GUIDANCE_UPDATED event')\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n .description('Changes schema for FORM_JSON_UPLOADED event')\n\nexport const entitlementMessageData = Joi.object<EntitlementMessageData>().keys(\n {\n userId: Joi.string().required(),\n displayName: Joi.string().required(),\n email: Joi.string().email().required(),\n roles: Joi.array().items(Joi.string())\n }\n)\n\nexport const formFileDownloadedMessageData =\n Joi.object<FormFileDownloadedMessageData>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n fileLink: Joi.string().required()\n })\n .required()\n .description(\n 'Schema for FORM_FILE_DOWNLOAD_SUCCESS and FORM_FILE_DOWNLOAD_FAILURE events'\n )\n\nexport const excelGenerationMessageData =\n Joi.object<ExcelGenerationMessageData>()\n .keys({\n formId: Joi.string().required(),\n formName: Joi.string().required(),\n notificationEmail: Joi.string().email().required()\n })\n .required()\n .description(\n 'Schema for Excel generation audit events (submissions and CSAT)'\n )\n\nexport const authenticationMessageData =\n Joi.object<AuthenticationMessageData>().keys({\n userId: Joi.string().required(),\n displayName: Joi.string().required()\n })\n\nexport const auditUserSchema = Joi.object<AuditUser>()\n .keys({\n id: Joi.string().required(),\n displayName: Joi.string().required()\n })\n .description('Schema for CREATED_BY audit event')\n\nexport function formChangesMessageData<T, U extends FormMessageChangesData>(\n schema: ObjectSchema<T>\n): ObjectSchema<U> {\n return formMessageDataBase.append<U>({\n changes: Joi.object<ChangesMessageData<T>>()\n .keys({\n previous: schema,\n new: schema\n })\n .description('Changes schema')\n })\n}\n\nexport const messageSchema = Joi.object<AuditMessage>()\n .keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(AuditEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the AuditMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(AuditEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(AuditEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(AuditEventMessageType))\n .description('Event type'),\n entityId: Joi.string()\n .required()\n .description('The id of the entity the category relates to'),\n traceId: Joi.string()\n .optional()\n .description(\n 'Trace id of the event - to link events across multiple services'\n ),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n createdBy: auditUserSchema\n .required()\n .description('The user who performed the action being audited'),\n data: Joi.when('type', {\n switch: [\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_CREATED),\n then: formCreatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TITLE_UPDATED),\n then: formChangesMessageData<\n FormTitleChanges,\n FormTitleUpdatedMessageData\n >(formTitleChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_ORGANISATION_UPDATED),\n then: formChangesMessageData<\n FormOrganisationChanges,\n FormOrganisationUpdatedMessageData\n >(formOrganisationChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_NAME_UPDATED),\n then: formChangesMessageData<\n FormTeamNameChanges,\n FormTeamNameUpdatedMessageData\n >(formTeamNameChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormTeamEmailChanges,\n FormTeamEmailUpdatedMessageData\n >(formTeamEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),\n then: formChangesMessageData<\n FormSupportContactChanges,\n FormSupportContactUpdatedMessageData\n >(formSupportContactChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED),\n then: formChangesMessageData<\n FormSupportPhoneChanges,\n FormSupportPhoneUpdatedMessageData\n >(formSupportPhoneChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormSupportEmailChanges,\n FormSupportEmailUpdatedMessageData\n >(formSupportEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED),\n then: formChangesMessageData<\n FormSupportOnlineChanges,\n FormSupportOnlineUpdatedMessageData\n >(formSupportOnlineChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED),\n then: formChangesMessageData<\n FormPrivacyNoticeChanges,\n FormPrivacyNoticeUpdatedMessageData\n >(formPrivacyNoticeChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TERMS_AND_CONDITIONS_AGREED),\n then: formChangesMessageData<\n FormTermsAndConditionsChanges,\n FormTermsAndConditionsAgreedMessageData\n >(formTermsAndConditionsChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormNotificationEmailChanges,\n FormNotificationEmailUpdatedMessageData\n >(formNotificationEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED),\n then: formChangesMessageData<\n FormSubmissionGuidanceChanges,\n FormSubmissionGuidanceUpdatedMessageData\n >(formSubmissionGuidanceChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_UPLOADED),\n then: formChangesMessageData<\n FormUploadedChanges,\n FormUploadedMessageData\n >(formUploadedChanges)\n },\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_UPDATED),\n then: formUpdatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.ENTITLEMENT_CREATED,\n AuditEventMessageType.ENTITLEMENT_UPDATED,\n AuditEventMessageType.ENTITLEMENT_DELETED\n ),\n then: entitlementMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_DRAFT_DELETED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_DOWNLOADED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.AUTHENTICATION_LOGIN,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n ),\n then: authenticationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS,\n AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n ),\n then: formFileDownloadedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED,\n AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n ),\n then: excelGenerationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORMS_BACKUP_REQUESTED),\n then: formsBackupRequestedMessageData\n }\n ],\n otherwise: Joi.forbidden()\n }).description('The data/payload of the audit message'),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published')\n })\n .required()\n .description('The audit message issued by the publishing service')\n\nexport const auditEvent = Joi.object<AuditEvent>()\n .keys({\n message: messageSchema\n })\n .description('The Body of the audit event')\n\nexport const auditRecord = messageSchema\n .append<AuditRecord>({\n id: idSchema,\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n })\n .description('The audit record persisted into the DB')\n"],"mappings":"AAAA,OAAOA,GAAG,MAA6B,KAAK;AAE5C,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,qBAAqB,EACrBC,yBAAyB;AA6C3B,SACEC,aAAa,EACbC,kBAAkB,EAClBC,uBAAuB,EACvBC,QAAQ,EACRC,8BAA8B,EAC9BC,gBAAgB,EAChBC,eAAe,EACfC,kBAAkB,EAClBC,WAAW,EACXC,uBAAuB,EACvBC,uBAAuB,EACvBC,sBAAsB,EACtBC,UAAU,EACVC,wBAAwB,EACxBC,eAAe,EACfC,cAAc,EACdC,8BAA8B,EAC9BC,WAAW;AAGb,OAAO,MAAMC,mBAAmB,GAAGxB,GAAG,CAACyB,MAAM,CAAsB;EACjEC,MAAM,EAAEjB,QAAQ;EAChBkB,IAAI,EAAET,UAAU;EAChBU,OAAO,EAAE5B,GAAG,CAACyB,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC;AACjC,CAAC,CAAC,CACCC,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,wCAAwC,CAAC;AAExD,OAAO,MAAMC,sBAAsB,GAAGR,mBAAmB,CACtDS,MAAM,CAAyB;EAC9BC,KAAK,EAAEX,WAAW;EAClBY,YAAY,EAAEtB,kBAAkB;EAChCuB,QAAQ,EAAEf,cAAc;EACxBgB,SAAS,EAAEjB;AACb,CAAC,CAAC,CACDU,QAAQ,CAAC,CAAC,CACVC,WAAW,CAAC,gDAAgD,CAAC;AAEhE,OAAO,MAAMO,oBAAoB,GAAG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AAc;EACnBmE,EAAE,EAAE3F,QAAQ;EACZiJ,SAAS,EAAE1J,GAAG,CAACyC,MAAM,CAAC,CAAC,CAACkH,IAAI,CAAC,CAAC,CAAC7H,QAAQ,CAAC,CAAC;EACzCiF,QAAQ,EAAE/G,GAAG,CAACyC,MAAM,CAAC,CAAC,CAACX,QAAQ,CAAC,CAAC;EACjC8H,eAAe,EAAE5J,GAAG,CAACkH,IAAI,CAAC,CAAC,CAACpF,QAAQ,CAAC;AACvC,CAAC,CAAC,CACDC,WAAW,CAAC,wCAAwC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Joi","AuditEventMessageCategory","AuditEventMessageSchemaVersion","AuditEventMessageSource","AuditEventMessageType","FormDefinitionRequestType","contactSchema","emailAddressSchema","emailResponseTimeSchema","idSchema","notificationEmailAddressSchema","onlineTextSchema","onlineUrlSchema","organisationSchema","phoneSchema","privacyNoticeTextSchema","privacyNoticeTypeSchema","privacyNoticeUrlSchema","slugSchema","submissionGuidanceSchema","teamEmailSchema","teamNameSchema","termsAndConditionsAgreedSchema","titleSchema","formMessageDataBase","object","formId","slug","payload","optional","required","description","formCreatedMessageData","append","title","organisation","teamName","teamEmail","formDefinitionS3Meta","keys","fileId","string","filename","s3Key","formUpdatedMessageData","requestType","valid","Object","values","s3Meta","formsBackupRequestedMessageData","totalForms","number","integer","min","durationMs","formsSecretSavedMessageData","secretName","formTitleChanges","formOrganisationChanges","formTeamNameChanges","formTeamEmailChanges","formSupportContactChanges","contact","formSupportPhoneChanges","phone","formSupportOnlineChanges","url","text","formSupportEmailChanges","address","responseTime","formPrivacyNoticeChanges","privacyNoticeType","privacyNoticeText","when","is","then","otherwise","allow","privacyNoticeUrl","formTermsAndConditionsChanges","termsAndConditionsAgreed","formNotificationEmailChanges","notificationEmail","formSubmissionGuidanceChanges","submissionGuidance","formUploadedChanges","value","entitlementMessageData","userId","displayName","email","roles","array","items","formFileDownloadedMessageData","fileLink","excelGenerationMessageData","formName","authenticationMessageData","auditUserSchema","id","formChangesMessageData","schema","changes","previous","new","messageSchema","schemaVersion","category","source","type","entityId","traceId","createdAt","date","createdBy","data","switch","trim","FORM_CREATED","FORM_TITLE_UPDATED","FORM_ORGANISATION_UPDATED","FORM_TEAM_NAME_UPDATED","FORM_TEAM_EMAIL_UPDATED","FORM_SUPPORT_CONTACT_UPDATED","FORM_SUPPORT_PHONE_UPDATED","FORM_SUPPORT_EMAIL_UPDATED","FORM_SUPPORT_ONLINE_UPDATED","FORM_PRIVACY_NOTICE_UPDATED","FORM_TERMS_AND_CONDITIONS_AGREED","FORM_NOTIFICATION_EMAIL_UPDATED","FORM_SUBMISSION_GUIDANCE_UPDATED","FORM_JSON_UPLOADED","FORM_UPDATED","ENTITLEMENT_CREATED","ENTITLEMENT_UPDATED","ENTITLEMENT_DELETED","FORM_DRAFT_DELETED","FORM_JSON_DOWNLOADED","AUTHENTICATION_LOGIN","AUTHENTICATION_LOGOUT_MANUAL","AUTHENTICATION_LOGOUT_AUTO","AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE","FORM_FILE_DOWNLOAD_SUCCESS","FORM_FILE_DOWNLOAD_FAILURE","FORM_SUBMISSION_EXCEL_REQUESTED","FORM_CSAT_EXCEL_REQUESTED","PLATFORM_CSAT_EXCEL_REQUESTED","FORMS_BACKUP_REQUESTED","FORM_SECRET_SAVED","forbidden","messageCreatedAt","auditEvent","message","auditRecord","messageId","uuid","recordCreatedAt"],"sources":["../../../../src/form/form-audit/index.ts"],"sourcesContent":["import Joi, { type ObjectSchema } from 'joi'\n\nimport {\n AuditEventMessageCategory,\n AuditEventMessageSchemaVersion,\n AuditEventMessageSource,\n AuditEventMessageType,\n FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport {\n type AuditEvent,\n type AuditMessage,\n type AuditRecord,\n type AuditUser,\n type AuthenticationMessageData,\n type ChangesMessageData,\n type EntitlementMessageData,\n type ExcelGenerationMessageData,\n type FormCreatedMessageData,\n type FormDefinitionS3Meta,\n type FormFileDownloadedMessageData,\n type FormMessageChangesData,\n type FormMessageDataBase,\n type FormNotificationEmailChanges,\n type FormNotificationEmailUpdatedMessageData,\n type FormOrganisationChanges,\n type FormOrganisationUpdatedMessageData,\n type FormPrivacyNoticeChanges,\n type FormPrivacyNoticeUpdatedMessageData,\n type FormSecretSavedMessageData,\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 FormTermsAndConditionsAgreedMessageData,\n type FormTermsAndConditionsChanges,\n type FormTitleChanges,\n type FormTitleUpdatedMessageData,\n type FormUpdatedMessageData,\n type FormUploadedChanges,\n type FormUploadedMessageData,\n type FormsBackupRequestedMessageData\n} from '~/src/form/form-audit/types.js'\nimport {\n contactSchema,\n emailAddressSchema,\n emailResponseTimeSchema,\n idSchema,\n notificationEmailAddressSchema,\n onlineTextSchema,\n onlineUrlSchema,\n organisationSchema,\n phoneSchema,\n privacyNoticeTextSchema,\n privacyNoticeTypeSchema,\n privacyNoticeUrlSchema,\n slugSchema,\n submissionGuidanceSchema,\n teamEmailSchema,\n teamNameSchema,\n termsAndConditionsAgreedSchema,\n titleSchema\n} from '~/src/form/form-metadata/index.js'\n\nexport const formMessageDataBase = Joi.object<FormMessageDataBase>({\n formId: idSchema,\n slug: slugSchema,\n payload: Joi.object().optional()\n})\n .required()\n .description('The base data object for Form Messages')\n\nexport const formCreatedMessageData = formMessageDataBase\n .append<FormCreatedMessageData>({\n title: titleSchema,\n organisation: organisationSchema,\n teamName: teamNameSchema,\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Message data schema for when a form is created')\n\nexport const formDefinitionS3Meta = Joi.object<FormDefinitionS3Meta>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n s3Key: Joi.string().required()\n })\n .description('Schema for form data S3 object in message')\n\nexport const formUpdatedMessageData = formMessageDataBase\n .append<FormUpdatedMessageData>({\n requestType: Joi.string()\n .valid(...Object.values(FormDefinitionRequestType))\n .required(),\n s3Meta: formDefinitionS3Meta.optional()\n })\n .required()\n\nexport const formsBackupRequestedMessageData =\n Joi.object<FormsBackupRequestedMessageData>().keys({\n totalForms: Joi.number().integer().min(0).required(),\n durationMs: Joi.number().min(0).required()\n })\n\nexport const formsSecretSavedMessageData =\n Joi.object<FormSecretSavedMessageData>().keys({\n formId: Joi.string().required(),\n slug: Joi.string().required(),\n secretName: Joi.string().required()\n })\n\nexport const formTitleChanges = Joi.object<FormTitleChanges>()\n .keys({\n title: titleSchema\n })\n .required()\n .description('Changes schema for FORM_TITLE_UPDATED event')\n\nexport const formOrganisationChanges = Joi.object<FormOrganisationChanges>()\n .keys({\n organisation: organisationSchema\n })\n .required()\n .description('Changes schema for FORM_ORGANISATION_UPDATED event')\n\nexport const formTeamNameChanges = Joi.object<FormTeamNameChanges>()\n .keys({\n teamName: teamNameSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_NAME_UPDATED event')\n\nexport const formTeamEmailChanges = Joi.object<FormTeamEmailChanges>()\n .keys({\n teamEmail: teamEmailSchema\n })\n .required()\n .description('Changes schema for FORM_TEAM_EMAIL_UPDATED event')\n\nexport const formSupportContactChanges = Joi.object<FormSupportContactChanges>()\n .keys({\n contact: contactSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_CONTACT_UPDATED event')\n\nexport const formSupportPhoneChanges = Joi.object<FormSupportPhoneChanges>()\n .keys({\n phone: phoneSchema\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_PHONE_UPDATED event')\n\nexport const formSupportOnlineChanges = Joi.object<FormSupportOnlineChanges>()\n .keys({\n url: onlineUrlSchema.optional(),\n text: onlineTextSchema.optional()\n })\n .required()\n .description('Changes schema for FORM_SUPPORT_ONLINE_UPDATED event')\n\nexport const formSupportEmailChanges = Joi.object<FormSupportEmailChanges>()\n .keys({\n address: emailAddressSchema.optional(),\n responseTime: emailResponseTimeSchema.optional()\n })\n .description('Changes schema for FORM_SUPPORT_EMAIL_UPDATED event')\n\nexport const formPrivacyNoticeChanges = Joi.object<FormPrivacyNoticeChanges>()\n .keys({\n privacyNoticeType: privacyNoticeTypeSchema,\n privacyNoticeText: Joi.when('privacyNoticeType', {\n is: 'text',\n then: privacyNoticeTextSchema,\n otherwise: privacyNoticeTextSchema.allow('')\n }),\n privacyNoticeUrl: Joi.when('privacyNoticeType', {\n is: 'link',\n then: privacyNoticeUrlSchema,\n otherwise: privacyNoticeUrlSchema.allow('')\n })\n })\n .required()\n .description('Changes schema for FORM_PRIVACY_NOTICE_UPDATED event')\n\nexport const formTermsAndConditionsChanges =\n Joi.object<FormTermsAndConditionsChanges>()\n .keys({\n termsAndConditionsAgreed: termsAndConditionsAgreedSchema\n })\n .required()\n .description('Changes schema for FORM_TERMS_AND_CONDITIONS_AGREED event')\n\nexport const formNotificationEmailChanges =\n Joi.object<FormNotificationEmailChanges>()\n .keys({\n notificationEmail: notificationEmailAddressSchema\n })\n .required()\n .description('Changes schema for FORM_NOTIFICATION_EMAIL_UPDATED event')\n\nexport const formSubmissionGuidanceChanges =\n Joi.object<FormSubmissionGuidanceChanges>()\n .keys({\n submissionGuidance: submissionGuidanceSchema\n })\n .required()\n .description('Changes schema for FORM_SUBMISSION_GUIDANCE_UPDATED event')\n\nexport const formUploadedChanges = Joi.object<FormUploadedChanges>()\n .keys({\n value: Joi.string().required()\n })\n .required()\n .description('Changes schema for FORM_JSON_UPLOADED event')\n\nexport const entitlementMessageData = Joi.object<EntitlementMessageData>().keys(\n {\n userId: Joi.string().required(),\n displayName: Joi.string().required(),\n email: Joi.string().email().required(),\n roles: Joi.array().items(Joi.string())\n }\n)\n\nexport const formFileDownloadedMessageData =\n Joi.object<FormFileDownloadedMessageData>()\n .keys({\n fileId: Joi.string().required(),\n filename: Joi.string().required(),\n fileLink: Joi.string().required()\n })\n .required()\n .description(\n 'Schema for FORM_FILE_DOWNLOAD_SUCCESS and FORM_FILE_DOWNLOAD_FAILURE events'\n )\n\nexport const excelGenerationMessageData =\n Joi.object<ExcelGenerationMessageData>()\n .keys({\n formId: Joi.string().required(),\n formName: Joi.string().required(),\n notificationEmail: Joi.string().email().required()\n })\n .required()\n .description(\n 'Schema for Excel generation audit events (submissions and CSAT)'\n )\n\nexport const authenticationMessageData =\n Joi.object<AuthenticationMessageData>().keys({\n userId: Joi.string().required(),\n displayName: Joi.string().required()\n })\n\nexport const auditUserSchema = Joi.object<AuditUser>()\n .keys({\n id: Joi.string().required(),\n displayName: Joi.string().required()\n })\n .description('Schema for CREATED_BY audit event')\n\nexport function formChangesMessageData<T, U extends FormMessageChangesData>(\n schema: ObjectSchema<T>\n): ObjectSchema<U> {\n return formMessageDataBase.append<U>({\n changes: Joi.object<ChangesMessageData<T>>()\n .keys({\n previous: schema,\n new: schema\n })\n .description('Changes schema')\n })\n}\n\nexport const messageSchema = Joi.object<AuditMessage>()\n .keys({\n schemaVersion: Joi.string()\n .valid(...Object.values(AuditEventMessageSchemaVersion))\n .required()\n .description(\n 'The version of the AuditMessage - bumped with breaking changes'\n ),\n category: Joi.string()\n .valid(...Object.values(AuditEventMessageCategory))\n .required()\n .description('The message category - what does the entityId represent?'),\n source: Joi.string()\n .valid(...Object.values(AuditEventMessageSource))\n .required()\n .description('Source of the message - which service?'),\n type: Joi.string()\n .valid(...Object.values(AuditEventMessageType))\n .description('Event type'),\n entityId: Joi.string()\n .required()\n .description('The id of the entity the category relates to'),\n traceId: Joi.string()\n .optional()\n .description(\n 'Trace id of the event - to link events across multiple services'\n ),\n createdAt: Joi.date()\n .required()\n .description(\n 'The ISO timestamp where the action took place - should be the same as updated_at field in DB'\n ),\n createdBy: auditUserSchema\n .required()\n .description('The user who performed the action being audited'),\n data: Joi.when('type', {\n switch: [\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_CREATED),\n then: formCreatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TITLE_UPDATED),\n then: formChangesMessageData<\n FormTitleChanges,\n FormTitleUpdatedMessageData\n >(formTitleChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_ORGANISATION_UPDATED),\n then: formChangesMessageData<\n FormOrganisationChanges,\n FormOrganisationUpdatedMessageData\n >(formOrganisationChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_NAME_UPDATED),\n then: formChangesMessageData<\n FormTeamNameChanges,\n FormTeamNameUpdatedMessageData\n >(formTeamNameChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormTeamEmailChanges,\n FormTeamEmailUpdatedMessageData\n >(formTeamEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED),\n then: formChangesMessageData<\n FormSupportContactChanges,\n FormSupportContactUpdatedMessageData\n >(formSupportContactChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED),\n then: formChangesMessageData<\n FormSupportPhoneChanges,\n FormSupportPhoneUpdatedMessageData\n >(formSupportPhoneChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormSupportEmailChanges,\n FormSupportEmailUpdatedMessageData\n >(formSupportEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED),\n then: formChangesMessageData<\n FormSupportOnlineChanges,\n FormSupportOnlineUpdatedMessageData\n >(formSupportOnlineChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED),\n then: formChangesMessageData<\n FormPrivacyNoticeChanges,\n FormPrivacyNoticeUpdatedMessageData\n >(formPrivacyNoticeChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_TERMS_AND_CONDITIONS_AGREED),\n then: formChangesMessageData<\n FormTermsAndConditionsChanges,\n FormTermsAndConditionsAgreedMessageData\n >(formTermsAndConditionsChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED),\n then: formChangesMessageData<\n FormNotificationEmailChanges,\n FormNotificationEmailUpdatedMessageData\n >(formNotificationEmailChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED),\n then: formChangesMessageData<\n FormSubmissionGuidanceChanges,\n FormSubmissionGuidanceUpdatedMessageData\n >(formSubmissionGuidanceChanges)\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_UPLOADED),\n then: formChangesMessageData<\n FormUploadedChanges,\n FormUploadedMessageData\n >(formUploadedChanges)\n },\n {\n is: Joi.string().trim().valid(AuditEventMessageType.FORM_UPDATED),\n then: formUpdatedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.ENTITLEMENT_CREATED,\n AuditEventMessageType.ENTITLEMENT_UPDATED,\n AuditEventMessageType.ENTITLEMENT_DELETED\n ),\n then: entitlementMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_DRAFT_DELETED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_JSON_DOWNLOADED),\n then: formMessageDataBase\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.AUTHENTICATION_LOGIN,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO,\n AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n ),\n then: authenticationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS,\n AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n ),\n then: formFileDownloadedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(\n AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED,\n AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED,\n AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n ),\n then: excelGenerationMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORMS_BACKUP_REQUESTED),\n then: formsBackupRequestedMessageData\n },\n {\n is: Joi.string()\n .trim()\n .valid(AuditEventMessageType.FORM_SECRET_SAVED),\n then: formsSecretSavedMessageData\n }\n ],\n otherwise: Joi.forbidden()\n }).description('The data/payload of the audit message'),\n messageCreatedAt: Joi.date()\n .required()\n .description('ISO timestamp when the message was published')\n })\n .required()\n .description('The audit message issued by the publishing service')\n\nexport const auditEvent = Joi.object<AuditEvent>()\n .keys({\n message: messageSchema\n })\n .description('The Body of the audit event')\n\nexport const auditRecord = messageSchema\n .append<AuditRecord>({\n id: idSchema,\n messageId: Joi.string().uuid().required(),\n entityId: Joi.string().required(),\n recordCreatedAt: Joi.date().required()\n })\n .description('The audit record persisted into the DB')\n"],"mappings":"AAAA,OAAOA,GAAG,MAA6B,KAAK;AAE5C,SACEC,yBAAyB,EACzBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,qBAAqB,EACrBC,yBAAyB;AA8C3B,SACEC,aAAa,EACbC,kBAAkB,EAClBC,uBAAuB,EACvBC,QAAQ,EACRC,8BAA8B,EAC9BC,gBAAgB,EAChBC,eAAe,EACfC,kBAAkB,E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AE7F,QAAQ;EACZoJ,SAAS,EAAE7J,GAAG,CAACyC,MAAM,CAAC,CAAC,CAACqH,IAAI,CAAC,CAAC,CAAChI,QAAQ,CAAC,CAAC;EACzCmF,QAAQ,EAAEjH,GAAG,CAACyC,MAAM,CAAC,CAAC,CAACX,QAAQ,CAAC,CAAC;EACjCiI,eAAe,EAAE/J,GAAG,CAACoH,IAAI,CAAC,CAAC,CAACtF,QAAQ,CAAC;AACvC,CAAC,CAAC,CACDC,WAAW,CAAC,wCAAwC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-audit/types.ts"],"sourcesContent":["import {\n type AuditEventMessageCategory,\n type AuditEventMessageSchemaVersion,\n type AuditEventMessageSource,\n type AuditEventMessageType,\n type FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport { type FormMetadataContact } from '~/src/form/form-metadata/types.js'\n\nexport interface FormMessageDataBase {\n formId: string\n slug: string\n payload?: unknown\n}\n\nexport interface ChangesMessageData<T> {\n previous: T\n new: T\n}\n\nexport interface FormCreatedMessageData extends FormMessageDataBase {\n title: string\n organisation: string\n teamName: string\n teamEmail: string\n}\n\nexport interface FormTitleChanges {\n title: string\n}\n\nexport interface FormOrganisationChanges {\n organisation: string\n}\n\nexport interface FormTeamNameChanges {\n teamName: string\n}\n\nexport interface FormTeamEmailChanges {\n teamEmail: string\n}\n\nexport interface FormSupportContactChanges {\n contact?: FormMetadataContact\n}\n\nexport interface FormSupportPhoneChanges {\n phone?: string\n}\n\nexport interface FormSupportEmailChanges {\n address?: string\n responseTime?: string\n}\n\nexport interface FormSupportOnlineChanges {\n url?: string\n text?: string\n}\n\nexport interface FormPrivacyNoticeChanges {\n privacyNoticeType?: string\n privacyNoticeText?: string\n privacyNoticeUrl?: string\n}\n\nexport interface FormTermsAndConditionsChanges {\n termsAndConditionsAgreed?: boolean\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 FormTermsAndConditionsAgreedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormTermsAndConditionsChanges>\n}\n\nexport interface FormNotificationEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormNotificationEmailChanges>\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSubmissionGuidanceChanges>\n}\n\nexport interface FormUploadedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormUploadedChanges>\n}\n\nexport interface FormFileDownloadedMessageData {\n fileId: string\n filename: string\n fileLink: string\n}\n\nexport interface ExcelGenerationMessageData {\n formId: string\n formName: string\n notificationEmail: string\n}\n\nexport interface FormSecretSavedMessageData extends FormMessageDataBase {\n formId: string\n secretName: string\n}\n\nexport interface FormDefinitionS3Meta {\n fileId: string\n filename: string\n s3Key: string\n}\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n requestType: FormDefinitionRequestType\n s3Meta?: FormDefinitionS3Meta\n}\n\nexport type FormMessageChangesData =\n | FormTitleUpdatedMessageData\n | FormOrganisationUpdatedMessageData\n | FormTeamNameUpdatedMessageData\n | FormTeamEmailUpdatedMessageData\n | FormSupportContactUpdatedMessageData\n | FormSupportPhoneUpdatedMessageData\n | FormSupportEmailUpdatedMessageData\n | FormSupportOnlineUpdatedMessageData\n | FormPrivacyNoticeUpdatedMessageData\n | FormTermsAndConditionsAgreedMessageData\n | FormNotificationEmailUpdatedMessageData\n | FormSubmissionGuidanceUpdatedMessageData\n | FormUploadedMessageData\n\nexport type FormMessageActivitiesData =\n | FormCreatedMessageData\n | FormMessageDataBase\n | FormFileDownloadedMessageData\n\nexport interface EntitlementMessageData {\n userId: string\n displayName: string\n email: string\n roles: string[]\n}\n\nexport interface AuthenticationMessageData {\n userId: string\n displayName: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport interface FormsBackupRequestedMessageData {\n totalForms: number\n durationMs: number\n}\n\nexport type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\n | FormFileDownloadedMessageData\n | FormsBackupRequestedMessageData\n | FormSecretSavedMessage\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n source: AuditEventMessageSource\n type: AuditEventMessageType\n entityId: string\n traceId?: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface ManagerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_MANAGER\n}\nexport interface DesignerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_DESIGNER\n}\n\nexport interface EntitlementMessageBase extends MessageBase {\n source: AuditEventMessageSource.ENTITLEMENT\n}\n\nexport interface AuthenticationMessageBase extends MessageBase {\n source: AuditEventMessageSource.AUTHENTICATION\n}\n\nexport interface FormCreatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportContactUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED\n data: FormSupportContactUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormTermsAndConditionsAgreedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TERMS_AND_CONDITIONS_AGREED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormTermsAndConditionsAgreedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n data: FormMessageDataBase\n}\n\nexport interface FormFileDownloadSuccessMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormFileDownloadFailureMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\n data: FormUpdatedMessageData\n}\n\nexport interface EntitlementCreatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_CREATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementUpdatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_UPDATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementDeletedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_DELETED\n data: EntitlementMessageData\n}\n\nexport interface AuthenticationLoginMessage extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGIN\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutManualMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutAutoMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutDifferentDeviceMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n data: AuthenticationMessageData\n}\n\nexport interface FormSubmissionExcelRequestedMessage\n extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface PlatformCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormsBackupRequestedMessage extends DesignerMessageBase {\n type: AuditEventMessageType.FORMS_BACKUP_REQUESTED\n data: FormsBackupRequestedMessageData\n}\n\nexport interface FormSecretSavedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SECRET_SAVED\n data: FormSecretSavedMessageData\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 | FormTermsAndConditionsAgreedMessage\n | FormNotificationEmailUpdatedMessage\n | FormSubmissionGuidanceUpdatedMessage\n | FormUploadedMessage\n | FormDownloadedMessage\n | FormFileDownloadSuccessMessage\n | FormFileDownloadFailureMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n | EntitlementCreatedMessage\n | EntitlementUpdatedMessage\n | EntitlementDeletedMessage\n | AuthenticationLoginMessage\n | AuthenticationLogoutManualMessage\n | AuthenticationLogoutAutoMessage\n | AuthenticationLogoutDifferentDeviceMessage\n | FormSubmissionExcelRequestedMessage\n | FormCsatExcelRequestedMessage\n | PlatformCsatExcelRequestedMessage\n | FormsBackupRequestedMessage\n | FormSecretSavedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport interface AuditMetaBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface AuditInputMeta extends AuditMetaBase {\n id: string\n}\n\nexport type AuditRecordInput = AuditMessage & AuditMetaBase\n\nexport type AuditRecord = AuditMessage & AuditInputMeta\n\nexport interface MessageBody {\n Message: string\n}\n\n/**\n * Consolidated audit record that represents multiple grouped events.\n * Combines AuditRecord with consolidation metadata.\n */\nexport type ConsolidatedAuditRecord = AuditRecord & {\n /** Number of events consolidated into this record */\n consolidatedCount: number\n /** Timestamp of the earliest event in the group */\n consolidatedFrom: Date\n /** Timestamp of the latest event in the group */\n consolidatedTo: Date\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/form/form-audit/types.ts"],"sourcesContent":["import {\n type AuditEventMessageCategory,\n type AuditEventMessageSchemaVersion,\n type AuditEventMessageSource,\n type AuditEventMessageType,\n type FormDefinitionRequestType\n} from '~/src/form/form-audit/enums.js'\nimport { type FormMetadataContact } from '~/src/form/form-metadata/types.js'\n\nexport interface FormMessageDataBase {\n formId: string\n slug: string\n payload?: unknown\n}\n\nexport interface ChangesMessageData<T> {\n previous: T\n new: T\n}\n\nexport interface FormCreatedMessageData extends FormMessageDataBase {\n title: string\n organisation: string\n teamName: string\n teamEmail: string\n}\n\nexport interface FormTitleChanges {\n title: string\n}\n\nexport interface FormOrganisationChanges {\n organisation: string\n}\n\nexport interface FormTeamNameChanges {\n teamName: string\n}\n\nexport interface FormTeamEmailChanges {\n teamEmail: string\n}\n\nexport interface FormSupportContactChanges {\n contact?: FormMetadataContact\n}\n\nexport interface FormSupportPhoneChanges {\n phone?: string\n}\n\nexport interface FormSupportEmailChanges {\n address?: string\n responseTime?: string\n}\n\nexport interface FormSupportOnlineChanges {\n url?: string\n text?: string\n}\n\nexport interface FormPrivacyNoticeChanges {\n privacyNoticeType?: string\n privacyNoticeText?: string\n privacyNoticeUrl?: string\n}\n\nexport interface FormTermsAndConditionsChanges {\n termsAndConditionsAgreed?: boolean\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 FormTermsAndConditionsAgreedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormTermsAndConditionsChanges>\n}\n\nexport interface FormNotificationEmailUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormNotificationEmailChanges>\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessageData\n extends FormMessageDataBase {\n changes: ChangesMessageData<FormSubmissionGuidanceChanges>\n}\n\nexport interface FormUploadedMessageData extends FormMessageDataBase {\n changes: ChangesMessageData<FormUploadedChanges>\n}\n\nexport interface FormFileDownloadedMessageData {\n fileId: string\n filename: string\n fileLink: string\n}\n\nexport interface ExcelGenerationMessageData {\n formId: string\n formName: string\n notificationEmail: string\n}\n\nexport interface FormSecretSavedMessageData extends FormMessageDataBase {\n formId: string\n slug: string\n secretName: string\n}\n\nexport interface FormDefinitionS3Meta {\n fileId: string\n filename: string\n s3Key: string\n}\n\nexport interface FormUpdatedMessageData extends FormMessageDataBase {\n requestType: FormDefinitionRequestType\n s3Meta?: FormDefinitionS3Meta\n}\n\nexport type FormMessageChangesData =\n | FormTitleUpdatedMessageData\n | FormOrganisationUpdatedMessageData\n | FormTeamNameUpdatedMessageData\n | FormTeamEmailUpdatedMessageData\n | FormSupportContactUpdatedMessageData\n | FormSupportPhoneUpdatedMessageData\n | FormSupportEmailUpdatedMessageData\n | FormSupportOnlineUpdatedMessageData\n | FormPrivacyNoticeUpdatedMessageData\n | FormTermsAndConditionsAgreedMessageData\n | FormNotificationEmailUpdatedMessageData\n | FormSubmissionGuidanceUpdatedMessageData\n | FormUploadedMessageData\n\nexport type FormMessageActivitiesData =\n | FormCreatedMessageData\n | FormMessageDataBase\n | FormFileDownloadedMessageData\n\nexport interface EntitlementMessageData {\n userId: string\n displayName: string\n email: string\n roles: string[]\n}\n\nexport interface AuthenticationMessageData {\n userId: string\n displayName: string\n}\n\nexport interface AuditUser {\n id: string\n displayName: string\n}\n\nexport interface FormsBackupRequestedMessageData {\n totalForms: number\n durationMs: number\n}\n\nexport type MessageData =\n | FormMessageChangesData\n | FormMessageActivitiesData\n | FormUpdatedMessageData\n | EntitlementMessageData\n | AuthenticationMessageData\n | ExcelGenerationMessageData\n | FormFileDownloadedMessageData\n | FormsBackupRequestedMessageData\n | FormSecretSavedMessageData\n\nexport interface MessageBase {\n schemaVersion: AuditEventMessageSchemaVersion\n category: AuditEventMessageCategory\n source: AuditEventMessageSource\n type: AuditEventMessageType\n entityId: string\n traceId?: string\n createdAt: Date\n createdBy: AuditUser\n data?: MessageData\n messageCreatedAt: Date\n}\n\nexport interface ManagerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_MANAGER\n}\nexport interface DesignerMessageBase extends MessageBase {\n source: AuditEventMessageSource.FORMS_DESIGNER\n}\n\nexport interface EntitlementMessageBase extends MessageBase {\n source: AuditEventMessageSource.ENTITLEMENT\n}\n\nexport interface AuthenticationMessageBase extends MessageBase {\n source: AuditEventMessageSource.AUTHENTICATION\n}\n\nexport interface FormCreatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CREATED\n data: FormCreatedMessageData\n}\n\nexport interface FormTitleUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TITLE_UPDATED\n data: FormTitleUpdatedMessageData\n}\n\nexport interface FormOrganisationUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_ORGANISATION_UPDATED\n data: FormOrganisationUpdatedMessageData\n}\n\nexport interface FormTeamNameUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_NAME_UPDATED\n data: FormTeamNameUpdatedMessageData\n}\n\nexport interface FormTeamEmailUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TEAM_EMAIL_UPDATED\n data: FormTeamEmailUpdatedMessageData\n}\n\nexport interface FormSupportContactUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_CONTACT_UPDATED\n data: FormSupportContactUpdatedMessageData\n}\n\nexport interface FormSupportPhoneUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_PHONE_UPDATED\n data: FormSupportPhoneUpdatedMessageData\n}\n\nexport interface FormSupportEmailUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_EMAIL_UPDATED\n data: FormSupportEmailUpdatedMessageData\n}\n\nexport interface FormSupportOnlineUpdatedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUPPORT_ONLINE_UPDATED\n data: FormSupportOnlineUpdatedMessageData\n}\n\nexport interface FormPrivacyNoticeUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_PRIVACY_NOTICE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormPrivacyNoticeUpdatedMessageData\n}\n\nexport interface FormTermsAndConditionsAgreedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_TERMS_AND_CONDITIONS_AGREED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormTermsAndConditionsAgreedMessageData\n}\n\nexport interface FormNotificationEmailUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_NOTIFICATION_EMAIL_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormNotificationEmailUpdatedMessageData\n}\n\nexport interface FormSubmissionGuidanceUpdatedMessage\n extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_GUIDANCE_UPDATED\n source: AuditEventMessageSource.FORMS_MANAGER\n data: FormSubmissionGuidanceUpdatedMessageData\n}\n\nexport interface FormUploadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_UPLOADED\n data: FormUploadedMessageData\n}\n\nexport interface FormDownloadedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_JSON_DOWNLOADED\n data: FormMessageDataBase\n}\n\nexport interface FormFileDownloadSuccessMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_SUCCESS\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormFileDownloadFailureMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_FILE_DOWNLOAD_FAILURE\n data: FormFileDownloadedMessageData\n}\n\nexport interface FormDraftCreatedFromLiveMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_CREATED_FROM_LIVE\n}\n\nexport interface FormLiveCreatedFromDraftMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_LIVE_CREATED_FROM_DRAFT\n}\n\nexport interface FormDraftDeletedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_DRAFT_DELETED\n}\n\nexport interface FormMigratedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_MIGRATED\n}\n\nexport interface FormUpdatedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_UPDATED\n data: FormUpdatedMessageData\n}\n\nexport interface EntitlementCreatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_CREATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementUpdatedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_UPDATED\n data: EntitlementMessageData\n}\n\nexport interface EntitlementDeletedMessage extends EntitlementMessageBase {\n category: AuditEventMessageCategory.ENTITLEMENT\n type: AuditEventMessageType.ENTITLEMENT_DELETED\n data: EntitlementMessageData\n}\n\nexport interface AuthenticationLoginMessage extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGIN\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutManualMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_MANUAL\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutAutoMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_AUTO\n data: AuthenticationMessageData\n}\n\nexport interface AuthenticationLogoutDifferentDeviceMessage\n extends AuthenticationMessageBase {\n category: AuditEventMessageCategory.AUTHENTICATION\n type: AuditEventMessageType.AUTHENTICATION_LOGOUT_DIFFERENT_DEVICE\n data: AuthenticationMessageData\n}\n\nexport interface FormSubmissionExcelRequestedMessage\n extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SUBMISSION_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface PlatformCsatExcelRequestedMessage extends DesignerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.PLATFORM_CSAT_EXCEL_REQUESTED\n data: ExcelGenerationMessageData\n}\n\nexport interface FormsBackupRequestedMessage extends DesignerMessageBase {\n type: AuditEventMessageType.FORMS_BACKUP_REQUESTED\n data: FormsBackupRequestedMessageData\n}\n\nexport interface FormSecretSavedMessage extends ManagerMessageBase {\n category: AuditEventMessageCategory.FORM\n type: AuditEventMessageType.FORM_SECRET_SAVED\n data: FormSecretSavedMessageData\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 | FormTermsAndConditionsAgreedMessage\n | FormNotificationEmailUpdatedMessage\n | FormSubmissionGuidanceUpdatedMessage\n | FormUploadedMessage\n | FormDownloadedMessage\n | FormFileDownloadSuccessMessage\n | FormFileDownloadFailureMessage\n | FormDraftCreatedFromLiveMessage\n | FormLiveCreatedFromDraftMessage\n | FormDraftDeletedMessage\n | FormMigratedMessage\n | FormUpdatedMessage\n | EntitlementCreatedMessage\n | EntitlementUpdatedMessage\n | EntitlementDeletedMessage\n | AuthenticationLoginMessage\n | AuthenticationLogoutManualMessage\n | AuthenticationLogoutAutoMessage\n | AuthenticationLogoutDifferentDeviceMessage\n | FormSubmissionExcelRequestedMessage\n | FormCsatExcelRequestedMessage\n | PlatformCsatExcelRequestedMessage\n | FormsBackupRequestedMessage\n | FormSecretSavedMessage\n\nexport interface AuditEvent {\n message: AuditMessage\n}\n\nexport interface AuditMetaBase {\n messageId: string\n recordCreatedAt: Date\n}\n\nexport interface AuditInputMeta extends AuditMetaBase {\n id: string\n}\n\nexport type AuditRecordInput = AuditMessage & AuditMetaBase\n\nexport type AuditRecord = AuditMessage & AuditInputMeta\n\nexport interface MessageBody {\n Message: string\n}\n\n/**\n * Consolidated audit record that represents multiple grouped events.\n * Combines AuditRecord with consolidation metadata.\n */\nexport type ConsolidatedAuditRecord = AuditRecord & {\n /** Number of events consolidated into this record */\n consolidatedCount: number\n /** Timestamp of the earliest event in the group */\n consolidatedFrom: Date\n /** Timestamp of the latest event in the group */\n consolidatedTo: Date\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -65,6 +65,7 @@ export const jsEnabledSchema = Joi.string().trim().optional().allow('false', 'tr
|
|
|
65
65
|
export const usePostcodeLookupSchema = Joi.string().trim().optional().valid('', 'true').description('Indicates whether a UK address component supports postcode lookup. Empty string or "true" values are accepted.');
|
|
66
66
|
export const paymentDescriptionSchema = Joi.string().trim().max(230).required().description('Description of payment - appears in payment providers pages');
|
|
67
67
|
export const paymentAmountSchema = Joi.number().empty('').min(0.3).max(100000).description('Amount of payment in pounds');
|
|
68
|
+
export const paymentApiKeySchema = Joi.string().trim().description('API key for payment configuration');
|
|
68
69
|
export const customValidator = Joi.extend(joi => {
|
|
69
70
|
return {
|
|
70
71
|
type: 'dsv',
|
|
@@ -198,6 +199,7 @@ export const questionDetailsFullSchema = {
|
|
|
198
199
|
minSchema,
|
|
199
200
|
nameSchema,
|
|
200
201
|
paymentAmountSchema,
|
|
202
|
+
paymentApiKeySchema,
|
|
201
203
|
paymentDescriptionSchema,
|
|
202
204
|
precisionSchema,
|
|
203
205
|
prefixSchema,
|