Skip to content

Commit

Permalink
fix: missing params of connect method
Browse files Browse the repository at this point in the history
jonyw4 authored Aug 31, 2020

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
2 parents acc41e1 + d1e32b6 commit 9e12431
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,30 @@
declare module 'pagarme' {
export namespace client {
/**
* Returns a version of client with authentication data binded to the resource requests.
*
* @example
* // API Key Authentication
* pagarme.client.connect({ api_key: 'ak_test_y7jk294ynbzf93' })
*
* // Encryption Key Authentication
* pagarme.client.connect({ encryption_key: 'ek_test_y7jk294ynbzf93' })
*
* // Login Authentication
* pagarme.client.connect({ email: '', password: '' })
*
* @param {Object} authentication
* @returns {Promise} A Promise that resolves to a client with authentication data binded
*
* References:
* - https://pagarme.github.io/pagarme-js/module-client.html#~connect
* - https://pagarme.github.io/pagarme-js/client_index.js.html#line88
*/
function connect(authentication: {
api_key: string;
api_key?: string;
encryption_key?: string;
email?: string;
password?: string;
}): Promise<typeof client>;

function search(opts: any, query: any): any;

0 comments on commit 9e12431

Please sign in to comment.