@bizjaya/finclient 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -85,7 +85,7 @@ var FinHttpTransport = class {
85
85
  constructor(options) {
86
86
  this.apiKey = options.apiKey?.trim() ?? "";
87
87
  if (!this.apiKey && !options.fetch) throw new TypeError("apiKey is required unless a custom fetch authenticates the member session.");
88
- this.baseUrl = (options.baseUrl ?? "https://api.fincopy.pro").replace(/\/+$/, "");
88
+ this.baseUrl = (options.baseUrl ?? "https://api.fincopy.io").replace(/\/+$/, "");
89
89
  const base = new URL(this.baseUrl);
90
90
  if (!/^https?:$/.test(base.protocol) || base.search || base.hash) {
91
91
  throw new TypeError("baseUrl must be an absolute HTTP or HTTPS URL without a query or fragment.");
@@ -492,9 +492,11 @@ var AccountsResource = class {
492
492
  restart(acno, options = {}) {
493
493
  return this.operation(acno, "restart", options);
494
494
  }
495
- /** Queues account removal. */
496
- remove(acno, options = {}) {
497
- return this.http.request("DELETE", accountPath(acno), void 0, options);
495
+ remove(acno, commandOrOptions = {}, options = {}) {
496
+ const hasCommand = Object.prototype.hasOwnProperty.call(commandOrOptions, "TrPin");
497
+ const command = hasCommand ? commandOrOptions : { TrPin: null };
498
+ const requestOptions = hasCommand ? options : commandOrOptions;
499
+ return this.http.request("DELETE", accountPath(acno), command, requestOptions);
498
500
  }
499
501
  operation(acno, action, options) {
500
502
  return this.http.request("POST", `${accountPath(acno)}/${action}`, void 0, options);
@@ -608,7 +610,7 @@ var FxResource = class {
608
610
  }
609
611
  /** Searches broker servers available when adding an account. */
610
612
  brokers(query, platform, demosOnly, options = {}) {
611
- return this.http.request("GET", queryPath("v1/brokers", void 0, { Q: query, Platform: platform, DemosOnly: demosOnly }), void 0, options);
613
+ return this.http.request("GET", queryPath("v1/brokers", void 0, { query, Platform: platform, DemosOnly: demosOnly }), void 0, options);
612
614
  }
613
615
  };
614
616
  var ChangesResource = class {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizjaya/finclient",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Official TypeScript SDK for the FinCopy public API",
5
5
  "license": "MIT",
6
6
  "author": "BizJaya TechLab S/B",
@@ -45,22 +45,22 @@
45
45
  ],
46
46
  "sideEffects": false,
47
47
  "engines": {
48
- "node": ">=18"
48
+ "node": ">=20"
49
49
  },
50
50
  "scripts": {
51
51
  "generate:types": "openapi-typescript ../spec/fincopy-v1.json --output src/generated/schema.d.ts",
52
52
  "prepack": "node -e \"require('fs').copyFileSync('../LICENSE', 'LICENSE')\"",
53
- "build": "tsup src/index.ts src/webhook.ts --format esm,cjs --dts --clean --target node18",
53
+ "build": "tsup src/index.ts src/webhook.ts --format esm,cjs --dts --clean --target node20",
54
54
  "typecheck": "tsc --noEmit",
55
55
  "test": "vitest run"
56
56
  },
57
57
  "devDependencies": {
58
- "@types/node": "22.20.5",
59
- "openapi-typescript": "7.10.1",
60
- "tsup": "8.5.1",
58
+ "@types/node": "26.6.5",
59
+ "openapi-typescript": "7.13.0",
60
+ "tsup": "9.0.0",
61
61
  "typescript": "5.9.3",
62
- "vite": "6.4.4",
63
- "vitest": "3.2.7"
62
+ "vite": "8.3.5",
63
+ "vitest": "5.0.5"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public",