@epilot/validation-rules-client
Advanced tools
+303
-88
@@ -26,6 +26,3 @@ /* eslint-disable */ | ||
| used_by?: /* Describes where and how a validation rule is applied. */ UsedBy[]; | ||
| /** | ||
| * Matrix of validation rules that must be validated together. | ||
| */ | ||
| rules: (/* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType)[][]; | ||
| rule: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType; | ||
| } | ||
@@ -36,35 +33,170 @@ export interface GetValidationRulesResponse { | ||
| /** | ||
| * Specific pattern for numeric based validation rules, supporting range and digit count constraints. | ||
| * Condition definition for json-rules-engine (TopLevelCondition type) | ||
| */ | ||
| export interface NumericPattern { | ||
| export type JsonRulesEngineCondition = /* Condition definition for json-rules-engine (TopLevelCondition type) */ { | ||
| all: /* Condition definition for json-rules-engine (TopLevelCondition type) */ JsonRulesEngineCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| any: /* Condition definition for json-rules-engine (TopLevelCondition type) */ JsonRulesEngineCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| not: /* Condition definition for json-rules-engine (TopLevelCondition type) */ JsonRulesEngineCondition; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| condition: string; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| /** | ||
| * Minimum allowed value. | ||
| * The fact to evaluate | ||
| */ | ||
| min_value?: number; | ||
| fact: string; | ||
| /** | ||
| * Maximum allowed value. | ||
| * The operator to use for comparison | ||
| */ | ||
| max_value?: number; | ||
| operator: string; | ||
| /** | ||
| * Minimum number of integer digits. | ||
| * The value to compare against (can be any type or a fact reference) | ||
| */ | ||
| min_integer_count?: number; | ||
| value: any; | ||
| /** | ||
| * Maximum number of integer digits. | ||
| * JSON path to extract value from fact | ||
| */ | ||
| max_integer_count?: number; | ||
| path?: string; | ||
| /** | ||
| * Minimum number of decimal digits. | ||
| * Condition priority | ||
| */ | ||
| min_decimal_count?: number; | ||
| priority?: number; | ||
| /** | ||
| * Maximum number of decimal digits. | ||
| * Additional parameters for the condition | ||
| */ | ||
| max_decimal_count?: number; | ||
| params?: { | ||
| [key: string]: any; | ||
| }; | ||
| /** | ||
| * Whether leading zeroes are allowed. | ||
| * Optional condition name | ||
| */ | ||
| leading_zeroes?: boolean; | ||
| name?: string; | ||
| }; | ||
| /** | ||
| * Rule definition for json-rules-engine (RuleProperties interface) | ||
| */ | ||
| export interface JsonRulesEngineRule { | ||
| /** | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| conditions: /* Condition definition for json-rules-engine (TopLevelCondition type) */ JsonRulesEngineCondition; | ||
| } | ||
| /** | ||
| * Condition definition for a numeric validation rule | ||
| */ | ||
| export type NumericCondition = /* Condition definition for a numeric validation rule */ { | ||
| all: /* Condition definition for a numeric validation rule */ NumericCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| any: /* Condition definition for a numeric validation rule */ NumericCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| not: /* Condition definition for a numeric validation rule */ NumericCondition; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| /** | ||
| * The numeric value extracted from input | ||
| */ | ||
| fact: "numericValue"; | ||
| /** | ||
| * Numeric comparison operator | ||
| */ | ||
| operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"; | ||
| /** | ||
| * Numeric value to compare against | ||
| */ | ||
| value: number; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| }; | ||
| } | { | ||
| /** | ||
| * Count of integer digits (excludes leading zeros unless allowed) | ||
| */ | ||
| fact: "integerDigitsCount"; | ||
| /** | ||
| * Digit count comparison operator | ||
| */ | ||
| operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"; | ||
| /** | ||
| * Expected number of integer digits | ||
| */ | ||
| value: number; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| /** | ||
| * Whether to count leading zeroes in digit count | ||
| */ | ||
| allowLeadingZeroes?: boolean; | ||
| }; | ||
| } | { | ||
| /** | ||
| * Count of decimal digits | ||
| */ | ||
| fact: "decimalDigitsCount"; | ||
| /** | ||
| * Decimal digit count comparison operator | ||
| */ | ||
| operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"; | ||
| /** | ||
| * Expected number of decimal digits | ||
| */ | ||
| value: number; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| }; | ||
| } | { | ||
| /** | ||
| * Whether the input has leading zeros | ||
| */ | ||
| fact: "hasLeadingZeroes"; | ||
| /** | ||
| * Leading zeros check operator | ||
| */ | ||
| operator: "equal" | "notAllowed"; | ||
| /** | ||
| * Whether leading zeros should be present or not | ||
| */ | ||
| value: boolean; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| }; | ||
| }; | ||
| /** | ||
| * Validation rule for numeric values, supporting range and digit count constraints. | ||
@@ -78,65 +210,142 @@ */ | ||
| /** | ||
| * Specific pattern for numeric based validation rules, supporting range and digit count constraints. | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| numeric_pattern?: /* Specific pattern for numeric based validation rules, supporting range and digit count constraints. */ NumericPattern; | ||
| conditions: /* Condition definition for a numeric validation rule */ NumericCondition; | ||
| } | ||
| /** | ||
| * A pattern element used in pattern-based validation rules evaluated in a sequence. | ||
| * Condition definition for a pattern-based validation rule | ||
| */ | ||
| export type Pattern = { | ||
| export type PatternCondition = /* Condition definition for a pattern-based validation rule */ { | ||
| all: /* Condition definition for a pattern-based validation rule */ PatternCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| any: /* Condition definition for a pattern-based validation rule */ PatternCondition[]; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| not: /* Condition definition for a pattern-based validation rule */ PatternCondition; | ||
| name?: string; | ||
| priority?: number; | ||
| } | { | ||
| /** | ||
| * Whether this pattern is optional in the sequence. | ||
| * The name of the value to validate. | ||
| */ | ||
| optional?: boolean; | ||
| fact: "totalLength"; | ||
| /** | ||
| * Whether this pattern depends on the previous pattern. | ||
| * Numeric comparison operator | ||
| */ | ||
| is_dependent?: boolean; | ||
| } & (/* A pattern element used in pattern-based validation rules evaluated in a sequence. */ /* A static pattern that matches a fixed value. */ PatternStatic | /* A pattern that matches alphanumeric values with optional constraints. */ PatternAlphanumeric | /* A pattern that matches digit sequences with optional constraints. */ PatternDigits); | ||
| /** | ||
| * A pattern that matches alphanumeric values with optional constraints. | ||
| */ | ||
| export interface PatternAlphanumeric { | ||
| operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"; | ||
| /** | ||
| * Indicates an alphanumeric pattern type. | ||
| * Numeric value to compare against | ||
| */ | ||
| type: "alphanumeric"; | ||
| value: number; | ||
| /** | ||
| * List of allowed alphanumeric options. | ||
| * Additional parameters for the condition | ||
| */ | ||
| options?: string[]; | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| /** | ||
| * From where to check | ||
| */ | ||
| start?: number; | ||
| /** | ||
| * To where to check | ||
| */ | ||
| end?: number; | ||
| }; | ||
| } | { | ||
| /** | ||
| * Minimum number of alphanumeric characters. | ||
| * The name of the value to validate. | ||
| */ | ||
| min_count?: number; | ||
| fact: "staticCheck" | "totalLength"; | ||
| /** | ||
| * Exact number of alphanumeric characters. | ||
| * Exact digit count operator | ||
| */ | ||
| count?: number; | ||
| operator: "exactlyNDigits"; | ||
| /** | ||
| * Maximum number of alphanumeric characters. | ||
| * Number of digits required | ||
| */ | ||
| max_count?: number; | ||
| } | ||
| /** | ||
| * A pattern that matches digit sequences with optional constraints. | ||
| */ | ||
| export interface PatternDigits { | ||
| value: number; | ||
| /** | ||
| * Indicates a digits pattern type. | ||
| * Additional parameters for the condition | ||
| */ | ||
| type: "digits"; | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| /** | ||
| * From where to check | ||
| */ | ||
| start?: number; | ||
| /** | ||
| * To where to check | ||
| */ | ||
| end?: number; | ||
| }; | ||
| } | { | ||
| /** | ||
| * Minimum number of digits. | ||
| * The name of the value to validate. | ||
| */ | ||
| min_count?: number; | ||
| fact: "staticCheck"; | ||
| /** | ||
| * Exact number of digits. | ||
| * Array-based comparison operator | ||
| */ | ||
| count?: number; | ||
| operator: "in" | "notIn" | "contains" | "doesNotContain"; | ||
| /** | ||
| * Maximum number of digits. | ||
| * Array of string values for array-based operators | ||
| */ | ||
| max_count?: number; | ||
| } | ||
| value: string[]; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| /** | ||
| * From where to check | ||
| */ | ||
| start?: number; | ||
| /** | ||
| * To where to check | ||
| */ | ||
| end?: number; | ||
| }; | ||
| } | { | ||
| /** | ||
| * The name of the value to validate. | ||
| */ | ||
| fact: "staticCheck"; | ||
| /** | ||
| * String comparison operator | ||
| */ | ||
| operator: "equal" | "notEqual"; | ||
| /** | ||
| * String value to compare against | ||
| */ | ||
| value: string; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| /** | ||
| * From where to check | ||
| */ | ||
| start?: number; | ||
| /** | ||
| * To where to check | ||
| */ | ||
| end?: number; | ||
| }; | ||
| }; | ||
| /** | ||
@@ -151,19 +360,38 @@ * Validation rule that uses a sequence of patterns to validate input. | ||
| /** | ||
| * List of patterns that define the validation logic. | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| patterns: /* A pattern element used in pattern-based validation rules evaluated in a sequence. */ Pattern[]; | ||
| conditions: /* Condition definition for a pattern-based validation rule */ PatternCondition; | ||
| } | ||
| /** | ||
| * A static pattern that matches a fixed value. | ||
| * Condition definition for a regex-based validation rule | ||
| */ | ||
| export interface PatternStatic { | ||
| export type RegexCondition = /* Condition definition for a regex-based validation rule */ { | ||
| all: /* Condition definition for a regex-based validation rule */ RegexCondition[]; | ||
| } | { | ||
| any: /* Condition definition for a regex-based validation rule */ RegexCondition[]; | ||
| } | { | ||
| not: /* Condition definition for a regex-based validation rule */ RegexCondition; | ||
| } | { | ||
| /** | ||
| * Indicates a static pattern type. | ||
| * The name of the value to validate. Should always be 'inputValue' because this property name is passed to the engine | ||
| */ | ||
| type: "static"; | ||
| fact: "inputValue"; | ||
| /** | ||
| * The static value to match. | ||
| * The operator to use for comparison | ||
| */ | ||
| operator: "regexMatch"; | ||
| /** | ||
| * The actual regex | ||
| */ | ||
| value: string; | ||
| } | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| }; | ||
| }; | ||
| /** | ||
@@ -178,9 +406,5 @@ * Validation rule that uses a regular expression to validate input. | ||
| /** | ||
| * The regular expression pattern to validate against. | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| regex: string; | ||
| /** | ||
| * The error message to display when the regex validation fails. | ||
| */ | ||
| error_message?: string; | ||
| conditions: /* Condition definition for a regex-based validation rule */ RegexCondition; | ||
| } | ||
@@ -200,6 +424,3 @@ export interface UpdateValidationRuleRequest { | ||
| used_by?: /* Describes where and how a validation rule is applied. */ UsedBy[]; | ||
| /** | ||
| * Matrix of validation rules that must be validated together. | ||
| */ | ||
| rules?: (/* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType)[][]; | ||
| rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType; | ||
| } | ||
@@ -239,7 +460,4 @@ /** | ||
| used_by?: /* Describes where and how a validation rule is applied. */ UsedBy[]; | ||
| rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType; | ||
| /** | ||
| * Matrix of validation rules that must be validated together. | ||
| */ | ||
| rules?: (/* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType)[][]; | ||
| /** | ||
| * Schema version of the validation rule. | ||
@@ -286,6 +504,3 @@ */ | ||
| used_by?: /* Describes where and how a validation rule is applied. */ UsedBy[]; | ||
| /** | ||
| * Matrix of validation rules that must be validated together. | ||
| */ | ||
| rules?: (/* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType)[][]; | ||
| rule?: /* Validation rule that uses a regular expression to validate input. */ RegexRuleType | /* Validation rule that uses a sequence of patterns to validate input. */ PatternRuleType | /* Validation rule for numeric values, supporting range and digit count constraints. */ NumericRuleType; | ||
| } | ||
@@ -508,9 +723,9 @@ } | ||
| export type GetValidationRulesResponse = Components.Schemas.GetValidationRulesResponse; | ||
| export type NumericPattern = Components.Schemas.NumericPattern; | ||
| export type JsonRulesEngineCondition = Components.Schemas.JsonRulesEngineCondition; | ||
| export type JsonRulesEngineRule = Components.Schemas.JsonRulesEngineRule; | ||
| export type NumericCondition = Components.Schemas.NumericCondition; | ||
| export type NumericRuleType = Components.Schemas.NumericRuleType; | ||
| export type Pattern = Components.Schemas.Pattern; | ||
| export type PatternAlphanumeric = Components.Schemas.PatternAlphanumeric; | ||
| export type PatternDigits = Components.Schemas.PatternDigits; | ||
| export type PatternCondition = Components.Schemas.PatternCondition; | ||
| export type PatternRuleType = Components.Schemas.PatternRuleType; | ||
| export type PatternStatic = Components.Schemas.PatternStatic; | ||
| export type RegexCondition = Components.Schemas.RegexCondition; | ||
| export type RegexRuleType = Components.Schemas.RegexRuleType; | ||
@@ -517,0 +732,0 @@ export type UpdateValidationRuleRequest = Components.Schemas.UpdateValidationRuleRequest; |
+2
-1
| { | ||
| "name": "@epilot/validation-rules-client", | ||
| "version": "1.1.1", | ||
| "version": "1.1.2", | ||
| "description": "API Client for epilot Validation Rules API", | ||
@@ -16,2 +16,3 @@ "main": "dist/index.js", | ||
| "build:watch": "npm run build && tsc -w", | ||
| "prepublishOnly": "npm run typegen && npm run build", | ||
| "lint": "pnpm exec eslint src" | ||
@@ -18,0 +19,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31421
28.05%772
38.35%0
-100%