Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(seven Node): Rename sms77 to seven, fix credentials test #7180

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading