diff --git a/src/resources/Entity/Connect.ts b/src/resources/Entity/Connect.ts index 24ac9ac..92aee55 100644 --- a/src/resources/Entity/Connect.ts +++ b/src/resources/Entity/Connect.ts @@ -2,6 +2,7 @@ import Resource, { IResourceListOpts } from '../../resource'; import Configuration, { IResponse } from '../../configuration'; import type { IEntityConnect } from './types'; + export const AccountExpandableFields = { sensitive: 'sensitive', balance: 'balance', @@ -14,10 +15,12 @@ export const AccountExpandableFields = { latest_verification_session: 'latest_verification_session', } as const; -type AccountExpandableField = typeof AccountExpandableFields[keyof typeof AccountExpandableFields]; +type AccountFieldKey = typeof AccountExpandableFields[keyof typeof AccountExpandableFields]; + +export type ExpandField = 'accounts' | `accounts.${AccountFieldKey}`; export interface IExpandableOpts { - expand?: AccountExpandableField[]; + expand?: ExpandField[]; } export interface IConnectListOpts extends IResourceListOpts, IExpandableOpts {} diff --git a/test/resources/Account.tests.ts b/test/resources/Account.tests.ts index 8ce8f7a..5ed2bb3 100644 --- a/test/resources/Account.tests.ts +++ b/test/resources/Account.tests.ts @@ -239,6 +239,7 @@ describe('Accounts - core methods tests', () => { }; balances_create_response.should.be.eql(expect_results); + await new Promise(r => setTimeout(r, 5000)) }); it('should successfully retrieve the balance of an account.', async () => { @@ -311,7 +312,7 @@ describe('Accounts - core methods tests', () => { }; card_create_response.should.be.eql(expect_results); - await new Promise(r => setTimeout(r, 2000)) + await new Promise(r => setTimeout(r, 5000)) }); it('should successfully retrieve a card for an account.', async () => {