Skip to content

Commit d37ab8b

Browse files
horghclaude
andcommitted
Add credit_application and fund_transfer event types
Add CreditApplication and FundTransfer to the EventType enum to support new event types for credit applications and fund transfers. Updated tests to verify the new event types work correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1a349a2 commit d37ab8b

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
------------------
66

77
* Added `Securepay` to the `Processor` enum.
8+
* Added `CreditApplication` and `FundTransfer` to the `EventType` enum.
89

910
8.1.0 (2025-05-23)
1011
------------------

src/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export enum EventType {
22
AccountCreation = 'account_creation',
33
AccountLogin = 'account_login',
4+
CreditApplication = 'credit_application',
45
EmailChange = 'email_change',
6+
FundTransfer = 'fund_transfer',
57
PasswordReset = 'password_reset',
68
PayoutChange = 'payout_change',
79
Purchase = 'purchase',

src/request/event.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Event from './event';
2+
import { EventType } from '../constants';
23

34
describe('Event()', () => {
45
it('sets `time` to now by default', () => {
@@ -14,4 +15,20 @@ describe('Event()', () => {
1415

1516
expect(event.time).toEqual(mockDate);
1617
});
18+
19+
it('accepts credit_application event type', () => {
20+
const event = new Event({
21+
type: EventType.CreditApplication,
22+
});
23+
24+
expect(event.type).toEqual(EventType.CreditApplication);
25+
});
26+
27+
it('accepts fund_transfer event type', () => {
28+
const event = new Event({
29+
type: EventType.FundTransfer,
30+
});
31+
32+
expect(event.type).toEqual(EventType.FundTransfer);
33+
});
1734
});

0 commit comments

Comments
 (0)