weslleydesouza / payrexx-nodejs Goto Github PK
View Code? Open in Web Editor NEWPayrexx NodeJs API Wrapper
Home Page: https://developers.payrexx.com/
Payrexx NodeJs API Wrapper
Home Page: https://developers.payrexx.com/
It's not a string, it's a key value on an object containing a value property:
fields?: Record<string, { value: string }>
I found it by reverse engineering their awesome docs…
current workaround is to force the typing
...
'fields': {
'email': { value: '[email protected]' },
} as unknown as string,
...
Note: I initially wanted to hide the email from their form, if we provide the field at the gateway creation, the email is not mandatory anymore.
Hello Weslley, after updating to the latest version 0.4.3 I realized there is public method returning non exported types
for instance
create(params:IGatewayCreate):Promise<Gateway>{
Where Gateway is not exported
class Gateway implements IGatewayResponse
solution: Every type returned by a public method, must be exported as well
export class Gateway implements IGatewayResponse {
Workaround: right now I can export the type using the following ugly workaround
type Awaited<T> = T extends PromiseLike<infer U> ? Awaited<U> : T;
type Gateway = Awaited<ReturnType<PayRexx['gateway']['create']>>
Hi, I get the following error
/node_modules/PayRexx/index.ts:1
import {SubscriptionsActions} from "./actions/payrexx.actions.subscriptions";
^^^^^^
This because ts will try to compile *.ts files within the payrexx package, the only *.ts files you should commit are *.d.ts files.
To fix the issue, you should not commit index.ts file, only it's corresponding index.d.ts (by the way a nice place is aside the index.js
i.e. dist/index.d.ts
).
then declare explicitly the typings in package.json. To do so, replace
"main": "index.ts",`
with
"main": "dist/index.js",
"types": "dist/index.d.ts",
Hi, I get this error when I "npm audit"
axios <0.21.1
Severity: high
Server-Side Request Forgery - https://npmjs.com/advisories/1594
No fix available
node_modules/payrexx/node_modules/axios
payrexx *
Depends on vulnerable versions of axios
node_modules/payrexx
Solution: Upgrade to 0.21.1 or later
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.