{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "organization": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "project": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "pattern": "^[a-zA-Z0-9_-]+$"
      },
      "environment": {
        "type": "string",
        "enum": ["test", "live"]
      },
      "id": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      },
      "name": {
        "type": "string"
      },
      "origin": {
        "type": "string"
      },
      "expiresAt": {
        "type": "number"
      },
      "secrets": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "hint": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "number"
            },
            "expiresAt": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "lastUsedAt": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": ["id", "hint", "createdAt", "expiresAt", "lastUsedAt"]
        }
      },
      "lastUsedAt": {
        "default": null,
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "null"
          }
        ]
      },
      "identityKind": {
        "default": null,
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          {
            "type": "null"
          }
        ]
      },
      "vouchesAccounts": {
        "default": false,
        "type": "boolean"
      }
    },
    "required": [
      "organization",
      "project",
      "environment",
      "id",
      "name",
      "origin",
      "expiresAt",
      "secrets",
      "lastUsedAt",
      "identityKind",
      "vouchesAccounts"
    ]
  }
}
