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

docs(accounts): added doc blocks #878

Merged
merged 1 commit into from
Dec 6, 2023
Merged

docs(accounts): added doc blocks #878

merged 1 commit into from
Dec 6, 2023

Conversation

manchuck
Copy link
Contributor

Description

Motivation and Context

Testing Details

Example Output or Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ea2de27) 84.14% compared to head (24fc0b1) 84.14%.
Report is 5 commits behind head on 3.x.

Additional details and impacted files
@@           Coverage Diff           @@
##              3.x     #878   +/-   ##
=======================================
  Coverage   84.14%   84.14%           
=======================================
  Files         123      123           
  Lines        1646     1646           
  Branches      314      314           
=======================================
  Hits         1385     1385           
  Misses        260      260           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manchuck manchuck marked this pull request as ready for review October 30, 2023 20:52
@manchuck manchuck changed the title docs(accounts): added doc blocks for accounts docs(accounts): added doc blocks Nov 21, 2023
@manchuck manchuck requested a review from pardel December 4, 2023 14:56
};

nock("https://api.nexmo.com", {reqheaders: {'Authorization': 'Basic YWJjZDoxMjM0'} })
nock("https://api.nexmo.com", { reqheaders: { 'Authorization': 'Basic YWJjZDoxMjM0' } })

Check failure

Code scanning / CodeQL

Hard-coded credentials Critical test

The hard-coded value "Basic YWJjZDoxMjM0" is used as
authorization header
.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we used a randomly generated value to avoid the code scanning issues?

packages/accounts/__tests__/secrets.test.ts Dismissed Show dismissed Hide dismissed
packages/accounts/__tests__/secrets.test.ts Dismissed Show dismissed Hide dismissed
packages/accounts/__tests__/secrets.test.ts Dismissed Show dismissed Hide dismissed
@@ -42,9 +42,13 @@ describe('accounts', () => {
.query({ api_key: 'abcd', api_secret: '1234' })
.reply(200, expectedResponse);

const lookup = await client.topUpBalance('8ef2447e69604f642ae59363aa5f781b');
const lookup = await client.topUpBalance(
'8ef2447e69604f642ae59363aa5f781b',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this hardcoded value in here? I'm not a big fan of hardcoding items - can we use a random generator to create a random account_id and use it?

};

const callbacks = {moCallBackUrl: "https://example.com/webhooks/inbound-sms", drCallBackUrl: "https://example.com/webhooks/delivery-receipt"};
const callbacks = {
moCallBackUrl: "https://example.com/webhooks/inbound-sms",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment re: hardcoded values

import { Auth } from '@vonage/auth';

describe('secrets', () => {
let client;

beforeEach(() => {
client = new Secrets(new Auth({ apiKey: 'abcd', apiSecret: '1234' }));
client = new Secrets(new Auth({ apiKey: 'abcd', apiSecret: '1234' }));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment re: hardcoded values

};

nock("https://api.nexmo.com", {reqheaders: {'Authorization': 'Basic YWJjZDoxMjM0'} })
nock("https://api.nexmo.com", { reqheaders: { 'Authorization': 'Basic YWJjZDoxMjM0' } })
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we used a randomly generated value to avoid the code scanning issues?

@manchuck manchuck force-pushed the 3.x branch 2 times, most recently from ee19835 to e37ea4b Compare December 6, 2023 15:59
@manchuck manchuck changed the base branch from 3.x to docblocks December 6, 2023 19:41
@manchuck manchuck merged commit 8f68ddf into docblocks Dec 6, 2023
13 checks passed
@manchuck manchuck deleted the doc-accounts branch December 6, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants