2021-06-27 02:48:24 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const documentOperations : INodeProperties [ ] = [
2021-06-27 02:48:24 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2021-06-27 02:48:24 -07:00
displayOptions : {
show : {
resource : [
'document' ,
] ,
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
2022-07-10 13:50:51 -07:00
action : 'Create a document' ,
2021-06-27 02:48:24 -07:00
} ,
{
name : 'Get' ,
value : 'get' ,
2022-07-10 13:50:51 -07:00
action : 'Get a document' ,
2021-06-27 02:48:24 -07:00
} ,
{
name : 'Update' ,
value : 'update' ,
2022-07-10 13:50:51 -07:00
action : 'Update a document' ,
2021-06-27 02:48:24 -07:00
} ,
] ,
default : 'create' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2021-06-27 02:48:24 -07:00
2021-12-03 00:44:16 -08:00
export const documentFields : INodeProperties [ ] = [
2021-06-27 02:48:24 -07:00
/* -------------------------------------------------------------------------- */
/* document: create */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Drive Name or ID' ,
2021-06-27 02:48:24 -07:00
name : 'driveId' ,
type : 'options' ,
2022-07-14 13:05:11 -07:00
description : 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2021-06-27 02:48:24 -07:00
typeOptions : {
loadOptionsMethod : 'getDrives' ,
} ,
default : 'myDrive' ,
required : true ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Folder Name or ID' ,
2021-06-27 02:48:24 -07:00
name : 'folderId' ,
type : 'options' ,
2022-07-14 13:05:11 -07:00
description : 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>' ,
2021-06-27 02:48:24 -07:00
typeOptions : {
loadOptionsDependsOn : [
'driveId' ,
] ,
loadOptionsMethod : 'getFolders' ,
} ,
default : '' ,
required : true ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
} ,
{
displayName : 'Title' ,
name : 'title' ,
type : 'string' ,
default : '' ,
required : true ,
displayOptions : {
show : {
operation : [
'create' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
} ,
/* -------------------------------------------------------------------------- */
/* document: get */
/* -------------------------------------------------------------------------- */
{
displayName : 'Doc ID or URL' ,
name : 'documentURL' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
operation : [
'get' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The ID in the document URL (or just paste the whole URL)' ,
2021-06-27 02:48:24 -07:00
} ,
{
2022-05-20 14:47:24 -07:00
displayName : 'Simplify' ,
2021-06-27 02:48:24 -07:00
name : 'simple' ,
type : 'boolean' ,
displayOptions : {
show : {
operation : [
'get' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
default : true ,
2022-05-20 14:47:24 -07:00
description : 'Whether to return a simplified version of the response instead of the raw data' ,
2021-06-27 02:48:24 -07:00
} ,
/* -------------------------------------------------------------------------- */
/* document: update */
/* -------------------------------------------------------------------------- */
{
displayName : 'Doc ID or URL' ,
name : 'documentURL' ,
type : 'string' ,
required : true ,
displayOptions : {
show : {
operation : [
'update' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The ID in the document URL (or just paste the whole URL)' ,
2021-06-27 02:48:24 -07:00
} ,
{
2022-05-20 14:47:24 -07:00
displayName : 'Simplify' ,
2021-06-27 02:48:24 -07:00
name : 'simple' ,
type : 'boolean' ,
displayOptions : {
show : {
operation : [
'update' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
default : true ,
2022-05-20 14:47:24 -07:00
description : 'Whether to return a simplified version of the response instead of the raw data' ,
2021-06-27 02:48:24 -07:00
} ,
{
displayName : 'Actions' ,
name : 'actionsUi' ,
2022-05-06 14:01:25 -07:00
description : 'Actions applied to update the document' ,
2021-06-27 02:48:24 -07:00
type : 'fixedCollection' ,
placeholder : 'Add Action' ,
typeOptions : {
multipleValues : true ,
} ,
default : {
actionFields : [
{
object : 'text' ,
action : 'insert' ,
locationChoice : 'endOfSegmentLocation' ,
index : 0 ,
text : '' ,
} ,
] ,
} ,
displayOptions : {
show : {
operation : [
'update' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
options : [
{
name : 'actionFields' ,
displayName : 'Action Fields' ,
values : [
// Object field
{
displayName : 'Object' ,
name : 'object' ,
type : 'options' ,
options : [
{
name : 'Footer' ,
value : 'footer' ,
} ,
{
name : 'Header' ,
value : 'header' ,
} ,
{
name : 'Named Range' ,
value : 'namedRange' ,
} ,
{
name : 'Page Break' ,
value : 'pageBreak' ,
} ,
{
name : 'Paragraph Bullets' ,
value : 'paragraphBullets' ,
} ,
{
name : 'Positioned Object' ,
value : 'positionedObject' ,
} ,
{
name : 'Table' ,
value : 'table' ,
} ,
{
name : 'Table Column' ,
value : 'tableColumn' ,
} ,
{
name : 'Table Row' ,
value : 'tableRow' ,
} ,
{
name : 'Text' ,
value : 'text' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The update object' ,
2021-06-27 02:48:24 -07:00
default : 'text' ,
} ,
// Action fields (depend on the Object field)
{
displayName : 'Action' ,
name : 'action' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'Find and Replace Text' ,
2021-06-27 02:48:24 -07:00
value : 'replaceAll' ,
} ,
{
name : 'Insert' ,
value : 'insert' ,
} ,
] ,
displayOptions : {
show : {
object : [
'text' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update action' ,
2021-06-27 02:48:24 -07:00
default : '' ,
} ,
{
displayName : 'Action' ,
name : 'action' ,
type : 'options' ,
options : [
{
name : 'Create' ,
value : 'create' ,
} ,
{
name : 'Delete' ,
value : 'delete' ,
} ,
] ,
displayOptions : {
show : {
object : [
'footer' ,
'header' ,
'namedRange' ,
'paragraphBullets' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update action' ,
2021-06-27 02:48:24 -07:00
default : '' ,
} ,
{
displayName : 'Action' ,
name : 'action' ,
type : 'options' ,
options : [
{
name : 'Delete' ,
value : 'delete' ,
} ,
{
name : 'Insert' ,
value : 'insert' ,
} ,
] ,
displayOptions : {
show : {
object : [
'tableColumn' ,
'tableRow' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update action' ,
2021-06-27 02:48:24 -07:00
default : '' ,
} ,
{
displayName : 'Action' ,
name : 'action' ,
type : 'options' ,
options : [
{
name : 'Insert' ,
value : 'insert' ,
} ,
] ,
displayOptions : {
show : {
object : [
'pageBreak' ,
'table' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update action' ,
2021-06-27 02:48:24 -07:00
default : '' ,
} ,
{
displayName : 'Action' ,
name : 'action' ,
type : 'options' ,
options : [
{
name : 'Delete' ,
value : 'delete' ,
} ,
] ,
displayOptions : {
show : {
object : [
'positionedObject' ,
] ,
} ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The update action' ,
2021-06-27 02:48:24 -07:00
default : '' ,
} ,
// Shared Segment inputs for Create action (moved up for display purposes)
{
displayName : 'Insert Segment' ,
name : 'insertSegment' ,
type : 'options' ,
options : [
{
name : 'Header' ,
value : 'header' ,
} ,
{
name : 'Body' ,
value : 'body' ,
} ,
{
name : 'Footer' ,
value : 'footer' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where to create the object' ,
2021-06-27 02:48:24 -07:00
default : 'body' ,
displayOptions : {
show : {
object : [
'footer' ,
'header' ,
'paragraphBullets' ,
'namedRange' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
{
displayName : 'Segment ID' ,
name : 'segmentId' ,
type : 'string' ,
description : 'The ID of the header, footer or footnote. The <code>Document → Get</code> operation lists all segment IDs (make sure you disable the <code>simple</code> toggle).' ,
default : '' ,
displayOptions : {
show : {
object : [
'footer' ,
'header' ,
'paragraphBullets' ,
'namedRange' ,
] ,
action : [
'create' ,
] ,
} ,
hide : {
insertSegment : [
'body' ,
] ,
} ,
} ,
} ,
// Inputs fields
// create footer
// create header
{
displayName : 'Index' ,
name : 'index' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based index, relative to the beginning of the specified segment' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'footer' ,
'header' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
// create named range
{
displayName : 'Name' ,
name : 'name' ,
type : 'string' ,
description : 'The name of the Named Range. Names do not need to be unique.' ,
default : '' ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
{
displayName : 'Start Index' ,
name : 'startIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based start index of this range' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
{
displayName : 'End Index' ,
name : 'endIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based end index of this range' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
// create bullets
{
displayName : 'Style' ,
name : 'bulletPreset' ,
type : 'options' ,
options : [
{
name : 'Bullet List' ,
value : 'BULLET_DISC_CIRCLE_SQUARE' ,
2022-05-06 14:01:25 -07:00
description : 'A bulleted list with a <code>DISC</code>, <code>CIRCLE</code> and <code>SQUARE</code> bullet glyph for the first 3 list nesting levels' ,
2021-06-27 02:48:24 -07:00
} ,
{
name : 'Checkbox List' ,
value : 'BULLET_CHECKBOX' ,
2022-05-06 14:01:25 -07:00
description : 'A bulleted list with CHECKBOX bullet glyphs for all list nesting levels' ,
2021-06-27 02:48:24 -07:00
} ,
{
name : 'Numbered List' ,
value : 'NUMBERED_DECIMAL_NESTED' ,
description : 'A numbered list with <code>DECIMAL</code> numeric glyphs separated by periods, where each nesting level uses the previous nesting level\'s glyph as a prefix. For example: 1., 1.1., 2., 2.2 .' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The Preset pattern of bullet glyphs for list' ,
2021-06-27 02:48:24 -07:00
default : 'BULLET_DISC_CIRCLE_SQUARE' ,
displayOptions : {
show : {
object : [
'paragraphBullets' ,
] ,
action : [
'create' ,
] ,
} ,
} ,
} ,
// delete footer
{
displayName : 'Footer ID' ,
name : 'footerId' ,
type : 'string' ,
description : 'The ID of the footer to delete. To retrieve it, use the <code>get document</code> where you can find under <code>footers</code> attribute.' ,
default : '' ,
displayOptions : {
show : {
object : [
'footer' ,
] ,
action : [
'delete' ,
] ,
} ,
} ,
} ,
// delete header
{
displayName : 'Header ID' ,
name : 'headerId' ,
type : 'string' ,
description : 'The ID of the header to delete. To retrieve it, use the <code>get document</code> where you can find under <code>headers</code> attribute.' ,
default : '' ,
displayOptions : {
show : {
object : [
'header' ,
] ,
action : [
'delete' ,
] ,
} ,
} ,
} ,
// delete named range
{
2022-06-03 10:23:49 -07:00
displayName : 'Specify Range By' ,
2021-06-27 02:48:24 -07:00
name : 'namedRangeReference' ,
type : 'options' ,
options : [
{
name : 'ID' ,
value : 'namedRangeId' ,
} ,
{
name : 'Name' ,
value : 'name' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The value determines which range or ranges to delete' ,
2021-06-27 02:48:24 -07:00
default : 'namedRangeId' ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'delete' ,
] ,
} ,
} ,
} ,
{
displayName : 'ID' ,
name : 'value' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the range' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'delete' ,
] ,
namedRangeReference : [
'namedRangeId' ,
] ,
} ,
} ,
} ,
{
displayName : 'Name' ,
name : 'value' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The name of the range' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'namedRange' ,
] ,
action : [
'delete' ,
] ,
namedRangeReference : [
'name' ,
] ,
} ,
} ,
} ,
// delete bullets (shared inputs added below)
// delete positioned object
{
displayName : 'Object ID' ,
name : 'objectId' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The ID of the positioned object to delete (An object that is tied to a paragraph and positioned relative to its beginning), See the Google <a href="https://developers.google.com/docs/api/reference/rest/v1/PositionedObject">documentation</a>' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'positionedObject' ,
] ,
action : [
'delete' ,
] ,
} ,
} ,
} ,
// insert table column/row (shared inputs added below)
// delete table column/row (shared inputs added below)
// Shared Segment inputs for Insert action (moved up for display purposes)
{
displayName : 'Insert Segment' ,
name : 'insertSegment' ,
type : 'options' ,
options : [
{
name : 'Header' ,
value : 'header' ,
} ,
{
name : 'Body' ,
value : 'body' ,
} ,
{
name : 'Footer' ,
value : 'footer' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where to create the object' ,
2021-06-27 02:48:24 -07:00
default : 'body' ,
displayOptions : {
show : {
object : [
'pageBreak' ,
'table' ,
'tableColumn' ,
'tableRow' ,
'text' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Segment ID' ,
name : 'segmentId' ,
type : 'string' ,
description : 'The ID of the header, footer or footnote. The <code>Document → Get</code> operation lists all segment IDs (make sure you disable the <code>simple</code> toggle).' ,
default : '' ,
displayOptions : {
show : {
object : [
'pageBreak' ,
'table' ,
'tableColumn' ,
'tableRow' ,
'text' ,
] ,
action : [
'insert' ,
] ,
} ,
hide : {
insertSegment : [
'body' ,
] ,
} ,
} ,
} ,
// insert page break
{
displayName : 'Insert Location' ,
name : 'locationChoice' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'At End of Specific Position' ,
2021-06-27 02:48:24 -07:00
value : 'endOfSegmentLocation' ,
2022-05-06 14:01:25 -07:00
description : 'Inserts the text at the end of a header, footer, footnote, or document body' ,
2021-06-27 02:48:24 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'At Index' ,
2021-06-27 02:48:24 -07:00
value : 'location' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where the text will be inserted' ,
2021-06-27 02:48:24 -07:00
default : 'endOfSegmentLocation' ,
displayOptions : {
show : {
object : [
'pageBreak' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Index' ,
name : 'index' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based index, relative to the beginning of the specified segment' ,
2021-06-27 02:48:24 -07:00
displayOptions : {
show : {
locationChoice : [
'location' ,
] ,
object : [
'pageBreak' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
} ,
default : 1 ,
} ,
// insert table
{
displayName : 'Insert Location' ,
name : 'locationChoice' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'At End of Specific Position' ,
2021-06-27 02:48:24 -07:00
value : 'endOfSegmentLocation' ,
2022-05-06 14:01:25 -07:00
description : 'Inserts the text at the end of a header, footer, footnote, or document body' ,
2021-06-27 02:48:24 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'At Index' ,
2021-06-27 02:48:24 -07:00
value : 'location' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where the text will be inserted' ,
2021-06-27 02:48:24 -07:00
default : 'endOfSegmentLocation' ,
displayOptions : {
show : {
object : [
'table' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Index' ,
name : 'index' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based index, relative to the beginning of the specified segment (use index + 1 to refer to a table)' ,
2021-06-27 02:48:24 -07:00
displayOptions : {
show : {
locationChoice : [
'location' ,
] ,
object : [
'table' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
default : 1 ,
typeOptions : {
minValue : 1 ,
} ,
} ,
{
displayName : 'Rows' ,
name : 'rows' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The number of rows in the table' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'table' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Columns' ,
name : 'columns' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The number of columns in the table' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'table' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
// insert text
{
displayName : 'Insert Location' ,
name : 'locationChoice' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'At End of Specific Position' ,
2021-06-27 02:48:24 -07:00
value : 'endOfSegmentLocation' ,
2022-05-06 14:01:25 -07:00
description : 'Inserts the text at the end of a header, footer, footnote, or document body' ,
2021-06-27 02:48:24 -07:00
} ,
{
2022-06-03 10:23:49 -07:00
name : 'At Index' ,
2021-06-27 02:48:24 -07:00
value : 'location' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where the text will be inserted' ,
2021-06-27 02:48:24 -07:00
default : 'endOfSegmentLocation' ,
displayOptions : {
show : {
object : [
'text' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Index' ,
name : 'index' ,
type : 'number' ,
typeOptions : {
minValue : 1 ,
} ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based index, relative to the beginning of the specified segment' ,
2021-06-27 02:48:24 -07:00
displayOptions : {
show : {
locationChoice : [
'location' ,
] ,
object : [
'text' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
default : 1 ,
} ,
{
displayName : 'Text' ,
name : 'text' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The text to insert in the document' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'text' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
// replace all text
{
displayName : 'Old Text' ,
name : 'text' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The text to search for in the document' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'text' ,
] ,
action : [
'replaceAll' ,
] ,
} ,
} ,
} ,
{
displayName : 'New Text' ,
name : 'replaceText' ,
type : 'string' ,
2022-05-06 14:01:25 -07:00
description : 'The text that will replace the matched text' ,
2021-06-27 02:48:24 -07:00
default : '' ,
displayOptions : {
show : {
object : [
'text' ,
] ,
action : [
'replaceAll' ,
] ,
} ,
} ,
} ,
{
displayName : 'Match Case' ,
name : 'matchCase' ,
type : 'boolean' ,
2022-06-20 07:54:01 -07:00
description : 'Whether the search should respect case sensitivity' ,
2021-06-27 02:48:24 -07:00
default : false ,
displayOptions : {
show : {
object : [
'text' ,
] ,
action : [
'replaceAll' ,
] ,
} ,
} ,
} ,
// Shared Segment inputs for Delete action
{
displayName : 'Insert Segment' ,
name : 'insertSegment' ,
type : 'options' ,
options : [
{
name : 'Header' ,
value : 'header' ,
} ,
{
name : 'Body' ,
value : 'body' ,
} ,
{
name : 'Footer' ,
value : 'footer' ,
} ,
] ,
2022-05-06 14:01:25 -07:00
description : 'The location where to create the object' ,
2021-06-27 02:48:24 -07:00
default : 'body' ,
displayOptions : {
show : {
object : [
'paragraphBullets' ,
'tableColumn' ,
'tableRow' ,
] ,
action : [
'delete' ,
] ,
} ,
} ,
} ,
{
displayName : 'Segment ID' ,
name : 'segmentId' ,
type : 'string' ,
description : 'The ID of the header, footer or footnote. The <code>Document → Get</code> operation lists all segment IDs (make sure you disable the <code>simple</code> toggle).' ,
default : '' ,
displayOptions : {
show : {
object : [
'paragraphBullets' ,
'tableColumn' ,
'tableRow' ,
] ,
action : [
'delete' ,
] ,
} ,
hide : {
insertSegment : [
'body' ,
] ,
} ,
} ,
} ,
// Shared inputs for paragraph bullets
{
displayName : 'Start Index' ,
name : 'startIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based start index of this range' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'paragraphBullets' ,
] ,
} ,
} ,
} ,
{
displayName : 'End Index' ,
name : 'endIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based end index of this range' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'paragraphBullets' ,
] ,
} ,
} ,
} ,
// Shared inputs for table column/row
{
displayName : 'Insert Position' ,
name : 'insertPosition' ,
type : 'options' ,
options : [
{
2022-06-03 10:23:49 -07:00
name : 'Before Content at Index' ,
2021-06-27 02:48:24 -07:00
value : false ,
} ,
{
2022-06-03 10:23:49 -07:00
name : 'After Content at Index' ,
2021-06-27 02:48:24 -07:00
value : true ,
} ,
] ,
default : true ,
displayOptions : {
show : {
object : [
'tableColumn' ,
'tableRow' ,
] ,
action : [
'insert' ,
] ,
} ,
} ,
} ,
{
displayName : 'Index' ,
name : 'index' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based index, relative to the beginning of the specified segment (use index + 1 to refer to a table)' ,
2021-06-27 02:48:24 -07:00
default : 1 ,
typeOptions : {
minValue : 1 ,
} ,
displayOptions : {
show : {
object : [
'tableColumn' ,
'tableRow' ,
] ,
} ,
} ,
} ,
{
displayName : 'Row Index' ,
name : 'rowIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based row index' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'tableColumn' ,
'tableRow' ,
] ,
} ,
} ,
} ,
{
displayName : 'Column Index' ,
name : 'columnIndex' ,
type : 'number' ,
2022-05-06 14:01:25 -07:00
description : 'The zero-based column index' ,
2021-06-27 02:48:24 -07:00
default : 0 ,
displayOptions : {
show : {
object : [
'tableColumn' ,
'tableRow' ,
] ,
} ,
} ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'fixedCollection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
operation : [
'update' ,
] ,
resource : [
'document' ,
] ,
} ,
} ,
options : [
{
displayName : 'Write Control Object' ,
name : 'writeControlObject' ,
values : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Revision Mode' ,
2021-06-27 02:48:24 -07:00
name : 'control' ,
type : 'options' ,
options : [
{
name : 'Target' ,
value : 'targetRevisionId' ,
description : 'Apply changes to the latest revision. Otherwise changes will not be processed.' ,
} ,
{
name : 'Required' ,
value : 'requiredRevisionId' ,
description : 'Apply changes to the provided revision while incorporating other collaborators\' changes. This mode is used for the recent revision, Otherwise changes will not be processed.' ,
} ,
] ,
default : 'requiredRevisionId' ,
2022-05-06 14:01:25 -07:00
description : 'Determines how the changes are applied to the revision' ,
2021-06-27 02:48:24 -07:00
} ,
{
displayName : 'Revision ID' ,
name : 'value' ,
type : 'string' ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;