diff --git a/audit-ci.jsonc b/audit-ci.jsonc index 1bfe23488..620120a10 100644 --- a/audit-ci.jsonc +++ b/audit-ci.jsonc @@ -8,5 +8,8 @@ "GHSA-2g4f-4pwh-qvx6", "GHSA-3ppc-4f35-3m26", "GHSA-mw96-cpmx-2vgc", + "GHSA-23c5-xmqv-rm74", + "GHSA-5c6j-r48x-rmvq", + "GHSA-7r86-cg39-jmmj", ], } diff --git a/types/Address/Verification.d.ts b/types/Address/Verification.d.ts index 14f981013..2b9966345 100644 --- a/types/Address/Verification.d.ts +++ b/types/Address/Verification.d.ts @@ -1,4 +1,4 @@ -import { IFieldError } from '../errors'; +import { IAddressVerificationFieldError } from '../errors'; import { IVerificationDetails } from './VerificationDetails'; /** @@ -13,7 +13,7 @@ export declare interface IVerification { /** * All errors that caused the verification to fail */ - errors: IFieldError[]; + errors: IAddressVerificationFieldError[]; /** * Extra data related to the verification diff --git a/types/errors/AddressVerificationFieldError.d.ts b/types/errors/AddressVerificationFieldError.d.ts new file mode 100644 index 000000000..09c2456bc --- /dev/null +++ b/types/errors/AddressVerificationFieldError.d.ts @@ -0,0 +1,26 @@ +import { TErrorCode } from './ErrorCode'; + +/** + * @see https://docs.easypost.com/docs/errors#addressverificationfielderror-object + */ +export declare interface IAddressVerificationFieldError { + /** + * Machine readable description of the problem + */ + code: TErrorCode; + + /** + * Field of the request that the error describes + */ + field: string; + + /** + * Human readable description of the problem + */ + message: string; + + /** + * Occasional insight on how to correct the error + */ + suggestion?: string; +} diff --git a/types/errors/FieldError.d.ts b/types/errors/FieldError.d.ts index 3935d33d4..2448b13de 100644 --- a/types/errors/FieldError.d.ts +++ b/types/errors/FieldError.d.ts @@ -8,4 +8,9 @@ export declare interface IFieldError { * Human readable description of the problem */ message: string; + + /** + * Occasional insight on how to correct the error + */ + suggestion?: string; } diff --git a/types/errors/index.d.ts b/types/errors/index.d.ts index d6c2ac5d8..d76c4718b 100644 --- a/types/errors/index.d.ts +++ b/types/errors/index.d.ts @@ -1,3 +1,4 @@ +export * from './AddressVerificationFieldError'; export * from './Error'; export * from './ErrorCode'; export * from './FieldError';