diff --git a/package-lock.json b/package-lock.json index 2d9d06e..5cea0df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2086,7 +2086,7 @@ }, "node_modules/@oneblink/types": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/oneblink/types.git#4a3fbd809a2094d1606ce5ee29ea9ccf0031928b", + "resolved": "git+ssh://git@github.com/oneblink/types.git#69414e93190c9ffa4d2a8ff0cc0b948d588fc3cd", "dev": true, "engines": { "node": ">=16", diff --git a/src/OneBlinkUploader.ts b/src/OneBlinkUploader.ts index 5980ba4..756e0f5 100644 --- a/src/OneBlinkUploader.ts +++ b/src/OneBlinkUploader.ts @@ -228,17 +228,11 @@ export default class OneBlinkUploader { createdAt, title, lastElementUpdated, - localKey, onProgress, abortSignal, }: UploadFormSubmissionOptions & { - /** - * The identifier of the draft that a new version should be created for. Set - * to `undefined` to create a new draft. - */ - formSubmissionDraftId?: string - /** The identifier used to store the draft locally for offline capability */ - localKey: string + /** The identifier of the draft that a new version should be created for. */ + formSubmissionDraftId: string /** * The date and time (in ISO format) when the draft data was saved by a * user. @@ -261,16 +255,13 @@ export default class OneBlinkUploader { jobId, }) - let key = 'form-submission-drafts' - if (formSubmissionDraftId) { - key += `/${formSubmissionDraftId}` - } + tags.append('formSubmissionDraftId', formSubmissionDraftId) return await uploadToS3({ ...this, contentType: 'application/json', body: JSON.stringify(newS3SubmissionData), - key, + key: 'form-submission-draft-versions', tags, abortSignal, onProgress, @@ -283,9 +274,9 @@ export default class OneBlinkUploader { taskGroupInstanceId, jobId, previousFormSubmissionApprovalId, - localKey, createdAt, title, + formSubmissionDraftId, }, }) }