# sh.diffuse.output.playlistItem

> Published by [tokono.ma](https://lexicon.garden/identity/did:plc:qvgds53otyohus5lfcfjssk2)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qvgds53otyohus5lfcfjssk2/sh.diffuse.output.playlistItem)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qvgds53otyohus5lfcfjssk2/sh.diffuse.output.playlistItem/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qvgds53otyohus5lfcfjssk2/sh.diffuse.output.playlistItem/examples)

## Definitions

### `sh.diffuse.output.playlistItem`

**Type**: `record`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes |  |
| `criteria` | `array` | Yes | Criteria for matching this item against a set of tracks |
| `playlist` | `string` | Yes | The name of the playlist |
| `createdAt` | `string` (datetime) | No |  |
| `ephemeral` | `boolean` | No |  |
| `updatedAt` | `string` (datetime) | No |  |
| `positionedAfter` | `string` | No | Id of the item that this item should be positioned after |

### `sh.diffuse.output.playlistItem#criterion`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `mode` | `string` | No |  |
| `field` | `string` | Yes |  |
| `value` | `unknown` | Yes | Value that should be matched belonging to the given field |
| `amount` | `integer` | No |  |
| `transformations` | `array` | No |  |

### `sh.diffuse.output.playlistItem#transformation`

**Type**: `string`

Transformation to apply to the field value before comparison. This transformation is method to call on the value. For example, `toString`

## Raw Schema

```json
{
  "id": "sh.diffuse.output.playlistItem",
  "defs": {
    "main": {
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "id",
          "criteria",
          "playlist"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "criteria": {
            "type": "array",
            "items": {
              "ref": "#criterion",
              "type": "ref"
            },
            "description": "Criteria for matching this item against a set of tracks"
          },
          "playlist": {
            "type": "string",
            "description": "The name of the playlist"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "ephemeral": {
            "type": "boolean"
          },
          "updatedAt": {
            "type": "string",
            "format": "datetime"
          },
          "positionedAfter": {
            "type": "string",
            "description": "Id of the item that this item should be positioned after"
          }
        }
      }
    },
    "criterion": {
      "type": "object",
      "required": [
        "field",
        "value"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "default": "include",
          "knownValues": [
            "include",
            "exclude"
          ]
        },
        "field": {
          "type": "string"
        },
        "value": {
          "type": "unknown",
          "description": "Value that should be matched belonging to the given field"
        },
        "amount": {
          "type": "integer",
          "minimum": 0
        },
        "transformations": {
          "type": "array",
          "items": {
            "ref": "#transformation",
            "type": "ref"
          }
        }
      }
    },
    "transformation": {
      "type": "string",
      "description": "Transformation to apply to the field value before comparison. This transformation is method to call on the value. For example, `toString`"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
