@go-labs-sg/bb 1.2.9 → 1.3.0
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.
|
@@ -113,8 +113,15 @@ export function parseCreateBillPayload(raw) {
|
|
|
113
113
|
const vr = o.verificationResults;
|
|
114
114
|
if (vr !== undefined && vr !== null) {
|
|
115
115
|
const v = requireObject(vr, "verificationResults");
|
|
116
|
+
const verificationResultStatus = v.status;
|
|
117
|
+
if (verificationResultStatus !== "PENDING" &&
|
|
118
|
+
verificationResultStatus !== "PASS" &&
|
|
119
|
+
verificationResultStatus !== "FAIL" &&
|
|
120
|
+
verificationResultStatus !== "MANUAL_REVIEW") {
|
|
121
|
+
throw new Error("create-bill payload.verificationResults.status must be PENDING | PASS | FAIL | MANUAL_REVIEW.");
|
|
122
|
+
}
|
|
116
123
|
verificationResults = {
|
|
117
|
-
status:
|
|
124
|
+
status: verificationResultStatus,
|
|
118
125
|
extractedAmount: v.extractedAmount === null || v.extractedAmount === undefined
|
|
119
126
|
? null
|
|
120
127
|
: Number(v.extractedAmount),
|
|
@@ -124,6 +131,9 @@ export function parseCreateBillPayload(raw) {
|
|
|
124
131
|
confidence: v.confidence === null || v.confidence === undefined
|
|
125
132
|
? null
|
|
126
133
|
: Number(v.confidence),
|
|
134
|
+
failureReason: v.failureReason === null || v.failureReason === undefined
|
|
135
|
+
? null
|
|
136
|
+
: String(v.failureReason),
|
|
127
137
|
};
|
|
128
138
|
}
|
|
129
139
|
const verificationStatus = o.verificationStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/bb",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Budget Builder CLI — list budgets, bills, approvals, suppliers; approve bills; change status. For AI agents (e.g. Chuck/OpenClaw).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|