Resolve "Fix(Paypro): Paypro produces invalid declaration file"

This commit is contained in:
2025-10-31 04:45:02 +00:00
committed by Emergent Reasons
parent 457dd04469
commit 159a1fbcbe
4 changed files with 160 additions and 92 deletions
+2 -2
View File
@@ -199,8 +199,8 @@ export class PayPro {
// Expiry timestamp
e: z.coerce.number().optional(),
})
// Allow any unspecified keys to be parsed as a string.
.catchall(z.string())
// Allow any unspecified keys to be parsed. This allows us to handle the unknown keys below.
.loose()
// Validate that any unknown keys are optional (prefixed with x-).
.check(({ value }) => {
const keys = Object.values(PayPro.ENCODING_KEYS);