# so.indx.defs

> Shared definitions for Indx records.

- Kind: defs
- Authority: indx.so
- Lexicon: 1
- Published by [indx.so](https://lexicon.garden/identity/did:plc:62qaw3tjtuox2zt7aqtshs7p), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:62qaw3tjtuox2zt7aqtshs7p/so.indx.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:62qaw3tjtuox2zt7aqtshs7p/so.indx.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:62qaw3tjtuox2zt7aqtshs7p/so.indx.defs/analytics)

## #aspectRatio (`so.indx.defs#aspectRatio`)

Type: object

Width and height of an image, used to reserve its space before it loads. Only the ratio is meaningful; the values may be the pixel size.

### Properties

- `height` (integer, required)
  - Constraints: minimum: 1
- `width` (integer, required)
  - Constraints: minimum: 1

## #image (`so.indx.defs#image`)

Type: object

An image stored as a blob in the author's account.

### Properties

- `alt` (string): Description of the image for people who cannot see it.
  - Constraints: maxLength: 10000, maxGraphemes: 1000
- `aspectRatio` (ref)
  - Reference: `#aspectRatio`
- `image` (blob, required)
  - Constraints: maxSize: 2000000, accept: image/jpeg, image/png, image/webp

## #location (`so.indx.defs#location`)

Type: object

A place on Earth as a WGS 84 coordinate. Field names match community.lexicon.location.geo.

### Properties

- `address` (string): Address as one line of text, in the form the author wants it shown.
  - Constraints: maxLength: 5000, maxGraphemes: 500
- `latitude` (string, required): Decimal degrees between -90 and 90, as a string because records cannot hold fractional numbers. Example: "52.521666".
  - Constraints: maxLength: 32
- `longitude` (string, required): Decimal degrees between -180 and 180, as a string. Example: "13.413191".
  - Constraints: maxLength: 32
- `name` (string): Name of the place, such as a venue or landmark.
  - Constraints: maxLength: 3000, maxGraphemes: 300

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "description": "Width and height of an image, used to reserve its space before it loads. Only the ratio is meaningful; the values may be the pixel size.",
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "image": {
      "description": "An image stored as a blob in the author's account.",
      "properties": {
        "alt": {
          "description": "Description of the image for people who cannot see it.",
          "maxGraphemes": 1000,
          "maxLength": 10000,
          "type": "string"
        },
        "aspectRatio": {
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "image": {
          "accept": [
            "image/jpeg",
            "image/png",
            "image/webp"
          ],
          "maxSize": 2000000,
          "type": "blob"
        }
      },
      "required": [
        "image"
      ],
      "type": "object"
    },
    "location": {
      "description": "A place on Earth as a WGS 84 coordinate. Field names match community.lexicon.location.geo.",
      "properties": {
        "address": {
          "description": "Address as one line of text, in the form the author wants it shown.",
          "maxGraphemes": 500,
          "maxLength": 5000,
          "type": "string"
        },
        "latitude": {
          "description": "Decimal degrees between -90 and 90, as a string because records cannot hold fractional numbers. Example: \"52.521666\".",
          "maxLength": 32,
          "type": "string"
        },
        "longitude": {
          "description": "Decimal degrees between -180 and 180, as a string. Example: \"13.413191\".",
          "maxLength": 32,
          "type": "string"
        },
        "name": {
          "description": "Name of the place, such as a venue or landmark.",
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object"
    }
  },
  "description": "Shared definitions for Indx records.",
  "id": "so.indx.defs",
  "lexicon": 1
}
```
