Data-Mate: `Function Configs Interfaces Field Validate Config`
function-configs/interfaces.FieldValidateConfig
Type parameters
Name | Type |
---|---|
T | extends Record <string , any > = Record <string , unknown > |
Hierarchy
-
↳
FieldValidateConfig
Table of contents
Properties
- accepts
- aliases
- argument_schema
- category
- create
- description
- examples
- name
- output_type
- process_mode
- required_arguments
- type
- validate_arguments
Properties
accepts
• Readonly
accepts: readonly FieldType
[]
Can be used in strongly typed contexts to throw early, some types or only compatible with a given operation
Inherited from
FunctionDefinitionConfig.accepts
Defined in
data-mate/src/function-configs/interfaces.ts:138
aliases
• Optional
Readonly
aliases: readonly string
[]
Optionally specify other known aliases to this function
Inherited from
FunctionDefinitionConfig.aliases
Defined in
data-mate/src/function-configs/interfaces.ts:102
argument_schema
• Optional
Readonly
argument_schema: DataTypeFields
Used for validating and defining the types of the input arguments, please include description field when creating the schema
Inherited from
FunctionDefinitionConfig.argument_schema
Defined in
data-mate/src/function-configs/interfaces.ts:126
category
• Readonly
category: FunctionDefinitionCategory
The category of operation, for documentation purposes
Inherited from
FunctionDefinitionConfig.category
Defined in
data-mate/src/function-configs/interfaces.ts:113
create
• Readonly
create: (config
: FunctionContext
<T
>) => (value
: unknown
, index
: number
) => boolean
Type declaration
▸ (config
): (value
: unknown
, index
: number
) => boolean
Parameters
Name | Type |
---|---|
config | FunctionContext <T > |
Returns
fn
▸ (value
, index
): boolean
Parameters
Name | Type |
---|---|
value | unknown |
index | number |
Returns
boolean
Defined in
data-mate/src/function-configs/interfaces.ts:179
description
• Readonly
description: string
Used to generate documentation
Inherited from
FunctionDefinitionConfig.description
Defined in
data-mate/src/function-configs/interfaces.ts:108
examples
• Optional
Readonly
examples: readonly FunctionDefinitionExample
<T
, unknown
>[]
Examples that will be used in the documentation and potentially in the automated tests. FIXME make this non-optional
Inherited from
FunctionDefinitionConfig.examples
Defined in
data-mate/src/function-configs/interfaces.ts:120
name
• Readonly
name: string
The name of the function, this should be considered case-insensitive, since some languages like SQL are case insensitive.
Inherited from
Defined in
data-mate/src/function-configs/interfaces.ts:97
output_type
• Optional
Readonly
output_type: (inputConfig
: DataTypeFieldAndChildren
, args
: T
) => DataTypeFieldAndChildren
Type declaration
▸ (inputConfig
, args
): DataTypeFieldAndChildren
Parameters
Name | Type |
---|---|
inputConfig | DataTypeFieldAndChildren |
args | T |
Returns
Defined in
data-mate/src/function-configs/interfaces.ts:180
process_mode
• Readonly
process_mode: ProcessMode
Defined in
data-mate/src/function-configs/interfaces.ts:178
required_arguments
• Optional
Readonly
required_arguments: readonly string
[]
Used to determine what of the possible args are required, as DataType configs does not have a mechanism to specify what is required
Inherited from
FunctionDefinitionConfig.required_arguments
Defined in
data-mate/src/function-configs/interfaces.ts:132
type
• Readonly
type: FIELD_VALIDATION
Type of operation that will be preformed
Overrides
Defined in
data-mate/src/function-configs/interfaces.ts:177
validate_arguments
• Optional
Readonly
validate_arguments: (args
: T
) => void
Type declaration
▸ (args
): void
Used for additional custom validation of args, called after generic arg validation
Parameters
Name | Type |
---|---|
args | T |
Returns
void
Inherited from
FunctionDefinitionConfig.validate_arguments