fix: Add missing test and authenticate to OpenWeatherMap, Azure Storage and Netlify credentials (#20221)

This commit is contained in:
RomanDavydchuk
2025-10-02 15:49:49 +03:00
committed by GitHub
parent 574a7b8052
commit 18a592499f
3 changed files with 62 additions and 2 deletions
@@ -1,5 +1,6 @@
import type {
ICredentialDataDecryptedObject,
ICredentialTestRequest,
ICredentialType,
IHttpRequestOptions,
INodeProperties,
@@ -93,4 +94,18 @@ export class AzureStorageSharedKeyApi implements ICredentialType {
return requestOptions;
}
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.baseUrl}}',
url: '/',
headers: {
'x-ms-date': '={{ new Date().toUTCString() }}',
'x-ms-version': '2021-12-02',
},
qs: {
comp: 'list',
},
},
};
}
@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticate,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class NetlifyApi implements ICredentialType {
name = 'netlifyApi';
@@ -16,4 +21,20 @@ export class NetlifyApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticate = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.netlify.com',
url: '/api/v1/sites',
},
};
}
@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticate,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class OpenWeatherMapApi implements ICredentialType {
name = 'openWeatherMapApi';
@@ -16,4 +21,23 @@ export class OpenWeatherMapApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticate = {
type: 'generic',
properties: {
qs: {
appid: '={{$credentials.accessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.openweathermap.org/data/2.5',
url: '/weather',
qs: {
q: 'London',
},
},
};
}