NODEDC_PLATFORM/packages/n8n-nodes-ndc/credentials/NdcDataProductWriterApi.cre...

35 lines
791 B
TypeScript

import type {
IAuthenticateGeneric,
Icon,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class NdcDataProductWriterApi implements ICredentialType {
name = 'ndcDataProductWriterApi';
displayName = 'NDC Data Product Writer API';
icon: Icon = {
light: 'file:../icons/ndc.svg',
dark: 'file:../icons/ndc.dark.svg',
};
documentationUrl = '';
properties: INodeProperties[] = [
{
displayName: 'Opaque Writer Capability',
name: 'capability',
type: 'string',
typeOptions: { password: true },
default: '',
required: true,
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.capability}}',
},
},
};
}