From 23d1c17e04bbfc8db6cd048063776c6ce422a696 Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 2 Jun 2025 12:13:31 -0500 Subject: [PATCH 1/5] add source property to cardbrand --- package-lock.json | 4 ++-- package.json | 2 +- src/resources/Account/types.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a6d260..65dc254 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "method-node", - "version": "1.2.0", + "version": "1.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "method-node", - "version": "1.2.1", + "version": "1.2.2", "license": "ISC", "dependencies": { "axios": "^1.7.4", diff --git a/package.json b/package.json index 18b63af..0ab3b39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "method-node", - "version": "1.2.1", + "version": "1.2.2", "description": "Node.js library for the Method API", "main": "dist/index.ts", "module": "dist/index.mjs", diff --git a/src/resources/Account/types.ts b/src/resources/Account/types.ts index 5f69cb1..a4e26fe 100644 --- a/src/resources/Account/types.ts +++ b/src/resources/Account/types.ts @@ -313,6 +313,7 @@ export interface IAccountCardBrand { brands: IAccountCardBrandInfo[]; status: 'completed' | 'failed'; shared: boolean; + source: 'method' | 'network' | null; error: IResourceError | null; created_at: string; updated_at: string; From 91dcef19b7455b7d456959660caa5d823a8fe4d3 Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 2 Jun 2025 12:21:15 -0500 Subject: [PATCH 2/5] update tests --- test/resources/Account.tests.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/resources/Account.tests.ts b/test/resources/Account.tests.ts index d73a6dd..4f3b656 100644 --- a/test/resources/Account.tests.ts +++ b/test/resources/Account.tests.ts @@ -304,6 +304,7 @@ describe('Accounts - core methods tests', () => { last4: '1580', brands: card_create_response.brands, shared: false, + source: card_create_response.source, error: null, created_at: card_create_response.created_at, updated_at: card_create_response.updated_at @@ -327,6 +328,7 @@ describe('Accounts - core methods tests', () => { last4: '1580', brands: card_create_response.brands, shared: false, + source: card_retrieve_response.source, error: null, created_at: card_retrieve_response.created_at, updated_at: card_retrieve_response.updated_at From 6b1b7f4ff592e82aa49f18b60a2dc27f0b1b3915 Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 2 Jun 2025 12:32:27 -0500 Subject: [PATCH 3/5] update entity tests --- test/resources/Entity.tests.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/resources/Entity.tests.ts b/test/resources/Entity.tests.ts index f2c2664..2fa5809 100644 --- a/test/resources/Entity.tests.ts +++ b/test/resources/Entity.tests.ts @@ -78,12 +78,12 @@ describe('Entities - core methods tests', () => { verified: false, matched: false, latest_verification_session: null, - methods: ['element', 'kba'], + methods: ['element', 'kba', 'opal'], }, phone: { verified: false, latest_verification_session: null, - methods: ['element', 'sna', 'sms', 'byo_sms'], + methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], }, }, connect: null, @@ -137,12 +137,12 @@ describe('Entities - core methods tests', () => { verified: false, matched: false, latest_verification_session: null, - methods: ['element', 'kba'], + methods: ['element', 'kba', 'opal'], }, phone: { verified: false, latest_verification_session: null, - methods: ['element', 'sna', 'sms', 'byo_sms'], + methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], }, }, connect: null, @@ -207,14 +207,14 @@ describe('Entities - core methods tests', () => { latest_verification_session: entities_update_response.verification?.identity ?.latest_verification_session || null, - methods: ['element', 'kba'], + methods: ['element', 'kba', 'opal'], }, phone: { verified: false, latest_verification_session: entities_update_response.verification?.phone ?.latest_verification_session || null, - methods: ['element', 'sna', 'sms', 'byo_sms'], + methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], }, }, connect: null, From 6577303e19c455b1671fbb62fd312bc99026b3db Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 2 Jun 2025 13:27:30 -0500 Subject: [PATCH 4/5] update entity verification session types --- src/resources/Entity/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/resources/Entity/types.ts b/src/resources/Entity/types.ts index b7c78c0..e2881d0 100644 --- a/src/resources/Entity/types.ts +++ b/src/resources/Entity/types.ts @@ -31,6 +31,7 @@ export const EntityVerificationIdentityMethods = { kba: 'kba', byo_kyc: 'byo_kyc', element: 'element', + opal: 'opal', } as const; export type TEntityVerificationIdentityMethods = keyof typeof EntityVerificationIdentityMethods; @@ -40,6 +41,7 @@ export const EntityVerificationPhoneMethods = { sna: 'sna', byo_sms: 'byo_sms', element: 'element', + opal: 'opal', } as const; export type TEntityVerificationPhoneMethods = keyof typeof EntityVerificationPhoneMethods; From ab4df32f848ddd1a15da6823a3585b760102558a Mon Sep 17 00:00:00 2001 From: Bilal Hussain Date: Mon, 2 Jun 2025 14:14:31 -0500 Subject: [PATCH 5/5] update entity tests --- test/resources/Entity.tests.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/resources/Entity.tests.ts b/test/resources/Entity.tests.ts index 2fa5809..f5d2573 100644 --- a/test/resources/Entity.tests.ts +++ b/test/resources/Entity.tests.ts @@ -78,12 +78,12 @@ describe('Entities - core methods tests', () => { verified: false, matched: false, latest_verification_session: null, - methods: ['element', 'kba', 'opal'], + methods: ['element', 'opal', 'kba'], }, phone: { verified: false, latest_verification_session: null, - methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], + methods: ['element', 'opal', 'sna', 'sms', 'byo_sms'], }, }, connect: null, @@ -137,12 +137,12 @@ describe('Entities - core methods tests', () => { verified: false, matched: false, latest_verification_session: null, - methods: ['element', 'kba', 'opal'], + methods: ['element', 'opal', 'kba'], }, phone: { verified: false, latest_verification_session: null, - methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], + methods: ['element', 'opal', 'sna', 'sms', 'byo_sms'], }, }, connect: null, @@ -207,14 +207,14 @@ describe('Entities - core methods tests', () => { latest_verification_session: entities_update_response.verification?.identity ?.latest_verification_session || null, - methods: ['element', 'kba', 'opal'], + methods: ['element', 'opal', 'kba'], }, phone: { verified: false, latest_verification_session: entities_update_response.verification?.phone ?.latest_verification_session || null, - methods: ['element', 'sna', 'sms', 'byo_sms', 'opal'], + methods: ['element', 'opal', 'sna', 'sms', 'byo_sms'], }, }, connect: null,