@proofline/sdk 5.5.0 → 5.5.1

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
@@ -45,7 +45,7 @@ export class ProoflineClient extends Operations {
45
45
  throw protocol("the review page has no typed collection metadata");
46
46
  for (const item of page.items) {
47
47
  if (count >= maxItems)
48
- throw protocol("the review collection exceeds maxItems");
48
+ throw paginationLimit("the review collection exceeds maxItems");
49
49
  count += 1;
50
50
  yield item;
51
51
  }
@@ -61,7 +61,7 @@ export class ProoflineClient extends Operations {
61
61
  seen.add(page.next_cursor);
62
62
  cursor = page.next_cursor;
63
63
  }
64
- throw protocol("the review collection exceeds maxPages");
64
+ throw paginationLimit("the review collection exceeds maxPages");
65
65
  }
66
66
  async waitForReview(orgId, reviewId, options = {}) {
67
67
  const timeout = options.timeoutMs ?? 20 * 60_000;
@@ -106,6 +106,10 @@ import { ProoflineError } from "./transport.js";
106
106
  function protocol(detail) {
107
107
  return new ProoflineError(0, "urn:proofline:sdk:invalid-response", detail);
108
108
  }
109
+ // A caller's bound, not a server fault: the collection continues past it.
110
+ function paginationLimit(detail) {
111
+ return new ProoflineError(0, "urn:proofline:sdk:pagination-limit", detail);
112
+ }
109
113
  function integerLimit(value, name) {
110
114
  if (!Number.isSafeInteger(value) || value <= 0)
111
115
  throw new TypeError(`${name} must be a positive integer`);
package/dist/transport.js CHANGED
@@ -1,4 +1,4 @@
1
- const VERSION = "5.5.0";
1
+ const VERSION = "5.5.1";
2
2
  const MAX_RESPONSE_BYTES = 8 * 1024 * 1024;
3
3
  const MAX_RETRIES = 3;
4
4
  const MAX_RETRY_SECONDS = 60;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proofline/sdk",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Typed clients for the token-scoped Proofline review API",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",