mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-31 15:37:26 -08:00
05c61091db
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
39 lines
1 KiB
TypeScript
39 lines
1 KiB
TypeScript
import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
export class MicrosoftSharePointOAuth2Api implements ICredentialType {
|
|
name = 'microsoftSharePointOAuth2Api';
|
|
|
|
extends = ['microsoftOAuth2Api'];
|
|
|
|
icon: Icon = {
|
|
light: 'file:icons/SharePoint.svg',
|
|
dark: 'file:icons/SharePoint.svg',
|
|
};
|
|
|
|
displayName = 'Microsoft SharePoint OAuth2 API';
|
|
|
|
documentationUrl = 'microsoft';
|
|
|
|
httpRequestNode = {
|
|
name: 'Microsoft SharePoint',
|
|
docsUrl: 'https://learn.microsoft.com/en-us/sharepoint/dev/apis/sharepoint-rest-graph',
|
|
apiBaseUrlPlaceholder: 'https://{subdomain}.sharepoint.com/_api/v2.0/',
|
|
};
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Scope',
|
|
name: 'scope',
|
|
type: 'hidden',
|
|
default: '=openid offline_access https://{{$self.subdomain}}.sharepoint.com/.default',
|
|
},
|
|
{
|
|
displayName: 'Subdomain',
|
|
name: 'subdomain',
|
|
type: 'string',
|
|
default: '',
|
|
hint: 'You can extract the subdomain from the URL. For example, in the URL "https://tenant123.sharepoint.com", the subdomain is "tenant123".',
|
|
},
|
|
];
|
|
}
|