Correct contact search date filtering and operator docs - #625
Draft
adisan19 wants to merge 1 commit into
Draft
Conversation
The single_filter_search_request.operator enum falsely implies != is valid for every field type, and omits >= / <= which work on integer/float fields. Both are type-blind facts an OpenAPI enum can't express structurally (fields are dynamic, including custom attributes), so the enum stays a flat superset of all valid operators and the description now states validity per field type, including the date-field exception (=, IN, NIN, <, > only; !=, <=, >= 400). Also corrects the SearchContacts endpoint's "Searching for Timestamp Fields" and "Accepted Operators" prose to state the day-truncation and >-matches-next-day rule explicitly, and to generalize the created_at-only <=/>= admonition to all Date fields plus !=. Applied identically across all versions (2.7-2.16, Preview/0) since the operator/type validation is shared search infrastructure, not gated by public API version.
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.
Why?
The contact search docs describe date filtering incorrectly. They list operators that actually return a 400 error, leave out two that work, and never mention that a date value is cut down to a whole day, which makes
>look like it skips a day.How?
Rewrites the timestamp section and the operator table in every version to say which operators each field type accepts, and what day truncation does to the comparison results.
Generated with Claude Code