> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Code Editor

## Overview

The code editor is an integrated development environment (IDE) for writing code, configuring function inputs/outputs, and testing functions. A package can contain multiple functions, each configured in the editor.

### Package Information/Action Bar

* **Back arrow**: Return to home page
* **Package thumbnail**
* **Title/Description**
* **Last Saved**
* **Runtime/Language**
* **Owner thumbnail**
* **Share button**: Manage permissions
* **Dark Mode toggle**
* **Version list**
* **Save/Save options**: Save, create new version, delete, or deploy

***

## Permissions

Permissions are granted at the package level:

* **Admin**: Full control
* **Delete**: Delete package/version
* **Read**: View metadata and versions
* **Write**: Edit package
* **Share**: Grant access to others
* **Execute**: Run functions
* **Read Content**: View code content
* **Update Content**: Edit code and metadata

To grant permissions:

1. Click **Share** in the action bar.
2. Search for a user or group.
3. Select the desired permission.
4. Click **Save**.

***

## Side Navigation

The side navigation in the code editor has two sections:

* **Function Configuration**: Configure function description, inputs, and output.
* **Package Information**: View package metadata.

### Function Configuration

* **Select a function**: Choose from parsed functions.
* **Function description**: Brief summary.
* **Inputs tab**: Add input parameters (name and data type required).
* **Output tab**: Add an output parameter (optional, but recommended).
* **Rescan Functions**: Parse new/updated functions.

#### Input Variables and Return Type

Available data types:

* Account, Boolean, DataSet, Date, Datetime, Decimal, Duration, Group, Number, Object, Person, Text, Time

> **Note:** Defining data types is required for saving functions and for mapping in Workflows.

#### Advanced Editing for Parameters

* Access via the three-dot menu next to a parameter.
* Options: Change name/type, make a list, nullable, add/delete default value.

##### Account Data Type

* Choose a data provider when selecting Account type.
* Configure account-specific fields for function execution.

##### List & Object Types

* **List**: Define as an array of a type.
* **Object**: Can be open (any data) or defined (with child properties).

***

## Testing a Function

After coding and configuring parameters:

1. Click **Start Function** in the code editor.
2. Enter/modify variable values for the test run.
3. Click **Save and Start Function**.
4. View results in the Console and Response areas.

> **Tip:** Fix any parameter issues (e.g., missing types) before testing.

***
