mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(seven Node): Rename sms77 to seven, fix credentials test (#7180)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
parent
8b3aa0d68f
commit
cf776b8f17
|
@ -8,7 +8,8 @@ import type {
|
|||
export class Sms77Api implements ICredentialType {
|
||||
name = 'sms77Api';
|
||||
|
||||
displayName = 'Sms77 API';
|
||||
// eslint-disable-next-line n8n-nodes-base/cred-class-field-display-name-miscased
|
||||
displayName = 'seven API';
|
||||
|
||||
documentationUrl = 'sms77';
|
||||
|
||||
|
@ -33,8 +34,21 @@ export class Sms77Api implements ICredentialType {
|
|||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://gateway.sms77.io/api',
|
||||
url: '/balance',
|
||||
baseURL: 'https://gateway.seven.io/api',
|
||||
url: '/hooks',
|
||||
qs: {
|
||||
action: 'read',
|
||||
},
|
||||
},
|
||||
rules: [
|
||||
{
|
||||
type: 'responseSuccessBody',
|
||||
properties: {
|
||||
key: 'success',
|
||||
message: 'Invalid API Key',
|
||||
value: undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { IExecuteFunctions, IHookFunctions, IDataObject, JsonObject } from 'n8n-workflow';
|
||||
import type { IDataObject, IExecuteFunctions, IHookFunctions, JsonObject } from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
/**
|
||||
* Make an API request to Sms77
|
||||
* Make an API request to seven
|
||||
*
|
||||
* @param {IHookFunctions | IExecuteFunctions} this
|
||||
* @param {object | undefined} data
|
||||
|
@ -21,7 +21,7 @@ export async function sms77ApiRequest(
|
|||
SentWith: 'n8n',
|
||||
},
|
||||
qs,
|
||||
uri: `https://gateway.sms77.io/api${endpoint}`,
|
||||
uri: `https://gateway.seven.io/api${endpoint}`,
|
||||
json: true,
|
||||
method,
|
||||
};
|
||||
|
|
|
@ -14,5 +14,6 @@
|
|||
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.sms77/"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"alias": ["SMS", "Sms77"]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
|
@ -10,16 +10,15 @@ import { sms77ApiRequest } from './GenericFunctions';
|
|||
|
||||
export class Sms77 implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'sms77',
|
||||
displayName: 'seven',
|
||||
name: 'sms77',
|
||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-icon-not-svg
|
||||
icon: 'file:sms77.png',
|
||||
icon: 'file:seven.svg',
|
||||
group: ['transform'],
|
||||
version: 1,
|
||||
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
||||
description: 'Send SMS and make text-to-speech calls',
|
||||
defaults: {
|
||||
name: 'sms77',
|
||||
name: 'seven',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
|
@ -118,7 +117,7 @@ export class Sms77 implements INodeType {
|
|||
},
|
||||
},
|
||||
description:
|
||||
'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from Sms77.',
|
||||
'The number of your recipient(s) separated by comma. Can be regular numbers or contact/groups from seven.',
|
||||
},
|
||||
{
|
||||
displayName: 'Message',
|
||||
|
|
1
packages/nodes-base/nodes/Sms77/seven.svg
Normal file
1
packages/nodes-base/nodes/Sms77/seven.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 252 176"><linearGradient id="a" x1="32.71" x2="115.06" y1="19.46" y2="67.11" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#01d468"/><stop offset=".1" stop-color="#15d875"/><stop offset=".41" stop-color="#50e59b"/><stop offset=".67" stop-color="#7befb7"/><stop offset=".88" stop-color="#96f5c9"/><stop offset="1" stop-color="#a0f7cf"/></linearGradient><path fill="url(#a)" d="m101.45 57-6.78 9.2-84.6-43.03C2.42 20.3.4 14.54 1.03 10.07 1.92 4.52 6.8.68 12.9.68h16.91l2.04 5.52-2.04 6.19H14.49l86.96 44.6z"/><linearGradient id="b" x1="110.13" x2="248.26" y1="44.67" y2="-35.11" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#01d468"/><stop offset=".26" stop-color="#22de7b"/><stop offset=".76" stop-color="#5ef29d"/><stop offset="1" stop-color="#75f9ab"/></linearGradient><path fill="url(#b)" d="M251.48 9.47c-1.1-3.28-4.5-8.79-15.24-8.79H29.82V12.4h37.16c1.72 0 3.38.03 4.99.11 3.88.16 7.43.5 10.66.97l.14.02c18.07 2.1 32.42 7.17 34.7 15.32a6.3 6.3 0 0 1 .21 3.66l-.02.15c-.67 3-2.98 6.66-6.49 11.44l-83.3 110.3a12.51 12.51 0 0 0-1.74 13.37 12.8 12.8 0 0 0 11.5 7.09 13.55 13.55 0 0 0 7.4-2.23l.87-.58c.17-.11.34-.24.48-.38l199-147.66c7.94-5.4 6.92-11.93 6.1-14.5zm-12.93 4.82L38.52 162.73c-.65.46-1.64.46-1.85.03-.1-.19.04-.6.41-1.04l82.63-109.56c3.73-4.94 7.6-10.04 9.57-15.46 3.01-8.32.98-15.9-5.74-21.36a37.48 37.48 0 0 0-4.14-2.95h117.06c2.22 0 3.26.31 3.71.52-.23.3-.7.76-1.62 1.38z"/></svg>
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in a new issue