2023-01-27 03:22:44 -08:00
import type { ICredentialType , INodeProperties } from 'n8n-workflow' ;
2020-10-28 15:07:35 -07:00
export class SalesforceJwtApi implements ICredentialType {
name = 'salesforceJwtApi' ;
2022-12-02 12:54:28 -08:00
2020-10-28 15:07:35 -07:00
displayName = 'Salesforce JWT API' ;
2022-12-02 12:54:28 -08:00
2020-10-28 15:07:35 -07:00
documentationUrl = 'salesforce' ;
2022-12-02 12:54:28 -08:00
2021-06-12 09:39:55 -07:00
properties : INodeProperties [ ] = [
2020-10-28 15:07:35 -07:00
{
displayName : 'Environment Type' ,
name : 'environment' ,
2021-06-12 09:39:55 -07:00
type : 'options' ,
2020-10-28 15:07:35 -07:00
options : [
{
name : 'Production' ,
value : 'production' ,
} ,
{
name : 'Sandbox' ,
value : 'sandbox' ,
} ,
] ,
default : 'production' ,
} ,
{
displayName : 'Client ID' ,
name : 'clientId' ,
2021-06-12 09:39:55 -07:00
type : 'string' ,
2020-10-28 15:07:35 -07:00
default : '' ,
required : true ,
2022-04-13 23:32:27 -07:00
description : 'Consumer Key from Salesforce Connected App' ,
2020-10-28 15:07:35 -07:00
} ,
{
displayName : 'Username' ,
name : 'username' ,
2021-06-12 09:39:55 -07:00
type : 'string' ,
2020-10-28 15:07:35 -07:00
default : '' ,
required : true ,
} ,
{
displayName : 'Private Key' ,
name : 'privateKey' ,
2021-06-12 09:39:55 -07:00
type : 'string' ,
2020-10-28 15:07:35 -07:00
typeOptions : {
password : true ,
} ,
default : '' ,
required : true ,
2022-07-24 08:36:17 -07:00
description :
'Use the multiline editor. Make sure it is in standard PEM key format:<br />-----BEGIN PRIVATE KEY-----<br />KEY DATA GOES HERE<br />-----END PRIVATE KEY-----' ,
2020-10-28 15:07:35 -07:00
} ,
] ;
}