Skip to content

[mercadopago]: add definition for mercadopago/dx-nodejs#49745

Merged
sheetalkamat merged 7 commits intoDefinitelyTyped:masterfrom
danieldspx:master
Nov 25, 2020
Merged

[mercadopago]: add definition for mercadopago/dx-nodejs#49745
sheetalkamat merged 7 commits intoDefinitelyTyped:masterfrom
danieldspx:master

Conversation

@danieldspx
Copy link
Copy Markdown
Contributor

@danieldspx danieldspx commented Nov 23, 2020

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an NPM package, match the name. If not, do not conflict with the name of an NPM package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tslint.json should be present and it shouldn't have any additional or disabling of rules. Just content as { "extends": "dtslint/dt.json" }. If for reason the some rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

When we merged, this PR will resolve mercadopago/sdk-nodejs#190

@typescript-bot typescript-bot added the New Definition This PR creates a new definition package. label Nov 23, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Nov 23, 2020

@danieldspx Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR adds a new definition, so it needs to be reviewed by a DT maintainer before it can be merged.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ❌ Only a DT maintainer can approve changes when there are new packages added

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 49745,
  "author": "danieldspx",
  "headCommitAbbrOid": "2039838",
  "headCommitOid": "2039838c12c53ec88ba4b02f091a302d83de44af",
  "lastPushDate": "2020-11-25T00:08:48.000Z",
  "lastActivityDate": "2020-11-25T00:10:36.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "mercadopago",
      "kind": "add",
      "files": [
        {
          "path": "types/mercadopago/configuration.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/mercadopago-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/mercadopago/models/cards/create-payload.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/cards/update-payload.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/customers/create-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/customers/search-configuration.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/customers/update-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/default-configuration.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/merchantOrders/create-payload.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/merchantOrders/update-payload.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/payment/create-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/payment/update-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/preapproval/create-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/preapproval/update-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/preferences/create-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/models/preferences/update-payload.model.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/cards.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/customers.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/merchantOrders.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/payment.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/preapproval.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/resources/preferences.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/address.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/currency.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/item.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/payer-identification.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/phone.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/shared/types.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/mercadopago/tsconfig.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/mercadopago/tslint.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/mercadopago/utils/mercadopago-respose.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [],
      "addedOwners": [
        "danieldspx"
      ],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "stale",
      "reviewer": "sheetalkamat",
      "date": "2020-11-24T23:55:46.000Z",
      "abbrOid": "9662a47"
    },
    {
      "type": "stale",
      "reviewer": "Gabrielpatrola",
      "date": "2020-11-23T16:39:19.000Z",
      "abbrOid": "8f7ee26"
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @danieldspx — you're the only owner, but it would still be good if you find someone to review this PR in the next few days, otherwise a maintainer will look at it. (And if you do find someone, maybe even recruit them to be a second owner to make future changes easier...)

@danger-public
Copy link
Copy Markdown

danger-public commented Nov 23, 2020

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

mercadopago (unpkg)

was missing the following properties:

  1. The declaration doesn't match the JavaScript module 'mercadopago'. Reason:
    The JavaScript module can be called or constructed, but the declaration module cannot.

Generated by 🚫 dangerJS against 2039838

@typescript-bot
Copy link
Copy Markdown
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to mercadopago with its source on master.

Comparison details 📊
Batch compilation
Type count 2817
Assignability cache size 118
Language service measurements
Samples taken 16
Identifiers in tests 16
getCompletionsAtPosition
    Mean duration (ms) 113.8
    Mean CV 17.7%
    Worst duration (ms) 150.6
    Worst identifier clientSecret
getQuickInfoAtPosition
    Mean duration (ms) 113.1
    Mean CV 19.8%
    Worst duration (ms) 132.4
    Worst identifier mercadopago
System information
Node version v14.15.0
CPU count 2
CPU speed 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1098-azure

Copy link
Copy Markdown

@Gabrielpatrola Gabrielpatrola left a comment

Choose a reason for hiding this comment

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

LGTM!

@typescript-bot typescript-bot added the Other Approved This PR was reviewed and signed-off by a community member. label Nov 23, 2020
@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Other Approved This PR was reviewed and signed-off by a community member. labels Nov 23, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@danieldspx One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Nov 23, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@sheetalkamat, @Gabrielpatrola Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Nov 23, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@danieldspx One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Nov 24, 2020
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Nov 24, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@danieldspx One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Nov 25, 2020
@sheetalkamat sheetalkamat merged commit 12d0356 into DefinitelyTyped:master Nov 25, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/mercadopago@1.5.0 to npm.

owenlow pushed a commit to owenlow/DefinitelyTyped that referenced this pull request Dec 8, 2020
…ped#49745)

* feat: add `mercadopago` main types

* feat: add tests and tsconfig/tslint files

* fix: tslint fixes

* fix: remove tslint.json rules turned off, fix the problem that it was preventing with namespace and update tests to reflect thosechanges

* fix: add new-line at the end of file

* fix: use string literal unions instead of enum

* fix: create interface and export obj of that interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Definition This PR creates a new definition package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants