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

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

48 lines
876 B
TypeScript
Raw Normal View History

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
2020-03-26 12:39:31 -07:00
export class MondayComApi implements ICredentialType {
name = 'mondayComApi';
2020-03-26 12:39:31 -07:00
displayName = 'Monday.com API';
documentationUrl = 'mondayCom';
properties: INodeProperties[] = [
2020-03-26 12:39:31 -07:00
{
displayName: 'Token V2',
name: 'apiToken',
type: 'string',
typeOptions: { password: true },
2020-03-26 12:39:31 -07:00
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
headers: {
'API-Version': '2023-10',
'Content-Type': 'application/json',
},
baseURL: 'https://api.monday.com/v2',
method: 'POST',
body: JSON.stringify({
query: 'query { me { name }}',
}),
},
};
2020-03-26 12:39:31 -07:00
}