fix(Monday.com Node): Migrate to api 2023-10 (#8254)

This commit is contained in:
Michael Kret
2024-01-10 11:17:00 +02:00
committed by GitHub
parent f208a6e087
commit ccde38a8a8
4 changed files with 223 additions and 111 deletions

View File

@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class MondayComApi implements ICredentialType {
name = 'mondayComApi';
@@ -16,4 +21,27 @@ export class MondayComApi implements ICredentialType {
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 }}',
}),
},
};
}