@parseapi/sdk 1.10.5 → 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
 
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.5";
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.js CHANGED
@@ -256,7 +256,7 @@ var EmojiCatalog = class {
256
256
  };
257
257
 
258
258
  // src/index.ts
259
- var VERSION = "1.10.5";
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.5",
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",