# `ordinaryd.json` Reference
## `OrdinaryHostConfig`
Config definition for an Ordinary API Instance
### `domain`
> string
### `contacts`
> array<string>
### `public_dns_ip`
> array<integer> | null
### `env_name`
> string
### `limits`
> [OrdinaryHostLimits](#ordinaryhostlimits)
### `proxied_metrics`
> array<[ProxiedMetric](#proxiedmetric)>
### `console`
> boolean
whether to serve the web console
### `invite_token_link`
> string
link to the location where you are able to obtain an invite token
### `extensions`
> array<[OrdinaryHostExtensionConfig](#ordinaryhostextensionconfig)>
configuration for extensions
## `OrdinaryHostLimits`
### `app_domains`
> array<string>
### `privileged_domains`
> array<string>
### `proxy`
> [ProxyLimits](#proxylimits)
### `middleware`
> [MiddlewareLimits](#middlewarelimits)
### `function`
> [FunctionLimits](#functionlimits)
### `auth`
> [AuthLimits](#authlimits)
### `monitor`
> [MonitorLimits](#monitorlimits)
### `storage`
> [StorageLimits](#storagelimits)
## `ProxyLimits`
### `count`
> integer
max number of proxies per application.
### `disallowed_targets`
> array<string>
a list of any internal or external target
regexes that should be disallowed.
## `MiddlewareLimits`
### `count`
> integer
max number of proxies per application.
### `disallowed_endpoints`
> array<string>
a list of any internal or external target
regexes that should be disallowed.
## `FunctionLimits`
### `count`
> integer
Max number of functions per app.
### `max_timeout`
> integer
Function request timeout.
Unit: seconds.
## `AuthLimits`
> object
## `MonitorLimits`
> object
## `StorageLimits`
### `max_storage`
> integer
Maximum total storage for all apps and api.
Unit: bytes.
Default: 10 GB
### `max_app_storage`
> integer
Maximum per-app storage.
Unit: bytes.
Default: 50 MB
### `assets`
> [AssetsLimits](#assetslimits)
### `artifact`
> [ArtifactLimits](#artifactlimits)
### `cache`
> [CacheLimits](#cachelimits)
### `database`
> [DatabaseLimits](#databaselimits)
### `secrets`
> [SecretsLimits](#secretslimits)
## `AssetsLimits`
### `allowed_extensions`
> array<string>
Allowed extensions corresponding to
[MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types) types.
(More to be supported in the future)
Supported:
- "txt"
- "xml"
- "html"
- "css"
- "css.map"
- "csv"
- "js"
- "png"
- "apng"
- "gif"
- "svg"
- "jpg"
- "jpeg"
- "bmp"
- "tif"
- "tiff"
- "webp"
- "avif"
- "ico"
- "pdf"
- "json"
- "wasm"
Special:
- "none" (for no extension; uses "application/octet-stream")
- "any" (for unsupported extensions; also uses "application/octet-stream")
### `max_store_size`
> integer
Limit on total storage for all assets within an app
(bytes).
### `max_asset_size`
> integer
Limit on individual asset size (bytes).
## `ArtifactLimits`
### `max_store_size`
> integer
### `max_artifact_size`
> integer
## `CacheLimits`
### `max_size_range`
> array
### `max_count_range`
> array
## `DatabaseLimits`
### `max_model_definitions`
> integer
### `max_model_fields`
> integer
### `max_item_size`
> integer
### `max_field_size`
> integer
## `SecretsLimits`
### `max_count`
> integer
### `max_size`
> integer
## `ProxiedMetric`
### `name`
> string
### `endpoint`
> string
## `OrdinaryHostExtensionConfig`
### `name`
> string
### `operations`
> object
## `ExtensionOperationConfig`
### `idx`
> integer
### `input`
> [Kind](#kind)
### `output`
> [Kind](#kind)
## `Kind`
> (one of)
> object
In the case of one-to-many the deletion of the
parent reference causes a cascading delete (i.e if you have a user, chat, message
relationship structure, deletion of the user or the chat automatically
deletes messages owned by either).
References must always be bidirectionally defined.
### `Ref`
> object
### `model`
> string
name of model you're referencing.
### `field`
> string
name of the field on the model.
### `many`
> boolean | null
whether you have many of the referenced model.
null/void/undefined/None
> Void (string)
boolean/true/false
> Bool (string)
integers between
> I8 (string)
integers between
> U8 (string)
integers between
> I16 (string)
integers between
> U16 (string)
integers between
> I32 (string)
integers between
> U32 (string)
integers between
> I64 (string)
integers between
> U64 (string)
floats between
> F32 (string)
floats between
> F64 (string)
universal unique identifiers. 16 bytes
or 36 characters.
> Uuid (string)
must be a valid URL
> Url (string)
> object
unix timestamp
### `Timestamp`
> object
### `unit`
> [TimeUnit](#timeunit)
### `fmt`
> string | null
array of bytes.
> Blob (string)
text/string/characters.
> String (string)
JSON formatted string.
> Json (string)
Markdown formatted string
> Markdown (string)
> object
array of values.
### `List`
> object
### `kind`
> [Kind](#kind)
the type for the values stored in the list.
> object
Select from a list of options. Stored as its u8 index value.
### `Enum`
> object
### `name`
> string
### `opts`
> array<[EnumOpt](#enumopt)>
> object
complex kind with its own name and subfields.
### `Object`
> object
### `name`
> string
the object definition's name.
### `fields`
> array<[Field](#field)>
nested subfields.
Defines the types recognized by this framework.
## `TimeUnit`
> string
> (enum) Seconds
## `EnumOpt`
### `idx`
> integer
### `name`
> string
## `Field`
Fields are used to describe properties on a model,
IO for functions/integrations and content definitions.
### `idx`
> integer
The index used for compact, vector based serialization.
The index is preserved even if the property name changes.
Each field must be assigned an index value from 0-255, with
no gaps (i.e. cannot go from 2 to 4 without also having a field
with an index of 3).
### `name`
> string
this is the name that is used when accessing a property in a template
and will be the name that is used in the JSON serialized format.
### `kind`
> [Kind](#kind)
the "kind" represents the type of the value that will
be stored or sent.
### `indexed`
> boolean | null
Used for models and content definitions. Determines whether
you can access an object/item by this property. All items
have are automatically stored ID that can be used for look
up if no properties are indexed.
Note: `indexed` fields also have a uniqueness constraint.
!! Important: only `String`, `Uuid` and `Url` kinds can be indexed
### `queryable`
> boolean | null
Specifies whether field can be queried via Gte/Gt, Lte/Lt, Eq and `BeginsWith`.
!! Important: only `Bool`, `String`, `Url`, `Uuid`, `Timestamp`, `U8/16/32/64`, `I8/16/32/64`,
!! and `F32/64` kinds can be made queryable.
### `mapping`
> string | null
Used for integrations, so that a property on the external
resource's response can be renamed.
### `doc`
> string | null
Optional message to hint to the user
in an editor.
### `compressed`
> boolean | null
Compresses the value of the field using the Zstd compression algorithm (level 4).
Note: at some point in the future, compression levels and compression algorithm
selection will be configurable.
### `encrypted`
> boolean | null
Encrypts the field using `XChaCha20Poly1305`.
Note: The storage encryption key is stored on the same
server as the data it's encrypting; anyone with full access
to the server. This is mostly useful for protecting
sensitive data in backups (assuming the key isn't stored with the
backup), and can potentially limit exposure in partial-access context
stemming from a misconfiguration or a mistake in a multi-tenant scenario
(i.e. for whatever reason tenant A's database contents is moved to tenant B's
directory, without the keys also being shifted over).
!! Important: this is not currently intended for storing *any* meaningfully
!! sensitive data (e.g. SSNs, credit card numbers, passwords, encryption keys, etc.)
!! use (or don't) at your own risk.
<hr/>
_This document was generated automatically for structs defined in the [`ordinary-config`](https://docs.rs/ordinary-config/latest/ordinary_config/) crate._