Skip to content

Contact properties: the date type of MillionSend v0.22.0 (0.10.0) - #10

Merged
heliocosta-dev merged 1 commit into
mainfrom
feat/date-property-type
Oct 21, 2026
Merged

heliocosta-dev merged 1 commit into
mainfrom
feat/date-property-type

Conversation

@heliocosta-dev

Copy link
Copy Markdown
Member

MillionSend v0.22.0 adds a third contact property type, date, next to Resend's string and number. ContactPropertyType had only String and Number and no catch-all, so contacts.properties.get, list and create returned Error::Parse ("unknown variant date") for any team with a date property.

Changes

  • ContactPropertyType::Date serializes as "date".
  • ContactPropertyType::Unknown (#[serde(other)]) is what any type newer than the SDK reads as, so the next new type won't fail a call either. It is read-only: serializing it fails.
  • ContactPropertyType is now #[non_exhaustive].
  • Rustdoc and README: what a date value takes, the { "type": "date", "value": "…" } wrapper on Contact.properties, the segment date ops (before/after with an ISO date or date-time, in_last_days/not_in_last_days with a day count from "1" to "36500"), and a v0.22.0 row in the server versions table. SegmentCondition.op is already a String, so the new ops needed no code change.
  • Version 0.10.0. Adding variants breaks exhaustive matches on ContactPropertyType, which now need a _ arm.

Tests

contact_properties_send_date_and_read_date_and_unknown_types checks three things against the mock server: create sends "type": "date" and reads the date property it gets back, list reads both "date" and an unknown "boolean" type, and Unknown refuses to serialize. cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings and cargo test pass locally.

Not included: reqwest 0.13 (#3)

reqwest's types are part of this crate's public API (MillionSend::with_client(reqwest::Client), Error::Http(reqwest::Error)). 0.13 also renames rustls-tls to rustls, which is why #3 fails to resolve. On top of that, it swaps the TLS stack: the aws-lc crypto provider replaces ring, and the platform verifier replaces the bundled webpki roots. That changes runtime and build behavior for every user, so it stays out of this release.

🤖 Generated with Claude Code

- ContactPropertyType gains Date, which serializes as "date", and an
  Unknown catch-all that any type newer than the SDK reads as, so
  contact_properties get, list and create no longer fail to parse a
  team's date property. Unknown is read-only: serializing it fails.
- ContactPropertyType is now #[non_exhaustive]. An exhaustive match on
  it needs a `_` arm, hence the minor bump.
- README: what a date value takes, the segment date ops (before, after,
  in_last_days, not_in_last_days) and the v0.22.0 server version row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@heliocosta-dev
heliocosta-dev merged commit 752409b into main Oct 21, 2026
1 check passed
@heliocosta-dev
heliocosta-dev deleted the feat/date-property-type branch October 21, 2026 21:17
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