From 52aa86aa8bd5235767b0543d8a8a8f513d8070e5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 18:38:40 +0000 Subject: [PATCH 1/2] Add identity and business verification trigger Co-authored-by: myles.foster --- lib/VerificationGateway.ts | 5 +++++ lib/types.ts | 24 ++++++++++++++++++++++++ test/unit/releasePrepSpec.ts | 16 ++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/lib/VerificationGateway.ts b/lib/VerificationGateway.ts index 9f0f406..a8e9e1f 100644 --- a/lib/VerificationGateway.ts +++ b/lib/VerificationGateway.ts @@ -38,6 +38,11 @@ export class VerificationGateway { return new PaginatedArray(result.meta, ...result.verifications); } + async triggerIdentityOrBusinessVerification(body: types.Verification.TriggerIdentityOrBusinessRequest) { + const endPoint = buildURL("verifications", "trigger"); + return this.gateway.client.post(endPoint, body); + } + async triggerWatchlist(body: any) { const endPoint = buildURL("verifications", "watchlist", "trigger"); const result = await this.gateway.client.post(endPoint, body); diff --git a/lib/types.ts b/lib/types.ts index 8a50105..6e646f7 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -88,6 +88,30 @@ export namespace Balance { } export namespace Verification { + export type IdentityOrBusinessType = "individual" | "business"; + export type RetryRejectedReasonType = "unprocessable" | "invalid" | "missing_requirements" | "fraudulent"; + + export interface TriggerIdentityOrBusinessRequest { + recipientId: string; + types: IdentityOrBusinessType[]; + enforceInactiveUntilVerified?: boolean; + retryAllowed?: boolean; + retryRejectedReasonTypes?: RetryRejectedReasonType[]; + } + + export interface TriggerIdentityOrBusinessVerification { + type: IdentityOrBusinessType; + status: "created" | "failed"; + verificationId?: string; + error?: string; + } + + export interface TriggerIdentityOrBusinessResult { + ok: boolean; + recipientId: string; + verifications: TriggerIdentityOrBusinessVerification[]; + } + export interface Verification { id: string; type: string; diff --git a/test/unit/releasePrepSpec.ts b/test/unit/releasePrepSpec.ts index c8dde71..ad596c8 100644 --- a/test/unit/releasePrepSpec.ts +++ b/test/unit/releasePrepSpec.ts @@ -95,6 +95,17 @@ describe("Release prep endpoint coverage", () => { assert.strictEqual((await verifications.trigger("individual", { recipientIds: ["R-123"] }))[0].id, "WV-123"); assert.strictEqual((await verifications.triggerWatchlist({ recipientIds: ["R-123"] }))[0].id, "WV-123"); assert.strictEqual((await verifications.trigger_watchlist({ recipientIds: ["R-123"] }))[0].id, "WV-123"); + const identityResponse = { + ok: true, + recipientId: "R-123", + verifications: [{ type: "individual", status: "created", verificationId: "IV-123" }], + }; + client.post.resolves(identityResponse); + assert.deepStrictEqual(await verifications.triggerIdentityOrBusinessVerification({ + recipientId: "R-123", + types: ["individual"], + retryAllowed: true, + }), identityResponse); assert.deepStrictEqual(client.get.getCall(0).args, ["/v1/verifications?verificationType=watchlist&page=1&pageSize=10"]); assert.deepStrictEqual(client.get.getCall(1).args, ["/v1/verifications?page=1"]); @@ -102,6 +113,11 @@ describe("Release prep endpoint coverage", () => { assert.deepStrictEqual(client.post.getCall(0).args, ["/v1/verifications/individual/trigger", { recipientIds: ["R-123"] }]); assert.deepStrictEqual(client.post.getCall(1).args, ["/v1/verifications/watchlist/trigger", { recipientIds: ["R-123"] }]); assert.deepStrictEqual(client.post.getCall(2).args, ["/v1/verifications/watchlist/trigger", { recipientIds: ["R-123"] }]); + assert.deepStrictEqual(client.post.getCall(3).args, ["/v1/verifications/trigger", { + recipientId: "R-123", + types: ["individual"], + retryAllowed: true, + }]); }); it("constructs gateway verification aliases", () => { From 0763e3ef2bdc40579895cedf2ab449d62e75eaeb Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 16 Sep 2026 19:27:07 +0000 Subject: [PATCH 2/2] fix(ci): update Codecov orb Co-authored-by: myles.foster --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6455cf4..2b46721 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 orbs: - codecov: codecov/codecov@5.0.3 + codecov: codecov/codecov@6.0.0 executors: default: