@parseapi/sdk 1.10.4 → 1.10.6

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/README.md CHANGED
@@ -285,7 +285,7 @@ await parse.weather(40.7128, -74.006, { deep: true, date: '2026-08-15' });
285
285
 
286
286
  Tariff starts with the general schedule line. Paid deep adds units and the special and other schedule columns. An optional origin then resolves country-specific measures. The three calls below show those successive choices. Without origin, schedule detail is still returned and origin-dependent fields are null. A null effective rate is not a zero rate.
287
287
 
288
- Tariff lookup and search accept an optional `edition` fingerprint and `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
288
+ Tariff lookup and search accept the `edition` ID returned by Tariff, such as `ted_3`, and an optional `date` (`YYYY-MM-DD`). The edition pins exact immutable source bytes. A date is accepted only when verified source coverage exists. An edition without a date returns undated schedule context (`date: null`). Default requests use today. Paid detail exposes an open-string `reason` when `effective_rate` is null, including `incomplete_coverage`. A null rate never means zero. Explicit selections fail with `tariff_selection_mismatch` if an older server ignores the requested scope.
289
289
 
290
290
  Origin means where the goods originate, not where they ship from. The effective rate covers matched stored schedule measures only. It is not complete duty or landed cost.
291
291
 
@@ -303,7 +303,7 @@ HLR reports status at the last check. `live` means assigned and `connected` mean
303
303
 
304
304
  Bank returns core `checks` for input, country, length, structure, checksum and national rules, plus an `issues` list. States are `passed`, `failed`, `not_checked` or `not_supported`. Unsupported national checking is not a failure. `valid` covers the implemented format and checksum rules, not account existence, ownership or payment reachability. Directory names and BICs may be null independently. Older responses may omit `checks` and `issues`, and future states and issue codes remain strings. Pass the original input unchanged so the API can report invalid characters. Deep `account` remains the BBAN remainder.
305
305
 
306
- Bank inputs use `POST /bank` JSON bodies, keeping IBAN and account values out of request URLs. Pass original strings; the server owns normalization and validation. Avoid logging request bodies. IBAN deep can include `directory` with the immutable `edition`, resolved `country` and actual `match` grain (`bank`, `branch`, `prefix` or `none`); it is absent if no directory lookup ran. A match does not prove complete country coverage or payment reachability.
306
+ Bank inputs use `POST /bank` JSON bodies, keeping IBAN and account values out of request URLs. Pass original strings; the server owns normalization and validation. Avoid logging request bodies. IBAN deep adds the branch identifier and account remainder.
307
307
 
308
308
  Use country requirements to build supported input fields. US ACH has an explicit helper with no deep option. It checks the routing format/ABA checksum and account-field syntax; `account_checksum` is `not_supported`. It preserves account characters and leading zeros. A nullable bank name is routing-directory identity, not account existence, ownership or ACH eligibility. The examples below are synthetic test inputs, not payment instructions.
309
309
 
package/dist/index.cjs CHANGED
@@ -285,7 +285,7 @@ var EmojiCatalog = class {
285
285
  };
286
286
 
287
287
  // src/index.ts
288
- var VERSION = "1.10.4";
288
+ var VERSION = "1.10.6";
289
289
  var API_VERSION = "2.0.0";
290
290
  var DEFAULT_BASE_URL = "https://api.parseapi.com";
291
291
  var DEFAULT_TIMEOUT_MS = 1e4;
@@ -313,8 +313,11 @@ var ParseAPIError = class extends Error {
313
313
  this.retryAfter = retryAfter;
314
314
  }
315
315
  };
316
+ function tariffEditionId(value) {
317
+ return typeof value === "string" && (value.length === 64 && /^[a-f0-9]{64}$/.test(value) || /^ted_[1-9][0-9]{0,19}(?![\s\S])/.test(value) && (value.length < 24 || value.slice(4) <= "18446744073709551615"));
318
+ }
316
319
  function tariffSelection(result, opts) {
317
- if ((opts?.edition !== void 0 || opts?.date !== void 0) && (typeof result.edition !== "string" || result.edition.length !== 64 || !/^[a-f0-9]{64}$/.test(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
320
+ if ((opts?.edition !== void 0 || opts?.date !== void 0) && (!tariffEditionId(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
318
321
  throw new ParseAPIError(0, "tariff_selection_mismatch", "Tariff response did not confirm the requested edition/date. The server may not support this selection.", null, null);
319
322
  }
320
323
  return result;
package/dist/index.d.cts CHANGED
@@ -1607,7 +1607,7 @@ interface BankDeep {
1607
1607
  /** Source edition and exact match grain, not coverage or account verification. */
1608
1608
  directory?: BankDirectory;
1609
1609
  /** Two check digits as a string, keeping a leading zero. */
1610
- checksum: string | null;
1610
+ checksum?: string | null;
1611
1611
  /** Branch identifier when that country has one. */
1612
1612
  branch: string | null;
1613
1613
  account: string | null;
package/dist/index.d.ts CHANGED
@@ -1607,7 +1607,7 @@ interface BankDeep {
1607
1607
  /** Source edition and exact match grain, not coverage or account verification. */
1608
1608
  directory?: BankDirectory;
1609
1609
  /** Two check digits as a string, keeping a leading zero. */
1610
- checksum: string | null;
1610
+ checksum?: string | null;
1611
1611
  /** Branch identifier when that country has one. */
1612
1612
  branch: string | null;
1613
1613
  account: string | null;
package/dist/index.js CHANGED
@@ -256,7 +256,7 @@ var EmojiCatalog = class {
256
256
  };
257
257
 
258
258
  // src/index.ts
259
- var VERSION = "1.10.4";
259
+ var VERSION = "1.10.6";
260
260
  var API_VERSION = "2.0.0";
261
261
  var DEFAULT_BASE_URL = "https://api.parseapi.com";
262
262
  var DEFAULT_TIMEOUT_MS = 1e4;
@@ -284,8 +284,11 @@ var ParseAPIError = class extends Error {
284
284
  this.retryAfter = retryAfter;
285
285
  }
286
286
  };
287
+ function tariffEditionId(value) {
288
+ return typeof value === "string" && (value.length === 64 && /^[a-f0-9]{64}$/.test(value) || /^ted_[1-9][0-9]{0,19}(?![\s\S])/.test(value) && (value.length < 24 || value.slice(4) <= "18446744073709551615"));
289
+ }
287
290
  function tariffSelection(result, opts) {
288
- if ((opts?.edition !== void 0 || opts?.date !== void 0) && (typeof result.edition !== "string" || result.edition.length !== 64 || !/^[a-f0-9]{64}$/.test(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
291
+ if ((opts?.edition !== void 0 || opts?.date !== void 0) && (!tariffEditionId(result.edition) || opts.edition !== void 0 && result.edition !== opts.edition || (opts.date !== void 0 ? result.date !== opts.date : result.date != null))) {
289
292
  throw new ParseAPIError(0, "tariff_selection_mismatch", "Tariff response did not confirm the requested edition/date. The server may not support this selection.", null, null);
290
293
  }
291
294
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parseapi/sdk",
3
- "version": "1.10.4",
3
+ "version": "1.10.6",
4
4
  "description": "Official ParseAPI client for Node and TypeScript. One key, minimal JSON, fast.",
5
5
  "keywords": [
6
6
  "parseapi",