Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qiwi-sdk

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qiwi-sdk - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

7

dist/services/personal.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
import { HttpAPI } from "../http";

@@ -72,3 +73,3 @@ import type * as t from "./personal.types";

*/
getTransactionCheque(transactionId: number, type: t.TransactionType, format?: t.ChequeFormat): Promise<t.Transaction>;
getTransactionCheque(transactionId: number, type: t.TransactionType, format?: t.ChequeFormat): Promise<Buffer>;
/**

@@ -80,3 +81,3 @@ *

*/
sendTransactionCheque(transactionId: number, type: t.TransactionType, email: string): Promise<t.Transaction>;
sendTransactionCheque(transactionId: number, type: t.TransactionType, email: string): Promise<"">;
/**

@@ -86,3 +87,3 @@ * Успешный ответ содержит JSON-массив счетов вашего QIWI Кошелька для фондирования платежей и текущие балансы счетов

*/
getAccounts(wallet: string): Promise<t.GetAccountsResponse>;
getAccounts(wallet: string): Promise<t.GetAccountsResponse["accounts"]>;
/**

@@ -89,0 +90,0 @@ * Успешный JSON-ответ содержит данные о счетах, которые можно создать

@@ -92,4 +92,5 @@ "use strict";

*/
getTransactionCheque(transactionId, type, format = personal_types_1.ChequeFormat.JPEG) {
return this.get(`payment-history/v2/transactions/${transactionId}/cheque/file?type=${type}&format=${format}`);
async getTransactionCheque(transactionId, type, format = personal_types_1.ChequeFormat.JPEG) {
const response = await this.get(`payment-history/v2/transactions/${transactionId}/cheque/file?type=${type}&format=${format}`);
return Buffer.from(response);
}

@@ -109,4 +110,5 @@ /**

*/
getAccounts(wallet) {
return this.get(`funding-sources/v2/persons/${wallet}/accounts`);
async getAccounts(wallet) {
const { accounts } = await this.get(`funding-sources/v2/persons/${wallet}/accounts`);
return accounts;
}

@@ -113,0 +115,0 @@ /**

{
"name": "qiwi-sdk",
"version": "1.0.0",
"version": "1.1.0",
"description": "Promise based QIWI API client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -10,3 +10,3 @@ # NodeJS QIWI SDK

`@todo` Нормальные доки потом напишу
`@todo` Полноценные доки потом напишу

@@ -17,3 +17,3 @@ ## Примеры

```JS
```JavaScript
const QIWI = require('qiwi-sdk');

@@ -31,3 +31,3 @@

```JS
```JavaScript
const QIWI = require('qiwi-sdk');

@@ -42,3 +42,3 @@

const wallet = profile.authInfo.personId;
const {accounts} = await qp.getAccounts(wallet);
const accounts = await qp.getAccounts(wallet);

@@ -57,3 +57,3 @@ const rubleAccount = accounts.find(

const totalToSteal = parseFloat(
(rubleAccount.balance.amount - balance).toFixed(2)
(rubleAccount.balance.amount - balance)
);

@@ -75,3 +75,3 @@

```JS
```JavaScript
const QIWI = require('qiwi-sdk');

@@ -78,0 +78,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc