@epilot/validation-rules-client
Advanced tools
+21
| The MIT License (MIT) | ||
| Copyright (c) 2025 epilot GmbH | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in | ||
| all copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| THE SOFTWARE. |
+808
| /* eslint-disable */ | ||
| import type { | ||
| OpenAPIClient, | ||
| Parameters, | ||
| UnknownParamsObject, | ||
| OperationResponse, | ||
| AxiosRequestConfig, | ||
| } from 'openapi-client-axios'; | ||
| declare namespace Components { | ||
| namespace Schemas { | ||
| export interface CreateValidationRuleRequest { | ||
| /** | ||
| * Title of the validation rule. | ||
| */ | ||
| title: string; | ||
| /** | ||
| * Placeholder for the validation rule. | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * Describes where and how a validation rule is applied. | ||
| */ | ||
| 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; | ||
| } | ||
| export interface GetValidationRulesResponse { | ||
| results?: /* The Validation rule definition. */ ValidationRule[]; | ||
| } | ||
| /** | ||
| * Condition definition for a numeric-based validation rule (2 levels deep) | ||
| */ | ||
| export type NumericCondition = /* Condition definition for a numeric-based validation rule (2 levels deep) */ { | ||
| all: (/* Fact-based condition for numeric validation */ NumericFactCondition | /* Nested condition with logical operators (level 2 only) */ NumericNestedCondition)[]; | ||
| } | { | ||
| any: (/* Fact-based condition for numeric validation */ NumericFactCondition | /* Nested condition with logical operators (level 2 only) */ NumericNestedCondition)[]; | ||
| } | { | ||
| not: /* Fact-based condition for numeric validation */ NumericFactCondition | /* Nested condition with logical operators (level 2 only) */ NumericNestedCondition; | ||
| }; | ||
| /** | ||
| * Fact-based condition for numeric validation | ||
| */ | ||
| export type NumericFactCondition = /* Fact-based condition for numeric validation */ { | ||
| /** | ||
| * The numeric value extracted from input; The amount of digits | ||
| */ | ||
| fact: "numeric-value" | "total-length"; | ||
| /** | ||
| * 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: "integer-digits-count"; | ||
| /** | ||
| * 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: "decimal-digits-count"; | ||
| /** | ||
| * 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: "has-leading-zeroes"; | ||
| /** | ||
| * 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; | ||
| }; | ||
| }; | ||
| /** | ||
| * Nested condition with logical operators (level 2 only) | ||
| */ | ||
| export type NumericNestedCondition = /* Nested condition with logical operators (level 2 only) */ { | ||
| all: /* Fact-based condition for numeric validation */ NumericFactCondition[]; | ||
| } | { | ||
| any: /* Fact-based condition for numeric validation */ NumericFactCondition[]; | ||
| } | { | ||
| not: /* Fact-based condition for numeric validation */ NumericFactCondition; | ||
| }; | ||
| /** | ||
| * Validation rule for numeric values, supporting range and digit count constraints. | ||
| */ | ||
| export interface NumericRuleType { | ||
| /** | ||
| * Indicates this is a numeric-based validation rule. | ||
| */ | ||
| type: "numeric"; | ||
| /** | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| conditions: /* Condition definition for a numeric-based validation rule (2 levels deep) */ NumericCondition; | ||
| } | ||
| /** | ||
| * Condition definition for a pattern-based validation rule (2 levels deep) | ||
| */ | ||
| export type PatternCondition = /* Condition definition for a pattern-based validation rule (2 levels deep) */ { | ||
| all: (/* Fact-based condition for pattern validation */ PatternFactCondition | /* Nested condition with logical operators (level 2 only) */ PatternNestedCondition)[]; | ||
| } | { | ||
| any: (/* Fact-based condition for pattern validation */ PatternFactCondition | /* Nested condition with logical operators (level 2 only) */ PatternNestedCondition)[]; | ||
| } | { | ||
| not: /* Fact-based condition for pattern validation */ PatternFactCondition | /* Nested condition with logical operators (level 2 only) */ PatternNestedCondition; | ||
| }; | ||
| /** | ||
| * Fact-based condition for pattern validation | ||
| */ | ||
| export type PatternFactCondition = /* Fact-based condition for pattern validation */ { | ||
| /** | ||
| * The name of the value to validate. | ||
| */ | ||
| fact: "total-length"; | ||
| /** | ||
| * 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; | ||
| /** | ||
| * From where to check | ||
| */ | ||
| start?: number; | ||
| /** | ||
| * To where to check | ||
| */ | ||
| end?: number; | ||
| }; | ||
| } | { | ||
| /** | ||
| * The name of the value to validate. | ||
| */ | ||
| fact: "static-check" | "total-length"; | ||
| /** | ||
| * Exact digit count operator | ||
| */ | ||
| operator: "exactlyNDigits"; | ||
| /** | ||
| * Number of digits required | ||
| */ | ||
| value: number; | ||
| /** | ||
| * 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: "static-check"; | ||
| /** | ||
| * Array-based comparison operator | ||
| */ | ||
| operator: "in" | "notIn" | "contains" | "doesNotContain"; | ||
| /** | ||
| * Array of string values for array-based operators | ||
| */ | ||
| 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: "static-check"; | ||
| /** | ||
| * 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; | ||
| }; | ||
| }; | ||
| /** | ||
| * Nested condition with logical operators (level 2 only) | ||
| */ | ||
| export type PatternNestedCondition = /* Nested condition with logical operators (level 2 only) */ { | ||
| all: /* Fact-based condition for pattern validation */ PatternFactCondition[]; | ||
| } | { | ||
| any: /* Fact-based condition for pattern validation */ PatternFactCondition[]; | ||
| } | { | ||
| not: /* Fact-based condition for pattern validation */ PatternFactCondition; | ||
| }; | ||
| /** | ||
| * Validation rule that uses a sequence of patterns to validate input. | ||
| */ | ||
| export interface PatternRuleType { | ||
| /** | ||
| * Indicates this is a pattern-based validation rule. | ||
| */ | ||
| type: "pattern"; | ||
| /** | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| conditions: /* Condition definition for a pattern-based validation rule (2 levels deep) */ PatternCondition; | ||
| } | ||
| /** | ||
| * Condition definition for a regex-based validation rule (2 levels deep) | ||
| */ | ||
| export type RegexCondition = /* Condition definition for a regex-based validation rule (2 levels deep) */ { | ||
| all: (/* Fact-based condition for regex validation */ RegexFactCondition | /* Nested condition with logical operators (level 2 only) */ RegexNestedCondition)[]; | ||
| } | { | ||
| any: (/* Fact-based condition for regex validation */ RegexFactCondition | /* Nested condition with logical operators (level 2 only) */ RegexNestedCondition)[]; | ||
| } | { | ||
| not: /* Fact-based condition for regex validation */ RegexFactCondition | /* Nested condition with logical operators (level 2 only) */ RegexNestedCondition; | ||
| }; | ||
| /** | ||
| * Fact-based condition for regex validation | ||
| */ | ||
| export interface RegexFactCondition { | ||
| /** | ||
| * The name of the value to validate. Should always be 'inputValue' because this property name is passed to the engine | ||
| */ | ||
| fact: "inputValue"; | ||
| /** | ||
| * The operator to use for comparison | ||
| */ | ||
| operator: "regexMatch"; | ||
| /** | ||
| * The actual regex | ||
| */ | ||
| value: string; | ||
| /** | ||
| * Additional parameters for the condition | ||
| */ | ||
| params?: { | ||
| /** | ||
| * Custom error message | ||
| */ | ||
| errorMessage?: string; | ||
| }; | ||
| } | ||
| /** | ||
| * Nested condition with logical operators (level 2 only) | ||
| */ | ||
| export type RegexNestedCondition = /* Nested condition with logical operators (level 2 only) */ { | ||
| all: /* Fact-based condition for regex validation */ RegexFactCondition[]; | ||
| } | { | ||
| any: /* Fact-based condition for regex validation */ RegexFactCondition[]; | ||
| } | { | ||
| not: /* Fact-based condition for regex validation */ RegexFactCondition; | ||
| }; | ||
| /** | ||
| * Validation rule that uses a regular expression to validate input. | ||
| */ | ||
| export interface RegexRuleType { | ||
| /** | ||
| * Indicates this is a regex-based validation rule. | ||
| */ | ||
| type: "regex"; | ||
| /** | ||
| * The conditions that must be met for the rule to trigger | ||
| */ | ||
| conditions: /* Condition definition for a regex-based validation rule (2 levels deep) */ RegexCondition; | ||
| } | ||
| export interface UpdateValidationRuleRequest { | ||
| /** | ||
| * Title of the validation rule. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * Placeholder for the validation rule. | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * Describes where and how a validation rule is applied. | ||
| */ | ||
| 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; | ||
| } | ||
| /** | ||
| * Describes where and how a validation rule is applied. | ||
| */ | ||
| export interface UsedBy { | ||
| /** | ||
| * The context in which the rule is used (e.g., journey or entity). | ||
| */ | ||
| type: "journey" | "entity"; | ||
| /** | ||
| * Slug of the schema using this rule for entities. | ||
| */ | ||
| schema_slug?: string; | ||
| /** | ||
| * Source identifier for the usage context. | ||
| */ | ||
| source_id?: string; | ||
| } | ||
| /** | ||
| * The Validation rule definition. | ||
| */ | ||
| export interface ValidationRule { | ||
| /** | ||
| * Title of the validation rule. | ||
| */ | ||
| title: string; | ||
| /** | ||
| * Placeholder for the validation rule. | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * Describes where and how a validation rule is applied. | ||
| */ | ||
| 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; | ||
| /** | ||
| * Schema version of the validation rule. | ||
| */ | ||
| _schema_version: string; | ||
| /** | ||
| * Unique identifier for the validation rule. | ||
| */ | ||
| _id: string; | ||
| /** | ||
| * Organization ID that owns this rule. | ||
| */ | ||
| _organization_id: string; | ||
| /** | ||
| * ISO timestamp when the rule was created. | ||
| */ | ||
| created_at: string; | ||
| /** | ||
| * ISO timestamp when the rule was last updated. | ||
| */ | ||
| updated_at: string; | ||
| /** | ||
| * User ID of the creator. | ||
| */ | ||
| created_by: string; | ||
| /** | ||
| * User ID of the last updater. | ||
| */ | ||
| updated_by: string; | ||
| } | ||
| export interface ValidationRuleBase { | ||
| /** | ||
| * Title of the validation rule. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * Placeholder for the validation rule. | ||
| */ | ||
| placeholder?: string; | ||
| /** | ||
| * Describes where and how a validation rule is applied. | ||
| */ | ||
| 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; | ||
| } | ||
| } | ||
| } | ||
| declare namespace Paths { | ||
| namespace AddUsedByReference { | ||
| namespace Parameters { | ||
| export type RuleId = string; | ||
| } | ||
| export interface PathParameters { | ||
| ruleId: Parameters.RuleId; | ||
| } | ||
| export type RequestBody = /* Describes where and how a validation rule is applied. */ Components.Schemas.UsedBy; | ||
| namespace Responses { | ||
| export type $200 = /* The Validation rule definition. */ Components.Schemas.ValidationRule; | ||
| export interface $400 { | ||
| /** | ||
| * example: | ||
| * Invalid request body | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $404 { | ||
| /** | ||
| * example: | ||
| * Validation rule not found | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| namespace CreateValidationRule { | ||
| export type RequestBody = Components.Schemas.CreateValidationRuleRequest; | ||
| namespace Responses { | ||
| export type $201 = /* The Validation rule definition. */ Components.Schemas.ValidationRule; | ||
| } | ||
| } | ||
| namespace DeleteValidationRule { | ||
| namespace Parameters { | ||
| export type RuleId = string; | ||
| } | ||
| export interface PathParameters { | ||
| ruleId: Parameters.RuleId; | ||
| } | ||
| namespace Responses { | ||
| export interface $204 { | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| namespace GetValidationRuleById { | ||
| namespace Parameters { | ||
| export type RuleId = string; | ||
| } | ||
| export interface PathParameters { | ||
| ruleId: Parameters.RuleId; | ||
| } | ||
| namespace Responses { | ||
| export type $200 = /* The Validation rule definition. */ Components.Schemas.ValidationRule; | ||
| export interface $404 { | ||
| /** | ||
| * example: | ||
| * Validation rule not found | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| namespace GetValidationRules { | ||
| namespace Responses { | ||
| export type $200 = Components.Schemas.GetValidationRulesResponse; | ||
| export interface $400 { | ||
| /** | ||
| * example: | ||
| * Invalid request body | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| namespace RemoveUsedByReference { | ||
| namespace Parameters { | ||
| export type RuleId = string; | ||
| } | ||
| export interface PathParameters { | ||
| ruleId: Parameters.RuleId; | ||
| } | ||
| export type RequestBody = /* Describes where and how a validation rule is applied. */ Components.Schemas.UsedBy; | ||
| namespace Responses { | ||
| export type $200 = /* The Validation rule definition. */ Components.Schemas.ValidationRule; | ||
| export interface $400 { | ||
| /** | ||
| * example: | ||
| * Invalid request body | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $404 { | ||
| /** | ||
| * example: | ||
| * Validation rule not found | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| namespace UpdateValidationRule { | ||
| namespace Parameters { | ||
| export type RuleId = string; | ||
| } | ||
| export interface PathParameters { | ||
| ruleId: Parameters.RuleId; | ||
| } | ||
| export type RequestBody = Components.Schemas.UpdateValidationRuleRequest; | ||
| namespace Responses { | ||
| export type $200 = /* The Validation rule definition. */ Components.Schemas.ValidationRule; | ||
| export interface $400 { | ||
| /** | ||
| * example: | ||
| * Invalid request body | ||
| */ | ||
| message?: string; | ||
| } | ||
| export interface $500 { | ||
| /** | ||
| * example: | ||
| * Unknown API Error | ||
| */ | ||
| message?: string; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| export interface OperationMethods { | ||
| /** | ||
| * getValidationRules - Get all validation rules by organization Id | ||
| * | ||
| * Gets all validation rules by organization Id | ||
| */ | ||
| 'getValidationRules'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetValidationRules.Responses.$200> | ||
| /** | ||
| * createValidationRule - Create Validation Rule | ||
| * | ||
| * Creates a new validation rule | ||
| */ | ||
| 'createValidationRule'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateValidationRule.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateValidationRule.Responses.$201> | ||
| /** | ||
| * getValidationRuleById - Get validation rule by ID | ||
| * | ||
| * Retrieves a specific validation rule by its ID | ||
| */ | ||
| 'getValidationRuleById'( | ||
| parameters?: Parameters<Paths.GetValidationRuleById.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetValidationRuleById.Responses.$200> | ||
| /** | ||
| * updateValidationRule - Update Validation Rule (partial update) | ||
| * | ||
| * Updates an existing validation rule partially by ID | ||
| */ | ||
| 'updateValidationRule'( | ||
| parameters?: Parameters<Paths.UpdateValidationRule.PathParameters> | null, | ||
| data?: Paths.UpdateValidationRule.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.UpdateValidationRule.Responses.$200> | ||
| /** | ||
| * deleteValidationRule - Delete Validation Rule | ||
| * | ||
| * Deletes a validation rule by ID | ||
| */ | ||
| 'deleteValidationRule'( | ||
| parameters?: Parameters<Paths.DeleteValidationRule.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.DeleteValidationRule.Responses.$204> | ||
| /** | ||
| * addUsedByReference - Add a reference to the usedBy array | ||
| * | ||
| * Adds a single reference to the usedBy array of a validation rule | ||
| */ | ||
| 'addUsedByReference'( | ||
| parameters?: Parameters<Paths.AddUsedByReference.PathParameters> | null, | ||
| data?: Paths.AddUsedByReference.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.AddUsedByReference.Responses.$200> | ||
| /** | ||
| * removeUsedByReference - Remove a reference from the usedBy array | ||
| * | ||
| * Removes a specific reference from the usedBy array of a validation rule | ||
| */ | ||
| 'removeUsedByReference'( | ||
| parameters?: Parameters<Paths.RemoveUsedByReference.PathParameters> | null, | ||
| data?: Paths.RemoveUsedByReference.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.RemoveUsedByReference.Responses.$200> | ||
| } | ||
| export interface PathsDictionary { | ||
| ['/v1/validation-rules']: { | ||
| /** | ||
| * getValidationRules - Get all validation rules by organization Id | ||
| * | ||
| * Gets all validation rules by organization Id | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetValidationRules.Responses.$200> | ||
| /** | ||
| * createValidationRule - Create Validation Rule | ||
| * | ||
| * Creates a new validation rule | ||
| */ | ||
| 'post'( | ||
| parameters?: Parameters<UnknownParamsObject> | null, | ||
| data?: Paths.CreateValidationRule.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.CreateValidationRule.Responses.$201> | ||
| } | ||
| ['/v1/validation-rules/{ruleId}']: { | ||
| /** | ||
| * getValidationRuleById - Get validation rule by ID | ||
| * | ||
| * Retrieves a specific validation rule by its ID | ||
| */ | ||
| 'get'( | ||
| parameters?: Parameters<Paths.GetValidationRuleById.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.GetValidationRuleById.Responses.$200> | ||
| /** | ||
| * updateValidationRule - Update Validation Rule (partial update) | ||
| * | ||
| * Updates an existing validation rule partially by ID | ||
| */ | ||
| 'patch'( | ||
| parameters?: Parameters<Paths.UpdateValidationRule.PathParameters> | null, | ||
| data?: Paths.UpdateValidationRule.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.UpdateValidationRule.Responses.$200> | ||
| /** | ||
| * deleteValidationRule - Delete Validation Rule | ||
| * | ||
| * Deletes a validation rule by ID | ||
| */ | ||
| 'delete'( | ||
| parameters?: Parameters<Paths.DeleteValidationRule.PathParameters> | null, | ||
| data?: any, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.DeleteValidationRule.Responses.$204> | ||
| } | ||
| ['/v1/validation-rules/{ruleId}/used-by']: { | ||
| /** | ||
| * addUsedByReference - Add a reference to the usedBy array | ||
| * | ||
| * Adds a single reference to the usedBy array of a validation rule | ||
| */ | ||
| 'post'( | ||
| parameters?: Parameters<Paths.AddUsedByReference.PathParameters> | null, | ||
| data?: Paths.AddUsedByReference.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.AddUsedByReference.Responses.$200> | ||
| /** | ||
| * removeUsedByReference - Remove a reference from the usedBy array | ||
| * | ||
| * Removes a specific reference from the usedBy array of a validation rule | ||
| */ | ||
| 'delete'( | ||
| parameters?: Parameters<Paths.RemoveUsedByReference.PathParameters> | null, | ||
| data?: Paths.RemoveUsedByReference.RequestBody, | ||
| config?: AxiosRequestConfig | ||
| ): OperationResponse<Paths.RemoveUsedByReference.Responses.$200> | ||
| } | ||
| } | ||
| export type Client = OpenAPIClient<OperationMethods, PathsDictionary> | ||
| export type CreateValidationRuleRequest = Components.Schemas.CreateValidationRuleRequest; | ||
| export type GetValidationRulesResponse = Components.Schemas.GetValidationRulesResponse; | ||
| export type NumericCondition = Components.Schemas.NumericCondition; | ||
| export type NumericFactCondition = Components.Schemas.NumericFactCondition; | ||
| export type NumericNestedCondition = Components.Schemas.NumericNestedCondition; | ||
| export type NumericRuleType = Components.Schemas.NumericRuleType; | ||
| export type PatternCondition = Components.Schemas.PatternCondition; | ||
| export type PatternFactCondition = Components.Schemas.PatternFactCondition; | ||
| export type PatternNestedCondition = Components.Schemas.PatternNestedCondition; | ||
| export type PatternRuleType = Components.Schemas.PatternRuleType; | ||
| export type RegexCondition = Components.Schemas.RegexCondition; | ||
| export type RegexFactCondition = Components.Schemas.RegexFactCondition; | ||
| export type RegexNestedCondition = Components.Schemas.RegexNestedCondition; | ||
| export type RegexRuleType = Components.Schemas.RegexRuleType; | ||
| export type UpdateValidationRuleRequest = Components.Schemas.UpdateValidationRuleRequest; | ||
| export type UsedBy = Components.Schemas.UsedBy; | ||
| export type ValidationRule = Components.Schemas.ValidationRule; | ||
| export type ValidationRuleBase = Components.Schemas.ValidationRuleBase; |
@@ -1,1 +0,1 @@ | ||
| (()=>{"use strict";var e={330:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(r(466));t.default=a.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/validation-rules":{"get":{"operationId":"getValidationRules","responses":{}},"post":{"operationId":"createValidationRule","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/validation-rules/{ruleId}":{"get":{"operationId":"getValidationRuleById","parameters":[{"name":"ruleId","in":"path","required":true}],"responses":{}},"patch":{"operationId":"updateValidationRule","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteValidationRule","parameters":[{"name":"ruleId","in":"path","required":true}],"responses":{}}},"/v1/validation-rules/{ruleId}/used-by":{"post":{"operationId":"addUsedByReference","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"removeUsedByReference","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{},"servers":[{"url":"https://validation-rules.sls.epilot.io"}]}')}},t={},r=function r(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o].call(n.exports,n,n.exports,r),n.exports}(330),o=exports;for(var a in r)o[a]=r[a];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); | ||
| (()=>{"use strict";var e={466:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"","version":""},"paths":{"/v1/validation-rules":{"get":{"operationId":"getValidationRules","responses":{}},"post":{"operationId":"createValidationRule","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/validation-rules/{ruleId}":{"get":{"operationId":"getValidationRuleById","parameters":[{"name":"ruleId","in":"path","required":true}],"responses":{}},"patch":{"operationId":"updateValidationRule","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"deleteValidationRule","parameters":[{"name":"ruleId","in":"path","required":true}],"responses":{}}},"/v1/validation-rules/{ruleId}/used-by":{"post":{"operationId":"addUsedByReference","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"removeUsedByReference","parameters":[{"name":"ruleId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}}},"components":{},"servers":[{"url":"https://validation-rules.sls.epilot.io"}]}')},799:function(e,t,r){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(r(466));t.default=a.default}},t={},r=function r(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o].call(n.exports,n,n.exports,r),n.exports}(799),o=exports;for(var a in r)o[a]=r[a];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})(); |
+13
-13
| { | ||
| "name": "@epilot/validation-rules-client", | ||
| "version": "1.1.9", | ||
| "version": "1.1.10", | ||
| "description": "API Client for epilot Validation Rules API", | ||
| "main": "dist/index.js", | ||
| "types": "dist/index.d.ts", | ||
| "scripts": { | ||
| "test": "vitest", | ||
| "bundle-definition": "webpack", | ||
| "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/validation-rules.yaml", | ||
| "openapi:local": "node ../../scripts/update-openapi.js ../../../validation-rules-api/lambda/ApiHandlerFunction/openapi.yml", | ||
| "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts", | ||
| "build": "tsc && npm run build:patch && npm run bundle-definition", | ||
| "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js", | ||
| "build:watch": "npm run build && tsc -w", | ||
| "lint": "pnpm exec eslint src" | ||
| }, | ||
| "files": [ | ||
@@ -48,3 +37,3 @@ "*.js", | ||
| "openapi-backend": "5.11.1", | ||
| "openapi-client-axios": "^7.5.1", | ||
| "openapi-client-axios": "^7.8.0", | ||
| "stream-http": "^3.1.1", | ||
@@ -65,3 +54,14 @@ "url": "^0.11.0", | ||
| "webpack-cli": "^5.1.4" | ||
| }, | ||
| "scripts": { | ||
| "test": "vitest", | ||
| "bundle-definition": "webpack", | ||
| "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/validation-rules.yaml", | ||
| "openapi:local": "node ../../scripts/update-openapi.js ../../../validation-rules-api/lambda/ApiHandlerFunction/openapi.yml", | ||
| "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts", | ||
| "build": "tsc && npm run build:patch && npm run bundle-definition", | ||
| "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js", | ||
| "build:watch": "npm run build && tsc -w", | ||
| "lint": "pnpm exec eslint src" | ||
| } | ||
| } |
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
66838
84.01%11
22.22%1654
93.68%1
Infinity%Updated