@baselime/cdk
Version:
Define your observability as code using the AWS CDK
151 lines (150 loc) • 6.94 kB
TypeScript
/**
* Creates a filter operation object that narrows down the results where the key equals the value.
* @param {string} key The field in the data used for filtering.
* @param {string | number | boolean} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function eq(key: string, value: string | number | boolean): {
readonly key: string;
readonly value: string | number | boolean;
readonly operation: "=";
};
/**
* Creates a filter operation object that narrows down the results where the key does not equal the value.
* @param {string} key The field in the data used for filtering.
* @param {string | number | boolean} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function neq(key: string, value: string | number | boolean): {
readonly key: string;
readonly value: string | number | boolean;
readonly operation: "!=";
};
/**
* Creates a filter operation object that narrows down the results where the key is greater than the value.
* @param {string} key The field in the data used for filtering.
* @param {number} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function gt(key: string, value: number): {
readonly key: string;
readonly value: number;
readonly operation: ">";
};
/**
* Creates a filter operation object that narrows down the results where the key is greater than or equal to the value.
* @param {string} key The field in the data used for filtering.
* @param {number} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function gte(key: string, value: number): {
readonly key: string;
readonly value: number;
readonly operation: ">=";
};
/**
* Creates a filter operation object that narrows down the results where the key is less than the value.
* @param {string} key The field in the data used for filtering.
* @param {number} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function lt(key: string, value: number): {
readonly key: string;
readonly value: number;
readonly operation: "<";
};
/**
* Creates a filter operation object that narrows down the results where the key is less than or equal the value.
* @param {string} key The field in the data used for filtering.
* @param {number} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function lte(key: string, value: number): {
readonly key: string;
readonly value: number;
readonly operation: "<=";
};
/**
* Creates a filter operation object that narrows down the results where the key includes the value.
* @param {string} key The field in the data used for filtering.
* @param {string} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function includes(key: string, value: string): {
readonly key: string;
readonly value: string;
readonly operation: "INCLUDES";
};
/**
* Creates a filter operation object that narrows down the results where the key does not include the value.
* @param {string} key The field in the data used for filtering.
* @param {string} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function notIncludes(key: string, value: string): {
readonly key: string;
readonly value: string;
readonly operation: "DOES_NOT_INCLUDE";
};
/**
* Creates a filter operation object that narrows down the results where the key matches the regex.
* @param {string} key The field in the data used for filtering.
* @param {RegExp} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function regex(key: string, value: RegExp): {
readonly key: string;
readonly value: string;
readonly operation: "MATCH_REGEX";
};
/**
* Creates a filter operation object that narrows down the results where the key starts with the value.
* @param {string} key The field in the data used for filtering.
* @param {string} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function startsWith(key: string, value: string): {
readonly key: string;
readonly value: string;
readonly operation: "STARTS_WITH";
};
/**
* Creates a filter operation object that narrows down the results where the key is one of the values
* @param {string} key The field in the data used for filtering.
* @param {string[]} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function inArray(key: string, value: string[]): {
readonly key: string;
readonly value: string[];
readonly operation: "IN";
};
/**
* Creates a filter operation object that narrows down the results where the key is not one of the values
* @param {string} key The field in the data used for filtering.
* @param {string[]} value The value for the specified key used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function notInArray(key: string, value: string[]): {
readonly key: string;
readonly value: string[];
readonly operation: "NOT_IN";
};
/**
* Creates a filter operation object that narrows down the results where the key exists
* @param {string} key The field in the data used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function exists(key: string): {
readonly key: string;
readonly operation: "EXISTS";
};
/**
* Creates a filter operation object that narrows down the results where the key does not exist
* @param {string} key The field in the data used for filtering.
* @returns {Object} A filter operation object with the key, value, and operation properties.
*/
export declare function notExists(key: string): {
readonly key: string;
readonly operation: "DOES_NOT_EXIST";
};