sew-proto 0.11.6

Sew wire contracts: ids, addresses, errors, HTTP and gateway bodies, permissions, policies, audit.
Documentation
{
  "$defs": {
    "ProfileFieldKind": {
      "description": "A custom field's value kind.",
      "oneOf": [
        {
          "const": "text",
          "description": "Free text (1–500 characters).",
          "type": "string"
        },
        {
          "const": "url",
          "description": "An `http(s)` URL.",
          "type": "string"
        },
        {
          "const": "select",
          "description": "One of the field's options.",
          "type": "string"
        },
        {
          "const": "date",
          "description": "`YYYY-MM-DD`.",
          "type": "string"
        }
      ]
    },
    "ProfileFieldManagedBy": {
      "description": "Who writes a custom field.",
      "oneOf": [
        {
          "const": "member",
          "description": "The member.",
          "type": "string"
        },
        {
          "const": "provider",
          "description": "The identity provider (mgmt only).",
          "type": "string"
        }
      ]
    },
    "ProfileFieldVisibility": {
      "description": "Who sees a custom field.",
      "oneOf": [
        {
          "const": "everyone",
          "description": "Everyone who can see the member, guests included.",
          "type": "string"
        },
        {
          "const": "non_guests",
          "description": "Everyone but guests.",
          "type": "string"
        },
        {
          "const": "admins",
          "description": "Install owner and admins, and the member themself.",
          "type": "string"
        }
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Body of `POST /api/v1/install/profile-fields`.",
  "properties": {
    "key": {
      "description": "`[a-z][a-z0-9_]{0,39}`.",
      "type": "string"
    },
    "kind": {
      "$ref": "#/$defs/ProfileFieldKind",
      "description": "Value kind."
    },
    "label": {
      "description": "Label, 1–60 characters.",
      "type": "string"
    },
    "managed_by": {
      "$ref": "#/$defs/ProfileFieldManagedBy",
      "description": "Who writes it."
    },
    "options": {
      "description": "`select` only: 1–50 options of 1–100 characters.",
      "items": {
        "type": "string"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "position": {
      "description": "Display order (default: last).",
      "format": "uint32",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "visibility": {
      "$ref": "#/$defs/ProfileFieldVisibility",
      "description": "Who sees it."
    }
  },
  "required": [
    "key",
    "label",
    "kind",
    "managed_by",
    "visibility"
  ],
  "title": "CreateProfileFieldRequest",
  "type": "object"
}