Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/n8n-io/n8n into node-559-…
Browse files Browse the repository at this point in the history
…set-node-overhaul
  • Loading branch information
michael-radency committed Sep 19, 2023
2 parents 813c4f4 + cf776b8 commit e81b7fa
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 13 deletions.
20 changes: 17 additions & 3 deletions packages/nodes-base/credentials/Sms77Api.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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,
},
},
],
};
}
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/Sms77/GenericFunctions.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
};
Expand Down
3 changes: 2 additions & 1 deletion packages/nodes-base/nodes/Sms77/Sms77.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.sms77/"
}
]
}
},
"alias": ["SMS", "Sms77"]
}
11 changes: 5 additions & 6 deletions packages/nodes-base/nodes/Sms77/Sms77.node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {
IExecuteFunctions,
IDataObject,
IExecuteFunctions,
INodeExecutionData,
INodeType,
INodeTypeDescription,
Expand All @@ -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'],
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions packages/nodes-base/nodes/Sms77/seven.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed packages/nodes-base/nodes/Sms77/sms77.png
Binary file not shown.

0 comments on commit e81b7fa

Please sign in to comment.