n8n/packages/nodes-base/credentials/SalesforceOAuth2Api.credentials.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2020-02-10 12:55:28 -08:00
export class SalesforceOAuth2Api implements ICredentialType {
name = 'salesforceOAuth2Api';
extends = ['oAuth2Api'];
2020-02-10 12:55:28 -08:00
displayName = 'Salesforce OAuth2 API';
documentationUrl = 'salesforce';
properties: INodeProperties[] = [
{
displayName: 'Environment Type',
name: 'environment',
type: 'options',
options: [
{
name: 'Production',
value: 'production',
},
{
name: 'Sandbox',
value: 'sandbox',
},
],
default: 'production',
},
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
2020-02-10 12:55:28 -08:00
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
2020-02-10 12:55:28 -08:00
required: true,
default:
'={{ $self["environment"] === "sandbox" ? "https://test.salesforce.com/services/oauth2/authorize" : "https://login.salesforce.com/services/oauth2/authorize" }}',
2020-02-10 12:55:28 -08:00
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
2020-02-10 12:55:28 -08:00
required: true,
default:
'={{ $self["environment"] === "sandbox" ? "https://test.salesforce.com/services/oauth2/token" : "https://login.salesforce.com/services/oauth2/token" }}',
2020-02-10 12:55:28 -08:00
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: 'full refresh_token',
2020-02-10 12:55:28 -08:00
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
2020-02-10 12:55:28 -08:00
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'header',
},
2020-02-10 12:55:28 -08:00
];
}