- Notifications
You must be signed in to change notification settings - Fork144
Open
Description
CreateDataEventRequest models (CreateDataEventRequestWithId,CreateDataEventRequestWithUserId,CreateDataEventRequestWithEmail) only accept string metadata, conflicting with Intercom’s documented metadata types (strings, numbers, Unix timestamps, rich links, monetary amounts).
Steps to reproduce
- Instantiate any variant with non-string metadata:
fromintercom.typesimportCreateDataEventRequestWithUserIdCreateDataEventRequestWithUserId(user_id="123",event_name="test-event",created_at=1671028894,metadata={"load":3.67},)
- Observe
ValidationErrorbecause metadata.load is not a string.
Expected behaviour
Allow every metadata type listed athttps://developers.intercom.com/docs/references/rest-api/api.intercom.io/data-events/createdataevent.
Actual behaviour
Validation forces all metadata values to be plain strings.
Suggested Fix
Relax the metadata value type in allCreateDataEventRequest* models (e.g., usetyping.Any or a union covering the documented types) so the SDK aligns with Intercom’s API specification.
Metadata
Metadata
Assignees
Labels
No labels