update
This commit is contained in:
@@ -3,8 +3,10 @@
|
|||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A full-featured TypeScript/JavaScript client for the bunq API",
|
"description": "A full-featured TypeScript/JavaScript client for the bunq API",
|
||||||
"main": "dist_ts/index.js",
|
"type": "module",
|
||||||
"typings": "dist_ts/index.d.ts",
|
"exports": {
|
||||||
|
".": "./dist_ts/index.js"
|
||||||
|
},
|
||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -22,6 +24,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@push.rocks/smartcrypto": "^2.0.4",
|
"@push.rocks/smartcrypto": "^2.0.4",
|
||||||
"@push.rocks/smartfile": "^11.2.5",
|
"@push.rocks/smartfile": "^11.2.5",
|
||||||
|
"@push.rocks/smartpath": "^5.0.18",
|
||||||
"@push.rocks/smartpromise": "^4.2.3",
|
"@push.rocks/smartpromise": "^4.2.3",
|
||||||
"@push.rocks/smartrequest": "^2.0.21",
|
"@push.rocks/smartrequest": "^2.0.21",
|
||||||
"@push.rocks/smarttime": "^4.0.54"
|
"@push.rocks/smarttime": "^4.0.54"
|
||||||
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -14,6 +14,9 @@ importers:
|
|||||||
'@push.rocks/smartfile':
|
'@push.rocks/smartfile':
|
||||||
specifier: ^11.2.5
|
specifier: ^11.2.5
|
||||||
version: 11.2.5
|
version: 11.2.5
|
||||||
|
'@push.rocks/smartpath':
|
||||||
|
specifier: ^5.0.18
|
||||||
|
version: 5.0.18
|
||||||
'@push.rocks/smartpromise':
|
'@push.rocks/smartpromise':
|
||||||
specifier: ^4.2.3
|
specifier: ^4.2.3
|
||||||
version: 4.2.3
|
version: 4.2.3
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqApiContext } from './bunq.classes.apicontext';
|
import { BunqApiContext } from './bunq.classes.apicontext.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
import { BunqUser } from './bunq.classes.user';
|
import { BunqUser } from './bunq.classes.user.js';
|
||||||
import { IBunqSessionServerResponse } from './bunq.interfaces';
|
import { IBunqSessionServerResponse } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export interface IBunqConstructorOptions {
|
export interface IBunqConstructorOptions {
|
||||||
deviceName: string;
|
deviceName: string;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import * as paths from './bunq.paths';
|
import * as paths from './bunq.paths.js';
|
||||||
import { BunqCrypto } from './bunq.classes.crypto';
|
import { BunqCrypto } from './bunq.classes.crypto.js';
|
||||||
import { BunqSession } from './bunq.classes.session';
|
import { BunqSession } from './bunq.classes.session.js';
|
||||||
import { IBunqApiContext } from './bunq.interfaces';
|
import { IBunqApiContext } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export interface IBunqApiContextOptions {
|
export interface IBunqApiContextOptions {
|
||||||
apiKey: string;
|
apiKey: string;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
|
|
||||||
export class BunqAttachment {
|
export class BunqAttachment {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { IBunqCard, IBunqAmount } from './bunq.interfaces';
|
import { IBunqCard, IBunqAmount } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqCard {
|
export class BunqCard {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
|
|
||||||
export class BunqCrypto {
|
export class BunqCrypto {
|
||||||
private privateKey: string;
|
private privateKey: string;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
import {
|
import {
|
||||||
IBunqPaymentRequest,
|
IBunqPaymentRequest,
|
||||||
IBunqAmount,
|
IBunqAmount,
|
||||||
IBunqAlias,
|
IBunqAlias,
|
||||||
IBunqPaginationOptions
|
IBunqPaginationOptions
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqDraftPayment {
|
export class BunqDraftPayment {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
|
|
||||||
export type TExportFormat = 'CSV' | 'PDF' | 'MT940';
|
export type TExportFormat = 'CSV' | 'PDF' | 'MT940';
|
||||||
|
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqCrypto } from './bunq.classes.crypto';
|
import { BunqCrypto } from './bunq.classes.crypto.js';
|
||||||
import {
|
import {
|
||||||
IBunqApiContext,
|
IBunqApiContext,
|
||||||
IBunqError,
|
IBunqError,
|
||||||
IBunqRequestOptions
|
IBunqRequestOptions
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqHttpClient {
|
export class BunqHttpClient {
|
||||||
private crypto: BunqCrypto;
|
private crypto: BunqCrypto;
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqTransaction } from './bunq.classes.transaction';
|
import { BunqTransaction } from './bunq.classes.transaction.js';
|
||||||
import { BunqPayment } from './bunq.classes.payment';
|
import { BunqPayment } from './bunq.classes.payment.js';
|
||||||
import { IBunqPaginationOptions, IBunqMonetaryAccountBank } from './bunq.interfaces';
|
import { IBunqPaginationOptions, IBunqMonetaryAccountBank } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export type TAccountType = 'joint' | 'savings' | 'bank';
|
export type TAccountType = 'joint' | 'savings' | 'bank';
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { IBunqNotificationFilter } from './bunq.interfaces';
|
import { IBunqNotificationFilter } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqNotification {
|
export class BunqNotification {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
import {
|
import {
|
||||||
IBunqPaymentRequest,
|
IBunqPaymentRequest,
|
||||||
IBunqPayment,
|
IBunqPayment,
|
||||||
IBunqAmount,
|
IBunqAmount,
|
||||||
IBunqAlias,
|
IBunqAlias,
|
||||||
IBunqPaginationOptions
|
IBunqPaginationOptions
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqPayment {
|
export class BunqPayment {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
import {
|
import {
|
||||||
IBunqRequestInquiry,
|
IBunqRequestInquiry,
|
||||||
IBunqAmount,
|
IBunqAmount,
|
||||||
IBunqAlias,
|
IBunqAlias,
|
||||||
IBunqPaginationOptions
|
IBunqPaginationOptions
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqRequestInquiry {
|
export class BunqRequestInquiry {
|
||||||
private bunqAccount: BunqAccount;
|
private bunqAccount: BunqAccount;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
import {
|
import {
|
||||||
IBunqScheduledPaymentRequest,
|
IBunqScheduledPaymentRequest,
|
||||||
IBunqAmount,
|
IBunqAmount,
|
||||||
IBunqAlias,
|
IBunqAlias,
|
||||||
IBunqPaginationOptions
|
IBunqPaginationOptions
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export interface IScheduleOptions {
|
export interface IScheduleOptions {
|
||||||
timeStart: string;
|
timeStart: string;
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqHttpClient } from './bunq.classes.httpclient';
|
import { BunqHttpClient } from './bunq.classes.httpclient.js';
|
||||||
import { BunqCrypto } from './bunq.classes.crypto';
|
import { BunqCrypto } from './bunq.classes.crypto.js';
|
||||||
import {
|
import {
|
||||||
IBunqApiContext,
|
IBunqApiContext,
|
||||||
IBunqInstallationResponse,
|
IBunqInstallationResponse,
|
||||||
IBunqDeviceServerResponse,
|
IBunqDeviceServerResponse,
|
||||||
IBunqSessionServerResponse
|
IBunqSessionServerResponse
|
||||||
} from './bunq.interfaces';
|
} from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqSession {
|
export class BunqSession {
|
||||||
private httpClient: BunqHttpClient;
|
private httpClient: BunqHttpClient;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount';
|
import { BunqMonetaryAccount } from './bunq.classes.monetaryaccount.js';
|
||||||
|
|
||||||
export class BunqTransaction {
|
export class BunqTransaction {
|
||||||
public static fromApiObject(monetaryAccountRefArg: BunqMonetaryAccount, apiObjectArg: any) {
|
public static fromApiObject(monetaryAccountRefArg: BunqMonetaryAccount, apiObjectArg: any) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqApiContext } from './bunq.classes.apicontext';
|
import { BunqApiContext } from './bunq.classes.apicontext.js';
|
||||||
import { IBunqUser } from './bunq.interfaces';
|
import { IBunqUser } from './bunq.interfaces.js';
|
||||||
|
|
||||||
export class BunqUser {
|
export class BunqUser {
|
||||||
private apiContext: BunqApiContext;
|
private apiContext: BunqApiContext;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
import { BunqAccount } from './bunq.classes.account';
|
import { BunqAccount } from './bunq.classes.account.js';
|
||||||
import { BunqNotification, BunqWebhookHandler } from './bunq.classes.notification';
|
import { BunqNotification, BunqWebhookHandler } from './bunq.classes.notification.js';
|
||||||
import { BunqCrypto } from './bunq.classes.crypto';
|
import { BunqCrypto } from './bunq.classes.crypto.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Webhook server for receiving bunq notifications
|
* Webhook server for receiving bunq notifications
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './bunq.plugins';
|
import * as plugins from './bunq.plugins.js';
|
||||||
|
|
||||||
export const packageDir = plugins.path.join(__dirname, '../');
|
export const packageDir = plugins.path.join(__dirname, '../');
|
||||||
export const nogitDir = plugins.path.join(packageDir, './.nogit/');
|
export const nogitDir = plugins.path.join(packageDir, './.nogit/');
|
||||||
|
@@ -7,8 +7,9 @@ export { path, crypto };
|
|||||||
// @pushrocks scope
|
// @pushrocks scope
|
||||||
import * as smartcrypto from '@push.rocks/smartcrypto';
|
import * as smartcrypto from '@push.rocks/smartcrypto';
|
||||||
import * as smartfile from '@push.rocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
|
import * as smartpath from '@push.rocks/smartpath';
|
||||||
import * as smartpromise from '@push.rocks/smartpromise';
|
import * as smartpromise from '@push.rocks/smartpromise';
|
||||||
import * as smartrequest from '@push.rocks/smartrequest';
|
import * as smartrequest from '@push.rocks/smartrequest';
|
||||||
import * as smarttime from '@push.rocks/smarttime';
|
import * as smarttime from '@push.rocks/smarttime';
|
||||||
|
|
||||||
export { smartcrypto, smartfile, smartpromise, smartrequest, smarttime };
|
export { smartcrypto, smartfile, smartpath, smartpromise, smartrequest, smarttime };
|
||||||
|
36
ts/index.ts
36
ts/index.ts
@@ -1,27 +1,27 @@
|
|||||||
// Core classes
|
// Core classes
|
||||||
export * from './bunq.classes.account';
|
export * from './bunq.classes.account.js';
|
||||||
export * from './bunq.classes.apicontext';
|
export * from './bunq.classes.apicontext.js';
|
||||||
export * from './bunq.classes.crypto';
|
export * from './bunq.classes.crypto.js';
|
||||||
export * from './bunq.classes.httpclient';
|
export * from './bunq.classes.httpclient.js';
|
||||||
export * from './bunq.classes.session';
|
export * from './bunq.classes.session.js';
|
||||||
|
|
||||||
// Account and transaction classes
|
// Account and transaction classes
|
||||||
export * from './bunq.classes.monetaryaccount';
|
export * from './bunq.classes.monetaryaccount.js';
|
||||||
export * from './bunq.classes.transaction';
|
export * from './bunq.classes.transaction.js';
|
||||||
export * from './bunq.classes.user';
|
export * from './bunq.classes.user.js';
|
||||||
|
|
||||||
// Payment and financial classes
|
// Payment and financial classes
|
||||||
export * from './bunq.classes.payment';
|
export * from './bunq.classes.payment.js';
|
||||||
export * from './bunq.classes.card';
|
export * from './bunq.classes.card.js';
|
||||||
export * from './bunq.classes.request';
|
export * from './bunq.classes.request.js';
|
||||||
export * from './bunq.classes.schedule';
|
export * from './bunq.classes.schedule.js';
|
||||||
export * from './bunq.classes.draft';
|
export * from './bunq.classes.draft.js';
|
||||||
|
|
||||||
// Utility classes
|
// Utility classes
|
||||||
export * from './bunq.classes.attachment';
|
export * from './bunq.classes.attachment.js';
|
||||||
export * from './bunq.classes.export';
|
export * from './bunq.classes.export.js';
|
||||||
export * from './bunq.classes.notification';
|
export * from './bunq.classes.notification.js';
|
||||||
export * from './bunq.classes.webhook';
|
export * from './bunq.classes.webhook.js';
|
||||||
|
|
||||||
// Interfaces and types
|
// Interfaces and types
|
||||||
export * from './bunq.interfaces';
|
export * from './bunq.interfaces.js';
|
||||||
|
@@ -1,31 +1,15 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
"useDefineForClassFields": false,
|
"useDefineForClassFields": false,
|
||||||
"target": "ES2020",
|
"target": "ES2022",
|
||||||
"module": "NodeNext",
|
"module": "NodeNext",
|
||||||
"moduleResolution": "NodeNext",
|
"moduleResolution": "NodeNext",
|
||||||
"lib": ["ES2020"],
|
|
||||||
"declaration": true,
|
|
||||||
"declarationDir": "./dist_ts",
|
|
||||||
"outDir": "./dist_ts",
|
|
||||||
"rootDir": "./ts",
|
|
||||||
"strict": true,
|
|
||||||
"verbatimModuleSyntax": false,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"skipLibCheck": true,
|
"verbatimModuleSyntax": true
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"allowSyntheticDefaultImports": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"strictNullChecks": true
|
|
||||||
},
|
},
|
||||||
"include": [
|
|
||||||
"./ts/**/*"
|
|
||||||
],
|
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"./node_modules",
|
"dist_*/**/*.d.ts"
|
||||||
"./dist",
|
|
||||||
"./dist_ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user