Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@swp/swipe-sdk
Advanced tools
Integration with our api.
Using npm:
$ npm install @swp/swipe-sdk
The sdk have type system in typescript
import { Swipe } from '@swp/swipe-sdk'
const sdk = new Swipe({
apiKey: string, // Ex: key
secret: string, // Ex: secret
sandbox?: boolean, // default false to acess prod
customHost?: string, // default null
debug?: boolean // default false
})
const data = sdk.Ledger.hello()
const data = sdk.Ledger.getMyAccount()
const newAccounts = [
{
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
},
...
]
const data = sdk.Ledger.createChildrenAccounts(newAccounts)
const searchOption = {
queryParams?: {
'...': '...',
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Ledger.getChildrenAccounts(searchOption?)
const accountId: string = '...'
const data = sdk.Ledger.getChildAccount(accountId)
const accountId: string = '...'
const data = sdk.Ledger.destroyAccount(accountId)
const asset = {
code: string, // Ex: 'BRL' or 'USD' or 'Banana'
decimalPlaces?: number, // for have a asset like '5.00000' set 5
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Ledger.createAsset(asset)
const searchOptions = {
queryParams?: {
'...': '...',
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Ledger.getAssets(searchOptions)
const assetId:string = '...'
const data = sdk.Ledger.getAsset(assetId)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'type': ActionType.TRANSFER | ActionType.ISSUE_ASSET | ActionType.BURN_ASSET
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Ledger.getActionBatches(searchOptions)
const batchId:string = '...'
const data = sdk.Ledger.getActionBatch(batchId)
const newActionsBatchs = {
actions: [
{
type: ActionType.TRANSFER,
amount: string, // Ex: '2.7'
from: string, // senderId
to: string, // receiverId
assetId: string // assetId
},
{
type: ActionType.ISSUE_ASSET,
amount: string, // Ex: '4.20'
to: string, // receiverId
assetId: string // assetId
},
{
type: ActionType.BURN_ASSET,
amount: string, // Ex: '3.141549'
from: string, // senderId
assetId: string // assetId
},
...
],
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Ledger.newActionBatch(newActionsBatchs)
const data = sdk.Ledger.revokeCredentialGetToken()
const token:string = '...'
const data = sdk.Ledger.revokeCredential(token)
const data = sdk.Ledger.resetAll()
const accountId:string = '...'
const profile = {
name: string, // Ex: 'Frederico Ferreira Franco'
email: string, // Ex: 'donald@knuth.com'
phone: string, // Ex: ''+5511900000000'
cpf: string, // Ex: '000.000.000-00'
birthDate: string, // Ex: '1990-12-17'
motherName: string, // Ex: 'Francisca Ferreica Franco'
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.Profile.addProfileToAccount(accountId, profile)
const profileCompany = {
name: string, //: Ex: 'Swipe"
corporateName: string, // Ex: 'Swipe'
cnpj: string, // Ex: '00.000.000/0000-00' or '00000000000000'
email: string, // Ex: 'swipe@swipetech.io'
phone: string, // Ex: '11900000000'
cnae?: string, // Ex: 'Agricultor'
openingDate: string, // Ex: '1990-12-17'
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
},
companyPartner: {
name: string, // Ex: 'Francisco Ferreiro'
cpf: string, // Ex: '000.000.000-00' or '00000000000'
birthDate: string, // Ex: '1990-12-17'
motherName: string, // Ex: 'Maria Ferreiro'
cellphone?: string, // Ex: '11900000000'
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
}
const data = sdk.Profile.addProfileToAccountCompany(accountId, profileCompany)
const accountId:string = '...'
const address = {
zipCode: string, // Ex: '000000-000'
city: string, // Ex: 'São João do Rio do Peixe'
complement?: string, // Ex: 'Logo ali depois da praça do peixe'
country: string, // Ex: 'BR'
neighborhood: string, // Ex: 'centro'
number: string, // Ex: '42'
state: string, // Ex: 'SP'
street: string, // Ex: 'Av. Brasil'
}
const data = sdk.Profile.addAddressToProfile(accountId, address)
const accountId:string = '...'
const documents = {
frontSide: string, // Ex: 'C:/Images/image.png'
backSide?: string, // Ex: 'C:/Images/image.png'
proofOfResidence: string, // Ex: 'C:/Images/image.png'
selfie: string // Ex: 'C:/Images/image.png'
}
const data = sdk.Profile.addDocumentsToProfile(accountId, documents)
const accountId:string = '...'
const documents = {
frontSide: string, // Ex: 'C:/Images/image.png'
backSide?: string, // Ex: 'C:/Images/image.png'
proofOfResidence: string, // Ex: 'C:/Images/image.png'
selfie: string, // Ex: 'C:/Images/image.png'
socialContract: string, // Ex: 'C:/Images/image.png'
cnpjCard: string // Ex: 'C:/Images/image.png'
}
const data = sdk.Profile.addDocumentsToProfileCompany(accountId, documents)
const accountId:string = '...'
const data = sdk.Profile.getProfile(accountId)
const accountId:string = '...'
const data = sdk.Profile.resetRejectedProfile(accountId)
const accountId:string = '...'
const data = sdk.Profile.aproveProfile(accountId)
const accountId:string = '...'
const data = sdk.Profile.rejectProfile(accountId)
const searchOptions = {
queryParams?: {
'with_balance': boolean,
'name': string,
'document': string,
'status': boolean,
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
}
}
const data = sdk.profile.getUsers(searchOptions)
const boleto = {
amount: string, // Ex: '42.0'
depositAccount: string, // Ex: 'id'
dueDate: string, // Ex: '2020-08-01T13:38:24.600Z'
split?: [
{
accountId: string, // Ex: accountId
percentage: number // Ex: 0.55
}
]
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashIn.newBoleto(id)
const boletoId:string = '...'
const data = sdk.CashIn.getBoleto(boletoId)
const boletoId:string = '...'
const data = sdk.CashIn.boletoPaymentSimulation(boletoId)
const barCode: string = '...'
const data = sdk.CashIn.getBoletoByBarCode(barCode)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashIn.getAllBoletos(searchOptions)
const creditCardCustomer = {
buyer?: {
document?: string // Ex: '00000000000'
},
creditCard: {
cardNumber: string, // Ex: '0000000000000000'
holderName: string, // Ex: 'João S Silveira'
expirationMonth: string, // Ex: '07'
expirationYear: string, // Ex: '2042'
securityCode: string, // Ex: '097'
}
}
const data = sdk.CashIn.newTokenCreditCard(creditCardCustomer)
const creditCard = {
installments?: number,
creditCard: string, // Ex: id
customer: string, // Ex: id
amount: string, // Ex: '0.42'
depositAccount: string, // Ex: id
split?: [
{
accountId: string, // Ex: accountId
percentage: number
}
]
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashIn.newCreditCard(creditCard)
const id:string = '...'
const data = sdk.CashIn.getCreditCardTransactionById(id)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashIn.getAllCreditCardCashIn(searchOptions)
const data = sdk.CashIn.getAllCreditCardCustomerByIdCashIn()
const lottery = {
amount: string, // Ex: '3.1415'
depositAccountId: string // id
}
const data = sdk.CashIn.newLotteryCashIn(lottery)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashIn.getAllLotteryCashIn(searchOptions)
const id:string = '...'
const data = sdk.CashIn.getLotteryCashInById(id)
const id:string = '...'
const data = sdk.CashIn.cancelLotteryCashInById(id)
const id:string = '...'
const data = sdk.CashIn.confirmLottery(id)
const boleto = {
amount: string, // Ex: '13.0'
barCode?: string, // Ex: code
type?: BoletoType.Utility | BoletoType.General
withdrawAccountId: string // Ex: id
}
const data = sdk.CashOut.payBoleto(boleto)
const id:string = '...'
const data = sdk.CashOut.getBoleto(id)
const barCode:string = '...'
const data = sdk.CashOut.getBoletoInfo(barCode)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashOut.getAllBoletos(searchOptions)
const bankTransfer = {
amount: string, // Ex: '12.0'
withdrawAccountId: string, // Ex: id
receiver: {
bankCode: string, // Ex: '340'
bankAgency: string, // Ex: '2000'
bankAgencyDigit?: string, // Ex: '0'
bankAccount: string, // Ex: '12345'
bankAccountDigit?: string, // Ex: '1'
name: string, // Ex: 'João Silva Silveira'
document: string, // Ex: '12345678910'
}
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashOut.newBankTransfer(bankTransfer)
const id:string = '...'
const data = sdk.CashOut.getBankTransfer(id)
const data = sdk.CashOut.getBanks()
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashOut.getAllBankTransfers(searchOptions)
const topUp = {
providerId: number, // Ex: providerId
amount: string, // Ex: '12.0'
withdrawAccountId: string, // Ex: accountId
phone?: string, // Ex: '00900000000'
tvSignerCode?: string, // Ex: id
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashOut.newTopUp(topUp)
const id:string = '...'
const data = sdk.CashOut.confirmTopUp(id)
const id:string = '...'
const data = sdk.CashOut.cancelTopUp(id)
const phoneStateCode:number = number
const phoneNumber:string = '...'
const data = sdk.CashOut.findPhoneProvider(phoneStateCode, phoneNumber)
const id:string = '...'
const data = sdk.CashOut.getTopUpCashOutById(id)
const id:string = {
phoneStateCode?: number,
category?: number,
type?: number
}
const data = sdk.CashOut.getAllTopUpProviders(id)
const id:number = number
const phoneStateCode:string = '...'
const data = sdk.CashOut.getAvailableAmountsForProvider(id, phoneStateCode?)
const lotteryWithdrawal = {
amount: string, // Ex: '2.0'
withdrawAccountId: string, // id
}
const data = sdk.CashOut.newLotteryCashOut(lotteryWithdrawal)
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.CashOut.getAllLotteryCashOut(searchOptions)
const id:string = '...'
const data = sdk.CashOut.getLotteryCashOutById(id)
const id:string = '...'
const data = sdk.CashOut.cancelLotteryCashOut(id)
const id:string = '...'
const data = sdk.CashOut.confirmLottery(id)
const login = {
login: string, // Ex: 'the_quick_brown_fox' or 'izaac@azimov.com'
password: string,
accountId: string, // accountId
}
const data = sdk.Login.createLogin(login)
const login = {
email: string, // Ex: 'the_quick_brown_fox' or 'izaac@azimov.com'
password: string,
expirationInDays?: number // Ex: 10
}
const data = sdk.Login.newSession(login)
const id:string = '...'
const data = sdk.Login.isSessionActive(id)
const id:string = '...'
const data = sdk.Login.destroySession(id)
const newTermsAndConditions = {
text:string = '...', // Ex: 'Payment account opening agreement...'
}
## <a name="History">History</a>
@deprecated The method should not be used, use getAllTransactionHistory
- getTransactionHistory
```typescript
const searchOptions = {
queryParams?: {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
...
},
pagination?: {
limit?: number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields?: {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.history.getTransactionHistory(id, searchOptions)
import {HistoryStatus, Service, ServiceType} from "./history";
const searchOptions = {
queryParams? : {
'fromDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'toDate': string, // Ex: '2020-12-18T16:19:09.000Z'
'service': string, // EX: 'LEDGER,CASH_IN' // Service
'serviceType': string, // EX: 'BANK_SLIP,CREDIT_CARD' // ServiceType
'document': string,
'amountTo': string,
'amountFrom': string,
'name': string,
'status': HistoryStatus,
...
},
pagination? : {
limit? : number, // number bigger than 0
starting_after: number //number bigger than 0
},
fields? : {
'...': '...', // string:string Ex: 'clientType': 'common'
...
}
}
const data = sdk.history.getAllTransactionHistory(id, searchOptions)
FAQs
Integration with our api.
The npm package @swp/swipe-sdk receives a total of 134 weekly downloads. As such, @swp/swipe-sdk popularity was classified as not popular.
We found that @swp/swipe-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.