Data-Mate: `Function Configs Interfaces Record Transform Config`
function-configs/interfaces.RecordTransformConfig
Type parameters
Name | Type |
---|---|
T | extends Record <string , any > = Record <string , unknown > |
Hierarchy
-
↳
RecordTransformConfig
Table of contents
Properties
- accepts
- aliases
- argument_schema
- category
- create
- description
- examples
- name
- output_type
- 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
: Record
<string
, unknown
>, index
: number
) => Record
<string
, unknown
>
Type declaration
▸ (config
): (value
: Record
<string
, unknown
>, index
: number
) => Record
<string
, unknown
>
Parameters
Name | Type |
---|---|
config | FunctionContext <T > |
Returns
fn
▸ (value
, index
): Record
<string
, unknown
>
Parameters
Name | Type |
---|---|
value | Record <string , unknown > |
index | number |
Returns
Record
<string
, unknown
>
Defined in
data-mate/src/function-configs/interfaces.ts:218
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
• Readonly
output_type: (inputConfig
: ReadonlyDataTypeFields
, args?
: T
) => ReadonlyDataTypeFields
Type declaration
▸ (inputConfig
, args?
): ReadonlyDataTypeFields
Parameters
Name | Type |
---|---|
inputConfig | ReadonlyDataTypeFields |
args? | T |
Returns
ReadonlyDataTypeFields
Defined in
data-mate/src/function-configs/interfaces.ts:214
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: RECORD_TRANSFORM
Type of operation that will be preformed
Overrides
Defined in
data-mate/src/function-configs/interfaces.ts:213
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