# Interface: DurationSchema

Defined in: [schema.ts:779](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L779)

A schema representing a return value or object property that represents a duration. The value should be provided as a string like "3 days" or "40 minutes 30 seconds".

## Extends

- `BaseStringSchema`\<[`Duration`](../../enumerations/ValueHintType/#duration)>

## Properties

### codaType?

> `optional` **codaType**: [`Duration`](../../enumerations/ValueHintType/#duration)

Defined in: [schema.ts:809](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L809)

An optional type hint instructing Coda about how to interpret or render this value.

#### Inherited from

`BaseStringSchema.codaType`

______________________________________________________________________

### description?

> `optional` **description**: `string`

Defined in: [schema.ts:285](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L285)

A explanation of this object schema property shown to the user in the UI.

If your pack has an object schema with many properties, it may be useful to explain the purpose or contents of any property that is not self-evident.

#### Inherited from

`BaseStringSchema.description`

______________________________________________________________________

### maxUnit?

> `optional` **maxUnit**: [`DurationUnit`](../../enumerations/DurationUnit/)

Defined in: [schema.ts:789](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L789)

The unit to use for rounding the duration when rendering. For example, if using `DurationUnit.Days`, and a value of "3 days 4 hours" is provided, it will be rendered as "3 days".

______________________________________________________________________

### precision?

> `optional` **precision**: `number`

Defined in: [schema.ts:784](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L784)

A refinement of [DurationSchema.maxUnit](#maxunit) to use for rounding the duration when rendering. Currently only `1` is supported, which is the same as omitting a value.

______________________________________________________________________

### type

> **type**: [`String`](../../enumerations/ValueType/#string)

Defined in: [schema.ts:807](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/schema.ts#L807)

Identifies this schema as a string.

#### Inherited from

`BaseStringSchema.type`
