bharosa 0.3.2 → 0.3.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.3.3
2
+
3
+ Default both clients to https://api.bharosa.finance. Explicit base URL overrides remain supported. Existing clients using the app origin remain compatible. No analytics changes.
4
+
1
5
  # Changelog
2
6
 
3
7
  ## 0.3.2 — 30 October 2026
package/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  A TypeScript client for Bharosa accounts, investors, portfolios, and mutual funds. Use one resource interface from TypeScript, ESM, or CommonJS, with no runtime dependencies.
4
4
 
5
- **SDK version:** `bharosa@0.3.2`. Both clients use the production API at `https://app.bharosa.finance` by default. Account access and credentials are still required; installing the SDK does not grant access.
5
+ **SDK version:** `bharosa@0.3.3`. Both clients use the production API at `https://api.bharosa.finance` by default. Account access and credentials are still required; installing the SDK does not grant access.
6
6
 
7
7
  ## Start here
8
8
 
9
9
  Use Node.js 22.12+ in a supported LTS release. Install the published SDK in your backend application:
10
10
 
11
11
  ```sh
12
- npm install bharosa@0.3.2 --ignore-scripts
12
+ npm install bharosa@0.3.3 --ignore-scripts
13
13
  ```
14
14
 
15
15
  Source contributors can build and pack a local archive using the commands in CONTRIBUTING.md.
@@ -119,8 +119,8 @@ After installing the archive, run `node node_modules/bharosa/examples/offline-sm
119
119
 
120
120
  ### Registered-app monthly data
121
121
 
122
- Available in SDK 0.3.0 and activated at `https://app.bharosa.finance`. Server applications can use `new BharosaMarket({apiKey})` with an owner-issued `market_key` scoped only to `market:read`. `client.schemes.nav(id,{asOf:'2026-08-01'})`, `schemes.expenseRatio`, `funds.portfolio` and `funds.holdings` use account-independent monthly snapshot routes. These keys cannot read private accounts or portfolios and require no investor OAuth token. Keep secrets server-side; never bundle them into browser code. Existing account-key and delegated-user clients remain unchanged. The production control-plane environment is `production`. General third-party OAuth provisioning is separate and is not enabled by this feature.
122
+ Available in SDK 0.3.0 and activated at `https://api.bharosa.finance`. Server applications can use `new BharosaMarket({apiKey})` with an owner-issued `market_key` scoped only to `market:read`. `client.schemes.nav(id,{asOf:'2026-08-01'})`, `schemes.expenseRatio`, `funds.portfolio` and `funds.holdings` use account-independent monthly snapshot routes. These keys cannot read private accounts or portfolios and require no investor OAuth token. Keep secrets server-side; never bundle them into browser code. Existing account-key and delegated-user clients remain unchanged. The production control-plane environment is `production`. General third-party OAuth provisioning is separate and is not enabled by this feature.
123
123
 
124
124
  ### Optional API origin override
125
125
 
126
- Set `baseUrl` only for another deployment or tests. Omitted or `undefined` uses `https://app.bharosa.finance`; invalid explicit values fail validation and never fall back. Overrides must be HTTPS origins without credentials, paths, queries or fragments. Local HTTP also requires `allowLocalhostHttp: true`. The SDK does not read `BHAROSA_API_BASE_URL` automatically.
126
+ Set `baseUrl` only for another deployment or tests. Omitted or `undefined` uses `https://api.bharosa.finance`; invalid explicit values fail validation and never fall back. Overrides must be HTTPS origins without credentials, paths, queries or fragments. Local HTTP also requires `allowLocalhostHttp: true`. The SDK does not read `BHAROSA_API_BASE_URL` automatically.
@@ -17,7 +17,7 @@ export interface BharosaTransport {
17
17
  send(url: string, request: RequestInit): Promise<Response>;
18
18
  }
19
19
  interface BharosaBaseConfig {
20
- /** Defaults to https://app.bharosa.finance. Explicit overrides must be valid origins. */
20
+ /** Defaults to https://api.bharosa.finance. Explicit overrides must be valid origins. */
21
21
  readonly baseUrl?: string;
22
22
  readonly account: string;
23
23
  readonly allowLocalhostHttp?: boolean;
@@ -17,7 +17,7 @@ export interface BharosaTransport {
17
17
  send(url: string, request: RequestInit): Promise<Response>;
18
18
  }
19
19
  interface BharosaBaseConfig {
20
- /** Defaults to https://app.bharosa.finance. Explicit overrides must be valid origins. */
20
+ /** Defaults to https://api.bharosa.finance. Explicit overrides must be valid origins. */
21
21
  readonly baseUrl?: string;
22
22
  readonly account: string;
23
23
  readonly allowLocalhostHttp?: boolean;
package/dist/index.d.cts CHANGED
@@ -16,7 +16,7 @@ export declare class Bharosa implements T.ClientSurface {
16
16
  constructor(config: T.BharosaConfig);
17
17
  }
18
18
  export interface BharosaMarketConfig {
19
- /** Defaults to https://app.bharosa.finance. */
19
+ /** Defaults to https://api.bharosa.finance. */
20
20
  baseUrl?: string;
21
21
  apiKey: string;
22
22
  allowLocalhostHttp?: boolean;
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export declare class Bharosa implements T.ClientSurface {
16
16
  constructor(config: T.BharosaConfig);
17
17
  }
18
18
  export interface BharosaMarketConfig {
19
- /** Defaults to https://app.bharosa.finance. */
19
+ /** Defaults to https://api.bharosa.finance. */
20
20
  baseUrl?: string;
21
21
  apiKey: string;
22
22
  allowLocalhostHttp?: boolean;
@@ -156,7 +156,7 @@ function createTransport(config, marketOnly = false) {
156
156
  ]);
157
157
  check(config.allowLocalhostHttp === undefined ||
158
158
  typeof config.allowLocalhostHttp === "boolean");
159
- const base = origin(config.baseUrl === undefined ? "https://app.bharosa.finance" : config.baseUrl, config.allowLocalhostHttp);
159
+ const base = origin(config.baseUrl === undefined ? "https://api.bharosa.finance" : config.baseUrl, config.allowLocalhostHttp);
160
160
  check((0, validate_cjs_1.valid)(operations.retrieve_account.parameters[0].schema, config.account));
161
161
  const account = config.account;
162
162
  let headers, secrets;
@@ -4,12 +4,12 @@
4
4
 
5
5
  Use Node.js 22.12 or later in a supported LTS release. The SDK supports ESM and CommonJS. Key-based authentication is server-only; keep credentials in your backend or server that handles browser sessions. Browser applications can supply a generic transport whose private host implementation manages sessions, origin restrictions and CSRF. Bun and Deno are unsupported.
6
6
 
7
- Obtain your authorized account ID and account key. Bharosa and BharosaMarket default to the production origin `https://app.bharosa.finance`; no API URL environment variable is required. The SDK neither provisions accounts nor runs an OAuth consent flow.
7
+ Obtain your authorized account ID and account key. Bharosa and BharosaMarket default to the production origin `https://api.bharosa.finance`; no API URL environment variable is required. The SDK neither provisions accounts nor runs an OAuth consent flow.
8
8
 
9
9
  ## Install
10
10
 
11
11
  ```sh
12
- npm install bharosa@0.3.2 --ignore-scripts
12
+ npm install bharosa@0.3.3 --ignore-scripts
13
13
  ```
14
14
 
15
15
  Source contributors can build and pack a local archive as described in CONTRIBUTING.md.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bharosa",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "private": false,
5
5
  "description": "Typed Bharosa resource SDK with server credentials or caller-owned transport.",
6
6
  "license": "MIT",