dev.blinkers.lens

blinkers.dev

Documentation

Lets holders of a blinkers key read, change and optionally create selected records in this repo.

main record

Lets holders of a blinkers key read, change and optionally create selected records in this repo.

Record Key any Any valid record key

Properties

allow array of string Optional

add lets keys create new records.

collection string nsid Required

The collection this lens covers, in this lens's repo.

condition string Optional

CEL expression. The lens only covers records for which it is true.

createdAt string datetime Optional

An RFC 3339 formatted timestamp.

fields array of ref #field Required

The top-level fields of the blink.

newRecord unknown Optional

The object new records start from. Strings wrapped in {% %} are CEL expressions.

rkey string Required

A record key, or a pattern where * stands for one or more characters, e.g. byjp.*

maxLength: 512 bytes
View raw schema
{
  "description": "Lets holders of a blinkers key read, change and optionally create selected records in this repo.",
  "key": "any",
  "record": {
    "properties": {
      "allow": {
        "description": "add lets keys create new records.",
        "items": {
          "knownValues": [
            "add"
          ],
          "type": "string"
        },
        "type": "array"
      },
      "collection": {
        "description": "The collection this lens covers, in this lens's repo.",
        "format": "nsid",
        "type": "string"
      },
      "condition": {
        "description": "CEL expression. The lens only covers records for which it is true.",
        "type": "string"
      },
      "createdAt": {
        "format": "datetime",
        "type": "string"
      },
      "fields": {
        "description": "The top-level fields of the blink.",
        "items": {
          "ref": "#field",
          "type": "ref"
        },
        "type": "array"
      },
      "newRecord": {
        "description": "The object new records start from. Strings wrapped in {% %} are CEL expressions.",
        "type": "unknown"
      },
      "rkey": {
        "description": "A record key, or a pattern where * stands for one or more characters, e.g. byjp.*",
        "maxLength": 512,
        "type": "string"
      }
    },
    "required": [
      "collection",
      "rkey",
      "fields"
    ],
    "type": "object"
  },
  "type": "record"
}
each object

With items: how each item appears in the blink. Set path for a bare value or fields for an object. Paths are relative to the item. Leave each out to show the whole item.

Properties

allow array of string Optional

No description available.

fields array of ref#field Optional

No description available.

path string Optional

No description available.

View raw schema
{
  "description": "With items: how each item appears in the blink. Set path for a bare value or fields for an object. Paths are relative to the item. Leave each out to show the whole item.",
  "properties": {
    "allow": {
      "items": {
        "knownValues": [
          "add",
          "remove",
          "replace"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "fields": {
      "items": {
        "ref": "#field",
        "type": "ref"
      },
      "type": "array"
    },
    "path": {
      "type": "string"
    }
  },
  "type": "object"
}
field object

One field of the blink. Set exactly one of path, items or fields.

Properties

allow array of string Optional

Changes callers may make. Leave it out to make the field read-only.

each ref #each Optional

No description available.

fields array of ref#field Optional

Child fields; the blink shows an object.

items string Optional

JSONPath (RFC 9535) selecting list items: a singular query followed by one filter or wildcard selector.

key string Required

The field's name in the blink.

newItem unknown Optional

With items: the object new items start from, before posted values are filled in. Strings wrapped in {% %} are CEL expressions.

path string Optional

JSONPath (RFC 9535) selecting at most one value in the record.

View raw schema
{
  "description": "One field of the blink. Set exactly one of path, items or fields.",
  "properties": {
    "allow": {
      "description": "Changes callers may make. Leave it out to make the field read-only.",
      "items": {
        "knownValues": [
          "add",
          "remove",
          "replace"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "each": {
      "ref": "#each",
      "type": "ref"
    },
    "fields": {
      "description": "Child fields; the blink shows an object.",
      "items": {
        "ref": "#field",
        "type": "ref"
      },
      "type": "array"
    },
    "items": {
      "description": "JSONPath (RFC 9535) selecting list items: a singular query followed by one filter or wildcard selector.",
      "type": "string"
    },
    "key": {
      "description": "The field's name in the blink.",
      "type": "string"
    },
    "newItem": {
      "description": "With items: the object new items start from, before posted values are filled in. Strings wrapped in {% %} are CEL expressions.",
      "type": "unknown"
    },
    "path": {
      "description": "JSONPath (RFC 9535) selecting at most one value in the record.",
      "type": "string"
    }
  },
  "required": [
    "key"
  ],
  "type": "object"
}

Lexicon Garden

@