From 19750b035ab3d3e8859233f870d7b8a6d66a25a5 Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Tue, 20 Oct 2026 17:10:53 -0400 Subject: [PATCH 1/3] feat(VAPI-3321): add attestationLevel and identity attributes to Transfer verb --- models/bxml/verbs/Transfer.ts | 2 ++ tests/unit/models/bxml/verbs/Transfer.test.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/models/bxml/verbs/Transfer.ts b/models/bxml/verbs/Transfer.ts index 21e902e..14fb878 100644 --- a/models/bxml/verbs/Transfer.ts +++ b/models/bxml/verbs/Transfer.ts @@ -20,6 +20,8 @@ export interface TransferAttributes { diversionTreatment?: string; diversionReason?: string; privacy?: boolean; + attestationLevel?: string; + identity?: string; } /** diff --git a/tests/unit/models/bxml/verbs/Transfer.test.ts b/tests/unit/models/bxml/verbs/Transfer.test.ts index 39dd95d..dc9afb8 100644 --- a/tests/unit/models/bxml/verbs/Transfer.test.ts +++ b/tests/unit/models/bxml/verbs/Transfer.test.ts @@ -58,4 +58,19 @@ describe('Transfer', () => { transfer.addTransferRecipients(phoneNumber); expect(transfer.toBxml()).toBe(expected); }); + + test('should create a Transfer Verb with attestationLevel', () => { + const transfer = new Transfer({ transferCallerId: '+19195551234', attestationLevel: 'B' }, phoneNumber); + const expected = '+19195551234'; + + expect(transfer.toBxml()).toBe(expected); + }); + + test('should create a Transfer Verb with identity', () => { + const identity = 'eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt="shaken"'; + const transfer = new Transfer({ transferCallerId: '+19195551234', identity }, phoneNumber); + const expected = '+19195551234'; + + expect(transfer.toBxml()).toBe(expected); + }); }); From 0041f60779ffb83697f9be0d1f4517c4f684a2eb Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Wed, 11 Nov 2026 11:33:43 -0500 Subject: [PATCH 2/3] refactor(VAPI-4422): rename Transfer attestationLevel to requestedAttestationLevel --- models/bxml/verbs/Transfer.ts | 2 +- tests/unit/models/bxml/verbs/Transfer.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/models/bxml/verbs/Transfer.ts b/models/bxml/verbs/Transfer.ts index 14fb878..5ad3679 100644 --- a/models/bxml/verbs/Transfer.ts +++ b/models/bxml/verbs/Transfer.ts @@ -20,7 +20,7 @@ export interface TransferAttributes { diversionTreatment?: string; diversionReason?: string; privacy?: boolean; - attestationLevel?: string; + requestedAttestationLevel?: string; identity?: string; } diff --git a/tests/unit/models/bxml/verbs/Transfer.test.ts b/tests/unit/models/bxml/verbs/Transfer.test.ts index dc9afb8..ff3543e 100644 --- a/tests/unit/models/bxml/verbs/Transfer.test.ts +++ b/tests/unit/models/bxml/verbs/Transfer.test.ts @@ -59,9 +59,9 @@ describe('Transfer', () => { expect(transfer.toBxml()).toBe(expected); }); - test('should create a Transfer Verb with attestationLevel', () => { - const transfer = new Transfer({ transferCallerId: '+19195551234', attestationLevel: 'B' }, phoneNumber); - const expected = '+19195551234'; + test('should create a Transfer Verb with requestedAttestationLevel', () => { + const transfer = new Transfer({ transferCallerId: '+19195551234', requestedAttestationLevel: 'B' }, phoneNumber); + const expected = '+19195551234'; expect(transfer.toBxml()).toBe(expected); }); From cef442d12ec6bc4517b7022a4214e349b0c14b69 Mon Sep 17 00:00:00 2001 From: Nicolas Asanov Date: Wed, 11 Nov 2026 11:44:13 -0500 Subject: [PATCH 3/3] test(VAPI-4422): fold Transfer attestation and identity into existing tests --- tests/unit/models/bxml/verbs/Transfer.test.ts | 29 +++++-------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/tests/unit/models/bxml/verbs/Transfer.test.ts b/tests/unit/models/bxml/verbs/Transfer.test.ts index ff3543e..1d93960 100644 --- a/tests/unit/models/bxml/verbs/Transfer.test.ts +++ b/tests/unit/models/bxml/verbs/Transfer.test.ts @@ -19,7 +19,9 @@ describe('Transfer', () => { tag: 'initialTag', diversionTreatment: 'propagate', diversionReason: 'user-busy', - privacy: true + privacy: true, + requestedAttestationLevel: 'B', + identity: 'eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt="shaken"' }; const phoneNumber = new PhoneNumber('+19195551234'); @@ -27,7 +29,7 @@ describe('Transfer', () => { test('should create a Transfer Verb', () => { const transfer = new Transfer(attributes); - const expected = ''; + const expected = ''; expect(transfer).toBeInstanceOf(Transfer); expect(transfer).toBeInstanceOf(Verb); @@ -36,9 +38,9 @@ describe('Transfer', () => { test('should create a Transfer Verb with nested PhoneNumber and SipUri', () => { let transfer = new Transfer(attributes, phoneNumber); - const expected = '+19195551234'; - const expectedSingle = '+19195551234sip:1-999-123-4567@voip-provider.example.net'; - const expectedMultiple = '+19195551234sip:1-999-123-4567@voip-provider.example.netsip:1-999-123-4567@voip-provider.example.net+19195551234'; + const expected = '+19195551234'; + const expectedSingle = '+19195551234sip:1-999-123-4567@voip-provider.example.net'; + const expectedMultiple = '+19195551234sip:1-999-123-4567@voip-provider.example.netsip:1-999-123-4567@voip-provider.example.net+19195551234'; expect(transfer).toBeInstanceOf(Transfer); expect(transfer).toBeInstanceOf(Verb); @@ -53,24 +55,9 @@ describe('Transfer', () => { test('should test the addTransferRecipients method method when no verbs are initially nested', () => { const transfer = new Transfer(attributes); - const expected = '+19195551234'; + const expected = '+19195551234'; transfer.addTransferRecipients(phoneNumber); expect(transfer.toBxml()).toBe(expected); }); - - test('should create a Transfer Verb with requestedAttestationLevel', () => { - const transfer = new Transfer({ transferCallerId: '+19195551234', requestedAttestationLevel: 'B' }, phoneNumber); - const expected = '+19195551234'; - - expect(transfer.toBxml()).toBe(expected); - }); - - test('should create a Transfer Verb with identity', () => { - const identity = 'eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt="shaken"'; - const transfer = new Transfer({ transferCallerId: '+19195551234', identity }, phoneNumber); - const expected = '+19195551234'; - - expect(transfer.toBxml()).toBe(expected); - }); });