Add share operation to OneDrive Node (#1044)

This commit is contained in:
Ricardo Espinoza
2020-10-13 05:08:07 -04:00
committed by GitHub
parent 6c6e7625b9
commit 7f33ff8c3c
4 changed files with 196 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
import { INodeProperties } from 'n8n-workflow';
import {
INodeProperties,
} from 'n8n-workflow';
export const fileOperations = [
{
@@ -38,6 +40,11 @@ export const fileOperations = [
value: 'search',
description: 'Search a file',
},
{
name: 'Share',
value: 'share',
description: 'Share a file',
},
{
name: 'Upload',
value: 'upload',
@@ -273,6 +280,84 @@ export const fileFields = [
across several fields including filename, metadata, and file content.`,
},
/* -------------------------------------------------------------------------- */
/* file:share */
/* -------------------------------------------------------------------------- */
{
displayName: 'File ID',
name: 'fileId',
type: 'string',
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'file',
],
},
},
default: '',
description: 'File ID',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'View',
value: 'view',
},
{
name: 'Edit',
value: 'edit',
},
{
name: 'Embed',
value: 'embed',
},
],
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'file',
],
},
},
default: '',
description: 'The type of sharing link to create',
},
{
displayName: 'Scope',
name: 'scope',
type: 'options',
options: [
{
name: 'Anonymous',
value: 'anonymous',
},
{
name: 'Organization',
value: 'organization',
},
],
displayOptions: {
show: {
operation: [
'share',
],
resource: [
'file',
],
},
},
default: '',
description: 'The type of sharing link to create',
},
/* -------------------------------------------------------------------------- */
/* file:upload */
/* -------------------------------------------------------------------------- */
{