Lithic · Schema

TypeScript Code Parameters

Parameters for defining a TypeScript code rule

FinTechBaaSCard IssuingPaymentsEmbedded Finance

Properties

Name Type Description
features array Features available to the TypeScript code at evaluation time
code string The TypeScript source code of the rule. Must define a `rule()` function that accepts the declared features as positional arguments (in the same order as the `features` array) and returns an array of a
View JSON Schema on GitHub

JSON Schema

lithic-typescript-code-parameters-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/typescript-code-parameters",
  "title": "TypeScript Code Parameters",
  "description": "Parameters for defining a TypeScript code rule",
  "type": "object",
  "properties": {
    "features": {
      "type": "array",
      "description": "Features available to the TypeScript code at evaluation time",
      "items": {
        "$ref": "#/components/schemas/rule-feature"
      }
    },
    "code": {
      "type": "string",
      "description": "The TypeScript source code of the rule. Must define a `rule()` function that accepts the declared features as positional arguments (in the same order as the `features` array) and returns an array of actions."
    }
  },
  "required": [
    "features",
    "code"
  ]
}