| 581 | } |
| 582 | |
| 583 | function resolvePropertySnapshot( |
| 584 | config: HubSpotWebhookConfig, |
| 585 | property: string |
| 586 | ): PropertySnapshotState { |
| 587 | const existing = config.propertySnapshot |
| 588 | if (existing && existing.property === property && Array.isArray(existing.entries)) { |
| 589 | return { property, values: new Map(existing.entries) } |
| 590 | } |
| 591 | // Property changed since last config — start fresh so we don't compare against stale values. |
| 592 | return { property, values: new Map() } |
| 593 | } |
| 594 | |
| 595 | function serializeSnapshot(state: PropertySnapshotState): { |
| 596 | property: string |