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 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
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.

1 participant