(event: Event)
| 27 | } |
| 28 | |
| 29 | const enrichEventMetadata = (event: Event): Event => { |
| 30 | let enriched: EventWithImportMetadata = event |
| 31 | |
| 32 | const expiration = getEventExpiration(event) |
| 33 | if (expiration) { |
| 34 | enriched = { ...enriched, [EventExpirationTimeMetadataKey]: expiration } |
| 35 | } |
| 36 | |
| 37 | if (isParameterizedReplaceableEvent(event)) { |
| 38 | const [, deduplication] = event.tags.find((tag) => tag.length >= 2 && tag[0] === EventTags.Deduplication) ?? [ |
| 39 | null, |
| 40 | '', |
| 41 | ] |
| 42 | enriched = { ...enriched, [EventDeduplicationMetadataKey]: deduplication ? [deduplication] : [''] } |
| 43 | } |
| 44 | |
| 45 | return enriched |
| 46 | } |
| 47 | |
| 48 | const DEFAULT_BATCH_SIZE = 1000 |
| 49 |
no test coverage detected