Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | Option<**String**> | Required. Name of the field to use as the first operand in the filter expression. | [optional]
**key** | Option<**String**> | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional]
**value** | Option<**String**> | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional]
**value** | Option<**String**> | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional]
**hours_ago** | Option<**String**> | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | Option<**f32**> | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | Option<**f32**> | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/FilterExpression.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**field** | Option<**String**> | Required. Name of the field to use as the first operand in the filter expression. | [optional]
**key** | Option<**String**> | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional]
**value** | Option<**String**> | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional]
**value** | Option<**String**> | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional]
**hours_ago** | Option<**String**> | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | Option<**f32**> | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | Option<**f32**> | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
6 changes: 5 additions & 1 deletion src/models/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct Filter {
/// If `field` is `tag`, this field is *required* to specify `key` inside the tags.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.
/// Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.
#[serde(rename = "value", skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.
Expand Down Expand Up @@ -73,6 +73,10 @@ pub enum RelationType {
TimeElapsedGt,
#[serde(rename = "time_elapsed_lt")]
TimeElapsedLt,
#[serde(rename = "in_array")]
InArray,
#[serde(rename = "not_in_array")]
NotInArray,
}

impl Default for RelationType {
Expand Down
6 changes: 5 additions & 1 deletion src/models/filter_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct FilterExpression {
/// If `field` is `tag`, this field is *required* to specify `key` inside the tags.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.
/// Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.
#[serde(rename = "value", skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
/// If `field` is session-related, this is *required* to specify the number of hours before or after the user's session.
Expand Down Expand Up @@ -77,6 +77,10 @@ pub enum RelationType {
TimeElapsedGt,
#[serde(rename = "time_elapsed_lt")]
TimeElapsedLt,
#[serde(rename = "in_array")]
InArray,
#[serde(rename = "not_in_array")]
NotInArray,
}

impl Default for RelationType {
Expand Down