**@cobaltio/cobalt-js**
***
# Cobalt Javascript SDK
Cobalt frontend SDK.
## Install
#### npm
```bash
npm install @cobaltio/cobalt-js
```
#### yarn
```bash
yarn add @cobaltio/cobalt-js
```
## Usage
### Include
#### Browser
```html
```
#### Node
```js
import { Cobalt } from "@cobaltio/cobalt-js";
// or, if you're using CommonJS
const { Cobalt } = require("@cobaltio/cobalt-js");
```
### Initialize
```js
// initialize with token
const cobalt = new Cobalt({
// the token you generate for linked accounts using the cobalt backend SDK
token: "COBALT_SESSION_TOKEN",
// OPTIONAL: set custom base url for all API requests. only useful if you are hosting Cobalt on premise.
baseUrl: "https://cobalt.example.com/backend",
});
// Or, initialize without token
const cobalt = new Cobalt();
// and you can set the token later.
cobalt.token = "COBALT_SESSION_TOKEN";
```
# Documentation
- You can read the [SDK documentation here](https://gocobalt.github.io/cobalt-js).
- [`llms.txt`](https://gocobalt.github.io/cobalt-js/llms.txt)
This documentation is also available in [llms.txt](https://llmstxt.org) format, which is a simple markdown standard that LLMs can consume easily.
## Classes
### Cobalt
Defined in: [cobalt.ts:196](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L196)
#### Constructors
##### Constructor
> **new Cobalt**(`options`): [`Cobalt`](#cobalt)
Defined in: [cobalt.ts:206](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L206)
Cobalt Frontend SDK
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`CobaltOptions`](#cobaltoptions) | The options to configure the Cobalt SDK. |
###### Returns
[`Cobalt`](#cobalt)
#### Properties
| Property | Modifier | Type | Defined in |
| ------ | ------ | ------ | ------ |
| `token` | `public` | `string` | [cobalt.ts:198](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L198) |
#### Methods
##### config()
> **config**(`payload`): `Promise`\<[`Config`](#config-2)\>
Defined in: [cobalt.ts:453](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L453)
Returns the specified config, or creates one if it doesn't exist.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `payload` | [`ConfigPayload`](#configpayload) | The payload object for config. |
###### Returns
`Promise`\<[`Config`](#config-2)\>
The specified config.
##### connect()
> **connect**(`slug`, `payload?`): `Promise`\<`boolean`\>
Defined in: [cobalt.ts:393](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L393)
Connect the specified application, optionally with the auth data that user provides.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `payload?` | `Record`\<`string`, `string`\> | The key value pairs of auth data. |
###### Returns
`Promise`\<`boolean`\>
Whether the connection was successful.
##### createEcosystemLead()
> **createEcosystemLead**(`payload`): `Promise`\<[`EcosystemLead`](#ecosystemlead)\>
Defined in: [cobalt.ts:565](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L565)
Create a lead for an ecosystem app.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `payload` | [`EcosystemLeadPayload`](#ecosystemleadpayload) | The payload object for the lead. |
###### Returns
`Promise`\<[`EcosystemLead`](#ecosystemlead)\>
##### createWorkflow()
> **createWorkflow**(`params`): `Promise`\<[`PublicWorkflow`](#publicworkflow)\>
Defined in: [cobalt.ts:718](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L718)
Create a public workflow for the linked account.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`PublicWorkflowPayload`](#publicworkflowpayload) | |
###### Returns
`Promise`\<[`PublicWorkflow`](#publicworkflow)\>
The created public workflow.
##### deleteConfig()
> **deleteConfig**(`slug`, `configId?`): `Promise`\<`unknown`\>
Defined in: [cobalt.ts:544](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L544)
Delete the specified config.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `configId?` | `string` | The unique ID of the config. |
###### Returns
`Promise`\<`unknown`\>
##### deleteConfigField()
> **deleteConfigField**(`slug`, `fieldId`, `workflowId?`): `Promise`\<`unknown`\>
Defined in: [cobalt.ts:640](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L640)
Delete the specified config field value.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `fieldId` | `string` | The unique ID of the field. |
| `workflowId?` | `string` | The unique ID of the workflow. |
###### Returns
`Promise`\<`unknown`\>
##### deleteWorkflow()
> **deleteWorkflow**(`workflowId`): `Promise`\<`unknown`\>
Defined in: [cobalt.ts:745](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L745)
Delete the specified public workflow.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `workflowId` | `string` | The workflow ID. |
###### Returns
`Promise`\<`unknown`\>
##### disconnect()
> **disconnect**(`slug`): `Promise`\<`void`\>
Defined in: [cobalt.ts:434](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L434)
Disconnect the specified application and remove any associated data from Cobalt.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
###### Returns
`Promise`\<`void`\>
##### getApp()
Returns the application details for the specified application, provided
the application is enabled in Cobalt. If no application is specified,
it returns all the enabled applications.
###### Param
The application slug.
###### Call Signature
> **getApp**(): `Promise`\<[`Application`](#application)[]\>
Defined in: [cobalt.ts:266](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L266)
Returns the list of enabled applications and their details.
###### Returns
`Promise`\<[`Application`](#application)[]\>
The application details.
###### Param
The application slug.
###### Call Signature
> **getApp**(`slug`): `Promise`\<[`Application`](#application)\>
Defined in: [cobalt.ts:273](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L273)
Returns the application details for the specified application, provided
the application is enabled in Cobalt.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
###### Returns
`Promise`\<[`Application`](#application)\>
The application details.
###### Param
The application slug.
##### getApps()
> **getApps**(): `Promise`\<[`Application`](#application)[]\>
Defined in: [cobalt.ts:301](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L301)
Returns all the enabled and ecosystem apps.
###### Returns
`Promise`\<[`Application`](#application)[]\>
The list of applications.
##### getConfig()
> **getConfig**(`slug`, `configId?`): `Promise`\<[`Config`](#config-2)\>
Defined in: [cobalt.ts:500](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L500)
Returns the specified config.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `configId?` | `string` | The unique ID of the config. |
###### Returns
`Promise`\<[`Config`](#config-2)\>
The specified config.
##### getConfigField()
> **getConfigField**(`slug`, `fieldId`, `workflowId?`): `Promise`\<[`Config`](#config-2)\>
Defined in: [cobalt.ts:590](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L590)
Returns the specified field of the config.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `fieldId` | `string` | The unique ID of the field. |
| `workflowId?` | `string` | The unique ID of the workflow. |
###### Returns
`Promise`\<[`Config`](#config-2)\>
The specified config field.
##### getConfigs()
> **getConfigs**(`slug`): `Promise`\<`object`[]\>
Defined in: [cobalt.ts:479](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L479)
Returns the configs created for the specified application.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
###### Returns
`Promise`\<`object`[]\>
The configs created for the specified application.
##### getFieldOptions()
> **getFieldOptions**(`lhs`, `slug`, `fieldId`, `workflowId?`): `Promise`\<[`RuleOptions`](#ruleoptions)\>
Defined in: [cobalt.ts:665](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L665)
Returns the options for the specified field.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `lhs` | `string` | The selected value of the lhs field. |
| `slug` | `string` | The application slug. |
| `fieldId` | `string` | The unique ID of the field. |
| `workflowId?` | `string` | The unique ID of the workflow, if this is a workflow field. |
###### Returns
`Promise`\<[`RuleOptions`](#ruleoptions)\>
The specified rule field's options.
##### getWorkflows()
> **getWorkflows**(`params?`): `Promise`\<[`PublicWorkflow`](#publicworkflow)[]\>
Defined in: [cobalt.ts:694](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L694)
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params?` | [`PublicWorkflowsPayload`](#publicworkflowspayload) | |
###### Returns
`Promise`\<[`PublicWorkflow`](#publicworkflow)[]\>
##### updateConfig()
> **updateConfig**(`payload`): `Promise`\<[`Config`](#config-2)\>
Defined in: [cobalt.ts:520](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L520)
Update the specified config.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `payload` | [`UpdateConfigPayload`](#updateconfigpayload) | The update payload. |
###### Returns
`Promise`\<[`Config`](#config-2)\>
The specified config.
##### updateConfigField()
> **updateConfigField**(`slug`, `fieldId`, `value`, `workflowId?`): `Promise`\<[`Config`](#config-2)\>
Defined in: [cobalt.ts:614](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L614)
Update the specified config field value.
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `slug` | `string` | The application slug. |
| `fieldId` | `string` | The unique ID of the field. |
| `value` | `null` \| `string` \| `number` \| `boolean` | The new value for the field. |
| `workflowId?` | `string` | The unique ID of the workflow. |
###### Returns
`Promise`\<[`Config`](#config-2)\>
The updated config field.
## Interfaces
### Application
Defined in: [cobalt.ts:6](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L6)
An application in Cobalt.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `auth_input_map?` | [`InputField`](#inputfield)[] | The fields required from the user to connect the application (for `keybased` auth type). | [cobalt.ts:24](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L24) |
| `auth_type` | `"oauth2"` \| `"keybased"` | The type of auth used by application. | [cobalt.ts:18](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L18) |
| `connected?` | `boolean` | Whether the user has connected the application. | [cobalt.ts:20](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L20) |
| `description` | `string` | The application description. | [cobalt.ts:10](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L10) |
| `icon` | `string` | The application icon. | [cobalt.ts:12](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L12) |
| `name` | `string` | The application name. | [cobalt.ts:8](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L8) |
| `reauth_required?` | `boolean` | Whether the connection has expired and re-auth is required. | [cobalt.ts:22](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L22) |
| `slug?` | `string` | The application slug for custom apps. | [cobalt.ts:16](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L16) |
| `type` | `string` | The application slug for native apps. | [cobalt.ts:14](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L14) |
***
### CobaltOptions
Defined in: [cobalt.ts:81](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L81)
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `baseUrl?` | `string` | The base URL of the Cobalt API. You don't need to set this. | [cobalt.ts:83](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L83) |
| `token?` | `string` | The session token. | [cobalt.ts:85](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L85) |
***
### Config
Defined in: [cobalt.ts:152](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L152)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `config_id?` | `string` | [cobalt.ts:154](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L154) |
| `field_errors?` | `object`[] | [cobalt.ts:157](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L157) |
| `fields?` | [`ConfigField`](#configfield)[] | [cobalt.ts:155](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L155) |
| `slug` | `string` | [cobalt.ts:153](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L153) |
| `workflows?` | [`ConfigWorkflow`](#configworkflow)[] | [cobalt.ts:156](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L156) |
***
### ConfigField
Defined in: [cobalt.ts:167](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L167)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `field_type` | `string` | [cobalt.ts:170](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L170) |
| `hidden?` | `boolean` | [cobalt.ts:182](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L182) |
| `id` | `string` | [cobalt.ts:168](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L168) |
| `labels?` | `object`[] | [cobalt.ts:176](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L176) |
| `multiple?` | `boolean` | [cobalt.ts:180](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L180) |
| `name` | `string` | [cobalt.ts:169](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L169) |
| `options?` | `object`[] | [cobalt.ts:171](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L171) |
| `parent?` | `string` | [cobalt.ts:175](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L175) |
| `required?` | `boolean` | [cobalt.ts:181](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L181) |
| `value?` | `any` | [cobalt.ts:183](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L183) |
***
### ConfigPayload
Defined in: [cobalt.ts:42](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L42)
The payload object for config.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `config_id?` | `string` | Unique ID for the config. | [cobalt.ts:46](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L46) |
| `labels?` | [`Label`](#label-1)[] | The dynamic label mappings. | [cobalt.ts:48](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L48) |
| `slug` | `string` | The application slug. | [cobalt.ts:44](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L44) |
***
### ConfigWorkflow
Defined in: [cobalt.ts:186](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L186)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `description?` | `string` | [cobalt.ts:189](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L189) |
| `enabled` | `boolean` | [cobalt.ts:190](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L190) |
| `fields?` | [`ConfigField`](#configfield)[] | [cobalt.ts:191](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L191) |
| `id` | `string` | [cobalt.ts:187](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L187) |
| `name` | `string` | [cobalt.ts:188](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L188) |
***
### EcosystemLead
Defined in: [cobalt.ts:88](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L88)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `_id` | `string` | [cobalt.ts:89](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L89) |
| `created_at` | `string` | [cobalt.ts:93](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L93) |
| `description?` | `string` | [cobalt.ts:92](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L92) |
| `email` | `string` | [cobalt.ts:91](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L91) |
| `name?` | `string` | [cobalt.ts:90](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L90) |
***
### EcosystemLeadPayload
Defined in: [cobalt.ts:96](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L96)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `description?` | `string` | [cobalt.ts:100](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L100) |
| `email` | `string` | [cobalt.ts:99](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L99) |
| `name?` | `string` | [cobalt.ts:98](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L98) |
| `slug` | `string` | [cobalt.ts:97](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L97) |
***
### InputField
Defined in: [cobalt.ts:28](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L28)
An Input field to take input from the user.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `label` | `string` | The label of the field. | [cobalt.ts:38](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L38) |
| `name` | `string` | Key name of the field. | [cobalt.ts:30](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L30) |
| `placeholder` | `string` | The placeholder of the field. | [cobalt.ts:36](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L36) |
| `required` | `boolean` | Whether the field is required. | [cobalt.ts:34](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L34) |
| `type` | `string` | Input type of the field. | [cobalt.ts:32](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L32) |
***
### Label
Defined in: [cobalt.ts:52](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L52)
Label Mapping
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `name` | `string` | The label name. | [cobalt.ts:54](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L54) |
| `value` | `string` \| `number` \| `boolean` | The label value. | [cobalt.ts:56](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L56) |
***
### PublicWorkflow
Defined in: [cobalt.ts:124](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L124)
A public workflow in Cobalt.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `_id` | `string` | The workflow ID. | [cobalt.ts:126](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L126) |
| `description?` | `string` | The workflow description. | [cobalt.ts:130](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L130) |
| `name` | `string` | The workflow name. | [cobalt.ts:128](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L128) |
***
### PublicWorkflowPayload
Defined in: [cobalt.ts:134](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L134)
The payload for creating a public workflow for the linked account.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `description?` | `string` | The workflow description. | [cobalt.ts:138](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L138) |
| `name` | `string` | The workflow name. | [cobalt.ts:136](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L136) |
| `slug?` | `string` | The application slug in which this workflow should be created. | [cobalt.ts:140](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L140) |
***
### PublicWorkflowsPayload
Defined in: [cobalt.ts:143](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L143)
#### Extends
- `PaginationProps`
#### Properties
| Property | Type | Inherited from | Defined in |
| ------ | ------ | ------ | ------ |
| `limit?` | `number` | `PaginationProps.limit` | [cobalt.ts:149](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L149) |
| `page?` | `number` | `PaginationProps.page` | [cobalt.ts:148](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L148) |
| `slug?` | `string` | - | [cobalt.ts:144](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L144) |
***
### RuleOptions
Defined in: [cobalt.ts:103](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L103)
#### Properties
| Property | Type | Defined in |
| ------ | ------ | ------ |
| `conditional_code_stdout?` | `string`[] | [cobalt.ts:116](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L116) |
| `error?` | `object` | [cobalt.ts:117](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L117) |
| `error.message?` | `string` | [cobalt.ts:118](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L118) |
| `error.stack?` | `string` | [cobalt.ts:119](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L119) |
| `rule_column` | `object` | [cobalt.ts:104](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L104) |
| `rule_column.operator` | `object` | [cobalt.ts:110](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L110) |
| `rule_column.operator.name` | `string` | [cobalt.ts:111](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L111) |
| `rule_column.operator.options` | [`Label`](#label-1)[] | [cobalt.ts:113](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L113) |
| `rule_column.operator.type` | `"select"` | [cobalt.ts:112](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L112) |
| `rule_column.rhs` | `object` | [cobalt.ts:105](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L105) |
| `rule_column.rhs.name` | `string` | [cobalt.ts:106](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L106) |
| `rule_column.rhs.options?` | [`Label`](#label-1)[] | [cobalt.ts:108](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L108) |
| `rule_column.rhs.type` | `"text"` \| `"select"` | [cobalt.ts:107](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L107) |
***
### UpdateConfigPayload
Defined in: [cobalt.ts:60](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L60)
The configuration data for an application.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `config_id?` | `string` | Unique ID for the config. | [cobalt.ts:64](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L64) |
| `fields` | `Record`\<`string`, `string` \| `number` \| `boolean`\> | A map of application fields and their values. | [cobalt.ts:66](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L66) |
| `slug` | `string` | The application slug | [cobalt.ts:62](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L62) |
| `workflows` | [`WorkflowPayload`](#workflowpayload)[] | The config workflows data. | [cobalt.ts:68](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L68) |
***
### WorkflowPayload
Defined in: [cobalt.ts:72](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L72)
The workflow.
#### Properties
| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `enabled` | `boolean` | Whether the workflow is enabled. | [cobalt.ts:76](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L76) |
| `fields` | `Record`\<`string`, `string` \| `number` \| `boolean`\> | A map of workflow field names and their values. | [cobalt.ts:78](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L78) |
| `id` | `string` | The ID of the workflow. | [cobalt.ts:74](https://github.com/gocobalt/cobalt-js/blob/b0775f9f64cc18029ce91bf46d52322be65eaa24/cobalt.ts#L74) |