mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 09:04:07 -08:00
d03d9276f9
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
44 lines
836 B
TypeScript
44 lines
836 B
TypeScript
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
export class AzureOpenAiApi implements ICredentialType {
|
|
name = 'azureOpenAiApi';
|
|
|
|
displayName = 'Azure Open AI';
|
|
|
|
documentationUrl = 'azureopenai';
|
|
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'API Key',
|
|
name: 'apiKey',
|
|
type: 'string',
|
|
typeOptions: { password: true },
|
|
required: true,
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Resource Name',
|
|
name: 'resourceName',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'API Version',
|
|
name: 'apiVersion',
|
|
type: 'string',
|
|
required: true,
|
|
default: '2023-07-01-preview',
|
|
},
|
|
];
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
type: 'generic',
|
|
properties: {
|
|
headers: {
|
|
'api-key': '={{$credentials.apiKey}}',
|
|
},
|
|
},
|
|
};
|
|
}
|