2023-01-27 03:22:44 -08:00
|
|
|
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
2019-07-07 10:19:07 -07:00
|
|
|
|
|
|
|
export class AirtableApi implements ICredentialType {
|
|
|
|
name = 'airtableApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2019-07-07 10:19:07 -07:00
|
|
|
displayName = 'Airtable API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'airtable';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2023-05-04 03:17:22 -07:00
|
|
|
{
|
|
|
|
displayName:
|
2024-04-24 06:04:14 -07:00
|
|
|
"This type of connection (API Key) was deprecated and can't be used anymore. Please create a new credential of type 'Access Token' instead.",
|
2023-05-04 03:17:22 -07:00
|
|
|
name: 'deprecated',
|
|
|
|
type: 'notice',
|
|
|
|
default: '',
|
|
|
|
},
|
2019-07-07 10:19:07 -07:00
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2022-11-01 09:41:45 -07:00
|
|
|
typeOptions: { password: true },
|
2019-07-07 10:19:07 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-07-10 03:32:19 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
2022-07-14 01:28:34 -07:00
|
|
|
qs: {
|
|
|
|
api_key: '={{$credentials.apiKey}}',
|
2022-07-10 03:32:19 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-07-07 10:19:07 -07:00
|
|
|
}
|