fix(core): update
This commit is contained in:
parent
9fbaac20d3
commit
01dbf842e9
4
.gitignore
vendored
4
.gitignore
vendored
@ -15,8 +15,6 @@ node_modules/
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
dist_*/
|
||||
|
||||
# custom
|
@ -4,7 +4,7 @@ image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
key: '$CI_BUILD_STAGE'
|
||||
|
||||
stages:
|
||||
- security
|
||||
@ -20,17 +20,20 @@ mirror:
|
||||
script:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
snyk:
|
||||
audit:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
stage: security
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
- npmci command npm config set registry https://registry.npmjs.org
|
||||
- npmci command npm audit --audit-level=high
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -47,6 +50,7 @@ testStable:
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
@ -59,6 +63,7 @@ testBuild:
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -70,6 +75,7 @@ release:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
@ -81,9 +87,11 @@ codequality:
|
||||
allow_failure: true
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- priv
|
||||
|
||||
@ -94,20 +102,20 @@ trigger:
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-dbase:npmci
|
||||
services:
|
||||
- docker:stable-dind
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- lossless
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
|
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
@ -11,7 +11,13 @@
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone"
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "mojoio",
|
||||
|
4253
package-lock.json
generated
4253
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@ -3,8 +3,8 @@
|
||||
"version": "1.0.15",
|
||||
"private": false,
|
||||
"description": "a bunq api abstraction package",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
@ -13,19 +13,31 @@
|
||||
"format": "(gitzone format)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
"@gitzone/tstest": "^1.0.28",
|
||||
"@pushrocks/qenv": "^4.0.6",
|
||||
"@pushrocks/tapbundle": "^3.2.0",
|
||||
"@types/node": "^12.12.17",
|
||||
"tslint": "^5.20.1",
|
||||
"@gitzone/tsbuild": "^2.1.24",
|
||||
"@gitzone/tstest": "^1.0.33",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/tapbundle": "^3.2.1",
|
||||
"@types/node": "^14.0.13",
|
||||
"tslint": "^6.1.2",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bunq-community/bunq-js-client": "^0.42.1",
|
||||
"@bunq-community/bunq-js-client": "^1.1.2",
|
||||
"@pushrocks/smartcrypto": "^1.0.9",
|
||||
"@pushrocks/smartfile": "^7.0.6",
|
||||
"@pushrocks/smartfile": "^7.0.12",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"json-store": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
40
readme.md
Normal file
40
readme.md
Normal file
@ -0,0 +1,40 @@
|
||||
# @mojoio/bunq
|
||||
a bunq api abstraction package
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@mojoio/bunq)
|
||||
* [gitlab.com (source)](https://gitlab.com/mojoio/bunq)
|
||||
* [github.com (source mirror)](https://github.com/mojoio/bunq)
|
||||
* [docs (typedoc)](https://mojoio.gitlab.io/bunq/)
|
||||
|
||||
## Status for master
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/mojoio/bunq/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/mojoio/bunq/badges/master/coverage.svg)](https://lossless.cloud)
|
||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@mojoio/bunq)](https://lossless.cloud)
|
||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/mojoio/bunq)](https://lossless.cloud)
|
||||
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
|
||||
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
|
||||
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@mojoio/bunq)](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@mojoio/bunq)](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@mojoio/bunq)](https://lossless.cloud)
|
||||
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
|
||||
|
||||
## Usage
|
||||
|
||||
Use Typescript for best in class intellisense.
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
|
@ -36,6 +36,6 @@ tap.test('should get transactions', async () => {
|
||||
|
||||
tap.test('should stop the instance', async () => {
|
||||
await testBunqAccount.stop();
|
||||
})
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
@ -39,11 +39,15 @@ export class BunqAccount {
|
||||
let apiKey: string;
|
||||
|
||||
if (this.options.environment === 'SANDBOX') {
|
||||
this.bunqJSClient = new plugins.bunqCommunityClient.default(plugins.JSONFileStore(paths.bunqJsonSandboxFile));
|
||||
this.bunqJSClient = new plugins.bunqCommunityClient.default(
|
||||
plugins.JSONFileStore(paths.bunqJsonSandboxFile)
|
||||
);
|
||||
apiKey = await this.bunqJSClient.api.sandboxUser.post();
|
||||
console.log(apiKey);
|
||||
} else {
|
||||
this.bunqJSClient = new plugins.bunqCommunityClient.default(plugins.JSONFileStore(paths.bunqJsonProductionFile));
|
||||
this.bunqJSClient = new plugins.bunqCommunityClient.default(
|
||||
plugins.JSONFileStore(paths.bunqJsonProductionFile)
|
||||
);
|
||||
apiKey = this.options.apiKey;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,6 @@ export class MonetaryAccount {
|
||||
public auto_save_id: null;
|
||||
public all_auto_save_id: any[];
|
||||
|
||||
|
||||
public bunqAccountRef: BunqAccount;
|
||||
constructor(bunqAccountRefArg: BunqAccount) {
|
||||
this.bunqAccountRef = bunqAccountRefArg;
|
||||
@ -101,9 +100,11 @@ export class MonetaryAccount {
|
||||
newer_id: startingIdArg
|
||||
};
|
||||
|
||||
|
||||
|
||||
const apiTransactions = await this.bunqAccountRef.bunqJSClient.api.payment.list(this.bunqAccountRef.userId, this.id, paginationOptions);
|
||||
const apiTransactions = await this.bunqAccountRef.bunqJSClient.api.payment.list(
|
||||
this.bunqAccountRef.userId,
|
||||
this.id,
|
||||
paginationOptions
|
||||
);
|
||||
const transactionsArray: Transaction[] = [];
|
||||
for (const apiTransaction of apiTransactions) {
|
||||
transactionsArray.push(Transaction.fromApiObject(this, apiTransaction));
|
||||
|
@ -8,7 +8,6 @@ export class Transaction {
|
||||
return newTransaction;
|
||||
}
|
||||
|
||||
|
||||
public id: number;
|
||||
public created: string;
|
||||
public updated: string;
|
||||
@ -41,5 +40,4 @@ export class Transaction {
|
||||
constructor(monetaryAccountRefArg: MonetaryAccount) {
|
||||
this.monetaryAccountRef = monetaryAccountRefArg;
|
||||
}
|
||||
|
||||
}
|
@ -1,23 +1,17 @@
|
||||
// node natice
|
||||
import * as path from 'path';
|
||||
|
||||
export {
|
||||
path
|
||||
};
|
||||
export { path };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as smartcrypto from '@pushrocks/smartcrypto';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
smartcrypto,
|
||||
smartfile,
|
||||
smartpromise,
|
||||
};
|
||||
export { smartcrypto, smartfile, smartpromise };
|
||||
|
||||
// third party
|
||||
import JSONFileStore from "@bunq-community/bunq-js-client/dist/Stores/JSONFileStore";
|
||||
import JSONFileStore from '@bunq-community/bunq-js-client/dist/Stores/JSONFileStore';
|
||||
import * as bunqCommunityClient from '@bunq-community/bunq-js-client';
|
||||
|
||||
export { JSONFileStore, bunqCommunityClient };
|
||||
|
Loading…
Reference in New Issue
Block a user