mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(Microsoft SharePoint Node): New node (#13727)
This commit is contained in:
committed by
GitHub
parent
64b3fa3d17
commit
954b66218f
@@ -0,0 +1,68 @@
|
||||
import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes } from 'n8n-workflow';
|
||||
|
||||
import { file, item, list } from './descriptions';
|
||||
import { listSearch, resourceMapping } from './methods';
|
||||
|
||||
export class MicrosoftSharePoint implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Microsoft SharePoint',
|
||||
name: 'microsoftSharePoint',
|
||||
icon: {
|
||||
light: 'file:microsoftSharePoint.svg',
|
||||
dark: 'file:microsoftSharePoint.svg',
|
||||
},
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
||||
description: 'Interact with Microsoft SharePoint API',
|
||||
defaults: {
|
||||
name: 'Microsoft SharePoint',
|
||||
},
|
||||
usableAsTool: true,
|
||||
inputs: [NodeConnectionTypes.Main],
|
||||
outputs: [NodeConnectionTypes.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'microsoftSharePointOAuth2Api',
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
requestDefaults: {
|
||||
baseURL: '=https://{{ $credentials.subdomain }}.sharepoint.com/_api/v2.0/',
|
||||
ignoreHttpStatusErrors: true,
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Resource',
|
||||
name: 'resource',
|
||||
type: 'options',
|
||||
noDataExpression: true,
|
||||
options: [
|
||||
{
|
||||
name: 'File',
|
||||
value: 'file',
|
||||
},
|
||||
{
|
||||
name: 'Item',
|
||||
value: 'item',
|
||||
},
|
||||
{
|
||||
name: 'List',
|
||||
value: 'list',
|
||||
},
|
||||
],
|
||||
default: 'file',
|
||||
},
|
||||
|
||||
...file.description,
|
||||
...item.description,
|
||||
...list.description,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
listSearch,
|
||||
resourceMapping,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user