codebaseLexicon

tcmts.records.codebaseLexicon · #6gl2lfal · term · runs anywhere

The codes.tcm.codebase lexicon.

import { CODEBASE_COLLECTION } from "#codebase/tcmts/records";

export const codebaseLexicon = {
  lexicon: 1,
  id: CODEBASE_COLLECTION,
  description:
    "A tcm codebase, listed on the AT Protocol by its author so others can find and browse it.",
  defs: {
    main: {
      type: "record",
      description:
        "A codebase its author lists: the tcm server it's served from, readable by anyone. It has no versions: its server has its history. Its key is its name, so a name is one codebase of theirs.",
      key: "any",
      record: {
        type: "object",
        required: ["name", "url", "createdAt"],
        properties: {
          name: {
            type: "string",
            minLength: 1,
            maxLength: 64,
            description: "Its name: letters, digits, '.', '_' and '-' (the record's key).",
          },
          url: {
            type: "string",
            format: "uri",
            maxLength: 2048,
            description: "The tcm server it's at (http or https), as `tcm serve` serves it.",
          },
          description: {
            type: "string",
            maxLength: 3000,
            maxGraphemes: 300,
            description: "What it is, in a line or two.",
          },
          createdAt: {
            type: "string",
            format: "datetime",
            description: "When it was listed.",
          },
        },
      },
    },
  },
} as const

uses

used by