@proofline/sdk 5.4.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 +6 -2
- package/dist/schema.d.ts +6 -0
- package/dist/transport.js +1 -1
- package/openapi.public.json +11 -1
- package/package.json +1 -1
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
|
|
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
|
|
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/schema.d.ts
CHANGED
|
@@ -1063,6 +1063,12 @@ export interface components {
|
|
|
1063
1063
|
* `MODEL_BUDGET_EXHAUSTED`. Null otherwise.
|
|
1064
1064
|
*/
|
|
1065
1065
|
incompleteness_kind?: string | null;
|
|
1066
|
+
/**
|
|
1067
|
+
* @description Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS`
|
|
1068
|
+
* when credits refused its model. Absent otherwise; other recorded
|
|
1069
|
+
* details stay private.
|
|
1070
|
+
*/
|
|
1071
|
+
reason_codes?: string[] | null;
|
|
1066
1072
|
/**
|
|
1067
1073
|
* Format: date-time
|
|
1068
1074
|
* @description When the code assessment started. Null until it starts.
|
package/dist/transport.js
CHANGED
package/openapi.public.json
CHANGED
|
@@ -1189,6 +1189,16 @@
|
|
|
1189
1189
|
"null"
|
|
1190
1190
|
]
|
|
1191
1191
|
},
|
|
1192
|
+
"reason_codes": {
|
|
1193
|
+
"description": "Public causes of an `INCOMPLETE` code assessment: `OUT_OF_CREDITS`\n when credits refused its model. Absent otherwise; other recorded\n details stay private.",
|
|
1194
|
+
"items": {
|
|
1195
|
+
"type": "string"
|
|
1196
|
+
},
|
|
1197
|
+
"type": [
|
|
1198
|
+
"array",
|
|
1199
|
+
"null"
|
|
1200
|
+
]
|
|
1201
|
+
},
|
|
1192
1202
|
"started_at": {
|
|
1193
1203
|
"description": "When the code assessment started. Null until it starts.",
|
|
1194
1204
|
"format": "date-time",
|
|
@@ -5996,7 +6006,7 @@
|
|
|
5996
6006
|
},
|
|
5997
6007
|
"info": {
|
|
5998
6008
|
"title": "Proofline Review API",
|
|
5999
|
-
"version": "5.
|
|
6009
|
+
"version": "5.5.0"
|
|
6000
6010
|
},
|
|
6001
6011
|
"openapi": "3.1.0",
|
|
6002
6012
|
"paths": {
|