Drop n8n createDraftVersion, add body to update
Remove the createDraftVersion document operation from the n8n node and instead expose the document body on the update operation. Updating the body edits the current draft version, or creates one from the latest published version when none exists, so a dedicated draft-creation operation is redundant. Also correct the content field help text across the document operations: the API expects a ProseMirror document JSON string, not markdown. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -23,7 +23,6 @@ import * as unarchiveOp from './unarchive.operation';
|
||||
import * as getVersionOp from './getVersion.operation';
|
||||
import * as getLatestPublishedVersionIdOp from './getLatestPublishedVersionId.operation';
|
||||
import * as getAllVersionsOp from './getAllVersions.operation';
|
||||
import * as createDraftVersionOp from './createDraftVersion.operation';
|
||||
import * as updateVersionOp from './updateVersion.operation';
|
||||
import * as deleteDraftVersionOp from './deleteDraftVersion.operation';
|
||||
import * as publishOp from './publish.operation';
|
||||
@@ -67,12 +66,6 @@ export const description: INodeProperties[] = [
|
||||
description: 'Create a new document',
|
||||
action: 'Create a document',
|
||||
},
|
||||
{
|
||||
name: 'Create Draft Version',
|
||||
value: 'createDraftVersion',
|
||||
description: 'Create a new draft version from the latest published version',
|
||||
action: 'Create a draft document version',
|
||||
},
|
||||
{
|
||||
name: 'Delete',
|
||||
value: 'delete',
|
||||
@@ -200,7 +193,6 @@ export const description: INodeProperties[] = [
|
||||
...getVersionOp.description,
|
||||
...getLatestPublishedVersionIdOp.description,
|
||||
...getAllVersionsOp.description,
|
||||
...createDraftVersionOp.description,
|
||||
...updateVersionOp.description,
|
||||
...deleteDraftVersionOp.description,
|
||||
...publishOp.description,
|
||||
@@ -226,7 +218,6 @@ export {
|
||||
getVersionOp as getVersion,
|
||||
getLatestPublishedVersionIdOp as getLatestPublishedVersionId,
|
||||
getAllVersionsOp as getAllVersions,
|
||||
createDraftVersionOp as createDraftVersion,
|
||||
updateVersionOp as updateVersion,
|
||||
deleteDraftVersionOp as deleteDraftVersion,
|
||||
publishOp as publish,
|
||||
|
||||
Reference in New Issue
Block a user