@defra/forms-model 3.0.706 → 3.0.708

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.
Files changed (49) hide show
  1. package/dist/module/components/component-types.js +7 -0
  2. package/dist/module/components/component-types.js.map +1 -1
  3. package/dist/module/components/enums.js +1 -0
  4. package/dist/module/components/enums.js.map +1 -1
  5. package/dist/module/components/types.js.map +1 -1
  6. package/dist/module/conditions/condition-operators.js +2 -1
  7. package/dist/module/conditions/condition-operators.js.map +1 -1
  8. package/dist/module/form/form-editor/preview/helpers.js +2 -0
  9. package/dist/module/form/form-editor/preview/helpers.js.map +1 -1
  10. package/dist/module/form/form-editor/preview/index.js +1 -0
  11. package/dist/module/form/form-editor/preview/index.js.map +1 -1
  12. package/dist/module/form/form-editor/preview/tracking.js +9 -0
  13. package/dist/module/form/form-editor/preview/tracking.js.map +1 -0
  14. package/dist/module/form/form-editor/translations/translations-config.js +1 -1
  15. package/dist/module/form/form-editor/translations/translations-config.js.map +1 -1
  16. package/dist/module/form/form-submission/enums.js +1 -0
  17. package/dist/module/form/form-submission/enums.js.map +1 -1
  18. package/dist/module/form/form-submission/index.js +21 -1
  19. package/dist/module/form/form-submission/index.js.map +1 -1
  20. package/dist/module/form/form-submission/types.js.map +1 -1
  21. package/dist/types/components/component-types.d.ts.map +1 -1
  22. package/dist/types/components/enums.d.ts +1 -0
  23. package/dist/types/components/enums.d.ts.map +1 -1
  24. package/dist/types/components/types.d.ts +7 -1
  25. package/dist/types/components/types.d.ts.map +1 -1
  26. package/dist/types/conditions/condition-operators.d.ts.map +1 -1
  27. package/dist/types/form/form-editor/preview/helpers.d.ts.map +1 -1
  28. package/dist/types/form/form-editor/preview/index.d.ts +1 -0
  29. package/dist/types/form/form-editor/preview/tracking.d.ts +4 -0
  30. package/dist/types/form/form-editor/preview/tracking.d.ts.map +1 -0
  31. package/dist/types/form/form-editor/translations/translations-config.d.ts.map +1 -1
  32. package/dist/types/form/form-submission/enums.d.ts +2 -1
  33. package/dist/types/form/form-submission/enums.d.ts.map +1 -1
  34. package/dist/types/form/form-submission/index.d.ts +2 -1
  35. package/dist/types/form/form-submission/index.d.ts.map +1 -1
  36. package/dist/types/form/form-submission/types.d.ts +44 -2
  37. package/dist/types/form/form-submission/types.d.ts.map +1 -1
  38. package/package.json +1 -1
  39. package/src/components/component-types.ts +8 -0
  40. package/src/components/enums.ts +1 -0
  41. package/src/components/types.ts +8 -0
  42. package/src/conditions/condition-operators.ts +2 -1
  43. package/src/form/form-editor/preview/helpers.js +2 -0
  44. package/src/form/form-editor/preview/index.js +1 -0
  45. package/src/form/form-editor/preview/tracking.js +9 -0
  46. package/src/form/form-editor/translations/translations-config.js +2 -1
  47. package/src/form/form-submission/enums.ts +2 -1
  48. package/src/form/form-submission/index.ts +25 -1
  49. package/src/form/form-submission/types.ts +49 -2
@@ -174,19 +174,48 @@ export interface SaveAndExitMessageData {
174
174
  state: object
175
175
  }
176
176
 
177
+ export interface SaveAndExitV2MessageData {
178
+ magicLinkGroupId?: string
179
+ form: {
180
+ id: string
181
+ title: string
182
+ status: FormStatus
183
+ isPreview: boolean
184
+ baseUrl: string
185
+ }
186
+ email: string
187
+ auth: {
188
+ sub: string
189
+ issuer: string
190
+ }
191
+ state: object
192
+ }
193
+
177
194
  export interface SaveAndExitMessage {
178
195
  schemaVersion: SubmissionEventMessageSchemaVersion
179
196
  source: SubmissionEventMessageSource
180
197
  createdAt: Date
181
198
  messageCreatedAt: Date
182
199
  category: SubmissionEventMessageCategory.RUNNER
183
- type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT
200
+ type:
201
+ | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT
202
+ | SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2
184
203
  data: SaveAndExitMessageData
185
204
  }
186
205
 
206
+ export interface SaveAndExitV2Message {
207
+ schemaVersion: SubmissionEventMessageSchemaVersion
208
+ source: SubmissionEventMessageSource
209
+ createdAt: Date
210
+ messageCreatedAt: Date
211
+ category: SubmissionEventMessageCategory.RUNNER
212
+ type: SubmissionEventMessageType.RUNNER_SAVE_AND_EXIT_V2
213
+ data: SaveAndExitV2MessageData
214
+ }
215
+
187
216
  export interface SaveAndExitRecord {
188
217
  magicLinkId: string
189
- magicLinkGroupId: string
218
+ magicLinkGroupId?: string
190
219
  form: {
191
220
  id: string
192
221
  status: FormStatus
@@ -203,6 +232,24 @@ export interface SaveAndExitRecord {
203
232
  createdAt: Date
204
233
  }
205
234
 
235
+ export interface SaveAndExitV2Record {
236
+ magicLinkId: string
237
+ magicLinkGroupId?: string
238
+ form: {
239
+ id: string
240
+ status: FormStatus
241
+ isPreview: boolean
242
+ baseUrl: string
243
+ }
244
+ email: string
245
+ auth: {
246
+ sub: string
247
+ issuer: string
248
+ }
249
+ state: object
250
+ createdAt: Date
251
+ }
252
+
206
253
  export type RunnerMessage = SaveAndExitMessage
207
254
 
208
255
  export interface RunnerRecordBase {