# Schema

The PANDIUM.yaml’s schema properties are a collection of string to object mappings that determine the name and type of each configuration in the connection settings page. The object to which the property name is mapped must contain the `type` prop. Pandium currently supports the following types, many of which can take additional props:

### Boolean

```yaml
bool_input:
  type: boolean
  default: true
```

In this example `bool_input` is the name of the config. When presented to the end user, they will see a checkbox that is checked because the default is set to true. When a run happens this config will be injected into the environment as `PAN_CFG_BOOL_INPUT`.

| prop        | values        | note |
| ----------- | ------------- | ---- |
| **default** | true or false |      |

![How the end-user will see this when combined with UISchema](/files/-Mi8QVRjXOjtg1WheaTQ)

### Integer

```yaml
integer_input:
  type: integer
  default: 0
  min: -1
  max: 10
```

In this example, `integer_input` is the name of the config. When presented to the end user, they will see a number selector that is restricted to integers, with the value 0 being presented as the starting value. The end user will be able to enter an integer between -1 and 10. When a run happens, this config will be injected into the Environment as `PAN_CFG_INTEGER_INPUT`.

| prop        | values     | note              |
| ----------- | ---------- | ----------------- |
| **default** | an integer |                   |
| **min**     | an integer | negatives allowed |
| **max**     | an integer |                   |

![How the end-user will see this when combined with UISchema](/files/-Mi8QRVLLg74MMn5ZuBe)

### Number

```yaml
number_input:
  type: number
  default: 1.3333333
```

In the above example, `number_input` is the name of the config. When presented to the Integration Hub user, they will see a number selector with the value 1.3333 presented as the starting value. When a Run happens this config will be injected into the Environment as `PAN_CFG_NUMBER_INPUT`.

| prop        | values     | note              |
| ----------- | ---------- | ----------------- |
| **default** | any number |                   |
| **min**     | any number | negatives allowed |
| **max**     | any number |                   |

![How the end-user will see this when combined with UISchema](/files/-Mi8QMs7cW-ysCJ1SyDK)

### String

```yaml
string_input:
  type: string
```

In the above example, string\_input is the name of the config. When presented to the Integration Hub user, they will see a text box that is empty being the starting value. When a Run happens this config will be injected into the Environment as PAN\_CFG\_STRING\_INPUT.

| prop        | values                                        | note                                                                                                                                                                                                     |
| ----------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **default** | any valid unicode string                      |                                                                                                                                                                                                          |
| **format**  | null \|\| "date" \|\| "time" \|\| "date-time" | <p>when null or undefined control renders as a text box. <em>date</em> renders as a date picker</p><p><em>time</em> renders as a time picker and <em>date-time</em> renders a date and time control.</p> |
| **enum**    | an array of values                            | if you add an enum to the control, it will render as a dropdown.                                                                                                                                         |

![How the end-user will see this when combined with UISchema](/files/-Mi8QDoD6u_3AVNPLGXj)

### Enum

```yaml
string_enum_input:
  enum:
  - option 1
  - option 2
  - option 3
  type: string
```

In the above example, string\_enum\_input is the name of the config. When presented to the Integration Hub user, they will see a select box allowing them to choose between the given enum values. When a Run happens this config will be injected into the Environment as PAN\_CFG\_STRING\_ENUM\_INPUT.

![How the end-user will see this when combined with UISchema](/files/-Mi8Q41lSC9ueA7OgyFZ)

### Labeled Enum

```yaml
labeled_enum:
  type: string
  oneOf:
    - title: Option 1 label
      const: option1
    - title: Option 2 label
      const: option2
    - title: Option 2 label
      const: option2
```

In the above example, labeled\_enum is the name of the config. When presented to the Integration Hub user, they will see a select box with labeled values. When a Run happens this config will be injected into the Environment as PAN\_CFG\_LABELED\_ENUM.

<figure><img src="/files/jPlekhoWSm3bVJgR1pAt" alt=""><figcaption><p>How the Integration Hub user will see this when combined with UISchema</p></figcaption></figure>

### Array/Object

```yaml
  array_input:
    type: array
    items:
      type: object
      properties:
        date:
          type: string
          format: date
        enum:
          enum:
          - foo
          - bar
          type: string
        message:
          type: string
          maxLength: 5
```

In the above example, `array_input`is the name of the config. When presented to the user they will see a line with a combination of the three properties that make up each object in the list, the UI allows them to add or remove objects to the array. When a Run happens this config will be injected into the Environment as `PAN_CFG_ARRAY_INPUT`

![How the end-user will see this when combined with UISchema](/files/-Mi8RQXScF4FzhAFfbBC)

### Multi-Select Enum

```yaml
string_enum_multi_input:
  items:
    options:
      - label: Option 1 label
        value: option1
      - label: Option 2 label
        value: option2
      - label: Option 2 label
        value: option2
```

| prop      | value                                                       | note |
| --------- | ----------------------------------------------------------- | ---- |
| **items** | options: a list of objects where each has a label and value |      |

### File Upload

```yaml
file_upload:
  type: string
```

In the above example, file\_upload is the name of the config. When presented to the Integration Hub or Marketplace user, they will see an option to import a CSV file . When a Run happens this config will be injected into the Environment as PAN\_CFG\_FILE\_UPLOAD.

The value for the `file_upload` config is a base64 encoded CSV file, so you will simply need to decode this in your integration should you choose to use it.

<figure><img src="/files/kNVPzju25xIWDoEx3lcg" alt=""><figcaption><p>How the Integration Hub user will see this when combined with UISchema</p></figcaption></figure>

{% hint style="info" %}
**Note:** Like all the schema property types described here, the configuration’s property must be referenced in the scope of a uischema element for it to be displayed on the connection settings page. Unlike other schema property types, the UISschema element type for a multi select uischema must be MultiSelectControl, rather than Control. To learn more about how the UISchema determines how the configurations are displayed review [this article](https://docs.pandium.com/getting-started/anatomy-of-an-integration/pandium.yaml-spec/uischema).
{% endhint %}

### Putting it all together

```yaml
schema:
  type: object
  properties:
    bool_input:
      type: boolean
      default: true
    array_input:
      type: array
      items:
        type: object
        properties:
          date:
            type: string
            format: date
          enum:
            enum:
            - foo
            - bar
            type: string
          message:
            type: string
            maxLength: 5
    number_input:
      type: number
      default: 1.3333333
    string_input:
      type: string
    integer_input:
      max: 10
      min: -1
      type: integer
      default: 0
    string_enum_input:
      enum:
      - option 1
      - option 2
      - option 3
      type: string
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pandium.com/getting-started/anatomy-of-an-integration/pandium.yaml-spec/schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
