# app.prismaliser.schema

> Published by [ovyerus.com](https://lexicon.garden/identity/did:plc:jrrhosrfzgjf6v4oydav6ftb)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:jrrhosrfzgjf6v4oydav6ftb/app.prismaliser.schema)
- [Documentation](https://lexicon.garden/lexicon/did:plc:jrrhosrfzgjf6v4oydav6ftb/app.prismaliser.schema/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:jrrhosrfzgjf6v4oydav6ftb/app.prismaliser.schema/examples)

## Definitions

### `app.prismaliser.schema`

**Type**: `record`

A Prismaliser Prisma schema and graph layout snapshot.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No | An optional name for the shared diagram. |
| `schema` | `blob` | Yes | The Prisma schema text used to render the diagram. |
| `createdAt` | `string` (datetime) | Yes | The time at which this snapshot was created. |
| `positions` | `array` | Yes | The saved positions of the diagram's nodes. |
| `prismaVersion` | `string` | Yes | The Prisma version used to parse the schema. |

### `app.prismaliser.schema#position`

**Type**: `object`

The saved canvas position of one diagram node.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `x` | `integer` | Yes | The horizontal node position in canvas coordinates. |
| `y` | `integer` | Yes | The vertical node position in canvas coordinates. |
| `id` | `string` | Yes | The identifier of the diagram node. |

## Raw Schema

```json
{
  "id": "app.prismaliser.schema",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "schema",
          "positions",
          "prismaVersion",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 160,
            "description": "An optional name for the shared diagram.",
            "maxGraphemes": 80
          },
          "schema": {
            "type": "blob",
            "accept": [
              "text/plain"
            ],
            "maxSize": 500000,
            "description": "The Prisma schema text used to render the diagram."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "The time at which this snapshot was created."
          },
          "positions": {
            "type": "array",
            "items": {
              "ref": "#position",
              "type": "ref"
            },
            "maxLength": 5000,
            "description": "The saved positions of the diagram's nodes."
          },
          "prismaVersion": {
            "type": "string",
            "maxLength": 64,
            "description": "The Prisma version used to parse the schema."
          }
        }
      },
      "description": "A Prismaliser Prisma schema and graph layout snapshot."
    },
    "position": {
      "type": "object",
      "required": [
        "id",
        "x",
        "y"
      ],
      "properties": {
        "x": {
          "type": "integer",
          "maximum": 10000000,
          "minimum": -10000000,
          "description": "The horizontal node position in canvas coordinates."
        },
        "y": {
          "type": "integer",
          "maximum": 10000000,
          "minimum": -10000000,
          "description": "The vertical node position in canvas coordinates."
        },
        "id": {
          "type": "string",
          "maxLength": 512,
          "description": "The identifier of the diagram node."
        }
      },
      "description": "The saved canvas position of one diagram node."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
