syntax = "proto3";
// flynt-disable package-matches-structure

package com.wixpress.appservice.api.upstream.wix.segments.v2.common;
import "wix/api/annotations.proto";

// Namespace for Operator enum to prevent conflicts
message OperatorEnum {
    option (.wix.api.decomposite_of) = "wix.segments.v2.common.OperatorEnum";
  // Supported filter operators.
  // These are used by the API to define a filter and by the SPI to declare supported operations.
  // NOTICE: this list is not exhaustive and may change over time.
  enum Operator {
    UNKNOWN_OPERATOR = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];

    // [Comparison] Matches values that are equal to a specified value.
    EQ = 1;
    // [Comparison] Matches all values that are not equal to a specified value.
    NEQ = 2;
    // [Comparison] Matches values that are greater than a specified value.
    GT = 3;
    // [Comparison] Matches values that are greater than or equal to a specified value.
    GTE = 4;
    // [Comparison] Matches values that are less than a specified value.
    LT = 5;
    // [Comparison] Matches values that are less than or equal to a specified value.
    LTE = 6;
    // [Comparison] Matches values that fall within a specified range (inclusive).
    BETWEEN = 7;


    // [Comparison] Matches any of the values specified in an array.
    IN = 8;
    // [Comparison] Matches none of the values specified in an array.
    NIN = 9;

    // [Existence] Matches values that are empty (e.g., empty string, null).
    EMPTY = 10;
    // [Existence] Matches values that are not empty (e.g., non-empty string, not null).
    NOT_EMPTY = 11;
    // [String] Matches values that start with a specified prefix.
    STARTS_WITH = 12;


    // [Array] Matches values that contain all specified items in an array.
    HAS_ALL = 13;
    // [Array] Matches values that contain at least one of the specified items in an array.
    HAS_SOME = 14;

    // matches any value.
    // Example usage - "user bought ANY product"
    ANY = 15;
  }
}

// Namespace for TimeConstraintType enum to prevent conflicts
message TimeConstraintTypeEnum {
    option (.wix.api.decomposite_of) = "wix.segments.v2.common.TimeConstraintTypeEnum";
  // Supported time-window types for a capability.
  // These are used by the API to define a filter and by the SPI to declare supported time constraints.
  enum TimeConstraintType {
    UNKNOWN_TIME_CONSTRAINT_TYPE = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
    // e.g., "last 30 days"
    LAST_DAYS = 1;
    // e.g., "last 24 hours"
    LAST_HOURS = 2;
    // e.g., "next 7 days"
    NEXT_DAYS = 3;
    // e.g., "next 3 hours"
    NEXT_HOURS = 4;
    // e.g., "between two specific dates"
    BETWEEN = 5;
    // Today
    TODAY = 6;
    // This month
    THIS_MONTH = 7;
  }
}
