File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/destination-actions/src/destinations/loops/sendEvent Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,13 @@ import type { ActionDefinition } from '@segment/actions-core'
2
2
import type { Settings } from '../generated-types'
3
3
import type { Payload } from './generated-types'
4
4
5
+ type SendEventPayload = {
6
+ email ?: string
7
+ eventName : string
8
+ userId : string
9
+ eventProperties ?: Record < string , string | number | boolean >
10
+ } & Record < string , string | number | boolean | null >
11
+
5
12
const action : ActionDefinition < Settings , Payload > = {
6
13
title : 'Send Event' ,
7
14
description : 'Send an event for a contact in Loops' ,
@@ -61,9 +68,8 @@ const action: ActionDefinition<Settings, Payload> = {
61
68
eventName : payload . eventName ,
62
69
userId : payload . userId ,
63
70
eventProperties : payload . eventProperties ,
64
- ...( typeof payload . contactProperties === 'object' &&
65
- ( payload . contactProperties as { [ k : string ] : string | boolean | number | null } ) )
66
- }
71
+ ...( typeof payload . contactProperties === 'object' && payload . contactProperties )
72
+ } as SendEventPayload
67
73
} )
68
74
}
69
75
}
You can’t perform that action at this time.
0 commit comments