Skip to content

[ENG-3815] feat(microsoft): Webhook Message format#2875

Open
Cobalt0s wants to merge 1 commit into
cobalt0s/microsoft-read-severalfrom
cobalt0s/microsoft-webhook-message
Open

[ENG-3815] feat(microsoft): Webhook Message format#2875
Cobalt0s wants to merge 1 commit into
cobalt0s/microsoft-read-severalfrom
cobalt0s/microsoft-webhook-message

Conversation

@Cobalt0s
Copy link
Copy Markdown
Contributor

@Cobalt0s Cobalt0s commented Apr 14, 2026

Description

Implements Microsoft subscription events and refactors HubSpot event tests to use testroutines.SubscriptionEventTestCase. It is used as a template for all future unit tests of this kind.

Key changes

  • Reusable test routine
    SubscriptionEventTestCase accepts a generic common.Event and validates it by casting to:

    • common.CollapsedSubscriptionEvent (for list-based events)
    • common.SubscriptionEvent (core contract assertions)
    • common.SubscriptionUpdateEvent (adds updated-fields validation)

    Test inputs use a unified parameter structure, enabling universal validation across all event interfaces.

  • Microsoft event implementation
    Implements the event interfaces for Microsoft subscription events.
    Responses always contain a single item, but are still modeled as a common.CollapsedSubscriptionEvent.

  • Exported event collection
    webhook.EventCollection is exported as microsoft.EventCollection for external server use.

NOTE: the clientState is used to carry the objectName. Microsoft returns the resource name but that would require mapping each and every string back to the object name we use for Read/Write, etc.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 14, 2026

@Cobalt0s Cobalt0s self-assigned this Apr 14, 2026
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 4937ac7 to f22b651 Compare May 1, 2026 00:11
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-webhook-message branch from d375649 to a08f98a Compare May 1, 2026 00:11
@Cobalt0s Cobalt0s marked this pull request as ready for review May 1, 2026 15:09
@Cobalt0s Cobalt0s requested a review from jlimatampersand May 1, 2026 15:09
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-webhook-message branch from a08f98a to 4fc22da Compare May 1, 2026 15:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from f22b651 to 5bfbaea Compare May 1, 2026 15:34
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-webhook-message branch from 4fc22da to c4c744b Compare May 1, 2026 17:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 7083e72 to 613e46e Compare May 13, 2026 21:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-webhook-message branch from c4c744b to 5766973 Compare May 13, 2026 21:33
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-read-several branch from 613e46e to 96931f6 Compare May 18, 2026 23:35
@Cobalt0s Cobalt0s force-pushed the cobalt0s/microsoft-webhook-message branch from 5766973 to 318e9c1 Compare May 18, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants