From f8730c1c5acf0b787f63600208e8195701620d35 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sat, 31 Jul 2021 23:22:26 +0300 Subject: [PATCH 01/27] Upgrade to TS --- .gitignore | 3 + dist/index.d.ts | 1 + dist/index.js | 14 + dist/index.js.map | 1 + dist/ts/checkbook.d.ts | 21 + dist/ts/checkbook.js | 34 ++ dist/ts/checkbook.js.map | 1 + dist/ts/endpoints/User.d.ts | 11 + dist/ts/endpoints/User.js | 50 ++ dist/ts/endpoints/User.js.map | 1 + dist/ts/endpoints/bank.d.ts | 11 + dist/ts/endpoints/bank.js | 49 ++ dist/ts/endpoints/bank.js.map | 1 + dist/ts/endpoints/check.d.ts | 12 + dist/ts/endpoints/check.js | 57 +++ dist/ts/endpoints/check.js.map | 1 + dist/ts/endpoints/invoice.d.ts | 10 + dist/ts/endpoints/invoice.js | 43 ++ dist/ts/endpoints/invoice.js.map | 1 + dist/ts/endpoints/subscription.d.ts | 11 + dist/ts/endpoints/subscription.js | 50 ++ dist/ts/endpoints/subscription.js.map | 1 + dist/ts/resource.d.ts | 7 + dist/ts/resource.js | 39 ++ dist/ts/resource.js.map | 1 + dist/tsconfig.tsbuildinfo | 1 + index.ts | 1 + package-lock.json | 662 +++++++++++++++++++++++++- package.json | 8 +- ts/checkbook.ts | 46 ++ ts/endpoints/bank.ts | 55 +++ ts/endpoints/check.ts | 63 +++ ts/endpoints/invoice.ts | 47 ++ ts/endpoints/subscription.ts | 57 +++ ts/endpoints/user.ts | 57 +++ ts/resource.ts | 84 ++++ tsconfig.build.json | 12 + tsconfig.json | 15 + 38 files changed, 1537 insertions(+), 2 deletions(-) create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.js.map create mode 100644 dist/ts/checkbook.d.ts create mode 100644 dist/ts/checkbook.js create mode 100644 dist/ts/checkbook.js.map create mode 100644 dist/ts/endpoints/User.d.ts create mode 100644 dist/ts/endpoints/User.js create mode 100644 dist/ts/endpoints/User.js.map create mode 100644 dist/ts/endpoints/bank.d.ts create mode 100644 dist/ts/endpoints/bank.js create mode 100644 dist/ts/endpoints/bank.js.map create mode 100644 dist/ts/endpoints/check.d.ts create mode 100644 dist/ts/endpoints/check.js create mode 100644 dist/ts/endpoints/check.js.map create mode 100644 dist/ts/endpoints/invoice.d.ts create mode 100644 dist/ts/endpoints/invoice.js create mode 100644 dist/ts/endpoints/invoice.js.map create mode 100644 dist/ts/endpoints/subscription.d.ts create mode 100644 dist/ts/endpoints/subscription.js create mode 100644 dist/ts/endpoints/subscription.js.map create mode 100644 dist/ts/resource.d.ts create mode 100644 dist/ts/resource.js create mode 100644 dist/ts/resource.js.map create mode 100644 dist/tsconfig.tsbuildinfo create mode 100644 index.ts create mode 100644 ts/checkbook.ts create mode 100644 ts/endpoints/bank.ts create mode 100644 ts/endpoints/check.ts create mode 100644 ts/endpoints/invoice.ts create mode 100644 ts/endpoints/subscription.ts create mode 100644 ts/endpoints/user.ts create mode 100644 ts/resource.ts create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index 0088af8..78d65f0 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,6 @@ typings/ # IDE .idea + + +.history \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..c83483d --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1 @@ +export * from './ts/checkbook'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..bdb6577 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./ts/checkbook"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..8e46ebb --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"} \ No newline at end of file diff --git a/dist/ts/checkbook.d.ts b/dist/ts/checkbook.d.ts new file mode 100644 index 0000000..0f10753 --- /dev/null +++ b/dist/ts/checkbook.d.ts @@ -0,0 +1,21 @@ +import { Resource } from "./resource"; +import { Check } from "./endpoints/check"; +import { Invoice } from "./endpoints/invoice"; +import { Subscription } from "./endpoints/subscription"; +import { Bank } from "./endpoints/bank"; +import { User } from "./endpoints/User"; +export declare class Checkbook { + checks: Check; + resource: Resource; + invoices: Invoice; + subscriptions: Subscription; + banks: Bank; + users: User; + constructor(config: { + env?: string; + auth?: string; + bearer?: string; + api_key?: string; + api_secret?: string; + }); +} diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js new file mode 100644 index 0000000..33ca3fa --- /dev/null +++ b/dist/ts/checkbook.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Checkbook = void 0; +const _ = require("lodash"); +const resource_1 = require("./resource"); +const check_1 = require("./endpoints/check"); +const invoice_1 = require("./endpoints/invoice"); +const subscription_1 = require("./endpoints/subscription"); +const bank_1 = require("./endpoints/bank"); +const User_1 = require("./endpoints/User"); +class Checkbook { + constructor(config) { + if (!config.env || !_.includes(["demo", "sandbox"], config.env)) { + config.env = "www"; + } + if (config.bearer) { + config.auth = "Bearer " + config.bearer; + } + else if (config.api_key && config.api_secret) { + config.auth = config.api_key + ":" + config.api_secret; + } + else { + throw "Invalid Authorization"; + } + this.resource = new resource_1.Resource(config); + this.checks = new check_1.Check(this.resource); + this.invoices = new invoice_1.Invoice(this.resource); + this.subscriptions = new subscription_1.Subscription(this.resource); + this.banks = new bank_1.Bank(this.resource); + this.users = new User_1.User(this.resource); + } +} +exports.Checkbook = Checkbook; +//# sourceMappingURL=checkbook.js.map \ No newline at end of file diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map new file mode 100644 index 0000000..7ffdad5 --- /dev/null +++ b/dist/ts/checkbook.js.map @@ -0,0 +1 @@ +{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAE5B,yCAAsC;AACtC,6CAA0C;AAC1C,iDAA8C;AAC9C,2DAAwD;AACxD,2CAAwC;AACxC,2CAAwC;AACxC,MAAa,SAAS;IAUpB,YAAY,MAMX;QACC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE;YAC/D,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC;SACpB;QAED,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACzC;aAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;YAC9C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;SACxD;aAAM;YACL,MAAM,uBAAuB,CAAC;SAC/B;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF;AArCD,8BAqCC"} \ No newline at end of file diff --git a/dist/ts/endpoints/User.d.ts b/dist/ts/endpoints/User.d.ts new file mode 100644 index 0000000..06e0ebb --- /dev/null +++ b/dist/ts/endpoints/User.d.ts @@ -0,0 +1,11 @@ +import { Resource } from "../resource"; +export declare class User { + private readonly resource; + constructor(resource: Resource); + create(params: any, callback: any, idempotencyKey: any): void; + update(params: any, callback: (err: any, response: any) => void): void; + get(callback: (err: any, response: any) => void): void; + list(query: any, callback: (err: any, response: any) => void): void; + delete(user_id: any, callback: (err: any, response: any) => void): void; + addSignature(params: any, callback: (err: any, response: any) => void): void; +} diff --git a/dist/ts/endpoints/User.js b/dist/ts/endpoints/User.js new file mode 100644 index 0000000..eb3f78a --- /dev/null +++ b/dist/ts/endpoints/User.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.User = void 0; +class User { + constructor(resource) { + this.resource = resource; + } + create(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/user', + body: params + }, callback, idempotencyKey); + } + update(params, callback) { + return this.resource.request({ + method: 'PUT', + uri: '/user', + body: params + }, callback); + } + get(callback) { + return this.resource.request({ + method: 'GET', + uri: '/user' + }, callback); + } + list(query, callback) { + return this.resource.request({ + method: 'GET', + uri: '/user/list', + qs: query + }, callback); + } + delete(user_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/user/' + user_id + }, callback); + } + addSignature(params, callback) { + return this.resource.request({ + method: 'POST', + uri: '/user/signature', + body: params + }, callback); + } +} +exports.User = User; +//# sourceMappingURL=User.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/User.js.map b/dist/ts/endpoints/User.js.map new file mode 100644 index 0000000..0fae673 --- /dev/null +++ b/dist/ts/endpoints/User.js.map @@ -0,0 +1 @@ +{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../ts/endpoints/User.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,QAAiC;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,YAAY;YACjB,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,MAAM,EAAE,QAAiC;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;CAEJ;AAtDD,oBAsDC"} \ No newline at end of file diff --git a/dist/ts/endpoints/bank.d.ts b/dist/ts/endpoints/bank.d.ts new file mode 100644 index 0000000..cc6256f --- /dev/null +++ b/dist/ts/endpoints/bank.d.ts @@ -0,0 +1,11 @@ +import { Resource } from "../resource"; +export declare class Bank { + private readonly resource; + constructor(resource: Resource); + list(callback: (err: any, response: any) => void): void; + institutions(callback: (err: any, response: any) => void): void; + delete(bank_id: any, callback: (err: any, response: any) => void): void; + instantAccountVerification(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + addBankAccount(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + verifyMicrodesposits(params: any, callback: (err: any, response: any) => void): void; +} diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js new file mode 100644 index 0000000..93be9aa --- /dev/null +++ b/dist/ts/endpoints/bank.js @@ -0,0 +1,49 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Bank = void 0; +class Bank { + constructor(resource) { + this.resource = resource; + } + list(callback) { + return this.resource.request({ + method: 'GET', + uri: '/bank' + }, callback); + } + institutions(callback) { + return this.resource.request({ + method: 'GET', + uri: '/bank/institutions' + }, callback); + } + delete(bank_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/bank/' + bank_id + }, callback); + } + instantAccountVerification(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/bank/iav', + body: params + }, callback, idempotencyKey); + } + addBankAccount(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/bank', + body: params + }, callback, idempotencyKey); + } + verifyMicrodesposits(params, callback) { + return this.resource.request({ + method: 'POST', + uri: '/bank/verify', + body: params + }, callback); + } +} +exports.Bank = Bank; +//# sourceMappingURL=bank.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map new file mode 100644 index 0000000..781e434 --- /dev/null +++ b/dist/ts/endpoints/bank.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,IAAI,CAAC,QAAiC;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,QAAiC;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,0BAA0B,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACjF,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,cAAc,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACrE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,oBAAoB,CAAC,MAAM,EAAE,QAAiC;QAC1D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;CACJ;AApDD,oBAoDC"} \ No newline at end of file diff --git a/dist/ts/endpoints/check.d.ts b/dist/ts/endpoints/check.d.ts new file mode 100644 index 0000000..1b50527 --- /dev/null +++ b/dist/ts/endpoints/check.d.ts @@ -0,0 +1,12 @@ +import { Resource } from "../resource"; +export declare class Check { + private readonly resource; + constructor(resource: Resource); + list(query: any, callback: (err: any, response: any) => void): void; + get(check_id: any, callback: (err: any, response: any) => void): void; + delete(check_id: any, callback: (err: any, response: any) => void): void; + sendDigitalCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + sendPhysicalCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + sendDirectCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + sendMultipleChecksCSV(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; +} diff --git a/dist/ts/endpoints/check.js b/dist/ts/endpoints/check.js new file mode 100644 index 0000000..fe63d97 --- /dev/null +++ b/dist/ts/endpoints/check.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Check = void 0; +class Check { + constructor(resource) { + this.resource = resource; + } + list(query, callback) { + return this.resource.request({ + method: 'GET', + uri: '/check', + qs: query + }, callback); + } + get(check_id, callback) { + return this.resource.request({ + method: 'GET', + uri: '/check/' + check_id + }, callback); + } + delete(check_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/check/' + check_id + }, callback); + } + sendDigitalCheck(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/check/digital', + body: params + }, callback, idempotencyKey); + } + sendPhysicalCheck(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/check/physical', + body: params + }, callback, idempotencyKey); + } + sendDirectCheck(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/check/direct', + body: params + }, callback, idempotencyKey); + } + sendMultipleChecksCSV(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/check/csv', + body: params + }, callback, idempotencyKey); + } +} +exports.Check = Check; +//# sourceMappingURL=check.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/check.js.map b/dist/ts/endpoints/check.js.map new file mode 100644 index 0000000..8bcc604 --- /dev/null +++ b/dist/ts/endpoints/check.js.map @@ -0,0 +1 @@ +{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../ts/endpoints/check.ts"],"names":[],"mappings":";;;AAEA,MAAa,KAAK;IAId,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IACD,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ;YACb,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,QAAQ,EAAE,QAAiC;QAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,SAAS,GAAG,QAAQ;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,QAAiC;QAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,SAAS,GAAG,QAAQ;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACvE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,gBAAgB;YACrB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,iBAAiB,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACxE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,eAAe,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACtE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,qBAAqB,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QAC5E,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;CACJ;AA5DD,sBA4DC"} \ No newline at end of file diff --git a/dist/ts/endpoints/invoice.d.ts b/dist/ts/endpoints/invoice.d.ts new file mode 100644 index 0000000..3f8cdb7 --- /dev/null +++ b/dist/ts/endpoints/invoice.d.ts @@ -0,0 +1,10 @@ +import { Resource } from "../resource"; +export declare class Invoice { + private readonly resource; + constructor(resource: Resource); + list(query: any, callback: (err: any, response: any) => void): void; + get(invoice_id: any, callback: (err: any, response: any) => void): void; + delete(invoice_id: any, callback: (err: any, response: any) => void): void; + sendInvoice(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + payInvoice(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; +} diff --git a/dist/ts/endpoints/invoice.js b/dist/ts/endpoints/invoice.js new file mode 100644 index 0000000..c267962 --- /dev/null +++ b/dist/ts/endpoints/invoice.js @@ -0,0 +1,43 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Invoice = void 0; +class Invoice { + constructor(resource) { + this.resource = resource; + } + list(query, callback) { + return this.resource.request({ + method: 'GET', + uri: '/invoice', + qs: query + }, callback); + } + get(invoice_id, callback) { + return this.resource.request({ + method: 'GET', + uri: '/invoice/' + invoice_id + }, callback); + } + delete(invoice_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/invoice/' + invoice_id + }, callback); + } + sendInvoice(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/invoice', + body: params + }, callback, idempotencyKey); + } + payInvoice(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/invoice/payment', + body: params + }, callback, idempotencyKey); + } +} +exports.Invoice = Invoice; +//# sourceMappingURL=invoice.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/invoice.js.map b/dist/ts/endpoints/invoice.js.map new file mode 100644 index 0000000..dbfd354 --- /dev/null +++ b/dist/ts/endpoints/invoice.js.map @@ -0,0 +1 @@ +{"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../ts/endpoints/invoice.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAIhB,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IACD,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,UAAU;YACf,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,UAAU,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,WAAW,GAAG,UAAU;SAChC,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,UAAU,EAAE,QAAiC;QAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,WAAW,GAAG,UAAU;SAChC,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,WAAW,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QAClE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,UAAU;YACf,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,UAAU,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACjE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,kBAAkB;YACvB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;CACJ;AA5CD,0BA4CC"} \ No newline at end of file diff --git a/dist/ts/endpoints/subscription.d.ts b/dist/ts/endpoints/subscription.d.ts new file mode 100644 index 0000000..3684038 --- /dev/null +++ b/dist/ts/endpoints/subscription.d.ts @@ -0,0 +1,11 @@ +import { Resource } from "../resource"; +export declare class Subscription { + private readonly resource; + constructor(resource: Resource); + list(query: any, callback: (err: any, response: any) => void): void; + get(subscription_id: any, callback: (err: any, response: any) => void): void; + delete(subscription_id: any, callback: (err: any, response: any) => void): void; + update(subscription_id: any, params: any, callback: (err: any, response: any) => void): void; + sendRecurringCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + sendRecurringInvoice(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; +} diff --git a/dist/ts/endpoints/subscription.js b/dist/ts/endpoints/subscription.js new file mode 100644 index 0000000..8f51bf5 --- /dev/null +++ b/dist/ts/endpoints/subscription.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Subscription = void 0; +class Subscription { + constructor(resource) { + this.resource = resource; + } + list(query, callback) { + return this.resource.request({ + method: 'GET', + uri: '/subscription', + qs: query + }, callback); + } + get(subscription_id, callback) { + return this.resource.request({ + method: 'GET', + uri: '/subscription/' + subscription_id + }, callback); + } + delete(subscription_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/subscription/' + subscription_id + }, callback); + } + update(subscription_id, params, callback) { + return this.resource.request({ + method: 'PUT', + uri: '/subscription/' + subscription_id, + body: params + }, callback); + } + sendRecurringCheck(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/subscription/check', + body: params + }, callback, idempotencyKey); + } + sendRecurringInvoice(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/subscription/invoice', + body: params + }, callback, idempotencyKey); + } +} +exports.Subscription = Subscription; +//# sourceMappingURL=subscription.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/subscription.js.map b/dist/ts/endpoints/subscription.js.map new file mode 100644 index 0000000..c93b851 --- /dev/null +++ b/dist/ts/endpoints/subscription.js.map @@ -0,0 +1 @@ +{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../../ts/endpoints/subscription.ts"],"names":[],"mappings":";;;AAEA,MAAa,YAAY;IAIrB,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,eAAe;YACpB,EAAE,EAAE,KAAK;SAC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ource.d.ts @@ -0,0 +1,7 @@ +export declare class Resource { + private readonly baseURI; + private readonly defaultOptions; + constructor(config: any); + request(options: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + getRequestOptions(options: any, idempotencyKey?: any): any; +} diff --git a/dist/ts/resource.js b/dist/ts/resource.js new file mode 100644 index 0000000..75341c4 --- /dev/null +++ b/dist/ts/resource.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Resource = void 0; +const request = require("request"); +const _ = require("lodash"); +class Resource { + constructor(config) { + this.baseURI = "https://" + config.env + ".checkbook.io/v3"; + this.defaultOptions = { + json: true, + headers: { + Accept: "application/json", + Authorization: config.auth, + }, + }; + } + request(options, callback, idempotencyKey) { + request(this.getRequestOptions(options, idempotencyKey), function (error, response, body) { + if (error) { + return callback.call(this, error, null); + } + if (!_.includes([200, 201], response.statusCode) || body.error) { + error = response.statusCode + " " + body.error; + return callback.call(this, error, null); + } + return callback.call(this, null, body); + }); + } + getRequestOptions(options, idempotencyKey) { + _.merge(options, this.defaultOptions); + if (idempotencyKey) { + options.headers["Idempotency-Key"] = idempotencyKey; + } + options.uri = this.baseURI + options.uri; + return options; + } +} +exports.Resource = Resource; +//# sourceMappingURL=resource.js.map \ No newline at end of file diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map new file mode 100644 index 0000000..9907c7d --- /dev/null +++ b/dist/ts/resource.js.map @@ -0,0 +1 @@ +{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../ts/resource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAmC;AACnC,4BAA4B;AAE5B,MAAa,QAAQ;IAMnB,YAAY,MAAM;QAChB,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,GAAG,GAAG,kBAAkB,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG;YACpB,IAAI,EAAE,IAAI;YACV,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBA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program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","3dd03afc762d90fce37c0d845a9ea89b07d89b4662f9379c24d2e14c871d290b","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","136f24f075d05f1a1beba46799deeb827bb5163d81af069da672ced7e4c85363","953d10620723ed8f026929b487c697977b1e8a3141df9a21fbe35a91b696bf54"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[25,26,27,28,29,30],[25]],"referencedMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"semanticDiagnosticsPerFile":[32,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,24,22,19,20,21,23,1,8,7,31,29,26,27,28,30,25]},"version":"4.3.5"} \ No newline at end of file diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..ac39e3c --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +export * from './ts/checkbook'; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 61388cc..6b41bf8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,565 @@ { "name": "checkbook-api", "version": "3.2.4", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "checkbook-api", + "version": "3.2.4", + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14", + "request": "^2.88.0" + }, + "devDependencies": { + "rimraf": "^3.0.2", + "typescript": "^4.3.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ajv": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", + "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "dependencies": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "node_modules/combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dependencies": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/lodash": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" + }, + "node_modules/mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "dependencies": { + "mime-db": "~1.37.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "node_modules/psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "dependencies": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "node_modules/typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + } + }, "dependencies": { "ajv": { "version": "6.9.1", @@ -43,6 +600,12 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -51,6 +614,16 @@ "tweetnacl": "^0.14.3" } }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -64,6 +637,12 @@ "delayed-stream": "~1.0.0" } }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -126,6 +705,12 @@ "mime-types": "^2.1.12" } }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -134,6 +719,20 @@ "assert-plus": "^1.0.0" } }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -158,6 +757,22 @@ "sshpk": "^1.7.0" } }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -217,11 +832,35 @@ "mime-db": "~1.37.0" } }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -269,6 +908,15 @@ "uuid": "^3.3.2" } }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -324,6 +972,12 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "dev": true + }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -346,6 +1000,12 @@ "core-util-is": "1.0.2", "extsprintf": "^1.2.0" } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true } } } diff --git a/package.json b/package.json index 99bd4d1..9f4539a 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,10 @@ "api", "ach" ], - "main": "lib/checkbook.js", + "main": "dist/index.js", "scripts": { + "prebuild": "rimraf ./dist", + "build": "tsc --outDir ./dist", "test": "echo \"Error: no tests specified\" && exit 1" }, "author": "Checkbook.io (https://checkbook.io/)", @@ -32,5 +34,9 @@ "dependencies": { "lodash": "^4.17.14", "request": "^2.88.0" + }, + "devDependencies": { + "rimraf": "^3.0.2", + "typescript": "^4.3.5" } } diff --git a/ts/checkbook.ts b/ts/checkbook.ts new file mode 100644 index 0000000..76b55c3 --- /dev/null +++ b/ts/checkbook.ts @@ -0,0 +1,46 @@ +import * as _ from "lodash"; + +import { Resource } from "./resource"; +import { Check } from "./endpoints/check"; +import { Invoice } from "./endpoints/invoice"; +import { Subscription } from "./endpoints/subscription"; +import { Bank } from "./endpoints/bank"; +import { User } from "./endpoints/User"; +export class Checkbook { + checks: Check; + resource: Resource; + invoices: Invoice; + subscriptions: Subscription; + banks: Bank; + users: User; + /** + * + */ + constructor(config: { + env?: string; + auth?: string; + bearer?: string; + api_key?: string; + api_secret?: string; + }) { + if (!config.env || !_.includes(["demo", "sandbox"], config.env)) { + config.env = "www"; + } + + if (config.bearer) { + config.auth = "Bearer " + config.bearer; + } else if (config.api_key && config.api_secret) { + config.auth = config.api_key + ":" + config.api_secret; + } else { + throw "Invalid Authorization"; + } + + this.resource = new Resource(config); + + this.checks = new Check(this.resource); + this.invoices = new Invoice(this.resource); + this.subscriptions = new Subscription(this.resource); + this.banks = new Bank(this.resource); + this.users = new User(this.resource); + } +} diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts new file mode 100644 index 0000000..0a03941 --- /dev/null +++ b/ts/endpoints/bank.ts @@ -0,0 +1,55 @@ +import { Resource } from "../resource"; + +export class Bank { + /** + * + */ + constructor(private readonly resource: Resource) { + + } + + list(callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/bank' + }, callback); + } + + institutions(callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/bank/institutions' + }, callback); + } + + delete(bank_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'DELETE', + uri: '/bank/' + bank_id + }, callback); + } + + instantAccountVerification(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/bank/iav', + body: params + }, callback, idempotencyKey); + } + + addBankAccount(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/bank', + body: params + }, callback, idempotencyKey); + } + + verifyMicrodesposits(params, callback: (err, response) => void) { + return this.resource.request({ + method: 'POST', + uri: '/bank/verify', + body: params + }, callback); + } +} diff --git a/ts/endpoints/check.ts b/ts/endpoints/check.ts new file mode 100644 index 0000000..10ce39f --- /dev/null +++ b/ts/endpoints/check.ts @@ -0,0 +1,63 @@ +import { Resource } from "../resource"; + +export class Check { + /** + * + */ + constructor(private readonly resource: Resource) { + + } + list(query, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/check', + qs: query + }, callback); + } + + get(check_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/check/' + check_id + }, callback); + } + + delete(check_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'DELETE', + uri: '/check/' + check_id + }, callback); + } + + sendDigitalCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/check/digital', + body: params + }, callback, idempotencyKey); + } + + sendPhysicalCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/check/physical', + body: params + }, callback, idempotencyKey); + } + + sendDirectCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/check/direct', + body: params + }, callback, idempotencyKey); + } + + sendMultipleChecksCSV(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/check/csv', + body: params + }, callback, idempotencyKey); + } +} \ No newline at end of file diff --git a/ts/endpoints/invoice.ts b/ts/endpoints/invoice.ts new file mode 100644 index 0000000..2aa6b98 --- /dev/null +++ b/ts/endpoints/invoice.ts @@ -0,0 +1,47 @@ +import { Resource } from "../resource"; + +export class Invoice { + /** + * + */ + constructor(private readonly resource: Resource) { + + } + list(query, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/invoice', + qs: query + }, callback); + } + + get(invoice_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/invoice/' + invoice_id + }, callback); + } + + delete(invoice_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'DELETE', + uri: '/invoice/' + invoice_id + }, callback); + } + + sendInvoice(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/invoice', + body: params + }, callback, idempotencyKey); + } + + payInvoice(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/invoice/payment', + body: params + }, callback, idempotencyKey); + } +} diff --git a/ts/endpoints/subscription.ts b/ts/endpoints/subscription.ts new file mode 100644 index 0000000..32c0f7a --- /dev/null +++ b/ts/endpoints/subscription.ts @@ -0,0 +1,57 @@ +import { Resource } from "../resource"; + +export class Subscription { + /** + * + */ + constructor(private readonly resource: Resource) { + + } + + list(query, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/subscription', + qs: query + }, callback); + } + + get(subscription_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/subscription/' + subscription_id + }, callback); + } + + delete(subscription_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'DELETE', + uri: '/subscription/' + subscription_id + }, callback); + } + + update(subscription_id, params, callback: (err, response) => void) { + return this.resource.request({ + method: 'PUT', + uri: '/subscription/' + subscription_id, + body: params + }, callback); + } + + sendRecurringCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/subscription/check', + body: params + }, callback, idempotencyKey); + } + + sendRecurringInvoice(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/subscription/invoice', + body: params + }, callback, idempotencyKey); + } + +} \ No newline at end of file diff --git a/ts/endpoints/user.ts b/ts/endpoints/user.ts new file mode 100644 index 0000000..031dc95 --- /dev/null +++ b/ts/endpoints/user.ts @@ -0,0 +1,57 @@ +import { Resource } from "../resource"; + +export class User { + /** + * + */ + constructor(private readonly resource: Resource) { + + } + + create(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/user', + body: params + }, callback, idempotencyKey); + } + + update(params, callback: (err, response) => void) { + return this.resource.request({ + method: 'PUT', + uri: '/user', + body: params + }, callback); + } + + get(callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/user' + }, callback); + } + + list(query, callback: (err, response) => void) { + return this.resource.request({ + method: 'GET', + uri: '/user/list', + qs: query + }, callback); + } + + delete(user_id, callback: (err, response) => void) { + return this.resource.request({ + method: 'DELETE', + uri: '/user/' + user_id + }, callback); + } + + addSignature(params, callback: (err, response) => void) { + return this.resource.request({ + method: 'POST', + uri: '/user/signature', + body: params + }, callback); + } + +} \ No newline at end of file diff --git a/ts/resource.ts b/ts/resource.ts new file mode 100644 index 0000000..0cdcce3 --- /dev/null +++ b/ts/resource.ts @@ -0,0 +1,84 @@ +"use strict"; + +import * as request from 'request'; +import * as _ from 'lodash'; + +export class Resource { + private readonly baseURI: string; + private readonly defaultOptions: { + json: boolean; + headers: { Accept: string; Authorization: any }; + }; + constructor(config) { + this.baseURI = "https://" + config.env + ".checkbook.io/v3"; + this.defaultOptions = { + json: true, + headers: { + Accept: "application/json", + Authorization: config.auth, + }, + }; + } + + public request(options, callback: (err, response) => void, idempotencyKey?) { + request( + this.getRequestOptions(options, idempotencyKey), + function (error, response, body) { + if (error) { + return callback.call(this, error, null); + } + + if (!_.includes([200, 201], response.statusCode) || body.error) { + error = response.statusCode + " " + body.error; + return callback.call(this, error, null); + } + + return callback.call(this, null, body); + } + ); + } + + getRequestOptions(options, idempotencyKey?) { + _.merge(options, this.defaultOptions); + + if (idempotencyKey) { + options.headers["Idempotency-Key"] = idempotencyKey; + } + + options.uri = this.baseURI + options.uri; + + return options; + } +} + +// Resource.prototype = { +// request: function (options, callback, idempotencyKey) { +// request( +// this.getRequestOptions(options, idempotencyKey), +// function (error, response, body) { +// if (error) { +// return callback.call(this, error, null); +// } + +// if (!_.includes([200, 201], response.statusCode) || body.error) { +// error = response.statusCode + " " + body.error; +// return callback.call(this, error, null); +// } + +// return callback.call(this, null, body); +// } +// ); +// }, + +// getRequestOptions: function (options, idempotencyKey) { +// _.merge(options, this.defaultOptions); + +// if (idempotencyKey) { +// options.headers["Idempotency-Key"] = idempotencyKey; +// } + +// options.uri = this.baseURI + options.uri; + +// return options; +// }, +// }; diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..36e395f --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "exclude": [ + "node_modules", + "test", + "dist", + "**/*spec.ts", + "prisma", + "prisma", + "prisma" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..bf10a23 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "target": "es2017", + "sourceMap": true, + "outDir": "./dist", + "baseUrl": "./", + "incremental": true + } +} From b1f7710b0f289dcdea3b0ab7186764e08d14eebe Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sat, 31 Jul 2021 23:39:15 +0300 Subject: [PATCH 02/27] Change to default export CheckbookAPI --- dist/index.d.ts | 3 ++- dist/index.js | 13 ++----------- dist/index.js.map | 2 +- dist/ts/checkbook.d.ts | 2 +- dist/ts/checkbook.js | 3 +-- dist/ts/checkbook.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- index.ts | 4 +++- ts/checkbook.ts | 2 +- 9 files changed, 13 insertions(+), 20 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index c83483d..0f1fb70 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1 +1,2 @@ -export * from './ts/checkbook'; +import CheckbookAPI from "./ts/checkbook"; +export default CheckbookAPI; diff --git a/dist/index.js b/dist/index.js index bdb6577..f757b16 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,14 +1,5 @@ "use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", { value: true }); -__exportStar(require("./ts/checkbook"), exports); +const checkbook_1 = require("./ts/checkbook"); +exports.default = checkbook_1.default; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 8e46ebb..e38cb26 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA+B"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;AAAA,8CAA0C;AAE1C,kBAAe,mBAAY,CAAC"} \ No newline at end of file diff --git a/dist/ts/checkbook.d.ts b/dist/ts/checkbook.d.ts index 0f10753..a82c9ee 100644 --- a/dist/ts/checkbook.d.ts +++ b/dist/ts/checkbook.d.ts @@ -4,7 +4,7 @@ import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; import { User } from "./endpoints/User"; -export declare class Checkbook { +export default class Checkbook { checks: Check; resource: Resource; invoices: Invoice; diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js index 33ca3fa..5c7f72d 100644 --- a/dist/ts/checkbook.js +++ b/dist/ts/checkbook.js @@ -1,6 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Checkbook = void 0; const _ = require("lodash"); const resource_1 = require("./resource"); const check_1 = require("./endpoints/check"); @@ -30,5 +29,5 @@ class Checkbook { this.users = new User_1.User(this.resource); } } -exports.Checkbook = Checkbook; +exports.default = Checkbook; //# sourceMappingURL=checkbook.js.map \ No newline at end of file diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map index 7ffdad5..84f1714 100644 --- a/dist/ts/checkbook.js.map +++ b/dist/ts/checkbook.js.map @@ -1 +1 @@ -{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;;AAAA,4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ig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","3dd03afc762d90fce37c0d845a9ea89b07d89b4662f9379c24d2e14c871d290b","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","136f24f075d05f1a1beba46799deeb827bb5163d81af069da672ced7e4c85363","953d10620723ed8f026929b487c697977b1e8a3141df9a21fbe35a91b696bf54"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[25,26,27,28,29,30],[25]],"referencedMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"semanticDiagnosticsPerFile":[32,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,24,22,19,20,21,23,1,8,7,31,29,26,27,28,30,25]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","3dd03afc762d90fce37c0d845a9ea89b07d89b4662f9379c24d2e14c871d290b","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","9a939d95a50c793fb1f03f8706d7ddb6c6057efc5eccacfcabaa2001873443d1","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[25,26,27,28,29,30],[25]],"referencedMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"semanticDiagnosticsPerFile":[32,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,24,22,19,20,21,23,1,8,7,31,29,26,27,28,30,25]},"version":"4.3.5"} \ No newline at end of file diff --git a/index.ts b/index.ts index ac39e3c..56704aa 100644 --- a/index.ts +++ b/index.ts @@ -1 +1,3 @@ -export * from './ts/checkbook'; \ No newline at end of file +import CheckbookAPI from "./ts/checkbook"; + +export default CheckbookAPI; diff --git a/ts/checkbook.ts b/ts/checkbook.ts index 76b55c3..ef0fa95 100644 --- a/ts/checkbook.ts +++ b/ts/checkbook.ts @@ -6,7 +6,7 @@ import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; import { User } from "./endpoints/User"; -export class Checkbook { +export default class Checkbook { checks: Check; resource: Resource; invoices: Invoice; From a9c4446185795f653ee9a36d31d8f287931d0e57 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sat, 31 Jul 2021 23:41:19 +0300 Subject: [PATCH 03/27] Add error response --- ts/resource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/resource.ts b/ts/resource.ts index 0cdcce3..7f17ae9 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -30,7 +30,7 @@ export class Resource { if (!_.includes([200, 201], response.statusCode) || body.error) { error = response.statusCode + " " + body.error; - return callback.call(this, error, null); + return callback.call(this, error, body); } return callback.call(this, null, body); From 9c27d814b056d15d62900b8b418c9a2c0549bc1a Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 00:55:27 +0300 Subject: [PATCH 04/27] Remove Lodash --- dist/ts/checkbook.js | 5 +- dist/ts/checkbook.js.map | 2 +- dist/ts/resource.js | 7 +- dist/ts/resource.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package-lock.json | 247 +++++++++++++++++++------------------- package.json | 1 - ts/checkbook.ts | 4 +- ts/resource.ts | 6 +- tsconfig.json | 3 +- 10 files changed, 139 insertions(+), 140 deletions(-) diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js index 5c7f72d..4375ce0 100644 --- a/dist/ts/checkbook.js +++ b/dist/ts/checkbook.js @@ -1,6 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -const _ = require("lodash"); const resource_1 = require("./resource"); const check_1 = require("./endpoints/check"); const invoice_1 = require("./endpoints/invoice"); @@ -9,7 +8,9 @@ const bank_1 = require("./endpoints/bank"); const User_1 = require("./endpoints/User"); class Checkbook { constructor(config) { - if (!config.env || !_.includes(["demo", "sandbox"], config.env)) { + if (!config.env || + config.env.indexOf("demo") === -1 || + config.env.indexOf("sandbox") === -1) { config.env = "www"; } if (config.bearer) { diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map index 84f1714..5d09ab6 100644 --- a/dist/ts/checkbook.js.map +++ b/dist/ts/checkbook.js.map @@ -1 +1 @@ -{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;AAAA,4BAA4B;AAE5B,yCAAsC;AACtC,6CAA0C;AAC1C,iDAA8C;AAC9C,2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AwC;AACxC,MAAqB,SAAS;IAU5B,YAAY,MAMX;QACC,IACE,CAAC,MAAM,CAAC,GAAG;YACX,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACjC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EACpC;YACA,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC;SACpB;QAED,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACzC;aAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;YAC9C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;SACxD;aAAM;YACL,MAAM,uBAAuB,CAAC;SAC/B;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF;AAzCD,4BAyCC"} \ No newline at end of file diff --git a/dist/ts/resource.js b/dist/ts/resource.js index 75341c4..2c5e099 100644 --- a/dist/ts/resource.js +++ b/dist/ts/resource.js @@ -2,7 +2,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Resource = void 0; const request = require("request"); -const _ = require("lodash"); class Resource { constructor(config) { this.baseURI = "https://" + config.env + ".checkbook.io/v3"; @@ -19,15 +18,15 @@ class Resource { if (error) { return callback.call(this, error, null); } - if (!_.includes([200, 201], response.statusCode) || body.error) { + if ([200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; - return callback.call(this, error, null); + return callback.call(this, error, body); } return callback.call(this, null, body); }); } getRequestOptions(options, idempotencyKey) { - _.merge(options, this.defaultOptions); + options = Object.assign(Object.assign({}, options), this.defaultOptions); if (idempotencyKey) { options.headers["Idempotency-Key"] = idempotencyKey; } diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map index 9907c7d..10db394 100644 --- a/dist/ts/resource.js.map +++ b/dist/ts/resource.js.map @@ -1 +1 @@ -{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../ts/resource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAmC;AACnC,4BAA4B;AAE5B,MAAa,QAAQ;IAMnB,YAAY,MAAM;QAChB,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,GAAG,GAAG,kBAAkB,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG;YACpB,IAAI,EAAE,IAAI;YACV,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBAC1B,aAAa,EAAE,MAAM,CAAC,IAAI;aAC3B;SACF,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,OAAO,EAAE,QAAiC,EAAE,cAAe;QACxE,OAAO,CACL,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,cAAc,CAAC,EAC/C,UAAU,KAAK,EAAE,QAAQ,EAAE,IAAI;YAC7B,IAAI,KAAK,EAAE;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;aACzC;YAED,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,GAAG,CA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AAE,IAAI;YAC7B,IAAI,KAAK,EAAE;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;aACzC;YAED,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE;gBAC1D,KAAK,GAAG,QAAQ,CAAC,UAAU,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;aACzC;YAED,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC,CACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAO,EAAE,cAAe;QACxC,OAAO,mCAAO,OAAO,GAAK,IAAI,CAAC,cAAc,CAAC,CAAC;QAE/C,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;SACrD;QAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAEzC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index c95a908..842b4c6 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2017.full.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","3dd03afc762d90fce37c0d845a9ea89b07d89b4662f9379c24d2e14c871d290b","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","9a939d95a50c793fb1f03f8706d7ddb6c6057efc5eccacfcabaa2001873443d1","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[25,26,27,28,29,30],[25]],"referencedMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[29,3],[26,3],[27,3],[28,3],[30,3]],"semanticDiagnosticsPerFile":[32,5,6,10,9,2,11,12,13,14,15,16,17,18,3,4,24,22,19,20,21,23,1,8,7,31,29,26,27,28,30,25]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"80a651e1e5969b3a0be70019b96f1da38132b6364eba47af1b41e737fab6e7c0","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","952c30565597a12d6a9d2f86650d5147303a341630cae134e63c7d45936d7dba","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6b41bf8..1a8ea71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,6 @@ "version": "3.2.4", "license": "MIT", "dependencies": { - "lodash": "^4.17.14", "request": "^2.88.0" }, "devDependencies": { @@ -21,14 +20,18 @@ } }, "node_modules/ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dependencies": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/asn1": { @@ -61,9 +64,9 @@ } }, "node_modules/aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -95,9 +98,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -158,14 +161,14 @@ ] }, "node_modules/fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/forever-agent": { "version": "0.6.1", @@ -231,11 +234,12 @@ } }, "node_modules/har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", "dependencies": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" }, "engines": { @@ -316,25 +320,20 @@ "verror": "1.10.0" } }, - "node_modules/lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" - }, "node_modules/mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==", + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", "dependencies": { - "mime-db": "~1.37.0" + "mime-db": "1.49.0" }, "engines": { "node": ">= 0.6" @@ -384,9 +383,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "node_modules/psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "node_modules/punycode": { "version": "2.1.1", @@ -405,9 +404,10 @@ } }, "node_modules/request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -416,7 +416,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -426,12 +426,12 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" }, "engines": { - "node": ">= 4" + "node": ">= 6" } }, "node_modules/rimraf": { @@ -450,9 +450,23 @@ } }, "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/safer-buffer": { "version": "2.1.2", @@ -474,27 +488,27 @@ "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, "engines": { "node": ">=0.10.0" } }, "node_modules/tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "dependencies": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "^1.1.28", + "punycode": "^2.1.1" }, "engines": { "node": ">=0.8" } }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -525,17 +539,18 @@ } }, "node_modules/uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dependencies": { "punycode": "^2.1.0" } }, "node_modules/uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "bin": { "uuid": "bin/uuid" } @@ -562,11 +577,11 @@ }, "dependencies": { "ajv": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.1.tgz", - "integrity": "sha512-XDN92U311aINL77ieWHmqCcNlwjoP5cHXDxIxbf2MaPYuCXOHS7gHH8jktxeK5omgd52XbSTX6a4Piwd1pQmzA==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -596,9 +611,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "balanced-match": { "version": "1.0.2", @@ -630,9 +645,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "combined-stream": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", - "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "requires": { "delayed-stream": "~1.0.0" } @@ -681,14 +696,14 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "forever-agent": { "version": "0.6.1", @@ -739,11 +754,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -814,22 +829,17 @@ "verror": "1.10.0" } }, - "lodash": { - "version": "4.17.14", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", - "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" - }, "mime-db": { - "version": "1.37.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", - "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" }, "mime-types": { - "version": "2.1.21", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", - "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", "requires": { - "mime-db": "~1.37.0" + "mime-db": "1.49.0" } }, "minimatch": { @@ -867,9 +877,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "punycode": { "version": "2.1.1", @@ -882,9 +892,9 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -893,7 +903,7 @@ "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~2.3.2", - "har-validator": "~5.1.0", + "har-validator": "~5.1.3", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", @@ -903,7 +913,7 @@ "performance-now": "^2.1.0", "qs": "~6.5.2", "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", + "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" } @@ -918,9 +928,9 @@ } }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safer-buffer": { "version": "2.1.2", @@ -944,19 +954,12 @@ } }, "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } + "psl": "^1.1.28", + "punycode": "^2.1.1" } }, "tunnel-agent": { @@ -979,17 +982,17 @@ "dev": true }, "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { "punycode": "^2.1.0" } }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, "verror": { "version": "1.10.0", diff --git a/package.json b/package.json index 9f4539a..4289226 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ }, "homepage": "https://github.com/CheckbookWeb/checkbook_node#readme", "dependencies": { - "lodash": "^4.17.14", "request": "^2.88.0" }, "devDependencies": { diff --git a/ts/checkbook.ts b/ts/checkbook.ts index ef0fa95..27df9f9 100644 --- a/ts/checkbook.ts +++ b/ts/checkbook.ts @@ -1,5 +1,3 @@ -import * as _ from "lodash"; - import { Resource } from "./resource"; import { Check } from "./endpoints/check"; import { Invoice } from "./endpoints/invoice"; @@ -23,7 +21,7 @@ export default class Checkbook { api_key?: string; api_secret?: string; }) { - if (!config.env || !_.includes(["demo", "sandbox"], config.env)) { + if (!config.env || !["demo", "sandbox"].includes(config.env)) { config.env = "www"; } diff --git a/ts/resource.ts b/ts/resource.ts index 7f17ae9..164bffc 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -1,8 +1,6 @@ "use strict"; import * as request from 'request'; -import * as _ from 'lodash'; - export class Resource { private readonly baseURI: string; private readonly defaultOptions: { @@ -28,7 +26,7 @@ export class Resource { return callback.call(this, error, null); } - if (!_.includes([200, 201], response.statusCode) || body.error) { + if ([200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; return callback.call(this, error, body); } @@ -39,7 +37,7 @@ export class Resource { } getRequestOptions(options, idempotencyKey?) { - _.merge(options, this.defaultOptions); + options = {...options, ...this.defaultOptions}; if (idempotencyKey) { options.headers["Idempotency-Key"] = idempotencyKey; diff --git a/tsconfig.json b/tsconfig.json index bf10a23..8c17c52 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "sourceMap": true, "outDir": "./dist", "baseUrl": "./", - "incremental": true + "incremental": true, + "lib": ["ES2017"] } } From 1a55df4359f21d2db6e2eddf80fd46d320fb9cf4 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 00:59:19 +0300 Subject: [PATCH 05/27] Fix --- dist/ts/checkbook.js | 4 +--- dist/ts/checkbook.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js index 4375ce0..d5cf3ce 100644 --- a/dist/ts/checkbook.js +++ b/dist/ts/checkbook.js @@ -8,9 +8,7 @@ const bank_1 = require("./endpoints/bank"); const User_1 = require("./endpoints/User"); class Checkbook { constructor(config) { - if (!config.env || - config.env.indexOf("demo") === -1 || - config.env.indexOf("sandbox") === -1) { + if (!config.env || !["demo", "sandbox"].includes(config.env)) { config.env = "www"; } if (config.bearer) { diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map index 5d09ab6..17710be 100644 --- a/dist/ts/checkbook.js.map +++ b/dist/ts/checkbook.js.map @@ -1 +1 @@ -{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AACtC,6CAA0C;AAC1C,iDAA8C;AAC9C,2DAAwD;AACxD,2CAAwC;AACxC,2CAAwC;AACxC,MAAqB,SAAS;IAU5B,YAAY,MAMX;QACC,IACE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MX;QACC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YAC5D,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC;SACpB;QAED,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACzC;aAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;YAC9C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;SACxD;aAAM;YACL,MAAM,uBAAuB,CAAC;SAC/B;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvC,CAAC;CACF;AArCD,4BAqCC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 842b4c6..565d20b 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"80a651e1e5969b3a0be70019b96f1da38132b6364eba47af1b41e737fab6e7c0","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","952c30565597a12d6a9d2f86650d5147303a341630cae134e63c7d45936d7dba","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"80a651e1e5969b3a0be70019b96f1da38132b6364eba47af1b41e737fab6e7c0","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file From 7e9a4454cb546405aba0de0aadac616947c4b6ef Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 01:03:11 +0300 Subject: [PATCH 06/27] Fix includes --- dist/ts/resource.js | 2 +- dist/ts/resource.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- ts/resource.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/ts/resource.js b/dist/ts/resource.js index 2c5e099..80bfc03 100644 --- a/dist/ts/resource.js +++ b/dist/ts/resource.js @@ -18,7 +18,7 @@ class Resource { if (error) { return callback.call(this, error, null); } - if ([200, 201].includes(response.statusCode) || body.error) { + if (![200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; return callback.call(this, error, body); } diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map index 10db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AE,IAAI,CAAC,CAAC;QACzC,CAAC,CACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAO,EAAE,cAAe;QACxC,OAAO,mCAAO,OAAO,GAAK,IAAI,CAAC,cAAc,CAAC,CAAC;QAE/C,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;SACrD;QAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAEzC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 565d20b..ad1eb39 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"80a651e1e5969b3a0be70019b96f1da38132b6364eba47af1b41e737fab6e7c0","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/ts/resource.ts b/ts/resource.ts index 164bffc..da3f315 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -26,7 +26,7 @@ export class Resource { return callback.call(this, error, null); } - if ([200, 201].includes(response.statusCode) || body.error) { + if (![200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; return callback.call(this, error, body); } From 94363efb698eb730eb091fd5a0fb09f1bf2b553c Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 15:23:44 +0300 Subject: [PATCH 07/27] optional idempotencyKey user create --- ts/endpoints/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/endpoints/user.ts b/ts/endpoints/user.ts index 031dc95..98c2727 100644 --- a/ts/endpoints/user.ts +++ b/ts/endpoints/user.ts @@ -8,7 +8,7 @@ export class User { } - create(params, callback, idempotencyKey) { + create(params, callback, idempotencyKey?) { return this.resource.request({ method: 'POST', uri: '/user', From 1aa1b3b559dd7175adf18de122d03f4a4e87463a Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 15:25:21 +0300 Subject: [PATCH 08/27] Ammend --- dist/ts/endpoints/User.d.ts | 2 +- dist/ts/endpoints/User.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/ts/endpoints/User.d.ts b/dist/ts/endpoints/User.d.ts index 06e0ebb..55eae5b 100644 --- a/dist/ts/endpoints/User.d.ts +++ b/dist/ts/endpoints/User.d.ts @@ -2,7 +2,7 @@ import { Resource } from "../resource"; export declare class User { private readonly resource; constructor(resource: Resource); - create(params: any, callback: any, idempotencyKey: any): void; + create(params: any, callback: any, idempotencyKey?: any): void; update(params: any, callback: (err: any, response: any) => void): void; get(callback: (err: any, response: any) => void): void; list(query: any, callback: (err: any, response: any) => void): void; diff --git a/dist/ts/endpoints/User.js.map b/dist/ts/endpoints/User.js.map index 0fae673..f6be750 100644 --- a/dist/ts/endpoints/User.js.map +++ b/dist/ts/endpoints/User.js.map @@ -1 +1 @@ -{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../ts/endpoints/User.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,QAAiC;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,YAAY;YACjB,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE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B,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,MAAM,EAAE,QAAiC;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;CAEJ;AAtDD,oBAsDC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index ad1eb39..64b6858 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","76b0aa2de8c7472ed870aa3c06cf4c930b03739817da1b5747da6a0e353c98aa","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file From 6bdcfedd887dd92c48671b34788b70cc4e218347 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Sun, 1 Aug 2021 15:40:55 +0300 Subject: [PATCH 09/27] Add plaid auth --- dist/ts/endpoints/bank.d.ts | 3 +++ dist/ts/endpoints/bank.js | 7 +++++++ dist/ts/endpoints/bank.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- ts/endpoints/bank.ts | 8 ++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dist/ts/endpoints/bank.d.ts b/dist/ts/endpoints/bank.d.ts index cc6256f..07f8b00 100644 --- a/dist/ts/endpoints/bank.d.ts +++ b/dist/ts/endpoints/bank.d.ts @@ -6,6 +6,9 @@ export declare class Bank { institutions(callback: (err: any, response: any) => void): void; delete(bank_id: any, callback: (err: any, response: any) => void): void; instantAccountVerification(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + instantAccountVerificationPlaid(params: { + processor_token: string; + }, callback: (err: any, response: any) => void, idempotencyKey?: any): void; addBankAccount(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; verifyMicrodesposits(params: any, callback: (err: any, response: any) => void): void; } diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js index 93be9aa..85e8b17 100644 --- a/dist/ts/endpoints/bank.js +++ b/dist/ts/endpoints/bank.js @@ -30,6 +30,13 @@ class Bank { body: params }, callback, idempotencyKey); } + instantAccountVerificationPlaid(params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/bank/iav/plaid', + body: params + }, callback, idempotencyKey); + } addBankAccount(params, callback, idempotencyKey) { return this.resource.request({ method: 'POST', diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map index 781e434..399bafa 100644 --- a/dist/ts/endpoints/bank.js.map +++ b/dist/ts/endpoints/bank.js.map @@ -1 +1 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,IAAI,CAAC,QAAiC;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,QAAiC;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,0BAA0B,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACjF,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,cAAc,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACrE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,oBAAoB,CAAC,MAAM,EA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,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,cAAc,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACrE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,oBAAoB,CAAC,MAAM,EAAE,QAAiC;QAC1D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;CACJ;AA5DD,oBA4DC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 64b6858..f8f995a 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","ac4d993921d42a57f2280e301d4aaeeb1ca885d1249897a2abe387216d07a659","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts index 0a03941..52c4433 100644 --- a/ts/endpoints/bank.ts +++ b/ts/endpoints/bank.ts @@ -37,6 +37,14 @@ export class Bank { }, callback, idempotencyKey); } + instantAccountVerificationPlaid(params: { processor_token: string }, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request({ + method: 'POST', + uri: '/bank/iav/plaid', + body: params + }, callback, idempotencyKey); + } + addBankAccount(params, callback: (err, response) => void, idempotencyKey?) { return this.resource.request({ method: 'POST', From 6b400bfa2a70e0ee72d3b49eaf8435a807463450 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Fri, 20 Aug 2021 16:18:57 +0300 Subject: [PATCH 10/27] npm --- package.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4289226..e095ccc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "checkbook-api", - "version": "3.2.4", - "description": "Node.js library for the Checkbook.io API", + "name": "checkbook-api-ts", + "version": "1.0.0", + "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", "digital checks", @@ -17,11 +17,12 @@ }, "author": "Checkbook.io (https://checkbook.io/)", "contributors": [ - "Cosmin Molea " + "Cosmin Molea ", + "Dan Shapir " ], "repository": { "type": "git", - "url": "git+https://github.com/CheckbookWeb/checkbook_node.git" + "url": "git+https://github.com/Precise-Finance/checkbook_node.git" }, "license": "MIT", "bugs": { From 888df9b7fac27a064a7206b6fd842cbb445afa7e Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Tue, 15 Mar 2022 20:00:27 +0200 Subject: [PATCH 11/27] Add VCC Endpoint --- .gitignore | 3 +- dist/ts/checkbook.d.ts | 2 + dist/ts/checkbook.js | 2 + dist/ts/checkbook.js.map | 2 +- dist/ts/endpoints/vcc.d.ts | 18 ++ dist/ts/endpoints/vcc.js | 42 +++ dist/ts/endpoints/vcc.js.map | 1 + dist/tsconfig.tsbuildinfo | 2 +- lib/checkbook.js | 16 +- lib/endpoints/vcc.js | 49 +++ package-lock.json | 578 +---------------------------------- package.json | 2 +- ts/checkbook.ts | 3 + ts/endpoints/vcc.ts | 69 +++++ 14 files changed, 203 insertions(+), 586 deletions(-) create mode 100644 dist/ts/endpoints/vcc.d.ts create mode 100644 dist/ts/endpoints/vcc.js create mode 100644 dist/ts/endpoints/vcc.js.map create mode 100644 lib/endpoints/vcc.js create mode 100644 ts/endpoints/vcc.ts diff --git a/.gitignore b/.gitignore index 78d65f0..2263549 100644 --- a/.gitignore +++ b/.gitignore @@ -64,4 +64,5 @@ typings/ .idea -.history \ No newline at end of file +.history +.DS_Store \ No newline at end of file diff --git a/dist/ts/checkbook.d.ts b/dist/ts/checkbook.d.ts index a82c9ee..f32a9b3 100644 --- a/dist/ts/checkbook.d.ts +++ b/dist/ts/checkbook.d.ts @@ -4,6 +4,7 @@ import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; import { User } from "./endpoints/User"; +import { VirtualCreditCard } from "./endpoints/vcc"; export default class Checkbook { checks: Check; resource: Resource; @@ -11,6 +12,7 @@ export default class Checkbook { subscriptions: Subscription; banks: Bank; users: User; + virtualCreditCards: VirtualCreditCard; constructor(config: { env?: string; auth?: string; diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js index d5cf3ce..1ab3801 100644 --- a/dist/ts/checkbook.js +++ b/dist/ts/checkbook.js @@ -6,6 +6,7 @@ const invoice_1 = require("./endpoints/invoice"); const subscription_1 = require("./endpoints/subscription"); const bank_1 = require("./endpoints/bank"); const User_1 = require("./endpoints/User"); +const vcc_1 = require("./endpoints/vcc"); class Checkbook { constructor(config) { if (!config.env || !["demo", "sandbox"].includes(config.env)) { @@ -26,6 +27,7 @@ class Checkbook { this.subscriptions = new subscription_1.Subscription(this.resource); this.banks = new bank_1.Bank(this.resource); this.users = new User_1.User(this.resource); + this.virtualCreditCards = new vcc_1.VirtualCreditCard(this.resource); } } exports.default = Checkbook; diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map index 17710be..58aec6d 100644 --- a/dist/ts/checkbook.js.map +++ b/dist/ts/checkbook.js.map @@ -1 +1 @@ -{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AACtC,6CAA0C;AAC1C,iDAA8C;AAC9C,2DAAwD;AACxD,2CAAwC;AACxC,2CAAwC;AACxC,MAAqB,SAAS;IAU5B,YAAY,MAMX;QACC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YAC5D,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC;SACpB;QAED,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACzC;aAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;YAC9C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;SACxD;aAAM;YACL,MAAM,uBAAuB,CAAC;SAC/B;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,QAAQ,C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QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjE,CAAC;CACF;AAvCD,4BAuCC"} \ No newline at end of file diff --git a/dist/ts/endpoints/vcc.d.ts b/dist/ts/endpoints/vcc.d.ts new file mode 100644 index 0000000..f2b144e --- /dev/null +++ b/dist/ts/endpoints/vcc.d.ts @@ -0,0 +1,18 @@ +import { Resource } from "../resource"; +export declare class VirtualCreditCard { + private readonly resource; + constructor(resource: Resource); + add(params: { + line_1: string; + city: string; + state: string; + zip: string; + }, callback: (err: any, response: any) => void, idempotencyKey?: string): void; + update(vcc_id: string, params: { + name?: string; + default: true; + }, callback: (err: any, response: any) => void): void; + get(callback: (err: any, response: any) => void): void; + getTransactions(vcc_id: string, callback: (err: any, response: any) => void): void; + remove(vcc_id: string, callback: (err: any, response: any) => void): void; +} diff --git a/dist/ts/endpoints/vcc.js b/dist/ts/endpoints/vcc.js new file mode 100644 index 0000000..424b30d --- /dev/null +++ b/dist/ts/endpoints/vcc.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.VirtualCreditCard = void 0; +class VirtualCreditCard { + constructor(resource) { + this.resource = resource; + } + add(params, callback, idempotencyKey) { + return this.resource.request({ + method: "POST", + uri: "/account/vcc", + body: params, + }, callback, idempotencyKey); + } + update(vcc_id, params, callback) { + return this.resource.request({ + method: "PUT", + uri: "/account/vcc" + vcc_id, + body: params, + }, callback); + } + get(callback) { + return this.resource.request({ + method: "GET", + uri: "/account/vcc", + }, callback); + } + getTransactions(vcc_id, callback) { + return this.resource.request({ + method: "GET", + uri: "/account/vcc" + vcc_id + "/transaction", + }, callback); + } + remove(vcc_id, callback) { + return this.resource.request({ + method: "DELETE", + uri: "/account/vcc/" + vcc_id, + }, callback); + } +} +exports.VirtualCreditCard = VirtualCreditCard; +//# sourceMappingURL=vcc.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/vcc.js.map b/dist/ts/endpoints/vcc.js.map new file mode 100644 index 0000000..bd5d9a5 --- /dev/null +++ b/dist/ts/endpoints/vcc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"vcc.js","sourceRoot":"","sources":["../../../ts/endpoints/vcc.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAI5B,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,GAAG,CACD,MAAoE,EACpE,QAAiC,EACjC,cAAuB;QAEvB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,MAAc,EACd,MAAwC,EACxC,QAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM;YAC5B,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAiC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;SACpB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,MAAc,EAAE,QAAiC;QAC/D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,cAAc;SAC9C,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,QAAiC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,eAAe,GAAG,MAAM;SAC9B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAlED,8CAkEC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index f8f995a..e0440ed 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","463273f391e67ad0ca33db8298238131f2e62033da1be3f5265c371137676c87","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[26],[20,21,22,23,24,25],[20]],"referencedMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"exportedModulesMap":[[27,1],[26,2],[24,3],[21,3],[22,3],[23,3],[25,3]],"semanticDiagnosticsPerFile":[27,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,26,24,21,22,23,25,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","eafcb5b1f314f66b987576d44e5ecf9f4e50eba3ffcffe7fa7f4d00c9518e908","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/lib/checkbook.js b/lib/checkbook.js index eb70d4d..fef006b 100644 --- a/lib/checkbook.js +++ b/lib/checkbook.js @@ -9,19 +9,20 @@ var Invoice = require('./endpoints/invoice'); var Subscription = require('./endpoints/subscription'); var Bank = require('./endpoints/bank'); var User = require('./endpoints/user'); +var VirtualCreditCard = require('./endpoints/vcc'); function Checkbook(config) { if (!config.env || !_.includes(['demo', 'sandbox'], config.env)) { config.env = 'www'; } - if (config.bearer) { - config.auth = 'Bearer ' + config.bearer; - } else if (config.api_key && config.api_secret){ - config.auth = config.api_key + ':' + config.api_secret; - } else { - throw 'Invalid Authorization'; - } + if (config.bearer) { + config.auth = 'Bearer ' + config.bearer; + } else if (config.api_key && config.api_secret) { + config.auth = config.api_key + ':' + config.api_secret; + } else { + throw 'Invalid Authorization'; + } this.resource = new Resource(config); @@ -30,6 +31,7 @@ function Checkbook(config) { this.subscriptions = new Subscription(this.resource); this.banks = new Bank(this.resource); this.users = new User(this.resource); + this.virtualCreditCards = new VirtualCreditCard(this.resource); } diff --git a/lib/endpoints/vcc.js b/lib/endpoints/vcc.js new file mode 100644 index 0000000..691e87e --- /dev/null +++ b/lib/endpoints/vcc.js @@ -0,0 +1,49 @@ +'use strict'; + +function VirtualCreditCard(resource) { + this.resource = resource; +} + +VirtualCreditCard.prototype = { + + add: function (params, callback, idempotencyKey) { + return this.resource.request({ + method: 'POST', + uri: '/account/vcc', + body: params + }, callback, idempotencyKey); + }, + + update: function (vcc_id, params, callback) { + return this.resource.request({ + method: 'PUT', + uri: '/account/vcc' + vcc_id, + body: params + }, callback); + }, + + get: function (callback) { + return this.resource.request({ + method: 'GET', + uri: '/account/vcc' + }, callback); + }, + + getTransactions: function (vcc_id, callback) { + return this.resource.request({ + method: 'GET', + uri: '/account/vcc/' + vcc_id + 'transaction', + qs: query + }, callback); + }, + + remove: function (vcc_id, callback) { + return this.resource.request({ + method: 'DELETE', + uri: '/account/vcc/' + vcc_id + }, callback); + }, + +}; + +module.exports = VirtualCreditCard; diff --git a/package-lock.json b/package-lock.json index 1a8ea71..7e318b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,580 +1,8 @@ { - "name": "checkbook-api", - "version": "3.2.4", - "lockfileVersion": 2, + "name": "checkbook-api-ts", + "version": "1.1.0", + "lockfileVersion": 1, "requires": true, - "packages": { - "": { - "name": "checkbook-api", - "version": "3.2.4", - "license": "MIT", - "dependencies": { - "request": "^2.88.0" - }, - "devDependencies": { - "rimraf": "^3.0.2", - "typescript": "^4.3.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "node_modules/json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "node_modules/jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "node_modules/mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "dependencies": { - "mime-db": "1.49.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "engines": { - "node": "*" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - } - }, "dependencies": { "ajv": { "version": "6.12.6", diff --git a/package.json b/package.json index e095ccc..789fe35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.0.0", + "version": "1.1.0", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/checkbook.ts b/ts/checkbook.ts index 27df9f9..f1566b9 100644 --- a/ts/checkbook.ts +++ b/ts/checkbook.ts @@ -4,6 +4,7 @@ import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; import { User } from "./endpoints/User"; +import { VirtualCreditCard } from "./endpoints/vcc"; export default class Checkbook { checks: Check; resource: Resource; @@ -11,6 +12,7 @@ export default class Checkbook { subscriptions: Subscription; banks: Bank; users: User; + virtualCreditCards: VirtualCreditCard; /** * */ @@ -40,5 +42,6 @@ export default class Checkbook { this.subscriptions = new Subscription(this.resource); this.banks = new Bank(this.resource); this.users = new User(this.resource); + this.virtualCreditCards = new VirtualCreditCard(this.resource); } } diff --git a/ts/endpoints/vcc.ts b/ts/endpoints/vcc.ts new file mode 100644 index 0000000..d53c15f --- /dev/null +++ b/ts/endpoints/vcc.ts @@ -0,0 +1,69 @@ +import { Resource } from "../resource"; + +export class VirtualCreditCard { + /** + * + */ + constructor(private readonly resource: Resource) {} + + add( + params: { line_1: string; city: string; state: string; zip: string }, + callback: (err, response) => void, + idempotencyKey?: string + ) { + return this.resource.request( + { + method: "POST", + uri: "/account/vcc", + body: params, + }, + callback, + idempotencyKey + ); + } + + update( + vcc_id: string, + params: { name?: string; default: true }, + callback: (err, response) => void + ) { + return this.resource.request( + { + method: "PUT", + uri: "/account/vcc" + vcc_id, + body: params, + }, + callback + ); + } + + get(callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/account/vcc", + }, + callback + ); + } + + getTransactions(vcc_id: string, callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/account/vcc" + vcc_id + "/transaction", + }, + callback + ); + } + + remove(vcc_id: string, callback: (err, response) => void) { + return this.resource.request( + { + method: "DELETE", + uri: "/account/vcc/" + vcc_id, + }, + callback + ); + } +} From 48e4ecf99a57b0024aeaa0ebb5f9dbe13de20ab7 Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Tue, 15 Mar 2022 20:04:09 +0200 Subject: [PATCH 12/27] Added address to VCC params --- ts/endpoints/vcc.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/endpoints/vcc.ts b/ts/endpoints/vcc.ts index d53c15f..5687131 100644 --- a/ts/endpoints/vcc.ts +++ b/ts/endpoints/vcc.ts @@ -7,7 +7,9 @@ export class VirtualCreditCard { constructor(private readonly resource: Resource) {} add( - params: { line_1: string; city: string; state: string; zip: string }, + params: { + address: { line_1: string; city: string; state: string; zip: string }; + }, callback: (err, response) => void, idempotencyKey?: string ) { @@ -24,7 +26,7 @@ export class VirtualCreditCard { update( vcc_id: string, - params: { name?: string; default: true }, + params: { name?: string; default?: boolean }, callback: (err, response) => void ) { return this.resource.request( From 9c0b6af8c12df6dbee19c87152045fbeb75aaacc Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Tue, 15 Mar 2022 20:04:45 +0200 Subject: [PATCH 13/27] Synced changes --- dist/ts/endpoints/vcc.d.ts | 12 +++++++----- dist/ts/endpoints/vcc.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/dist/ts/endpoints/vcc.d.ts b/dist/ts/endpoints/vcc.d.ts index f2b144e..0bee606 100644 --- a/dist/ts/endpoints/vcc.d.ts +++ b/dist/ts/endpoints/vcc.d.ts @@ -3,14 +3,16 @@ export declare class VirtualCreditCard { private readonly resource; constructor(resource: Resource); add(params: { - line_1: string; - city: string; - state: string; - zip: string; + address: { + line_1: string; + city: string; + state: string; + zip: string; + }; }, callback: (err: any, response: any) => void, idempotencyKey?: string): void; update(vcc_id: string, params: { name?: string; - default: true; + default?: boolean; }, callback: (err: any, response: any) => void): void; get(callback: (err: any, response: any) => void): void; getTransactions(vcc_id: string, callback: (err: any, response: any) => void): void; diff --git a/dist/ts/endpoints/vcc.js.map b/dist/ts/endpoints/vcc.js.map index bd5d9a5..f058afc 100644 --- a/dist/ts/endpoints/vcc.js.map +++ b/dist/ts/endpoints/vcc.js.map @@ -1 +1 @@ -{"version":3,"file":"vcc.js","sourceRoot":"","sources":["../../../ts/endpoints/vcc.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAI5B,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,GAAG,CACD,MAAoE,EACpE,QAAiC,EACjC,cAAuB;QAEvB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,MAAc,EACd,MAAwC,EACxC,QAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM;YAC5B,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAiC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;SACpB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,MAAc,EAAE,QAAiC;QAC/D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,cAAc;SAC9C,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,QAAiC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,eAAe,GAAG,MAAM;SAC9B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAlED,8CAkEC"} \ No newline at end of file +{"version":3,"file":"vcc.js","sourceRoot":"","sources":["../../../ts/endpoints/vcc.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAI5B,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,GAAG,CACD,MAEC,EACD,QAAiC,EACjC,cAAuB;QAEvB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,MAAc,EACd,MAA4C,EAC5C,QAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM;YAC5B,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAiC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;SACpB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,MAAc,EAAE,QAAiC;QAC/D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,cAAc;SAC9C,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,QAAiC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,eAAe,GAAG,MAAM;SAC9B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AApED,8CAoEC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index e0440ed..7644db5 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","eafcb5b1f314f66b987576d44e5ecf9f4e50eba3ffcffe7fa7f4d00c9518e908","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","691e958cbe0ced2b0fb979b88368873afa64d0a4a4eb706420d7a5ff0d63f829","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file From 3a5e6b7da0b58e89536c51582bdafe3947b0828f Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Wed, 16 Mar 2022 00:05:54 +0200 Subject: [PATCH 14/27] Added an update function for bank endpoint --- dist/ts/endpoints/bank.d.ts | 1 + dist/ts/endpoints/bank.js | 43 +++++---- dist/ts/endpoints/bank.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- lib/endpoints/bank.js | 20 +++-- package-lock.json | 2 +- package.json | 2 +- ts/endpoints/bank.ts | 159 +++++++++++++++++++++------------- 8 files changed, 144 insertions(+), 87 deletions(-) diff --git a/dist/ts/endpoints/bank.d.ts b/dist/ts/endpoints/bank.d.ts index 07f8b00..b807db1 100644 --- a/dist/ts/endpoints/bank.d.ts +++ b/dist/ts/endpoints/bank.d.ts @@ -11,4 +11,5 @@ export declare class Bank { }, callback: (err: any, response: any) => void, idempotencyKey?: any): void; addBankAccount(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; verifyMicrodesposits(params: any, callback: (err: any, response: any) => void): void; + update(bank_id: any, params: any, callback: (err: any, response: any) => void): void; } diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js index 85e8b17..aaac0a4 100644 --- a/dist/ts/endpoints/bank.js +++ b/dist/ts/endpoints/bank.js @@ -7,48 +7,55 @@ class Bank { } list(callback) { return this.resource.request({ - method: 'GET', - uri: '/bank' + method: "GET", + uri: "/bank", }, callback); } institutions(callback) { return this.resource.request({ - method: 'GET', - uri: '/bank/institutions' + method: "GET", + uri: "/bank/institutions", }, callback); } delete(bank_id, callback) { return this.resource.request({ - method: 'DELETE', - uri: '/bank/' + bank_id + method: "DELETE", + uri: "/bank/" + bank_id, }, callback); } instantAccountVerification(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/bank/iav', - body: params + method: "POST", + uri: "/bank/iav", + body: params, }, callback, idempotencyKey); } instantAccountVerificationPlaid(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/bank/iav/plaid', - body: params + method: "POST", + uri: "/bank/iav/plaid", + body: params, }, callback, idempotencyKey); } addBankAccount(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/bank', - body: params + method: "POST", + uri: "/bank", + body: params, }, callback, idempotencyKey); } verifyMicrodesposits(params, callback) { return this.resource.request({ - method: 'POST', - uri: '/bank/verify', - body: params + method: "POST", + uri: "/bank/verify", + body: params, + }, callback); + } + update(bank_id, params, callback) { + return this.resource.request({ + method: "PUT", + uri: "/bank/" + bank_id, + body: params, }, callback); } } diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map index 399bafa..9f2d45f 100644 --- a/dist/ts/endpoints/bank.js.map +++ b/dist/ts/endpoints/bank.js.map @@ -1 +1 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,IAAI,CAAC,QAAiC;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,QAAiC;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,0BAA0B,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACjF,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,+BAA+B,CAAC,MAA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dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 7644db5..469b63b 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","b8e6de915f2c763914b7dc824ff753f388fed7b06f5e7f4a8403a4b672b1665f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","691e958cbe0ced2b0fb979b88368873afa64d0a4a4eb706420d7a5ff0d63f829","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","9fffb69142431718e0f2ee6cc7b3f87bdb6a7bff6b8ae70d0aca7f07fa0fdc8f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","691e958cbe0ced2b0fb979b88368873afa64d0a4a4eb706420d7a5ff0d63f829","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/lib/endpoints/bank.js b/lib/endpoints/bank.js index 5171554..dce72c0 100644 --- a/lib/endpoints/bank.js +++ b/lib/endpoints/bank.js @@ -6,28 +6,28 @@ function Bank(resource) { Bank.prototype = { - list: function(callback) { + list: function (callback) { return this.resource.request({ method: 'GET', uri: '/bank' }, callback); }, - institutions: function(callback) { + institutions: function (callback) { return this.resource.request({ method: 'GET', uri: '/bank/institutions' }, callback); }, - delete: function(bank_id, callback) { + delete: function (bank_id, callback) { return this.resource.request({ method: 'DELETE', uri: '/bank/' + bank_id }, callback); }, - instantAccountVerification: function(params, callback, idempotencyKey) { + instantAccountVerification: function (params, callback, idempotencyKey) { return this.resource.request({ method: 'POST', uri: '/bank/iav', @@ -35,7 +35,7 @@ Bank.prototype = { }, callback, idempotencyKey); }, - addBankAccount: function(params, callback, idempotencyKey) { + addBankAccount: function (params, callback, idempotencyKey) { return this.resource.request({ method: 'POST', uri: '/bank', @@ -43,12 +43,20 @@ Bank.prototype = { }, callback, idempotencyKey); }, - verifyMicrodesposits: function(params, callback) { + verifyMicrodesposits: function (params, callback) { return this.resource.request({ method: 'POST', uri: '/bank/verify', body: params }, callback); + }, + + update: function (bank_id, params, callback) { + return this.resource.request({ + method: 'PUT', + uri: '/bank/' + bank_id, + body: params + }, callback); } }; diff --git a/package-lock.json b/package-lock.json index 7e318b7..a702acf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 789fe35..e1cb87e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.0", + "version": "1.1.1", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts index 52c4433..8f7a461 100644 --- a/ts/endpoints/bank.ts +++ b/ts/endpoints/bank.ts @@ -1,63 +1,104 @@ import { Resource } from "../resource"; export class Bank { - /** - * - */ - constructor(private readonly resource: Resource) { - - } - - list(callback: (err, response) => void) { - return this.resource.request({ - method: 'GET', - uri: '/bank' - }, callback); - } - - institutions(callback: (err, response) => void) { - return this.resource.request({ - method: 'GET', - uri: '/bank/institutions' - }, callback); - } - - delete(bank_id, callback: (err, response) => void) { - return this.resource.request({ - method: 'DELETE', - uri: '/bank/' + bank_id - }, callback); - } - - instantAccountVerification(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/bank/iav', - body: params - }, callback, idempotencyKey); - } - - instantAccountVerificationPlaid(params: { processor_token: string }, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/bank/iav/plaid', - body: params - }, callback, idempotencyKey); - } - - addBankAccount(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/bank', - body: params - }, callback, idempotencyKey); - } - - verifyMicrodesposits(params, callback: (err, response) => void) { - return this.resource.request({ - method: 'POST', - uri: '/bank/verify', - body: params - }, callback); - } + /** + * + */ + constructor(private readonly resource: Resource) {} + + list(callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/bank", + }, + callback + ); + } + + institutions(callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/bank/institutions", + }, + callback + ); + } + + delete(bank_id, callback: (err, response) => void) { + return this.resource.request( + { + method: "DELETE", + uri: "/bank/" + bank_id, + }, + callback + ); + } + + instantAccountVerification( + params, + callback: (err, response) => void, + idempotencyKey? + ) { + return this.resource.request( + { + method: "POST", + uri: "/bank/iav", + body: params, + }, + callback, + idempotencyKey + ); + } + + instantAccountVerificationPlaid( + params: { processor_token: string }, + callback: (err, response) => void, + idempotencyKey? + ) { + return this.resource.request( + { + method: "POST", + uri: "/bank/iav/plaid", + body: params, + }, + callback, + idempotencyKey + ); + } + + addBankAccount(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request( + { + method: "POST", + uri: "/bank", + body: params, + }, + callback, + idempotencyKey + ); + } + + verifyMicrodesposits(params, callback: (err, response) => void) { + return this.resource.request( + { + method: "POST", + uri: "/bank/verify", + body: params, + }, + callback + ); + } + + update(bank_id, params, callback: (err, response) => void) { + return this.resource.request( + { + method: "PUT", + uri: "/bank/" + bank_id, + body: params, + }, + callback + ); + } } From 457db0021968d8e81fe9872cd6a44eba7efe4361 Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Thu, 17 Mar 2022 11:13:49 +0200 Subject: [PATCH 15/27] BugFix: Add missing slashes --- lib/endpoints/vcc.js | 2 +- ts/endpoints/vcc.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/endpoints/vcc.js b/lib/endpoints/vcc.js index 691e87e..281536a 100644 --- a/lib/endpoints/vcc.js +++ b/lib/endpoints/vcc.js @@ -17,7 +17,7 @@ VirtualCreditCard.prototype = { update: function (vcc_id, params, callback) { return this.resource.request({ method: 'PUT', - uri: '/account/vcc' + vcc_id, + uri: '/account/vcc/' + vcc_id, body: params }, callback); }, diff --git a/ts/endpoints/vcc.ts b/ts/endpoints/vcc.ts index 5687131..67448e2 100644 --- a/ts/endpoints/vcc.ts +++ b/ts/endpoints/vcc.ts @@ -32,7 +32,7 @@ export class VirtualCreditCard { return this.resource.request( { method: "PUT", - uri: "/account/vcc" + vcc_id, + uri: "/account/vcc/" + vcc_id, body: params, }, callback @@ -53,7 +53,7 @@ export class VirtualCreditCard { return this.resource.request( { method: "GET", - uri: "/account/vcc" + vcc_id + "/transaction", + uri: "/account/vcc/" + vcc_id + "/transaction", }, callback ); From ff4892a4acda5bcb2cf60702aa08d06fa62b255f Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Thu, 17 Mar 2022 11:14:21 +0200 Subject: [PATCH 16/27] Version bump --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index a702acf..fd91e2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e1cb87e..63a3e7c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.1", + "version": "1.1.2", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", From 63e10b703210a7482df552e97cdcd4a3c4e9548a Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Thu, 17 Mar 2022 20:02:39 +0200 Subject: [PATCH 17/27] Version bump, Updated dist --- dist/ts/endpoints/vcc.js | 4 ++-- dist/ts/endpoints/vcc.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package-lock.json | 2 +- package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/ts/endpoints/vcc.js b/dist/ts/endpoints/vcc.js index 424b30d..618f177 100644 --- a/dist/ts/endpoints/vcc.js +++ b/dist/ts/endpoints/vcc.js @@ -15,7 +15,7 @@ class VirtualCreditCard { update(vcc_id, params, callback) { return this.resource.request({ method: "PUT", - uri: "/account/vcc" + vcc_id, + uri: "/account/vcc/" + vcc_id, body: params, }, callback); } @@ -28,7 +28,7 @@ class VirtualCreditCard { getTransactions(vcc_id, callback) { return this.resource.request({ method: "GET", - uri: "/account/vcc" + vcc_id + "/transaction", + uri: "/account/vcc/" + vcc_id + "/transaction", }, callback); } remove(vcc_id, callback) { diff --git a/dist/ts/endpoints/vcc.js.map b/dist/ts/endpoints/vcc.js.map index f058afc..6a8b64c 100644 --- a/dist/ts/endpoints/vcc.js.map +++ b/dist/ts/endpoints/vcc.js.map @@ -1 +1 @@ -{"version":3,"file":"vcc.js","sourceRoot":"","sources":["../../../ts/endpoints/vcc.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAI5B,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,GAAG,CACD,MAEC,EACD,QAAiC,EACjC,cAAuB;QAEvB,OAAO,IAAI,CAAC,Q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AM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,MAAc,EACd,MAA4C,EAC5C,QAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,eAAe,GAAG,MAAM;YAC7B,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAiC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,cAAc;SACpB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,MAAc,EAAE,QAAiC;QAC/D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,eAAe,GAAG,MAAM,GAAG,cAAc;SAC/C,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,MAAc,EAAE,QAAiC;QACtD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,eAAe,GAAG,MAAM;SAC9B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AApED,8CAoEC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 469b63b..f4930d2 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","9fffb69142431718e0f2ee6cc7b3f87bdb6a7bff6b8ae70d0aca7f07fa0fdc8f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","691e958cbe0ced2b0fb979b88368873afa64d0a4a4eb706420d7a5ff0d63f829","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","9fffb69142431718e0f2ee6cc7b3f87bdb6a7bff6b8ae70d0aca7f07fa0fdc8f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fd91e2c..35703f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 63a3e7c..7bee868 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.2", + "version": "1.1.3", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", From a7ba443ec8bb0c040efb790cfa81792bf5afc842 Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Thu, 11 May 2023 00:00:36 +0300 Subject: [PATCH 18/27] Added releaseMicrodesposits for banks --- README.md | 1 + dist/ts/endpoints/bank.d.ts | 1 + dist/ts/endpoints/bank.js | 7 +++++++ dist/ts/endpoints/bank.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- lib/endpoints/bank.js | 8 ++++++++ package-lock.json | 2 +- package.json | 2 +- ts/endpoints/bank.ts | 10 ++++++++++ 9 files changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d20dd17..6a2bef2 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ You can click on the :book: icon to access the detailed API reference for each m * ```delete(bank_id, callback)``` [:book:](https://docs.checkbook.io/reference#delete-bank) * ```instantAccountVerification(params, callback[, idempotencyKey])``` [:book:](https://docs.checkbook.io/reference#post-bank-iav) * ```addBankAccount(params, callback[, idempotencyKey])``` [:book:](https://docs.checkbook.io/reference#post-bank) + * ```releaseMicrodesposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-release) * ```verifyMicrodesposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-verify) * __Checkbook.users__ diff --git a/dist/ts/endpoints/bank.d.ts b/dist/ts/endpoints/bank.d.ts index b807db1..7bb4038 100644 --- a/dist/ts/endpoints/bank.d.ts +++ b/dist/ts/endpoints/bank.d.ts @@ -10,6 +10,7 @@ export declare class Bank { processor_token: string; }, callback: (err: any, response: any) => void, idempotencyKey?: any): void; addBankAccount(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + releaseMicrodesposits(params: any, callback: (err: any, response: any) => void): void; verifyMicrodesposits(params: any, callback: (err: any, response: any) => void): void; update(bank_id: any, params: any, callback: (err: any, response: any) => void): void; } diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js index aaac0a4..ee504f6 100644 --- a/dist/ts/endpoints/bank.js +++ b/dist/ts/endpoints/bank.js @@ -44,6 +44,13 @@ class Bank { body: params, }, callback, idempotencyKey); } + releaseMicrodesposits(params, callback) { + return this.resource.request({ + method: "POST", + uri: "/bank/release", + body: params, + }, callback); + } verifyMicrodesposits(params, callback) { return this.resource.request({ method: "POST", diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map index 9f2d45f..3cc6413 100644 --- a/dist/ts/endpoints/bank.js.map +++ b/dist/ts/endpoints/bank.js.map @@ -1 +1 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIf,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,IAAI,CAAC,QAAiC;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC1B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SACxB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,0BAA0B,CACxB,MAAM,EACN,QAAiC,EACjC,cAAe;QAEf,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,WAAW;YAChB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,+BAA+B,CAC7B,MAAmC,EACnC,QAAiC,EACjC,cAAe;QAEf,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACvE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,oBAAoB,CAAC,MAAM,EAAE,QAAiC;QAC5D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAiC;QACvD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ,GAAG,OAAO;YACvB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AArGD,oBAqGC"} \ No newline at end of file +{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIf,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,IAAI,CAAC,QAAiC;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBA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cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAiC;QACvD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ,GAAG,OAAO;YACvB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AA/GD,oBA+GC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index f4930d2..5cadd2e 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","9fffb69142431718e0f2ee6cc7b3f87bdb6a7bff6b8ae70d0aca7f07fa0fdc8f","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","037f73bdc1518ea8684a86a8adc99f1fea2431f2826240adc9c037f3ff0dccd1","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/lib/endpoints/bank.js b/lib/endpoints/bank.js index dce72c0..66c5238 100644 --- a/lib/endpoints/bank.js +++ b/lib/endpoints/bank.js @@ -43,6 +43,14 @@ Bank.prototype = { }, callback, idempotencyKey); }, + releaseMicrodesposits: function (params, callback) { + return this.resource.request({ + method: 'POST', + uri: '/bank/release', + body: params + }, callback); + }, + verifyMicrodesposits: function (params, callback) { return this.resource.request({ method: 'POST', diff --git a/package-lock.json b/package-lock.json index 35703f8..301395d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.3", + "version": "1.1.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7bee868..a9b6ec8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.3", + "version": "1.1.4", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts index 8f7a461..1de08e5 100644 --- a/ts/endpoints/bank.ts +++ b/ts/endpoints/bank.ts @@ -80,6 +80,16 @@ export class Bank { ); } + releaseMicrodesposits(params, callback: (err, response) => void) { + return this.resource.request( + { + method: "POST", + uri: "/bank/release", + body: params, + }, + callback + ); + } verifyMicrodesposits(params, callback: (err, response) => void) { return this.resource.request( { From 29ece8f5974f2788365c3270fd59f53c6e024403 Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Wed, 17 May 2023 22:54:05 +0300 Subject: [PATCH 19/27] Fixed Typo --- README.md | 4 ++-- dist/ts/endpoints/bank.d.ts | 4 ++-- dist/ts/endpoints/bank.js | 4 ++-- dist/ts/endpoints/bank.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- lib/endpoints/bank.js | 4 ++-- package-lock.json | 2 +- package.json | 2 +- samples/banks.js | 2 +- ts/endpoints/bank.ts | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6a2bef2..a507f93 100644 --- a/README.md +++ b/README.md @@ -118,8 +118,8 @@ You can click on the :book: icon to access the detailed API reference for each m * ```delete(bank_id, callback)``` [:book:](https://docs.checkbook.io/reference#delete-bank) * ```instantAccountVerification(params, callback[, idempotencyKey])``` [:book:](https://docs.checkbook.io/reference#post-bank-iav) * ```addBankAccount(params, callback[, idempotencyKey])``` [:book:](https://docs.checkbook.io/reference#post-bank) - * ```releaseMicrodesposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-release) - * ```verifyMicrodesposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-verify) + * ```releaseMicrodeposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-release) + * ```verifyMicrodeposits(params, callback)``` [:book:](https://docs.checkbook.io/reference#post-bank-verify) * __Checkbook.users__ * ```create(params, callback[, idempotencyKey])``` [:book:](https://docs.checkbook.io/reference#post-user) diff --git a/dist/ts/endpoints/bank.d.ts b/dist/ts/endpoints/bank.d.ts index 7bb4038..377ab6a 100644 --- a/dist/ts/endpoints/bank.d.ts +++ b/dist/ts/endpoints/bank.d.ts @@ -10,7 +10,7 @@ export declare class Bank { processor_token: string; }, callback: (err: any, response: any) => void, idempotencyKey?: any): void; addBankAccount(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; - releaseMicrodesposits(params: any, callback: (err: any, response: any) => void): void; - verifyMicrodesposits(params: any, callback: (err: any, response: any) => void): void; + releaseMicrodeposits(params: any, callback: (err: any, response: any) => void): void; + verifyMicrodeposits(params: any, callback: (err: any, response: any) => void): void; update(bank_id: any, params: any, callback: (err: any, response: any) => void): void; } diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js index ee504f6..e997eac 100644 --- a/dist/ts/endpoints/bank.js +++ b/dist/ts/endpoints/bank.js @@ -44,14 +44,14 @@ class Bank { body: params, }, callback, idempotencyKey); } - releaseMicrodesposits(params, callback) { + releaseMicrodeposits(params, callback) { return this.resource.request({ method: "POST", uri: "/bank/release", body: params, }, callback); } - verifyMicrodesposits(params, callback) { + verifyMicrodeposits(params, callback) { return this.resource.request({ method: "POST", uri: "/bank/verify", diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map index 3cc6413..8545e17 100644 --- a/dist/ts/endpoints/bank.js.map +++ b/dist/ts/endpoints/bank.js.map @@ -1 +1 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIf,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,IAAI,CAAC,QAAiC;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,oBAAoB;SAC1B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC/C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SACxB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,0BAA0B,CACxB,MAAM,EACN,QAAiC,EACjC,cAAe;QAEf,OAAO,IAAI,CAAC,QAAQ,CAAC,OA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E,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,oBAAoB,CAAC,MAAM,EAAE,QAAiC;QAC5D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IACD,mBAAmB,CAAC,MAAM,EAAE,QAAiC;QAC3D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,cAAc;YACnB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAiC;QACvD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ,GAAG,OAAO;YACvB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AA/GD,oBA+GC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 5cadd2e..4a452d9 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","037f73bdc1518ea8684a86a8adc99f1fea2431f2826240adc9c037f3ff0dccd1","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","a2cd01a07cb91c503f9290f6dc29d504e023ab99701f8407c47067ef6e03ef94","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/lib/endpoints/bank.js b/lib/endpoints/bank.js index 66c5238..136780f 100644 --- a/lib/endpoints/bank.js +++ b/lib/endpoints/bank.js @@ -43,7 +43,7 @@ Bank.prototype = { }, callback, idempotencyKey); }, - releaseMicrodesposits: function (params, callback) { + releaseMicrodeposits: function (params, callback) { return this.resource.request({ method: 'POST', uri: '/bank/release', @@ -51,7 +51,7 @@ Bank.prototype = { }, callback); }, - verifyMicrodesposits: function (params, callback) { + verifyMicrodeposits: function (params, callback) { return this.resource.request({ method: 'POST', uri: '/bank/verify', diff --git a/package-lock.json b/package-lock.json index 301395d..7e5b5c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.4", + "version": "1.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a9b6ec8..7d8d323 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.4", + "version": "1.1.5", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/samples/banks.js b/samples/banks.js index ea159d6..a645f12 100644 --- a/samples/banks.js +++ b/samples/banks.js @@ -76,7 +76,7 @@ Checkbook.banks.addBankAccount({ https://docs.checkbook.io/reference#post-bank-verify */ /* -Checkbook.banks.verifyMicrodesposits({ +Checkbook.banks.verifyMicrodeposits({ amount_1: 0.07, amount_2: 0.15 }, function (error, response) { diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts index 1de08e5..0673fd0 100644 --- a/ts/endpoints/bank.ts +++ b/ts/endpoints/bank.ts @@ -80,7 +80,7 @@ export class Bank { ); } - releaseMicrodesposits(params, callback: (err, response) => void) { + releaseMicrodeposits(params, callback: (err, response) => void) { return this.resource.request( { method: "POST", @@ -90,7 +90,7 @@ export class Bank { callback ); } - verifyMicrodesposits(params, callback: (err, response) => void) { + verifyMicrodeposits(params, callback: (err, response) => void) { return this.resource.request( { method: "POST", From b46e3abfdbb50c91e9d18a1fe75835ee7a3f37ce Mon Sep 17 00:00:00 2001 From: Haim Omesi Date: Mon, 24 Jul 2023 13:32:38 +0300 Subject: [PATCH 20/27] return response instead of body for failed requests --- dist/ts/resource.js | 2 +- dist/ts/resource.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package-lock.json | 433 +++++++++++++++++++++++++++----------- package.json | 2 +- ts/resource.ts | 6 +- 6 files changed, 317 insertions(+), 130 deletions(-) diff --git a/dist/ts/resource.js b/dist/ts/resource.js index 80bfc03..8fdc802 100644 --- a/dist/ts/resource.js +++ b/dist/ts/resource.js @@ -20,7 +20,7 @@ class Resource { } if (![200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; - return callback.call(this, error, body); + return callback.call(this, error, response); } return callback.call(this, null, body); }); diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map index 0165a0a..dd8a902 100644 --- a/dist/ts/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AAC;QACzC,CAAC,CACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAO,EAAE,cAAe;QACxC,OAAO,mCAAQ,OAAO,GAAK,IAAI,CAAC,cAAc,CAAE,CAAC;QAEjD,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;SACrD;QAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAEzC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 4a452d9..eb23e3a 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"0900adffc98eb95a23c795f279b7554d78b0245b9405016b4e03a74e930b3e2e","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","a2cd01a07cb91c503f9290f6dc29d504e023ab99701f8407c47067ef6e03ef94","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"5b9642d490990e2ab0c0402b9ba6740aab7ed5f0d907c8f701fd60daa78754fa","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","a2cd01a07cb91c503f9290f6dc29d504e023ab99701f8407c47067ef6e03ef94","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7e5b5c7..c50be1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,329 +1,459 @@ { "name": "checkbook-api-ts", - "version": "1.1.5", - "lockfileVersion": 1, + "version": "1.1.6", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "ajv": { + "packages": { + "": { + "name": "checkbook-api-ts", + "version": "1.1.6", + "license": "MIT", + "dependencies": { + "request": "^2.88.0" + }, + "devDependencies": { + "rimraf": "^3.0.2", + "typescript": "^4.3.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { + "license": "MIT", + "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "asn1": { + "node_modules/asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { + "license": "MIT", + "dependencies": { "safer-buffer": "~2.1.0" } }, - "assert-plus": { + "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "license": "MIT", + "engines": { + "node": ">=0.8" + } }, - "asynckit": { + "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "license": "MIT" }, - "aws-sign2": { + "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "license": "Apache-2.0", + "engines": { + "node": "*" + } }, - "aws4": { + "node_modules/aws4": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "license": "MIT" }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, - "bcrypt-pbkdf": { + "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "tweetnacl": "^0.14.3" } }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "caseless": { + "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "license": "Apache-2.0" }, - "combined-stream": { + "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { + "license": "MIT", + "dependencies": { "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" } }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "license": "MIT" }, - "core-util-is": { + "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "license": "MIT" }, - "dashdash": { + "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { + "license": "MIT", + "dependencies": { "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" } }, - "delayed-stream": { + "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } }, - "ecc-jsbn": { + "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { + "license": "MIT", + "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, - "extend": { + "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" }, - "extsprintf": { + "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "engines": [ + "node >=0.6.0" + ], + "license": "MIT" }, - "fast-deep-equal": { + "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, - "fast-json-stable-stringify": { + "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "license": "MIT" }, - "forever-agent": { + "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "license": "Apache-2.0", + "engines": { + "node": "*" + } }, - "form-data": { + "node_modules/form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { + "license": "MIT", + "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" } }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "dev": true, + "license": "ISC" }, - "getpass": { + "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { + "license": "MIT", + "dependencies": { "assert-plus": "^1.0.0" } }, - "glob": { + "node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "har-schema": { + "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "license": "ISC", + "engines": { + "node": ">=4" + } }, - "har-validator": { + "node_modules/har-validator": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "requires": { + "license": "MIT", + "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" } }, - "http-signature": { + "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { + "license": "MIT", + "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, - "is-typedarray": { + "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "license": "MIT" }, - "isstream": { + "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "license": "MIT" }, - "jsbn": { + "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "license": "MIT" }, - "json-schema": { + "node_modules/json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, - "json-schema-traverse": { + "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" }, - "json-stringify-safe": { + "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "license": "ISC" }, - "jsprim": { + "node_modules/jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", "json-schema": "0.2.3", "verror": "1.10.0" } }, - "mime-db": { + "node_modules/mime-db": { "version": "1.49.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } }, - "mime-types": { + "node_modules/mime-types": { "version": "2.1.32", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "requires": { + "license": "MIT", + "dependencies": { "mime-db": "1.49.0" + }, + "engines": { + "node": ">= 0.6" } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "oauth-sign": { + "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "license": "Apache-2.0", + "engines": { + "node": "*" + } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "wrappy": "1" } }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "performance-now": { + "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "license": "MIT" }, - "psl": { + "node_modules/psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "license": "MIT" }, - "punycode": { + "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "license": "MIT", + "engines": { + "node": ">=6" + } }, - "qs": { + "node_modules/qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.6" + } }, - "request": { + "node_modules/request": { "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { + "license": "Apache-2.0", + "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", "caseless": "~0.12.0", @@ -344,32 +474,59 @@ "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" } }, - "rimraf": { + "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, - "sshpk": { + "node_modules/sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { + "license": "MIT", + "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", "bcrypt-pbkdf": "^1.0.0", @@ -379,64 +536,94 @@ "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "tough-cookie": { + "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { + "license": "BSD-3-Clause", + "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" } }, - "tunnel-agent": { + "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { + "license": "Apache-2.0", + "dependencies": { "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" } }, - "tweetnacl": { + "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "license": "Unlicense" }, - "typescript": { + "node_modules/typescript": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", - "dev": true + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "uri-js": { + "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { + "license": "BSD-2-Clause", + "dependencies": { "punycode": "^2.1.0" } }, - "uuid": { + "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } }, - "verror": { + "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { + "engines": [ + "node >=0.6.0" + ], + "license": "MIT", + "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "license": "ISC" } } } diff --git a/package.json b/package.json index 7d8d323..23ae18d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.5", + "version": "1.1.6", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/resource.ts b/ts/resource.ts index da3f315..14be014 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -1,6 +1,6 @@ "use strict"; -import * as request from 'request'; +import * as request from "request"; export class Resource { private readonly baseURI: string; private readonly defaultOptions: { @@ -28,7 +28,7 @@ export class Resource { if (![200, 201].includes(response.statusCode) || body.error) { error = response.statusCode + " " + body.error; - return callback.call(this, error, body); + return callback.call(this, error, response); } return callback.call(this, null, body); @@ -37,7 +37,7 @@ export class Resource { } getRequestOptions(options, idempotencyKey?) { - options = {...options, ...this.defaultOptions}; + options = { ...options, ...this.defaultOptions }; if (idempotencyKey) { options.headers["Idempotency-Key"] = idempotencyKey; From ced2ebb6b081ee9e3652f5c01729de106c40e98b Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Tue, 10 Oct 2023 15:35:25 +0300 Subject: [PATCH 21/27] Add Wallet --- dist/ts/checkbook.d.ts | 4 ++- dist/ts/checkbook.js | 6 ++-- dist/ts/checkbook.js.map | 2 +- dist/ts/endpoints/User.js | 2 +- dist/ts/endpoints/User.js.map | 2 +- dist/ts/endpoints/bank.js | 18 +++++----- dist/ts/endpoints/bank.js.map | 2 +- dist/ts/endpoints/wallet.d.ts | 13 +++++++ dist/ts/endpoints/wallet.js | 36 +++++++++++++++++++ dist/ts/endpoints/wallet.js.map | 1 + dist/tsconfig.tsbuildinfo | 2 +- package-lock.json | 14 ++++---- package.json | 4 +-- ts/checkbook.ts | 5 ++- ts/endpoints/bank.ts | 18 +++++----- ts/endpoints/wallet.ts | 61 +++++++++++++++++++++++++++++++++ 16 files changed, 154 insertions(+), 36 deletions(-) create mode 100644 dist/ts/endpoints/wallet.d.ts create mode 100644 dist/ts/endpoints/wallet.js create mode 100644 dist/ts/endpoints/wallet.js.map create mode 100644 ts/endpoints/wallet.ts diff --git a/dist/ts/checkbook.d.ts b/dist/ts/checkbook.d.ts index f32a9b3..5f85c8e 100644 --- a/dist/ts/checkbook.d.ts +++ b/dist/ts/checkbook.d.ts @@ -3,8 +3,9 @@ import { Check } from "./endpoints/check"; import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; -import { User } from "./endpoints/User"; +import { User } from "./endpoints/user"; import { VirtualCreditCard } from "./endpoints/vcc"; +import { Wallet } from "./endpoints/wallet"; export default class Checkbook { checks: Check; resource: Resource; @@ -13,6 +14,7 @@ export default class Checkbook { banks: Bank; users: User; virtualCreditCards: VirtualCreditCard; + wallet: Wallet; constructor(config: { env?: string; auth?: string; diff --git a/dist/ts/checkbook.js b/dist/ts/checkbook.js index 1ab3801..7146412 100644 --- a/dist/ts/checkbook.js +++ b/dist/ts/checkbook.js @@ -5,8 +5,9 @@ const check_1 = require("./endpoints/check"); const invoice_1 = require("./endpoints/invoice"); const subscription_1 = require("./endpoints/subscription"); const bank_1 = require("./endpoints/bank"); -const User_1 = require("./endpoints/User"); +const user_1 = require("./endpoints/user"); const vcc_1 = require("./endpoints/vcc"); +const wallet_1 = require("./endpoints/wallet"); class Checkbook { constructor(config) { if (!config.env || !["demo", "sandbox"].includes(config.env)) { @@ -26,8 +27,9 @@ class Checkbook { this.invoices = new invoice_1.Invoice(this.resource); this.subscriptions = new subscription_1.Subscription(this.resource); this.banks = new bank_1.Bank(this.resource); - this.users = new User_1.User(this.resource); + this.users = new user_1.User(this.resource); this.virtualCreditCards = new vcc_1.VirtualCreditCard(this.resource); + this.wallet = new wallet_1.Wallet(this.resource); } } exports.default = Checkbook; diff --git a/dist/ts/checkbook.js.map b/dist/ts/checkbook.js.map index 58aec6d..133a4cc 100644 --- a/dist/ts/checkbook.js.map +++ b/dist/ts/checkbook.js.map @@ -1 +1 @@ -{"version":3,"file":"checkbook.js","sourceRoot":"","sources":["../../ts/checkbook.ts"],"names":[],"mappings":";;AAAA,yCAAsC;AACtC,6CAA0C;AAC1C,iDAA8C;AAC9C,2DAAwD;AACxD,2CAAwC;AACxC,2CAAwC;AACxC,yCAAoD;AACpD,MAAqB,SAAS;IAW5B,YAAY,MAMX;QACC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YAC5D,MAAM,CAAC,GAAG,GAAG,KAAK,CAAC;SACpB;QAED,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,CAAC,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;SACzC;aAAM,IAAI,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE;YAC9C,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC;SACxD;aAAM;YACL,MAAM,uBAAuB,CAAC;SAC/B;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAQ,CAAC,MAAM,CAAC,CAAC;QAErC,IAAI,CAAC,MAAM,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CA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,IAAI,CAAC,aAAa,GAAG,IAAI,2BAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/D,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACF;AAzCD,4BAyCC"} \ No newline at end of file diff --git a/dist/ts/endpoints/User.js b/dist/ts/endpoints/User.js index eb3f78a..dc14c7b 100644 --- a/dist/ts/endpoints/User.js +++ b/dist/ts/endpoints/User.js @@ -47,4 +47,4 @@ class User { } } exports.User = User; -//# sourceMappingURL=User.js.map \ No newline at end of file +//# sourceMappingURL=user.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/User.js.map b/dist/ts/endpoints/User.js.map index f6be750..2d09eda 100644 --- a/dist/ts/endpoints/User.js.map +++ b/dist/ts/endpoints/User.js.map @@ -1 +1 @@ -{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../ts/endpoints/User.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIb,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAe;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC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AE,MAAM;SACf,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,QAAiC;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,YAAY;YACjB,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,OAAO,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,QAAQ,GAAG,OAAO;SAC1B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,MAAM,EAAE,QAAiC;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACf,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;CAEJ;AAtDD,oBAsDC"} \ No newline at end of file diff --git a/dist/ts/endpoints/bank.js b/dist/ts/endpoints/bank.js index e997eac..6aa0276 100644 --- a/dist/ts/endpoints/bank.js +++ b/dist/ts/endpoints/bank.js @@ -8,60 +8,60 @@ class Bank { list(callback) { return this.resource.request({ method: "GET", - uri: "/bank", + uri: "/account/bank", }, callback); } institutions(callback) { return this.resource.request({ method: "GET", - uri: "/bank/institutions", + uri: "/account/bank/institutions", }, callback); } delete(bank_id, callback) { return this.resource.request({ method: "DELETE", - uri: "/bank/" + bank_id, + uri: "/account/bank/" + bank_id, }, callback); } instantAccountVerification(params, callback, idempotencyKey) { return this.resource.request({ method: "POST", - uri: "/bank/iav", + uri: "/account/bank/iav", body: params, }, callback, idempotencyKey); } instantAccountVerificationPlaid(params, callback, idempotencyKey) { return this.resource.request({ method: "POST", - uri: "/bank/iav/plaid", + uri: "/account/bank/iav/plaid", body: params, }, callback, idempotencyKey); } addBankAccount(params, callback, idempotencyKey) { return this.resource.request({ method: "POST", - uri: "/bank", + uri: "/account/bank", body: params, }, callback, idempotencyKey); } releaseMicrodeposits(params, callback) { return this.resource.request({ method: "POST", - uri: "/bank/release", + uri: "/account/bank/release", body: params, }, callback); } verifyMicrodeposits(params, callback) { return this.resource.request({ method: "POST", - uri: "/bank/verify", + uri: "/account/bank/verify", body: params, }, callback); } update(bank_id, params, callback) { return this.resource.request({ method: "PUT", - uri: "/bank/" + bank_id, + uri: "/account/bank/" + bank_id, body: params, }, callback); } diff --git a/dist/ts/endpoints/bank.js.map b/dist/ts/endpoints/bank.js.map index 8545e17..1cc29bc 100644 --- a/dist/ts/endpoints/bank.js.map +++ b/dist/ts/endpoints/bank.js.map @@ -1 +1 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../ts/endpoints/bank.ts"],"names":[],"mappings":";;;AAEA,MAAa,IAAI;IAIf,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,IAAI,CAAC,QAAiC;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,OAAO;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,YAAY,CAAC,QAAiC;QAC5C,OAAO,IAAI,CAAC,QAAQ,C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..2f48db1 --- /dev/null +++ b/dist/ts/endpoints/wallet.d.ts @@ -0,0 +1,13 @@ +import { Resource } from "../resource"; +export declare class Wallet { + private readonly resource; + constructor(resource: Resource); + add(params: { + name: string; + }, callback: (err: any, response: any) => void, idempotencyKey?: string): void; + update(wallet_id: string, params: { + name?: string; + }, callback: (err: any, response: any) => void): void; + get(callback: (err: any, response: any) => void): void; + remove(wallet_id: string, callback: (err: any, response: any) => void): void; +} diff --git a/dist/ts/endpoints/wallet.js b/dist/ts/endpoints/wallet.js new file mode 100644 index 0000000..a57d631 --- /dev/null +++ b/dist/ts/endpoints/wallet.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Wallet = void 0; +class Wallet { + constructor(resource) { + this.resource = resource; + } + add(params, callback, idempotencyKey) { + return this.resource.request({ + method: "POST", + uri: "/account/wallet", + body: params, + }, callback, idempotencyKey); + } + update(wallet_id, params, callback) { + return this.resource.request({ + method: "PUT", + uri: "/account/wallet/" + wallet_id, + body: params, + }, callback); + } + get(callback) { + return this.resource.request({ + method: "GET", + uri: "/account/wallet", + }, callback); + } + remove(wallet_id, callback) { + return this.resource.request({ + method: "DELETE", + uri: "/account/wallet/" + wallet_id, + }, callback); + } +} +exports.Wallet = Wallet; +//# sourceMappingURL=wallet.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/wallet.js.map b/dist/ts/endpoints/wallet.js.map new file mode 100644 index 0000000..bde775d --- /dev/null +++ b/dist/ts/endpoints/wallet.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wallet.js","sourceRoot":"","sources":["../../../ts/endpoints/wallet.ts"],"names":[],"mappings":";;;AAEA,MAAa,MAAM;IAIjB,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IAEnD,GAAG,CACD,MAEC,EACD,QAAiC,EACjC,cAAuB;QAEvB,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,MAAM,CACJ,SAAiB,EACjB,MAA0B,EAC1B,QAAiC;QAEjC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,kBAAkB,GAAG,SAAS;YACnC,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAiC;QACnC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iBAAiB;SACvB,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,SAAiB,EAAE,QAAiC;QACzD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,kBAAkB,GAAG,SAAS;SACpC,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AA1DD,wBA0DC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index eb23e3a..7b326e0 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},"5b9642d490990e2ab0c0402b9ba6740aab7ed5f0d907c8f701fd60daa78754fa","b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","a2cd01a07cb91c503f9290f6dc29d504e023ab99701f8407c47067ef6e03ef94","725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","289d28c79035eae325cff3672e0a96940c1d9244788a03c055b1c1ccca877173","bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[27],[20,21,22,23,24,25,26],[20]],"referencedMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"exportedModulesMap":[[28,1],[27,2],[24,3],[21,3],[22,3],[23,3],[25,3],[26,3]],"semanticDiagnosticsPerFile":[28,6,5,2,7,8,9,10,11,12,13,14,3,4,18,15,16,17,19,1,27,24,21,22,23,25,26,20]},"version":"4.3.5"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts","../../node_modules/@types/har-format/index.d.ts","../../node_modules/@types/json-schema/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"5b9642d490990e2ab0c0402b9ba6740aab7ed5f0d907c8f701fd60daa78754fa","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","signature":"c14d89b44d7799c988dda669dc2f7f4ea97dd750e7769fb8652fbd8e93a48d84"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"},"b58a196dd8634c1e39b123fd029ca4b9f21a2ab601453bd5cb152cc593786a8b","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b"],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23,33,34]},"version":"5.2.2"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c50be1e..db237d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "checkbook-api-ts", - "version": "1.1.6", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "checkbook-api-ts", - "version": "1.1.6", + "version": "1.3.0", "license": "MIT", "dependencies": { "request": "^2.88.0" }, "devDependencies": { "rimraf": "^3.0.2", - "typescript": "^4.3.5" + "typescript": "^5.2.2" }, "engines": { "node": ">=4" @@ -573,9 +573,9 @@ "license": "Unlicense" }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "5.2.2", + "resolved": "https://pkgs.dev.azure.com/precise-finance/precise-finance/_packaging/precise-npm/npm/registry/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha1-XrteWlt18IXyK8P4Rg+6MIMQ+ng=", "dev": true, "license": "Apache-2.0", "bin": { @@ -583,7 +583,7 @@ "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uri-js": { diff --git a/package.json b/package.json index 23ae18d..e4da232 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.1.6", + "version": "1.3.0", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", @@ -37,6 +37,6 @@ }, "devDependencies": { "rimraf": "^3.0.2", - "typescript": "^4.3.5" + "typescript": "^5.2.2" } } diff --git a/ts/checkbook.ts b/ts/checkbook.ts index f1566b9..4570053 100644 --- a/ts/checkbook.ts +++ b/ts/checkbook.ts @@ -3,8 +3,9 @@ import { Check } from "./endpoints/check"; import { Invoice } from "./endpoints/invoice"; import { Subscription } from "./endpoints/subscription"; import { Bank } from "./endpoints/bank"; -import { User } from "./endpoints/User"; +import { User } from "./endpoints/user"; import { VirtualCreditCard } from "./endpoints/vcc"; +import { Wallet } from "./endpoints/wallet"; export default class Checkbook { checks: Check; resource: Resource; @@ -13,6 +14,7 @@ export default class Checkbook { banks: Bank; users: User; virtualCreditCards: VirtualCreditCard; + wallet: Wallet; /** * */ @@ -43,5 +45,6 @@ export default class Checkbook { this.banks = new Bank(this.resource); this.users = new User(this.resource); this.virtualCreditCards = new VirtualCreditCard(this.resource); + this.wallet = new Wallet(this.resource); } } diff --git a/ts/endpoints/bank.ts b/ts/endpoints/bank.ts index 0673fd0..b0cec95 100644 --- a/ts/endpoints/bank.ts +++ b/ts/endpoints/bank.ts @@ -10,7 +10,7 @@ export class Bank { return this.resource.request( { method: "GET", - uri: "/bank", + uri: "/account/bank", }, callback ); @@ -20,7 +20,7 @@ export class Bank { return this.resource.request( { method: "GET", - uri: "/bank/institutions", + uri: "/account/bank/institutions", }, callback ); @@ -30,7 +30,7 @@ export class Bank { return this.resource.request( { method: "DELETE", - uri: "/bank/" + bank_id, + uri: "/account/bank/" + bank_id, }, callback ); @@ -44,7 +44,7 @@ export class Bank { return this.resource.request( { method: "POST", - uri: "/bank/iav", + uri: "/account/bank/iav", body: params, }, callback, @@ -60,7 +60,7 @@ export class Bank { return this.resource.request( { method: "POST", - uri: "/bank/iav/plaid", + uri: "/account/bank/iav/plaid", body: params, }, callback, @@ -72,7 +72,7 @@ export class Bank { return this.resource.request( { method: "POST", - uri: "/bank", + uri: "/account/bank", body: params, }, callback, @@ -84,7 +84,7 @@ export class Bank { return this.resource.request( { method: "POST", - uri: "/bank/release", + uri: "/account/bank/release", body: params, }, callback @@ -94,7 +94,7 @@ export class Bank { return this.resource.request( { method: "POST", - uri: "/bank/verify", + uri: "/account/bank/verify", body: params, }, callback @@ -105,7 +105,7 @@ export class Bank { return this.resource.request( { method: "PUT", - uri: "/bank/" + bank_id, + uri: "/account/bank/" + bank_id, body: params, }, callback diff --git a/ts/endpoints/wallet.ts b/ts/endpoints/wallet.ts new file mode 100644 index 0000000..1d43a6a --- /dev/null +++ b/ts/endpoints/wallet.ts @@ -0,0 +1,61 @@ +import { Resource } from "../resource"; + +export class Wallet { + /** + * + */ + constructor(private readonly resource: Resource) {} + + add( + params: { + name: string; + }, + callback: (err, response) => void, + idempotencyKey?: string + ) { + return this.resource.request( + { + method: "POST", + uri: "/account/wallet", + body: params, + }, + callback, + idempotencyKey + ); + } + + update( + wallet_id: string, + params: { name?: string; }, + callback: (err, response) => void + ) { + return this.resource.request( + { + method: "PUT", + uri: "/account/wallet/" + wallet_id, + body: params, + }, + callback + ); + } + + get(callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/account/wallet", + }, + callback + ); + } + + remove(wallet_id: string, callback: (err, response) => void) { + return this.resource.request( + { + method: "DELETE", + uri: "/account/wallet/" + wallet_id, + }, + callback + ); + } +} From 005e9f04977395d7c859193ca9065d660d1bf110 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Wed, 11 Oct 2023 12:18:03 +0300 Subject: [PATCH 22/27] Add deposit flow --- package-lock.json | 4 +- package.json | 2 +- ts/endpoints/check.ts | 166 +++++++++++++++++++++++++++--------------- ts/resource.ts | 2 +- 4 files changed, 110 insertions(+), 64 deletions(-) diff --git a/package-lock.json b/package-lock.json index db237d6..fe3a98a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "checkbook-api-ts", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "checkbook-api-ts", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "dependencies": { "request": "^2.88.0" diff --git a/package.json b/package.json index e4da232..8400a1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.3.0", + "version": "1.3.1", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/endpoints/check.ts b/ts/endpoints/check.ts index 10ce39f..bdd91b6 100644 --- a/ts/endpoints/check.ts +++ b/ts/endpoints/check.ts @@ -1,63 +1,109 @@ import { Resource } from "../resource"; export class Check { - /** - * - */ - constructor(private readonly resource: Resource) { - - } - list(query, callback: (err, response) => void) { - return this.resource.request({ - method: 'GET', - uri: '/check', - qs: query - }, callback); - } - - get(check_id, callback: (err, response) => void) { - return this.resource.request({ - method: 'GET', - uri: '/check/' + check_id - }, callback); - } - - delete(check_id, callback: (err, response) => void) { - return this.resource.request({ - method: 'DELETE', - uri: '/check/' + check_id - }, callback); - } - - sendDigitalCheck(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/check/digital', - body: params - }, callback, idempotencyKey); - } - - sendPhysicalCheck(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/check/physical', - body: params - }, callback, idempotencyKey); - } - - sendDirectCheck(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/check/direct', - body: params - }, callback, idempotencyKey); - } - - sendMultipleChecksCSV(params, callback: (err, response) => void, idempotencyKey?) { - return this.resource.request({ - method: 'POST', - uri: '/check/csv', - body: params - }, callback, idempotencyKey); - } -} \ No newline at end of file + /** + * + */ + constructor(private readonly resource: Resource) {} + list(query, callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/check", + qs: query, + }, + callback + ); + } + + get(check_id, callback: (err, response) => void) { + return this.resource.request( + { + method: "GET", + uri: "/check/" + check_id, + }, + callback + ); + } + + delete(check_id, callback: (err, response) => void) { + return this.resource.request( + { + method: "DELETE", + uri: "/check/" + check_id, + }, + callback + ); + } + + deposit( + check_id: string, + params: { account: string }, + callback: (err, response) => void + ) { + return this.resource.request( + { + method: "POST", + uri: "/check/deposit/" + check_id, + body: params, + }, + callback + ); + } + + sendDigitalCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request( + { + method: "POST", + uri: "/check/digital", + body: params, + }, + callback, + idempotencyKey + ); + } + + sendPhysicalCheck( + params, + callback: (err, response) => void, + idempotencyKey? + ) { + return this.resource.request( + { + method: "POST", + uri: "/check/physical", + body: params, + }, + callback, + idempotencyKey + ); + } + + sendDirectCheck(params, callback: (err, response) => void, idempotencyKey?) { + return this.resource.request( + { + method: "POST", + uri: "/check/direct", + body: params, + }, + callback, + idempotencyKey + ); + } + + sendMultipleChecksCSV( + params, + callback: (err, response) => void, + idempotencyKey? + ) { + return this.resource.request( + { + method: "POST", + uri: "/check/csv", + body: params, + }, + callback, + idempotencyKey + ); + } +} diff --git a/ts/resource.ts b/ts/resource.ts index 14be014..6995133 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -44,7 +44,7 @@ export class Resource { } options.uri = this.baseURI + options.uri; - + return options; } } From 5422b29e38d26a60c0fb76be3db8a832a3823d50 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Wed, 11 Oct 2023 13:03:46 +0300 Subject: [PATCH 23/27] Add deposit --- dist/ts/endpoints/check.d.ts | 3 +++ dist/ts/endpoints/check.js | 45 ++++++++++++++++++++-------------- dist/ts/endpoints/check.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package-lock.json | 4 +-- package.json | 2 +- 6 files changed, 34 insertions(+), 24 deletions(-) diff --git a/dist/ts/endpoints/check.d.ts b/dist/ts/endpoints/check.d.ts index 1b50527..35fc63b 100644 --- a/dist/ts/endpoints/check.d.ts +++ b/dist/ts/endpoints/check.d.ts @@ -5,6 +5,9 @@ export declare class Check { list(query: any, callback: (err: any, response: any) => void): void; get(check_id: any, callback: (err: any, response: any) => void): void; delete(check_id: any, callback: (err: any, response: any) => void): void; + deposit(check_id: string, params: { + account: string; + }, callback: (err: any, response: any) => void): void; sendDigitalCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; sendPhysicalCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; sendDirectCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; diff --git a/dist/ts/endpoints/check.js b/dist/ts/endpoints/check.js index fe63d97..5dec798 100644 --- a/dist/ts/endpoints/check.js +++ b/dist/ts/endpoints/check.js @@ -7,49 +7,56 @@ class Check { } list(query, callback) { return this.resource.request({ - method: 'GET', - uri: '/check', - qs: query + method: "GET", + uri: "/check", + qs: query, }, callback); } get(check_id, callback) { return this.resource.request({ - method: 'GET', - uri: '/check/' + check_id + method: "GET", + uri: "/check/" + check_id, }, callback); } delete(check_id, callback) { return this.resource.request({ - method: 'DELETE', - uri: '/check/' + check_id + method: "DELETE", + uri: "/check/" + check_id, + }, callback); + } + deposit(check_id, params, callback) { + return this.resource.request({ + method: "POST", + uri: "/check/deposit/" + check_id, + body: params, }, callback); } sendDigitalCheck(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/check/digital', - body: params + method: "POST", + uri: "/check/digital", + body: params, }, callback, idempotencyKey); } sendPhysicalCheck(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/check/physical', - body: params + method: "POST", + uri: "/check/physical", + body: params, }, callback, idempotencyKey); } sendDirectCheck(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/check/direct', - body: params + method: "POST", + uri: "/check/direct", + body: params, }, callback, idempotencyKey); } sendMultipleChecksCSV(params, callback, idempotencyKey) { return this.resource.request({ - method: 'POST', - uri: '/check/csv', - body: params + method: "POST", + uri: "/check/csv", + body: params, }, callback, idempotencyKey); } } diff --git a/dist/ts/endpoints/check.js.map b/dist/ts/endpoints/check.js.map index 8bcc604..8c93039 100644 --- a/dist/ts/endpoints/check.js.map +++ b/dist/ts/endpoints/check.js.map @@ -1 +1 @@ -{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../ts/endpoints/check.ts"],"names":[],"mappings":";;;AAEA,MAAa,KAAK;IAId,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAE/C,CAAC;IACD,IAAI,CAAC,KAAK,EAAE,QAAiC;QACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ;YACb,EAAE,EAAE,KAAK;SACZ,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,GAAG,CAAC,QAAQ,EAAE,QAAiC;QAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,SAAS,GAAG,QAAQ;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,QAAiC;QAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,MAAM,EAAE,QAAQ;YAChB,GAAG,EAAE,SAAS,GAAG,QAAQ;SAC5B,EAAE,QAAQ,CAAC,CAAC;IACjB,CAAC;IAED,gBAAgB,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACvE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,C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AAC;IAED,qBAAqB,CACnB,MAAM,EACN,QAAiC,EACjC,cAAe;QAEf,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;CACF;AA1GD,sBA0GC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 7b326e0..f7efd1c 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts","../../node_modules/@types/har-format/index.d.ts","../../node_modules/@types/json-schema/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"5b9642d490990e2ab0c0402b9ba6740aab7ed5f0d907c8f701fd60daa78754fa","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"b9292b22f26d7eaf3e9247f85c6b9167d726f2a8ca9e216404ce7588e12b727b","signature":"c14d89b44d7799c988dda669dc2f7f4ea97dd750e7769fb8652fbd8e93a48d84"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"},"b58a196dd8634c1e39b123fd029ca4b9f21a2ab601453bd5cb152cc593786a8b","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b"],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23,33,34]},"version":"5.2.2"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts","../../node_modules/@types/har-format/index.d.ts","../../node_modules/@types/json-schema/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"fd86a8d9af362f279947b70883a208262cb02da88b6bb40afc253dd91eeab4e9","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"140b2f97e8c49256f9f9a3fe3cdd30fcc713140c947bbad5899f0444629c1ec0","signature":"7a44fae922957159f8b373c3957a4bf82d7869268bb0643f7d206ff819b46c57"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"},"b58a196dd8634c1e39b123fd029ca4b9f21a2ab601453bd5cb152cc593786a8b","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b"],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23,33,34]},"version":"5.2.2"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index fe3a98a..e19cd68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "checkbook-api-ts", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "checkbook-api-ts", - "version": "1.3.1", + "version": "1.3.2", "license": "MIT", "dependencies": { "request": "^2.88.0" diff --git a/package.json b/package.json index 8400a1f..95e824c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.3.1", + "version": "1.3.2", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", From 500b59822517daa0c250229da4eb803240593beb Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Mon, 30 Oct 2023 17:07:44 +0200 Subject: [PATCH 24/27] Added .github directory --- .github/workflows/ci.yml | 281 ++++++++++++++++++++++++++++++++++ .github/workflows/deploy.yaml | 32 ++++ .github/workflows/pr.yaml | 38 +++++ 3 files changed, 351 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/deploy.yaml create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d8707f3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,281 @@ +name: CI/CD Workflow + +on: + workflow_dispatch: + push: + branches: + - '**' + # pull_request: + # types: + # - closed + +jobs: + run_tests: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - uses: ponicode/azure-devops-npm-action@master + with: + organisation: precise-finance + project: precise-finance + registry: precise-npm + user: danshapir + password: ${{ secrets.AZURE_PAT }} + email: dan@precisefinance.ai + # scope: ponicode + - run: cp `pwd`/.npmrc ~ # We need the .npmrc file in the $HOME directory + - name: Setup Node.js + uses: actions/setup-node@v4.0.0 + with: + node-version: '18' # Adjust as necessary + + - name: Cache node_modules + id: cache-node-modules # Added an ID for this step + uses: actions/cache@v3 + with: + path: node_modules # caching node_modules directly + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-modules- + + - name: Install Dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' # Only run if cache was a miss + run: npm ci + + - name: Run tests + run: | + npx prisma generate + npm run test:ci + + - name: Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() # run this step even if previous step failed + with: + name: JEST Tests # Name of the check run which will be created + path: reports/jest-*.xml # Path to test results + reporter: jest-junit # Format of test results + + build_image: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Checkout Helm repo + uses: actions/checkout@v4 + with: + repository: Precise-Finance/charts + path: helm-repo + ref: main + token: ${{ secrets.GH_SECRET }} + + - name: Install yq + run: | + sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.12.2/yq_linux_amd64 + sudo chmod +x /usr/local/bin/yq + + - name: Get current image tag + id: get_current_tag + run: | + CURRENT_TAG=$(yq eval ".image.tag" helm-repo/${{ github.event.repository.name }}/values.yaml) + echo "current_tag=$CURRENT_TAG" >> $GITHUB_OUTPUT + + - name: Check if tag needs update + id: check_tag + run: | + if [[ "${{ steps.get_current_tag.outputs.current_tag }}" == "$GITHUB_SHA" ]]; then + echo "Image tag is already up-to-date. Skipping." + echo "skip=true" >> $GITHUB_OUTPUT + else + echo "skip=false" >> $GITHUB_OUTPUT + fi + + - name: Azure npm auth + if: steps.check_tag.outputs.skip == 'false' + uses: ponicode/azure-devops-npm-action@master + with: + organisation: precise-finance + project: precise-finance + registry: precise-npm + user: danshapir + password: ${{ secrets.AZURE_PAT }} + email: dan@precisefinance.ai + # scope: ponicode + - run: cp `pwd`/.npmrc ~ # We need the .npmrc file in the $HOME directory + - name: Setup Node.js + if: steps.check_tag.outputs.skip == 'false' + uses: actions/setup-node@v4.0.0 + with: + node-version: '18' # Adjust as necessary + + - name: Configure AWS credentials + if: steps.check_tag.outputs.skip == 'false' + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: eu-west-1 + + - name: Login to Amazon ECR Private + if: steps.check_tag.outputs.skip == 'false' + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + + - name: Set up Docker Buildx + if: steps.check_tag.outputs.skip == 'false' + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker layers + if: steps.check_tag.outputs.skip == 'false' + uses: actions/cache@v3.3.2 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile', '**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-buildx-${{ hashFiles('**/package-lock.json') }} + ${{ runner.os }}-buildx- + + + - name: Build, tag, and push docker image to Amazon ECR using Buildx + if: steps.check_tag.outputs.skip == 'false' + env: + REGISTRY: ${{ steps.login-ecr.outputs.registry }} + REPOSITORY: precise/${{ github.event.repository.name }} + IMAGE_TAG: ${{ github.sha }} + run: | + docker buildx create --use + docker buildx build --push \ + --cache-from=type=local,src=/tmp/.buildx-cache \ + --cache-to=type=local,dest=/tmp/.buildx-cache,mode=max \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ + -t $REGISTRY/$REPOSITORY:$IMAGE_TAG . + + + + + - name: Update values.yaml + if: steps.check_tag.outputs.skip == 'false' + run: | + yq eval ".image.tag = \"$(echo $GITHUB_SHA )\"" -i helm-repo/${{ github.event.repository.name }}/values.yaml + cat helm-repo/${{ github.event.repository.name }}/values.yaml + + + - name: Set up Git + if: steps.check_tag.outputs.skip == 'false' + run: | + git config --global user.name "GitHub Action" + git config --global user.email "action@github.com" + + - name: Commit and Push Changes + if: steps.check_tag.outputs.skip == 'false' + run: | + cd helm-repo + git add . + git commit -m "Update image tag after commit" + git push + + - name: Generate File + run: | + cd helm-repo + echo $(git rev-parse HEAD) > ../helm_commit.txt + + - name: Upload artifact + uses: actions/upload-artifact@v3.1.3 + with: + name: helm-commit + path: helm_commit.txt + + + approval_and_tag_dev: + needs: [run_tests, build_image] # Change the dependency to the newly separated jobs + if: contains(github.ref, 'refs/pull/') || startsWith(github.ref, 'refs/heads/feature/') + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Download artifact + uses: actions/download-artifact@v3.0.2 + with: + name: helm-commit + path: helm-commit + - name: Set output + id: get_commit_id + run: | + echo $(cat helm-commit/helm_commit.txt) + echo "commit_id=$(cat helm-commit/helm_commit.txt)" >> $GITHUB_OUTPUT + + - name: Get Commit Details + id: get_commit_details + run: | + echo $(git log -1 --pretty=format:'%s') + echo "commit_message=$(git log -1 --pretty=format:'%s')" >> $GITHUB_OUTPUT + + - name: Get PR Details + id: get_pr_details + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "pr_link=${{ github.event.pull_request.html_url }}" >> $GITHUB_OUTPUT + else + echo "Not a PR event, skipping PR details extraction." + fi + + - name: send approval + uses: Precise-Finance/slack-approval@v2.8 + env: + SLACK_APP_TOKEN: ${{ secrets.SLACK_APP_TOKEN }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }} + SLACK_CHANNEL_ID: deployment-approvals-dev #${{ secrets.SLACK_CHANNEL_ID }} + DEPLOYMENT_ENV: DEV + COMMIT_SHA: ${{ steps.get_commit_id.outputs.commit_id }} + GH_SECRET: ${{ secrets.GH_SECRET }} + PR_LINK: ${{ steps.get_pr_details.outputs.pr_link }} + COMMIT_MESSAGE: ${{ steps.get_commit_details.outputs.commit_message }} + timeout-minutes: 10 + + approval_and_tag_prod: + needs: [run_tests, build_image] # Change the dependency to the newly separated jobs + if: (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/master') + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Download artifact + uses: actions/download-artifact@v3.0.2 + with: + name: helm-commit + path: helm-commit + - name: Set output + id: get_commit_id + run: | + echo $(cat helm-commit/helm_commit.txt) + echo "commit_id=$(cat helm-commit/helm_commit.txt)" >> $GITHUB_OUTPUT + + - name: Get Commit Details + id: get_commit_details + run: | + echo $(git log -1 --pretty=format:'%s') + echo "commit_message=$(git log -1 --pretty=format:'%s')" >> $GITHUB_OUTPUT + + - name: Get PR Details + id: get_pr_details + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + echo "pr_link=${{ github.event.pull_request.html_url }}" >> $GITHUB_OUTPUT + else + echo "Not a PR event, skipping PR details extraction." + fi + + - name: send approval + uses: Precise-Finance/slack-approval@v2.8 + env: + SLACK_APP_TOKEN: ${{ secrets.SLACK_APP_TOKEN }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }} + SLACK_CHANNEL_ID: deployment-approvals #${{ secrets.SLACK_CHANNEL_ID }} + DEPLOYMENT_ENV: Production + COMMIT_SHA: ${{ steps.get_commit_id.outputs.commit_id }} + GH_SECRET: ${{ secrets.GH_SECRET }} + PR_LINK: ${{ steps.get_pr_details.outputs.pr_link }} + COMMIT_MESSAGE: ${{ steps.get_commit_details.outputs.commit_message }} + timeout-minutes: 10 diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..5b2508b --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: Continue Deployment after Approval + +on: + repository_dispatch: + types: [deployment-approved] + +jobs: + post_approval_prod: + runs-on: ubuntu-latest + steps: + - name: Deploy to environment + run: | + echo "Deploying to ${{ github.event.client_payload.env }}" + + - name: Deploy commit + run: | + echo "Deploying commit ${{ github.event.client_payload.sha }}" + - name: Checkout Helm repo at specific SHA + uses: actions/checkout@v4 + with: + repository: Precise-Finance/charts + path: helm-repo + ref: ${{ github.event.client_payload.sha }} + token: ${{ secrets.GH_SECRET }} + + + - name: Tag with SHA and ENV + run: | + cd helm-repo + git tag ${{ github.event.client_payload.env }}-${{ github.event.repository.name }} + git push origin refs/tags/${{ github.event.client_payload.env }}-${{ github.event.repository.name }} -f --tags + diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..4aeb444 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,38 @@ +name: Code Review + +permissions: + contents: read + pull-requests: write + +on: + pull_request: + types: [opened, reopened, synchronize, labeled, unlabeled] + +jobs: + chatgpt_review: + if: ${{ !contains(github.event.*.labels.*.name, 'no gpt review') }} # Optional; to run only when a label is attached + runs-on: ubuntu-latest + steps: + - uses: anc95/ChatGPT-CodeReview@main + env: + GITHUB_TOKEN: ${{ secrets.GH_SECRET }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + # Optional + LANGUAGE: English + MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models + # OPENAI_API_ENDPOINT: https://api.openai.com/v1 + # PROMPT: Please check if there are any confusions, irregularities, security issues or performance issues in the following code diff: + # top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p + # temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature + # max_tokens: 10000 + # MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length. + gpt_review_node: + if: ${{ contains(github.event.*.labels.*.name, 'gpt summary') }} # Optional; to run only when a label is attached + runs-on: ubuntu-latest + steps: + - name: gpt-review-node + uses: Precise-Finance/gpt-review@v1.1 + with: + GITHUB_TOKEN: ${{ secrets.GH_SECRET }} + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + OPENAI_ORG_KEY: ${{ secrets.OPENAI_ORG_KEY }} From 06b9796bf01d901bfd98cfc4ce930bf089ff434f Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Mon, 7 Oct 2024 13:20:23 +0300 Subject: [PATCH 25/27] Bump version to 1.3.3 and add triggerWebhook method to Check class --- dist/ts/endpoints/check.d.ts | 5 +++++ dist/ts/endpoints/check.js | 10 ++++++++++ dist/ts/endpoints/check.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package.json | 2 +- ts/endpoints/check.ts | 14 ++++++++++++++ 6 files changed, 32 insertions(+), 3 deletions(-) diff --git a/dist/ts/endpoints/check.d.ts b/dist/ts/endpoints/check.d.ts index 35fc63b..f2c1d87 100644 --- a/dist/ts/endpoints/check.d.ts +++ b/dist/ts/endpoints/check.d.ts @@ -12,4 +12,9 @@ export declare class Check { sendPhysicalCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; sendDirectCheck(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; sendMultipleChecksCSV(params: any, callback: (err: any, response: any) => void, idempotencyKey?: any): void; + triggerWebhook(params: { + check_id: string; + status: string; + return_code?: string; + }, callback: (err: any, response: any) => void): void; } diff --git a/dist/ts/endpoints/check.js b/dist/ts/endpoints/check.js index 5dec798..311dee0 100644 --- a/dist/ts/endpoints/check.js +++ b/dist/ts/endpoints/check.js @@ -59,6 +59,16 @@ class Check { body: params, }, callback, idempotencyKey); } + triggerWebhook(params, callback) { + return this.resource.request({ + method: "PUT", + uri: "/check/webhook/" + params.check_id, + body: { + status: params.status, + options: params.return_code ? { return_code: params.return_code } : undefined, + }, + }, callback); + } } exports.Check = Check; //# sourceMappingURL=check.js.map \ No newline at end of file diff --git a/dist/ts/endpoints/check.js.map b/dist/ts/endpoints/check.js.map index 8c93039..97c5d6f 100644 --- a/dist/ts/endpoints/check.js.map +++ b/dist/ts/endpoints/check.js.map @@ -1 +1 @@ -{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../ts/endpoints/check.ts"],"names":[],"mappings":";;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,MAAM;YACd,GAAG,EAAE,iBAAiB;YACtB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,eAAe,CAAC,MAAM,EAAE,QAAiC,EAAE,cAAe;QACxE,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;IAED,qBAAqB,CACnB,MAAM,EACN,QAAiC,EACjC,cAAe;QAEf,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,MAAM;SACb,EACD,QAAQ,EACR,cAAc,CACf,CAAC;IACJ,CAAC;CACF;AA1GD,sBA0GC"} \ No newline at end of file +{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../ts/endpoints/check.ts"],"names":[],"mappings":";;;AAEA,MAAa,KAAK;IAIhB,YAA6B,QAAkB;QAAlB,aAAQ,GAAR,QAAQ,CAAU;IAAG,CAAC;IACnD,IAAI,CAAC,KAAK,EAAE,QAAiC;QAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,QAAQ;YACb,EAAE,EAAE,KAAK;SACV,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,GAAG,CAAC,QAAQ,EAAE,QAAiC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,SAAS,GAAG,QAAQ;SAC1B,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,QAAQ,EAAE,QAAiC;QAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,QAAQ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AClH,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAC1B;YACE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAAC,QAAQ;YACxC,IAAI,EAAE;gBACJ,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS;aAC9E;SACF,EACD,QAAQ,CACT,CAAC;IACJ,CAAC;CACF;AAxHD,sBAwHC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index f7efd1c..d4f5695 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts","../../node_modules/@types/har-format/index.d.ts","../../node_modules/@types/json-schema/index.d.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"fd86a8d9af362f279947b70883a208262cb02da88b6bb40afc253dd91eeab4e9","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"140b2f97e8c49256f9f9a3fe3cdd30fcc713140c947bbad5899f0444629c1ec0","signature":"7a44fae922957159f8b373c3957a4bf82d7869268bb0643f7d206ff819b46c57"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"},"b58a196dd8634c1e39b123fd029ca4b9f21a2ab601453bd5cb152cc593786a8b","dd89872dd0647dfd63665f3d525c06d114310a2f7a5a9277e5982a152b31be2b"],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23,33,34]},"version":"5.2.2"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"fd86a8d9af362f279947b70883a208262cb02da88b6bb40afc253dd91eeab4e9","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"fc2dba97c16094289f4fe2d29a74cbf4192c0e5b3f6dca0fce5e49cec9fa7244","signature":"32479517b734f200765b83dd0548e6d899a3b2f473b2b8768a02ba797e49cb5f"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"}],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23]},"version":"5.2.2"} \ No newline at end of file diff --git a/package.json b/package.json index 95e824c..b893baf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.3.2", + "version": "1.3.3", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/endpoints/check.ts b/ts/endpoints/check.ts index bdd91b6..cc83105 100644 --- a/ts/endpoints/check.ts +++ b/ts/endpoints/check.ts @@ -106,4 +106,18 @@ export class Check { idempotencyKey ); } + + triggerWebhook(params: { check_id: string, status: string, return_code?: string }, callback: (err, response) => void) { + return this.resource.request( + { + method: "PUT", + uri: "/check/webhook/" + params.check_id, + body: { + status: params.status, + options: params.return_code ? { return_code: params.return_code } : undefined, + }, + }, + callback + ); + } } From fbfde229a81b59d2e72ad9c1952ddfecfa4998d5 Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Mon, 7 Oct 2024 15:18:00 +0300 Subject: [PATCH 26/27] Fix optional chaining for error handling in Resource class --- dist/ts/resource.js | 4 ++-- dist/ts/resource.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package.json | 2 +- ts/resource.ts | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/ts/resource.js b/dist/ts/resource.js index 8fdc802..055598f 100644 --- a/dist/ts/resource.js +++ b/dist/ts/resource.js @@ -18,8 +18,8 @@ class Resource { if (error) { return callback.call(this, error, null); } - if (![200, 201].includes(response.statusCode) || body.error) { - error = response.statusCode + " " + body.error; + if (![200, 201].includes(response.statusCode) || (body === null || body === void 0 ? void 0 : body.error)) { + error = response.statusCode + " " + (body === null || body === void 0 ? void 0 : body.error); return callback.call(this, error, response); } return callback.call(this, null, body); diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map index dd8a902..2c05736 100644 --- a/dist/ts/resource.js.map +++ b/dist/ts/resource.js.map @@ -1 +1 @@ -{"version":3,"file":"resource.js","sourceRoot":"","s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;QACzC,CAAC,CACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CAAC,OAAO,EAAE,cAAe;QACxC,OAAO,mCAAQ,OAAO,GAAK,IAAI,CAAC,cAAc,CAAE,CAAC;QAEjD,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;SACrD;QAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAEzC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index d4f5695..2a6d6c4 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"fd86a8d9af362f279947b70883a208262cb02da88b6bb40afc253dd91eeab4e9","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"fc2dba97c16094289f4fe2d29a74cbf4192c0e5b3f6dca0fce5e49cec9fa7244","signature":"32479517b734f200765b83dd0548e6d899a3b2f473b2b8768a02ba797e49cb5f"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"}],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23]},"version":"5.2.2"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"3d18171d2a28166cffa727f4d400d2fca9fd6ac586fcd1834f10fa055a7f5042","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"fc2dba97c16094289f4fe2d29a74cbf4192c0e5b3f6dca0fce5e49cec9fa7244","signature":"32479517b734f200765b83dd0548e6d899a3b2f473b2b8768a02ba797e49cb5f"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"}],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23]},"version":"5.2.2"} \ No newline at end of file diff --git a/package.json b/package.json index b893baf..e0a7c02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.3.3", + "version": "1.3.4", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/resource.ts b/ts/resource.ts index 6995133..c5b7575 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -26,8 +26,8 @@ export class Resource { return callback.call(this, error, null); } - if (![200, 201].includes(response.statusCode) || body.error) { - error = response.statusCode + " " + body.error; + if (![200, 201].includes(response.statusCode) || body?.error) { + error = response.statusCode + " " + body?.error; return callback.call(this, error, response); } From d0957e76f6e5a9e097ed116d8c9ab778ed2411cc Mon Sep 17 00:00:00 2001 From: Dan Shapir Date: Mon, 7 Oct 2024 15:26:28 +0300 Subject: [PATCH 27/27] Bump version to 1.3.5 and update response status handling in Resource class --- dist/ts/resource.js | 2 +- dist/ts/resource.js.map | 2 +- dist/tsconfig.tsbuildinfo | 2 +- package.json | 2 +- ts/resource.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/ts/resource.js b/dist/ts/resource.js index 055598f..ad20429 100644 --- a/dist/ts/resource.js +++ b/dist/ts/resource.js @@ -18,7 +18,7 @@ class Resource { if (error) { return callback.call(this, error, null); } - if (![200, 201].includes(response.statusCode) || (body === null || body === void 0 ? void 0 : body.error)) { + if (![200, 201, 204].includes(response.statusCode) || (body === null || body === void 0 ? void 0 : body.error)) { error = response.statusCode + " " + (body === null || body === void 0 ? void 0 : body.error); return callback.call(this, error, response); } diff --git a/dist/ts/resource.js.map b/dist/ts/resource.js.map index 2c05736..88cc01e 100644 --- a/dist/ts/resource.js.map +++ b/dist/ts/resource.js.map @@ -1 +1 @@ -{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../ts/resource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAmC;AACnC,MAAa,QAAQ;IAMnB,YAAY,MAAM;QAChB,IAAI,CAAC,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC,GAAG,GAAG,kBAAkB,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG;YAC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,IAAI,cAAc,EAAE;YAClB,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;SACrD;QAED,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAEzC,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AA9CD,4BA8CC"} \ No newline at end of file diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo index 2a6d6c4..7ee9782 100644 --- a/dist/tsconfig.tsbuildinfo +++ b/dist/tsconfig.tsbuildinfo @@ -1 +1 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"3d18171d2a28166cffa727f4d400d2fca9fd6ac586fcd1834f10fa055a7f5042","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"fc2dba97c16094289f4fe2d29a74cbf4192c0e5b3f6dca0fce5e49cec9fa7244","signature":"32479517b734f200765b83dd0548e6d899a3b2f473b2b8768a02ba797e49cb5f"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"}],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23]},"version":"5.2.2"} \ No newline at end of file +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../ts/resource.ts","../ts/endpoints/check.ts","../ts/endpoints/invoice.ts","../ts/endpoints/subscription.ts","../ts/endpoints/bank.ts","../ts/endpoints/user.ts","../ts/endpoints/vcc.ts","../ts/endpoints/wallet.ts","../ts/checkbook.ts","../index.ts"],"fileInfos":[{"version":"2ac9cdcfb8f8875c18d14ec5796a8b029c426f73ad6dc3ffb580c228b58d1c44","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d",{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"09226e53d1cfda217317074a97724da3e71e2c545e18774484b61562afc53cd2","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"8b41361862022eb72fcc8a7f34680ac842aca802cf4bc1f915e8c620c9ce4331","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"f35a831e4f0fe3b3697f4a0fe0e3caa7624c92b78afbecaf142c0f93abfaf379","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},{"version":"845eeac3e6534197fdc1c94f9626058dc38bb4cf8586fa0c41678dc4d2e88896","signature":"70acd2e3a1aaff11239efe422984b84a77c182d7ddb65b23fab334538614c535"},{"version":"fc2dba97c16094289f4fe2d29a74cbf4192c0e5b3f6dca0fce5e49cec9fa7244","signature":"32479517b734f200765b83dd0548e6d899a3b2f473b2b8768a02ba797e49cb5f"},{"version":"8ae46c299e7d0b9074cd8b1e9574d19dac718b8f6ee6ac9de187a1629f095b75","signature":"d9be70ba9529740f8810654e298331ef1eef206a86572feb1f95b279a27a8d13"},{"version":"6bcea1c0dcec8c462ba1a8e99f73bc3721ec54b9f23577046643f08c487f11d2","signature":"c31752adfa450412582178023941f11f2b811c4c6729464c6d1c92795ea1c249"},{"version":"3069387174a5521a43e9659dd4ee06cb96a029fe3c7fdfcbfae20afb3d50099d","signature":"dc8a038c2028f980cfb0845e38986744f5aa91876bab8b494f20cb29bfb3571f"},{"version":"725f2520ad44e72fc5773b993cf15b9ac320f890c1710ab5f51bdb484815a3e8","signature":"7261a9a50f3f341dbd57427a3081f3e6f290d6a555f049d187512ac1cb844835"},{"version":"0bd48121ac87d0b441b641a4b69eff9327a631484df769b1bfe2870550d23e8c","signature":"c089933810a0ce743e97b53ac015d8f64b71f37e5d0ebf89de1dc9658e591da0"},{"version":"de5606dddfd173d88eb809cb2d3a01fdbf944683d30fc8a8b143d6197a87c0cd","signature":"a4f8a0c03509ff5c91b703f7ff3fc0769795ca033d58f00bf8d7dc528f368723"},{"version":"f38762361b01646ac5514122a5319747a378a63de4e693bbd9d1b1e867661144","signature":"1774c63854a94516033ef11b08f69d56e45fa5e98ad2b0fb00e5e7f63348429d"},{"version":"bc3c4b1c4836b1210d0450d9ad0da0cc4865fc59cf9f2b527410f1cc5d7e9032","signature":"0ccdf2807af1066a89af98800b9a1a69781644981e5581961748a84dd7b25897"}],"root":[[23,32]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":4},"fileIdsList":[[31],[23,24,25,26,27,28,29,30],[23]],"referencedMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"exportedModulesMap":[[32,1],[31,2],[27,3],[24,3],[25,3],[26,3],[28,3],[29,3],[30,3]],"semanticDiagnosticsPerFile":[32,21,22,6,5,2,7,8,9,10,11,12,13,14,3,4,15,19,16,17,18,20,1,31,27,24,25,26,28,29,30,23]},"version":"5.2.2"} \ No newline at end of file diff --git a/package.json b/package.json index e0a7c02..2d96f92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkbook-api-ts", - "version": "1.3.4", + "version": "1.3.5", "description": "Node.js library for the Checkbook.io API in TS", "keywords": [ "checkbook", diff --git a/ts/resource.ts b/ts/resource.ts index c5b7575..5302b13 100644 --- a/ts/resource.ts +++ b/ts/resource.ts @@ -26,7 +26,7 @@ export class Resource { return callback.call(this, error, null); } - if (![200, 201].includes(response.statusCode) || body?.error) { + if (![200, 201, 204].includes(response.statusCode) || body?.error) { error = response.statusCode + " " + body?.error; return callback.call(this, error, response); }