( body: ITrackHandlerPayload )
| 88 | |
| 89 | // Resolve a caller-supplied device id from a track event's `properties.__deviceId`. |
| 90 | export function getOverrideDeviceId( |
| 91 | body: ITrackHandlerPayload |
| 92 | ): string | undefined { |
| 93 | if (body.type !== 'track') { |
| 94 | return undefined; |
| 95 | } |
| 96 | return sanitizeOverrideDeviceId(body.payload?.properties?.__deviceId); |
| 97 | } |
| 98 | |
| 99 | export function getTimestamp( |
| 100 | timestamp: FastifyRequest['timestamp'], |
no test coverage detected