"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InTheLast1CompletedYearFilterSQL = exports.InTheLast1CompletedYearFilter = exports.TrinoInTheLast1YearFilterSQL = exports.InTheLast1YearFilterSQL = exports.InTheLast1YearFilter = exports.TrinoInTheLast1CompletedMonthFilterSQL = exports.InTheLast1CompletedMonthFilterSQL = exports.InTheLast1CompletedMonthFilter = exports.TrinoInTheLast1MonthFilterSQL = exports.InTheLast1MonthFilterSQL = exports.InTheLast1MonthFilter = exports.TrinoInTheLast1CompletedWeekFilterSQL = exports.InTheLast1CompletedWeekFilterSQL = exports.InTheLast1CompletedWeekFilter = exports.TrinoInTheLast1WeekFilterSQL = exports.InTheLast1WeekFilterSQL = exports.InTheLast1WeekFilter = exports.TrinoInTheLast1CompletedDayFilterSQL = exports.InTheLast1CompletedDayFilterSQL = exports.InTheLast1CompletedDayFilter = exports.TrinoInTheLast1DayFilterSQL = exports.InTheLast1DayFilterSQL = exports.InTheLast1DayFilter = exports.TrinoExpectedInTheNextCompleteWeekFilterSQLWithCustomStartOfWeek = exports.ExpectedInTheNextCompleteWeekFilterSQLWithCustomStartOfWeek = exports.TrinoExpectedInTheCurrentWeekFilterSQLWithCustomStartOfWeek = exports.ExpectedInTheCurrentWeekFilterSQLWithCustomStartOfWeek = exports.TrinoExpectedInThePastCompleteWeekFilterSQLWithCustomStartOfWeek = exports.ExpectedInThePastCompleteWeekFilterSQLWithCustomStartOfWeek = exports.InThePastFilterBase = exports.TrinoExpectedInTheNextCompleteFilterSQL = exports.ExpectedInTheNextCompleteFilterSQL = exports.TrinoExpectedInTheNextFilterSQL = exports.ExpectedInTheNextFilterSQL = exports.InTheNextFilterBase = exports.TrinoExpectedInTheCurrentFilterSQL = exports.ExpectedInTheCurrentFilterSQL = exports.InTheCurrentFilterBase = exports.WeekToDateFilterBase = exports.MonthToDateFilterBase = exports.QuarterToDateFilterBase = exports.YearToDateFilterBase = exports.ExpectedNumberFilterSQL = exports.NumberOperatorsWithMultipleValues = exports.NumberFilterBaseWithEmptyValues = exports.NumberFilterBaseWithMultiValues = exports.NumberFilterBase = exports.adapterType = exports.NumberDimensionMock = exports.DimensionSqlMock = void 0;
exports.filterPositiveOffsetEdgeCasePastCompletedDayMocks = exports.filterPositiveOffsetEdgeCaseCurrentDayMocks = exports.filterNegativeOffsetEdgeCasePastCompletedDayMocks = exports.filterNegativeOffsetEdgeCaseCurrentDayMocks = exports.filterInTheNextNonCompletedDayDateFormatterMocks = exports.filterInTheNextCompletedDayDateFormatterMocks = exports.filterInThePastNonCompletedDayDateFormatterMocks = exports.filterInTheCurrentDayDateFormatterMocks = exports.filterInThePastCompletedDayDateFormatterMocks = exports.filterInTheCurrentDayTimezoneMocks = exports.filterInTheNextNonCompletedDayDstMocks = exports.filterInThePastNonCompletedDayDstMocks = exports.filterInTheNextNonCompletedDayTimezoneMocks = exports.filterInThePastNonCompletedDayTimezoneMocks = exports.filterInTheNextCompletedDayDstMocks = exports.filterInThePastCompletedDayDstMocks = exports.filterInTheNextCompletedDayTimezoneMocks = exports.filterInThePastCompletedDayTimezoneMocks = exports.disabledFilterMock = exports.stringFilterRuleMocks = exports.stringFilterDimension = exports.TrinoInBetweenPastTwoYearsTimestampFilterSQL = exports.InBetweenPastTwoYearsTimestampFilterSQL = exports.TrinoInBetweenPastTwoYearsFilterSQL = exports.InBetweenPastTwoYearsFilterSQL = exports.InBetweenPastTwoYearsFilter = exports.TrinoInTheLast1CompletedMinuteFilterSQL = exports.InTheLast1CompletedMinuteFilterSQL = exports.InTheLast1CompletedMinuteFilter = exports.TrinoInTheLast1MinuteFilterSQL = exports.InTheLast1MinuteFilterSQL = exports.InTheLast1MinuteFilter = exports.TrinoInTheLast1CompletedHourFilterSQL = exports.InTheLast1CompletedHourFilterSQL = exports.InTheLast1CompletedHourFilter = exports.TrinoInTheLast1HourFilterSQL = exports.InTheLast1HourFilterSQL = exports.InTheLast1HourFilter = exports.TrinoInTheLast1CompletedYearFilterSQL = void 0;
const dbt_1 = require("../types/dbt");
const field_1 = require("../types/field");
const filter_1 = require("../types/filter");
const timeFrames_1 = require("../utils/timeFrames");
exports.DimensionSqlMock = 'customers.created';
exports.NumberDimensionMock = 'customers.age';
exports.adapterType = {
    default: dbt_1.SupportedDbtAdapter.POSTGRES,
    trino: dbt_1.SupportedDbtAdapter.TRINO,
};
exports.NumberFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.EQUALS,
    values: [1],
};
exports.NumberFilterBaseWithMultiValues = {
    ...exports.NumberFilterBase,
    values: [1, 2],
};
exports.NumberFilterBaseWithEmptyValues = {
    ...exports.NumberFilterBase,
    values: [],
};
exports.NumberOperatorsWithMultipleValues = [
    filter_1.FilterOperator.IN_BETWEEN,
    filter_1.FilterOperator.NOT_IN_BETWEEN,
];
exports.ExpectedNumberFilterSQL = {
    [filter_1.FilterOperator.NULL]: '(customers.age) IS NULL',
    [filter_1.FilterOperator.NOT_NULL]: '(customers.age) IS NOT NULL',
    [filter_1.FilterOperator.EQUALS]: '(customers.age) IN (1)',
    [filter_1.FilterOperator.NOT_EQUALS]: '((customers.age) NOT IN (1) OR (customers.age) IS NULL)',
    [filter_1.FilterOperator.STARTS_WITH]: null,
    [filter_1.FilterOperator.ENDS_WITH]: null,
    [filter_1.FilterOperator.INCLUDE]: null,
    [filter_1.FilterOperator.NOT_INCLUDE]: null,
    [filter_1.FilterOperator.LESS_THAN]: '(customers.age) < (1)',
    [filter_1.FilterOperator.LESS_THAN_OR_EQUAL]: '(customers.age) <= (1)',
    [filter_1.FilterOperator.GREATER_THAN]: '(customers.age) > (1)',
    [filter_1.FilterOperator.GREATER_THAN_OR_EQUAL]: '(customers.age) >= (1)',
    [filter_1.FilterOperator.IN_THE_PAST]: null,
    [filter_1.FilterOperator.NOT_IN_THE_PAST]: null,
    [filter_1.FilterOperator.IN_THE_CURRENT]: null,
    [filter_1.FilterOperator.NOT_IN_THE_CURRENT]: null,
    [filter_1.FilterOperator.IN_THE_NEXT]: null,
    [filter_1.FilterOperator.IN_BETWEEN]: '(customers.age) >= (1) AND (customers.age) <= (2)',
    [filter_1.FilterOperator.NOT_IN_BETWEEN]: '(customers.age) < (1) OR (customers.age) > (2)',
    [filter_1.FilterOperator.IN_PERIOD_TO_DATE]: null,
};
exports.YearToDateFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_PERIOD_TO_DATE,
    settings: { unitOfTime: filter_1.UnitOfTime.years },
};
exports.QuarterToDateFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_PERIOD_TO_DATE,
    settings: { unitOfTime: filter_1.UnitOfTime.quarters },
};
exports.MonthToDateFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_PERIOD_TO_DATE,
    settings: { unitOfTime: filter_1.UnitOfTime.months },
};
exports.WeekToDateFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_PERIOD_TO_DATE,
    settings: { unitOfTime: filter_1.UnitOfTime.weeks },
};
exports.InTheCurrentFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_THE_CURRENT,
    values: [1],
    settings: {
        unitOfTime: filter_1.UnitOfTime.days,
        completed: false,
    },
};
exports.ExpectedInTheCurrentFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= ('2020-04-04 06:12:00+00:00') AND (customers.created) <= ('2020-04-04 06:12:59+00:00'))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= ('2020-04-04 06:00:00+00:00') AND (customers.created) <= ('2020-04-04 06:59:59+00:00'))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= ('2020-04-04 00:00:00+00:00') AND (customers.created) <= ('2020-04-04 23:59:59+00:00'))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= ('2020-03-30 00:00:00+00:00') AND (customers.created) <= ('2020-04-05 23:59:59+00:00'))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= ('2020-04-01 00:00:00+00:00') AND (customers.created) <= ('2020-04-30 23:59:59+00:00'))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= ('2020-04-01 00:00:00+00:00') AND (customers.created) <= ('2020-06-30 23:59:59+00:00'))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= ('2020-01-01 00:00:00+00:00') AND (customers.created) <= ('2020-12-31 23:59:59+00:00'))`,
};
exports.TrinoExpectedInTheCurrentFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:30+00:00' AS timestamp))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= CAST('2020-04-04 06:12:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= CAST('2020-04-04 06:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:59:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= CAST('2020-04-04 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 23:59:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= CAST('2020-03-30 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-05 23:59:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= CAST('2020-04-01 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-30 23:59:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= CAST('2020-04-01 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-06-30 23:59:59+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= CAST('2020-01-01 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-12-31 23:59:59+00:00' AS timestamp))`,
};
exports.InTheNextFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_THE_NEXT,
    values: [1],
    settings: {
        unitOfTime: filter_1.UnitOfTime.days,
        completed: false,
    },
};
exports.ExpectedInTheNextFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:31+00:00'))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:13:30+00:00'))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 07:12:30+00:00'))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-05 06:12:30+00:00'))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-11 06:12:30+00:00'))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-05-04 06:12:30+00:00'))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-07-04 06:12:30+00:00'))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2021-04-04 06:12:30+00:00'))`,
};
exports.TrinoExpectedInTheNextFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:30+00:00' AS timestamp))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:31+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:13:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 07:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-05 06:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-11 06:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-05-04 06:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-07-04 06:12:30+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2021-04-04 06:12:30+00:00' AS timestamp))`,
};
exports.ExpectedInTheNextCompleteFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) < ('2020-04-04 06:12:30+00:00'))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= ('2020-04-04 06:12:31+00:00') AND (customers.created) < ('2020-04-04 06:12:32+00:00'))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= ('2020-04-04 06:13:00+00:00') AND (customers.created) < ('2020-04-04 06:14:00+00:00'))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= ('2020-04-04 07:00:00+00:00') AND (customers.created) < ('2020-04-04 08:00:00+00:00'))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= ('2020-04-05 00:00:00+00:00') AND (customers.created) < ('2020-04-06 00:00:00+00:00'))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= ('2020-04-06 00:00:00+00:00') AND (customers.created) < ('2020-04-13 00:00:00+00:00'))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= ('2020-05-01 00:00:00+00:00') AND (customers.created) < ('2020-06-01 00:00:00+00:00'))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= ('2020-07-01 00:00:00+00:00') AND (customers.created) < ('2020-10-01 00:00:00+00:00'))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= ('2021-01-01 00:00:00+00:00') AND (customers.created) < ('2022-01-01 00:00:00+00:00'))`,
};
exports.TrinoExpectedInTheNextCompleteFilterSQL = {
    [filter_1.UnitOfTime.milliseconds]: `((customers.created) >= CAST('2020-04-04 06:12:30+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 06:12:30+00:00' AS timestamp))`, // note that all milliseconds filters are working incorrectly #4074
    [filter_1.UnitOfTime.seconds]: `((customers.created) >= CAST('2020-04-04 06:12:31+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 06:12:32+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.minutes]: `((customers.created) >= CAST('2020-04-04 06:13:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 06:14:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.hours]: `((customers.created) >= CAST('2020-04-04 07:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 08:00:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.days]: `((customers.created) >= CAST('2020-04-05 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-06 00:00:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.weeks]: `((customers.created) >= CAST('2020-04-06 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-13 00:00:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.months]: `((customers.created) >= CAST('2020-05-01 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-06-01 00:00:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.quarters]: `((customers.created) >= CAST('2020-07-01 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-10-01 00:00:00+00:00' AS timestamp))`,
    [filter_1.UnitOfTime.years]: `((customers.created) >= CAST('2021-01-01 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2022-01-01 00:00:00+00:00' AS timestamp))`,
};
exports.InThePastFilterBase = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_THE_PAST,
    values: [1],
    settings: {
        unitOfTime: filter_1.UnitOfTime.days,
        completed: false,
    },
};
exports.ExpectedInThePastCompleteWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= ('2020-03-23 00:00:00+00:00') AND (customers.created) < ('2020-03-30 00:00:00+00:00'))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= ('2020-03-22 00:00:00+00:00') AND (customers.created) < ('2020-03-29 00:00:00+00:00'))`,
};
exports.TrinoExpectedInThePastCompleteWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= CAST('2020-03-23 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-03-30 00:00:00+00:00' AS timestamp))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= CAST('2020-03-22 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-03-29 00:00:00+00:00' AS timestamp))`,
};
exports.ExpectedInTheCurrentWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= ('2020-03-30 00:00:00+00:00') AND (customers.created) <= ('2020-04-05 23:59:59+00:00'))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= ('2020-03-29 00:00:00+00:00') AND (customers.created) <= ('2020-04-04 23:59:59+00:00'))`,
};
exports.TrinoExpectedInTheCurrentWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= CAST('2020-03-30 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-05 23:59:59+00:00' AS timestamp))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= CAST('2020-03-29 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 23:59:59+00:00' AS timestamp))`,
};
exports.ExpectedInTheNextCompleteWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= ('2020-04-06 00:00:00+00:00') AND (customers.created) < ('2020-04-13 00:00:00+00:00'))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= ('2020-04-05 00:00:00+00:00') AND (customers.created) < ('2020-04-12 00:00:00+00:00'))`,
};
exports.TrinoExpectedInTheNextCompleteWeekFilterSQLWithCustomStartOfWeek = {
    [timeFrames_1.WeekDay.MONDAY]: `((customers.created) >= CAST('2020-04-06 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-13 00:00:00+00:00' AS timestamp))`,
    [timeFrames_1.WeekDay.SUNDAY]: `((customers.created) >= CAST('2020-04-05 00:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-12 00:00:00+00:00' AS timestamp))`,
};
exports.InTheLast1DayFilter = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_THE_PAST,
    values: [1],
    settings: {
        unitOfTime: filter_1.UnitOfTime.days,
        completed: false,
    },
};
exports.InTheLast1DayFilterSQL = `((customers.created) >= ('2020-04-03') AND (customers.created) <= ('2020-04-04'))`;
exports.TrinoInTheLast1DayFilterSQL = `((customers.created) >= CAST('2020-04-03' AS timestamp) AND (customers.created) <= CAST('2020-04-04' AS timestamp))`;
exports.InTheLast1CompletedDayFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.days,
        completed: true,
    },
};
exports.InTheLast1CompletedDayFilterSQL = `((customers.created) >= ('2020-04-03') AND (customers.created) < ('2020-04-04'))`;
exports.TrinoInTheLast1CompletedDayFilterSQL = `((customers.created) >= CAST('2020-04-03' AS timestamp) AND (customers.created) < CAST('2020-04-04' AS timestamp))`;
exports.InTheLast1WeekFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.weeks,
        completed: false,
    },
};
exports.InTheLast1WeekFilterSQL = `((customers.created) >= ('2020-03-28') AND (customers.created) <= ('2020-04-04'))`;
exports.TrinoInTheLast1WeekFilterSQL = `((customers.created) >= CAST('2020-03-28' AS timestamp) AND (customers.created) <= CAST('2020-04-04' AS timestamp))`;
exports.InTheLast1CompletedWeekFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.weeks,
        completed: true,
    },
};
exports.InTheLast1CompletedWeekFilterSQL = `((customers.created) >= ('2020-03-23') AND (customers.created) < ('2020-03-30'))`;
exports.TrinoInTheLast1CompletedWeekFilterSQL = `((customers.created) >= CAST('2020-03-23' AS timestamp) AND (customers.created) < CAST('2020-03-30' AS timestamp))`;
exports.InTheLast1MonthFilter = {
    ...exports.InTheLast1WeekFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.months,
        completed: false,
    },
};
exports.InTheLast1MonthFilterSQL = `((customers.created) >= ('2020-03-04') AND (customers.created) <= ('2020-04-04'))`;
exports.TrinoInTheLast1MonthFilterSQL = `((customers.created) >= CAST('2020-03-04' AS timestamp) AND (customers.created) <= CAST('2020-04-04' AS timestamp))`;
exports.InTheLast1CompletedMonthFilter = {
    ...exports.InTheLast1WeekFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.months,
        completed: true,
    },
};
exports.InTheLast1CompletedMonthFilterSQL = `((customers.created) >= ('2020-03-01') AND (customers.created) < ('2020-04-01'))`;
exports.TrinoInTheLast1CompletedMonthFilterSQL = `((customers.created) >= CAST('2020-03-01' AS timestamp) AND (customers.created) < CAST('2020-04-01' AS timestamp))`;
exports.InTheLast1YearFilter = {
    ...exports.InTheLast1WeekFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.years,
        completed: false,
    },
};
exports.InTheLast1YearFilterSQL = `((customers.created) >= ('2019-04-04') AND (customers.created) <= ('2020-04-04'))`;
exports.TrinoInTheLast1YearFilterSQL = `((customers.created) >= CAST('2019-04-04' AS timestamp) AND (customers.created) <= CAST('2020-04-04' AS timestamp))`;
exports.InTheLast1CompletedYearFilter = {
    ...exports.InTheLast1WeekFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.years,
        completed: true,
    },
};
exports.InTheLast1CompletedYearFilterSQL = `((customers.created) >= ('2019-01-01') AND (customers.created) < ('2020-01-01'))`;
exports.TrinoInTheLast1CompletedYearFilterSQL = `((customers.created) >= CAST('2019-01-01' AS timestamp) AND (customers.created) < CAST('2020-01-01' AS timestamp))`;
exports.InTheLast1HourFilter = {
    ...exports.InTheLast1WeekFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.hours,
        completed: false,
    },
};
exports.InTheLast1HourFilterSQL = `((customers.created) >= ('2020-04-04 05:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))`;
exports.TrinoInTheLast1HourFilterSQL = `((customers.created) >= CAST('2020-04-04 05:12:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:30+00:00' AS timestamp))`;
exports.InTheLast1CompletedHourFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.hours,
        completed: true,
    },
};
exports.InTheLast1CompletedHourFilterSQL = `((customers.created) >= ('2020-04-04 05:00:00+00:00') AND (customers.created) < ('2020-04-04 06:00:00+00:00'))`;
exports.TrinoInTheLast1CompletedHourFilterSQL = `((customers.created) >= CAST('2020-04-04 05:00:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 06:00:00+00:00' AS timestamp))`;
exports.InTheLast1MinuteFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.minutes,
        completed: false,
    },
};
exports.InTheLast1MinuteFilterSQL = `((customers.created) >= ('2020-04-04 06:11:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))`;
exports.TrinoInTheLast1MinuteFilterSQL = `((customers.created) >= CAST('2020-04-04 06:11:30+00:00' AS timestamp) AND (customers.created) <= CAST('2020-04-04 06:12:30+00:00' AS timestamp))`;
exports.InTheLast1CompletedMinuteFilter = {
    ...exports.InTheLast1DayFilter,
    settings: {
        unitOfTime: filter_1.UnitOfTime.minutes,
        completed: true,
    },
};
exports.InTheLast1CompletedMinuteFilterSQL = `((customers.created) >= ('2020-04-04 06:11:00+00:00') AND (customers.created) < ('2020-04-04 06:12:00+00:00'))`;
exports.TrinoInTheLast1CompletedMinuteFilterSQL = `((customers.created) >= CAST('2020-04-04 06:11:00+00:00' AS timestamp) AND (customers.created) < CAST('2020-04-04 06:12:00+00:00' AS timestamp))`;
exports.InBetweenPastTwoYearsFilter = {
    id: 'id',
    target: {
        fieldId: 'fieldId',
    },
    operator: filter_1.FilterOperator.IN_BETWEEN,
    values: [
        new Date('04 Apr 2021 00:00:00 GMT'),
        new Date('04 Apr 2023 00:00:00 GMT'),
    ],
};
exports.InBetweenPastTwoYearsFilterSQL = `((customers.created) >= ('2021-04-04') AND (customers.created) <= ('2023-04-04'))`;
exports.TrinoInBetweenPastTwoYearsFilterSQL = `((customers.created) >= CAST('2021-04-04' AS timestamp) AND (customers.created) <= CAST('2023-04-04' AS timestamp))`;
exports.InBetweenPastTwoYearsTimestampFilterSQL = `((customers.created) >= ('2021-04-04 00:00:00+00:00') AND (customers.created) <= ('2023-04-04 00:00:00+00:00'))`;
exports.TrinoInBetweenPastTwoYearsTimestampFilterSQL = `((customers.created) >= CAST('2021-04-04 00:00:00+00:00' AS timestamp) AND (customers.created) <= CAST('2023-04-04 00:00:00+00:00' AS timestamp))`;
const stringSingleValueFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: ['Bob'],
};
const stringMultiValueFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: ['Tom', 'Jerry'],
};
const noValueFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: [],
};
const stringSingleUnescapedValueFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: ["Bob's"],
};
const stringMultiUnescapedValueFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: ["Bob's", "Tom's"],
};
const emptyStringFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: [''],
};
const mixedEmptyStringFilter = {
    id: '701b6520-1b19-4051-a553-7615aee0b03d',
    target: { fieldId: 'customers_first_name' },
    values: ['', "Bob's", '', "Tom's"],
};
exports.stringFilterDimension = '"customers".first_name';
exports.stringFilterRuleMocks = {
    includeFilterWithSingleVal: {
        ...stringSingleValueFilter,
        operator: filter_1.FilterOperator.INCLUDE,
    },
    includeFilterWithSingleValSQL: `(${exports.stringFilterDimension}) LIKE '%Bob%'`,
    includeFilterWithMultiVal: {
        ...stringMultiValueFilter,
        operator: filter_1.FilterOperator.INCLUDE,
    },
    includeFilterWithMultiValSQL: `((${exports.stringFilterDimension}) LIKE '%Tom%'\n  OR\n  (${exports.stringFilterDimension}) LIKE '%Jerry%')`,
    includeFilterWithNoVal: {
        ...noValueFilter,
        operator: filter_1.FilterOperator.INCLUDE,
    },
    includeFilterWithNoValSQL: 'true',
    notIncludeFilterWithSingleVal: {
        ...stringSingleValueFilter,
        operator: filter_1.FilterOperator.NOT_INCLUDE,
    },
    notIncludeFilterWithSingleValSQL: `((${exports.stringFilterDimension}) NOT LIKE '%Bob%' OR (${exports.stringFilterDimension}) IS NULL)`,
    notIncludeFilterWithMultiVal: {
        ...stringMultiValueFilter,
        operator: filter_1.FilterOperator.NOT_INCLUDE,
    },
    notIncludeFilterWithMultiValSQL: `((${exports.stringFilterDimension}) NOT LIKE '%Tom%'\n  AND\n  (${exports.stringFilterDimension}) NOT LIKE '%Jerry%' OR (${exports.stringFilterDimension}) IS NULL)`,
    notIncludeFilterWithNoVal: {
        ...noValueFilter,
        operator: filter_1.FilterOperator.NOT_INCLUDE,
    },
    notIncludeFilterWithNoValSQL: 'true',
    startsWithFilterWithSingleVal: {
        ...stringSingleValueFilter,
        operator: filter_1.FilterOperator.STARTS_WITH,
    },
    startsWithFilterWithSingleValSQL: `(${exports.stringFilterDimension}) LIKE 'Bob%'`,
    startsWithFilterWithMultiVal: {
        ...stringMultiValueFilter,
        operator: filter_1.FilterOperator.STARTS_WITH,
    },
    startsWithFilterWithMultiValSQL: `(${exports.stringFilterDimension}) LIKE 'Tom%'\n  OR\n  (${exports.stringFilterDimension}) LIKE 'Jerry%'`,
    startsWithFilterWithNoVal: {
        ...noValueFilter,
        operator: filter_1.FilterOperator.STARTS_WITH,
    },
    startsWithFilterWithNoValSQL: 'true',
    endsWithFilterWithSingleVal: {
        ...stringSingleValueFilter,
        operator: filter_1.FilterOperator.ENDS_WITH,
    },
    endsWithFilterWithSingleValSQL: `(${exports.stringFilterDimension}) LIKE '%Bob'`,
    endsWithFilterWithMultiVal: {
        ...stringMultiValueFilter,
        operator: filter_1.FilterOperator.ENDS_WITH,
    },
    endsWithFilterWithMultiValSQL: `(${exports.stringFilterDimension}) LIKE '%Tom'\n  OR\n  (${exports.stringFilterDimension}) LIKE '%Jerry'`,
    endsWithFilterWithNoVal: {
        ...noValueFilter,
        operator: filter_1.FilterOperator.ENDS_WITH,
    },
    endsWithFilterWithNoValSQL: 'true',
    equalsFilterWithSingleUnescapedValueSQL: `(${exports.stringFilterDimension}) IN ('Bob''s')`,
    equalsFilterWithSingleUnescapedValue: {
        ...stringSingleUnescapedValueFilter,
        operator: filter_1.FilterOperator.EQUALS,
    },
    equalsFilterWithMultiUnescapedValueSQL: `(${exports.stringFilterDimension}) IN ('Bob''s','Tom''s')`,
    equalsFilterWithMultiUnescapedValue: {
        ...stringMultiUnescapedValueFilter,
        operator: filter_1.FilterOperator.EQUALS,
    },
    includeFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.INCLUDE,
    },
    includeFilterWithEmptyStringSQL: 'true',
    includeFilterWithMixedEmptyStrings: {
        ...mixedEmptyStringFilter,
        operator: filter_1.FilterOperator.INCLUDE,
    },
    includeFilterWithMixedEmptyStringsSQL: `((${exports.stringFilterDimension}) LIKE '%Bob's%'\n  OR\n  (${exports.stringFilterDimension}) LIKE '%Tom's%')`,
    equalsFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.EQUALS,
    },
    equalsFilterWithEmptyStringSQL: `(${exports.stringFilterDimension}) IN ('')`,
    startsWithFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.STARTS_WITH,
    },
    startsWithFilterWithEmptyStringSQL: 'true',
    endsWithFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.ENDS_WITH,
    },
    endsWithFilterWithEmptyStringSQL: 'true',
    notEqualsFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.NOT_EQUALS,
    },
    notEqualsFilterWithEmptyStringSQL: `((${exports.stringFilterDimension}) NOT IN ('') OR ("customers".first_name) IS NULL)`,
    notIncludeFilterWithEmptyString: {
        ...emptyStringFilter,
        operator: filter_1.FilterOperator.NOT_INCLUDE,
    },
    notIncludeFilterWithEmptyStringSQL: 'true',
};
exports.disabledFilterMock = {
    filterRule: {
        id: '3cf51ddc-fa2b-4442-afaa-9eee4f348d7a',
        target: { fieldId: 'payments_payment_method' },
        values: [],
        operator: filter_1.FilterOperator.NOT_EQUALS,
        disabled: true,
    },
    field: {
        sql: '${TABLE}.payment_method',
        name: 'payment_method',
        type: field_1.DimensionType.STRING,
        index: 2,
        label: 'Payment method',
        table: 'payments',
        hidden: false,
        fieldType: field_1.FieldType.DIMENSION,
        tableLabel: 'Payments',
        compiledSql: '"payments".payment_method',
        description: 'Method of payment used, for example credit card',
        tablesReferences: ['payments'],
    },
    fieldQuoteChar: '"',
    stringQuoteChar: "'",
    escapeString: (string) => string.replaceAll("'", "''"),
    startOfWeek: null,
    adapterType: dbt_1.SupportedDbtAdapter.POSTGRES,
    timezone: 'UTC',
};
// System time: 04 Apr 2020 06:12:30 GMT
// IN_THE_PAST 1 completed day: .tz(tz).startOf('day') → subtract 1 day
// UTC:            start of day = 2020-04-04 00:00 UTC → from 2020-04-03 00:00, until 2020-04-04 00:00
// America/New_York (EDT, UTC-4): start of day = 2020-04-04 04:00 UTC → from 2020-04-03 04:00, until 2020-04-04 04:00
exports.filterInThePastCompletedDayTimezoneMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-03 00:00:00+00:00') AND (customers.created) < ('2020-04-04 00:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-03 04:00:00+00:00') AND (customers.created) < ('2020-04-04 04:00:00+00:00'))",
    ],
];
// IN_THE_NEXT 1 completed day: .tz(tz).add(1, 'day').startOf('day') → add 1 day
// UTC:            next day start = 2020-04-05 00:00 UTC → from 2020-04-05 00:00, until 2020-04-06 00:00
// America/New_York (EDT, UTC-4): next day start = 2020-04-05 04:00 UTC → from 2020-04-05 04:00, until 2020-04-06 04:00
exports.filterInTheNextCompletedDayTimezoneMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-05 00:00:00+00:00') AND (customers.created) < ('2020-04-06 00:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-05 04:00:00+00:00') AND (customers.created) < ('2020-04-06 04:00:00+00:00'))",
    ],
];
// DST spring forward: March 8, 2020 at 2:00 AM EST → 3:00 AM EDT (America/New_York)
// System time: 09 Mar 2020 05:00:00 GMT (= 01:00 EDT, post-DST)
// IN_THE_PAST 1 completed day crossing DST:
// UTC:            start of day = 2020-03-09 00:00 UTC → from 2020-03-08 00:00, until 2020-03-09 00:00 (24h)
// America/New_York: start of day = 2020-03-09 00:00 EDT = 04:00 UTC → from 2020-03-08 00:00 EST = 05:00 UTC, until 04:00 UTC (23h — DST spring forward)
exports.filterInThePastCompletedDayDstMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-03-08 00:00:00+00:00') AND (customers.created) < ('2020-03-09 00:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-03-08 05:00:00+00:00') AND (customers.created) < ('2020-03-09 04:00:00+00:00'))",
    ],
];
// System time: 07 Mar 2020 05:00:00 GMT (= 00:00 EST, pre-DST)
// IN_THE_NEXT 1 completed day crossing DST:
// UTC:            next day start = 2020-03-08 00:00 UTC → from 2020-03-08 00:00, until 2020-03-09 00:00 (24h)
// America/New_York: next day start = 2020-03-08 00:00 EST = 05:00 UTC → from 05:00 UTC, until 2020-03-09 00:00 EDT = 04:00 UTC (23h — DST spring forward)
exports.filterInTheNextCompletedDayDstMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-03-08 00:00:00+00:00') AND (customers.created) < ('2020-03-09 00:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-03-08 05:00:00+00:00') AND (customers.created) < ('2020-03-09 04:00:00+00:00'))",
    ],
];
// System time: 04 Apr 2020 06:12:30 GMT
// IN_THE_PAST 1 day (non-completed): from = .tz(tz).subtract(1, 'day'), until = .tz(tz) (now)
// Both timezones produce the same result here because no DST transition occurs in this range
exports.filterInThePastNonCompletedDayTimezoneMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-03 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-03 06:12:30+00:00') AND (customers.created) <= ('2020-04-04 06:12:30+00:00'))",
    ],
];
// IN_THE_NEXT 1 day (non-completed): from = .tz(tz) (now), until = .tz(tz).add(1, 'day')
// Both timezones produce the same result here because no DST transition occurs in this range
exports.filterInTheNextNonCompletedDayTimezoneMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-05 06:12:30+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-04 06:12:30+00:00') AND (customers.created) <= ('2020-04-05 06:12:30+00:00'))",
    ],
];
// DST spring forward: March 8, 2020 at 2:00 AM EST → 3:00 AM EDT (America/New_York)
// System time: 09 Mar 2020 05:00:00 GMT (= 01:00 EDT, post-DST)
// IN_THE_PAST 1 day (non-completed) crossing DST:
// UTC:            from = subtract 1 day = 2020-03-08 05:00:00, until = 2020-03-09 05:00:00 (24h)
// America/New_York: now = 01:00 EDT (UTC-4); subtract 1 day = 08 Mar 01:00 EST (UTC-5) = 06:00 UTC
//   from = 2020-03-08 06:00:00, until = 2020-03-09 05:00:00 (23h — DST spring forward)
exports.filterInThePastNonCompletedDayDstMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-03-08 05:00:00+00:00') AND (customers.created) <= ('2020-03-09 05:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-03-08 06:00:00+00:00') AND (customers.created) <= ('2020-03-09 05:00:00+00:00'))",
    ],
];
// System time: 08 Mar 2020 06:00:00 GMT (= 01:00 EST, pre-DST)
// IN_THE_NEXT 1 day (non-completed) crossing DST:
// UTC:            from = 2020-03-08 06:00:00, until = add 1 day = 2020-03-09 06:00:00 (24h)
// America/New_York: now = 01:00 EST (UTC-5); add 1 day = 09 Mar 01:00 EDT (UTC-4) = 05:00 UTC
//   from = 2020-03-08 06:00:00, until = 2020-03-09 05:00:00 (23h — DST spring forward)
exports.filterInTheNextNonCompletedDayDstMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-03-08 06:00:00+00:00') AND (customers.created) <= ('2020-03-09 06:00:00+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-03-08 06:00:00+00:00') AND (customers.created) <= ('2020-03-09 05:00:00+00:00'))",
    ],
];
exports.filterInTheCurrentDayTimezoneMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-04 00:00:00+00:00') AND (customers.created) <= ('2020-04-04 23:59:59+00:00'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-04 04:00:00+00:00') AND (customers.created) <= ('2020-04-05 03:59:59+00:00'))",
    ],
    [
        'Asia/Bangkok',
        "((customers.created) >= ('2020-04-03 17:00:00+00:00') AND (customers.created) <= ('2020-04-04 16:59:59+00:00'))",
    ],
    [
        'Pacific/Fiji',
        "((customers.created) >= ('2020-04-03 12:00:00+00:00') AND (customers.created) <= ('2020-04-04 11:59:59+00:00'))",
    ],
];
// ── Boundary formatter tests (YYYY-MM-DD) ────────────────────────────
// createBoundaryDateFormatter converts UTC dates back to project TZ
// before formatting, fixing the positive-offset date shift bug.
// System time: 04 Apr 2020 06:12:30 GMT
exports.filterInThePastCompletedDayDateFormatterMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-03') AND (customers.created) < ('2020-04-04'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-03') AND (customers.created) < ('2020-04-04'))",
    ],
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-03') AND (customers.created) < ('2020-04-04'))",
    ],
];
// IN_THE_CURRENT day: all TZs resolve to 2020-04-04
exports.filterInTheCurrentDayDateFormatterMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-04'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-04'))",
    ],
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-04'))",
    ],
];
// IN_THE_PAST 1 day non-completed: (now-1d) to now, formatted as dates
exports.filterInThePastNonCompletedDayDateFormatterMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-03') AND (customers.created) <= ('2020-04-04'))",
    ],
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-03') AND (customers.created) <= ('2020-04-04'))",
    ],
];
// IN_THE_NEXT 1 completed day: tomorrow's start-of-day per TZ
// Asia/Tokyo: without fix, Apr5 JST = Apr4 UTC → wrong date
exports.filterInTheNextCompletedDayDateFormatterMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-05') AND (customers.created) < ('2020-04-06'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-05') AND (customers.created) < ('2020-04-06'))",
    ],
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-05') AND (customers.created) < ('2020-04-06'))",
    ],
];
// IN_THE_NEXT 1 day non-completed: now to now+1d, formatted as dates
exports.filterInTheNextNonCompletedDayDateFormatterMocks = [
    [
        'UTC',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-05'))",
    ],
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-05'))",
    ],
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-04') AND (customers.created) <= ('2020-04-05'))",
    ],
];
// ── Negative-offset edge case: 02:00 UTC = Apr 3 22:00 EDT ──────────
// System time: 04 Apr 2020 02:00:00 GMT
// Without fix: endOf(day) crosses midnight UTC → wrong date (Apr 4)
// With fix: boundaryFormatter converts to EDT → correct date (Apr 3)
exports.filterNegativeOffsetEdgeCaseCurrentDayMocks = [
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-03') AND (customers.created) <= ('2020-04-03'))",
    ],
];
exports.filterNegativeOffsetEdgeCasePastCompletedDayMocks = [
    [
        'America/New_York',
        "((customers.created) >= ('2020-04-02') AND (customers.created) < ('2020-04-03'))",
    ],
];
// ── Positive-offset edge case: 22:00 UTC Apr 4 = Apr 5 07:00 JST ────
// System time: 04 Apr 2020 22:00:00 GMT
// Tokyo is already on Apr 5 while UTC is still Apr 4.
// Without fix: boundaries formatted from UTC dates yield Apr 3/Apr 4
// With fix: boundaryFormatter converts to JST → correct Apr 4/Apr 5
exports.filterPositiveOffsetEdgeCaseCurrentDayMocks = [
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-05') AND (customers.created) <= ('2020-04-05'))",
    ],
];
exports.filterPositiveOffsetEdgeCasePastCompletedDayMocks = [
    [
        'Asia/Tokyo',
        "((customers.created) >= ('2020-04-04') AND (customers.created) < ('2020-04-05'))",
    ],
];
//# sourceMappingURL=filtersCompiler.mock.js.map