Repository navigation
Contact properties: the date type of MillionSend v0.22.0 (0.10.0) - #10
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MillionSend v0.22.0 adds a third contact property type,
date, next to Resend'sstringandnumber.ContactPropertyTypehad onlyStringandNumberand no catch-all, socontacts.properties.get,listandcreatereturnedError::Parse("unknown variantdate") for any team with a date property.Changes
ContactPropertyType::Dateserializes 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.ContactPropertyTypeis now#[non_exhaustive].{ "type": "date", "value": "…" }wrapper onContact.properties, the segment date ops (before/afterwith an ISO date or date-time,in_last_days/not_in_last_dayswith a day count from"1"to"36500"), and a v0.22.0 row in the server versions table.SegmentCondition.opis already aString, so the new ops needed no code change.ContactPropertyType, which now need a_arm.Tests
contact_properties_send_date_and_read_date_and_unknown_typeschecks three things against the mock server:createsends"type": "date"and reads the date property it gets back,listreads both"date"and an unknown"boolean"type, andUnknownrefuses to serialize.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warningsandcargo testpass 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 renamesrustls-tlstorustls, 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