Create or update a Draft in the local store and sync it with remote drafts.
Will also handle cleaning up auto save data (if the autoSaveKey property is
passed).
Example
constabortController = newAbortController() constformSubmissionDraftId = 'd3aeb944-d0b3-11ea-87d0-0242ac130003'// pass `undefined` to create a new draft constautoSaveKey = 'SET ME TO DELETE AUTOSAVE DATA AFTER SAVING DRAFT' constdraftSubmissionInput = { title:1, formsAppId:1, submission: { form:'data', goes:'here', }, definition: { form:'definition', goes:'here', }, } awaitdraftService.upsertDraft({ formSubmissionDraftId, autoSaveKey, draftSubmissionInput, abortSignal:abortController.signal, onProgress: (progress) => { // ... }, })
Create or update a Draft in the local store and sync it with remote drafts. Will also handle cleaning up auto save data (if the
autoSaveKeyproperty is passed).Example