{
  "openapi": "3.0.3",
  "paths": {
    "/types/{typeId}/actions": {
      "get": {
        "tags": [
          "Actions"
        ],
        "summary": "List actions for type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Actions"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or actions not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Actions"
        ],
        "summary": "Create an action",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "hidden": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/actions/{id}": {
      "get": {
        "tags": [
          "Actions"
        ],
        "summary": "Get action by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or action not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Actions"
        ],
        "summary": "Update action by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "hidden": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Actions"
        ],
        "summary": "Delete action by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Action deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Action not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List triggers for type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Triggers"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-insert": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List pre-insert triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a pre-insert trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-insert": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List post-insert triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a post-insert trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-update": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List pre-update triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a pre-update trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-update": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List post-update triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a post-update trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-delete": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List pre-delete triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a pre-delete trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-delete": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "List post-delete triggers",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "send-to-agent"
                                  },
                                  "agentId": {
                                    "type": "string",
                                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action",
                                  "agentId"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "type": {
                                    "type": "string",
                                    "const": "system"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "action": {
                                    "type": "string",
                                    "const": "echo"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type",
                                  "name",
                                  "action"
                                ],
                                "additionalProperties": false
                              }
                            ],
                            "type": "object"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "custom"
                              },
                              "ruleSet": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "functions": {
                                    "type": "object",
                                    "propertyNames": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "additionalProperties": {
                                      "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)$"
                                        },
                                        "params": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          }
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "params",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "rules": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "block": {
                                          "$ref": "#/components/schemas/__schema0"
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "block"
                                      ],
                                      "additionalProperties": false
                                    }
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "rules"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "ruleSet"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      {
                        "type": "object",
                        "properties": {
                          "disabled": {
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Triggers"
        ],
        "summary": "Create a post-delete trigger on type",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-insert/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get pre-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update pre-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete pre-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-insert/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get post-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update post-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete post-insert trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-update/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get pre-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update pre-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete pre-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-update/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get post-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update post-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete post-update trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/pre-delete/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get pre-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update pre-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete pre-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/triggers/post-delete/{id}": {
      "get": {
        "tags": [
          "Triggers"
        ],
        "summary": "Get post-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Triggers"
        ],
        "summary": "Update post-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "send-to-agent"
                              },
                              "agentId": {
                                "type": "string",
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action",
                              "agentId"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string",
                                "const": "system"
                              },
                              "name": {
                                "type": "string"
                              },
                              "description": {
                                "type": "string"
                              },
                              "action": {
                                "type": "string",
                                "const": "echo"
                              }
                            },
                            "required": [
                              "id",
                              "type",
                              "name",
                              "action"
                            ],
                            "additionalProperties": false
                          }
                        ],
                        "type": "object"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "const": "custom"
                          },
                          "ruleSet": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "id",
                          "type",
                          "ruleSet"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "disabled": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Triggers"
        ],
        "summary": "Delete post-delete trigger by id",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerRef"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or trigger not found",
            "content": {}
          }
        }
      }
    },
    "/types": {
      "get": {
        "tags": [
          "Types"
        ],
        "summary": "List types",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Type"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid search provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Types"
        ],
        "summary": "Create a type",
        "parameters": [
          {
            "name": "skipRelationValidation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "_metaData": {
                        "type": "object",
                        "properties": {
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "system",
                          "custom"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "pluralName": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "schemaVersion": {
                        "type": "string"
                      },
                      "schema": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "relations": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "typeRef": {
                                      "type": "string"
                                    },
                                    "localField": {
                                      "type": "string"
                                    },
                                    "displayField": {
                                      "type": "string"
                                    },
                                    "searchBy": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "field",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "typeRef",
                                    "localField",
                                    "displayField"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "primaryKey": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primaryKey"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "display": {
                        "type": "string",
                        "enum": [
                          "default",
                          "pinned",
                          "setting",
                          "component",
                          "security"
                        ]
                      },
                      "defaultListStyle": {
                        "type": "string",
                        "enum": [
                          "table",
                          "card"
                        ]
                      },
                      "uiSchemas": {
                        "type": "object",
                        "properties": {
                          "createStyle": {},
                          "updateStyle": {},
                          "readStyle": {},
                          "systemStyle": {},
                          "duplicateStyle": {},
                          "listStyle": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "right",
                                        "center"
                                      ]
                                    },
                                    "width": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "flex": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "additionalProperties": {}
                                }
                              },
                              "order": {
                                "type": "object",
                                "properties": {
                                  "orderBy": {
                                    "type": "string"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ]
                                  }
                                },
                                "required": [
                                  "orderBy",
                                  "direction"
                                ],
                                "additionalProperties": false
                              },
                              "pagination": {
                                "type": "object",
                                "properties": {
                                  "totalCount": {
                                    "type": "string",
                                    "enum": [
                                      "include",
                                      "exclude"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "relatedStyle": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "path": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "align": {
                                        "type": "string",
                                        "enum": [
                                          "left",
                                          "right",
                                          "center"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "number",
                                          "string"
                                        ]
                                      },
                                      "flex": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "order": {
                                  "type": "object",
                                  "properties": {
                                    "orderBy": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "orderBy",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                },
                                "pagination": {
                                  "type": "object",
                                  "properties": {
                                    "totalCount": {
                                      "type": "string",
                                      "enum": [
                                        "include",
                                        "exclude"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "typeId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "typeId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "triggers": {
                        "type": "object",
                        "properties": {
                          "preInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "preInsert",
                          "postInsert",
                          "preUpdate",
                          "postUpdate",
                          "preDelete",
                          "postDelete"
                        ],
                        "additionalProperties": false
                      },
                      "actions": {
                        "type": "array",
                        "items": {
                          "allOf": [
                            {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "send-to-agent"
                                        },
                                        "agentId": {
                                          "type": "string",
                                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action",
                                        "agentId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "echo"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "ruleSet": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "functions": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "additionalProperties": {
                                            "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)$"
                                              },
                                              "params": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "params",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "rules": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "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)$"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "id",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "rules"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "ruleSet"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "hidden": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "objectType": {
                        "type": "string",
                        "const": "internal"
                      },
                      "features": {
                        "type": "object",
                        "properties": {
                          "auditTrail": {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "retentionPeriod": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "additionalProperties": false
                          },
                          "version": {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "auditTrail",
                          "version"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "schema",
                      "display",
                      "defaultListStyle",
                      "objectType"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "_metaData": {
                        "type": "object",
                        "properties": {
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "additionalProperties": false
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "system",
                          "custom"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "pluralName": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "schemaVersion": {
                        "type": "string"
                      },
                      "schema": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "relations": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "typeRef": {
                                      "type": "string"
                                    },
                                    "localField": {
                                      "type": "string"
                                    },
                                    "displayField": {
                                      "type": "string"
                                    },
                                    "searchBy": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "field",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "typeRef",
                                    "localField",
                                    "displayField"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "primaryKey": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primaryKey"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "display": {
                        "type": "string",
                        "enum": [
                          "default",
                          "pinned",
                          "setting",
                          "component",
                          "security"
                        ]
                      },
                      "defaultListStyle": {
                        "type": "string",
                        "enum": [
                          "table",
                          "card"
                        ]
                      },
                      "uiSchemas": {
                        "type": "object",
                        "properties": {
                          "createStyle": {},
                          "updateStyle": {},
                          "readStyle": {},
                          "systemStyle": {},
                          "duplicateStyle": {},
                          "listStyle": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "right",
                                        "center"
                                      ]
                                    },
                                    "width": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "flex": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "additionalProperties": {}
                                }
                              },
                              "order": {
                                "type": "object",
                                "properties": {
                                  "orderBy": {
                                    "type": "string"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ]
                                  }
                                },
                                "required": [
                                  "orderBy",
                                  "direction"
                                ],
                                "additionalProperties": false
                              },
                              "pagination": {
                                "type": "object",
                                "properties": {
                                  "totalCount": {
                                    "type": "string",
                                    "enum": [
                                      "include",
                                      "exclude"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "relatedStyle": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "path": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "align": {
                                        "type": "string",
                                        "enum": [
                                          "left",
                                          "right",
                                          "center"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "number",
                                          "string"
                                        ]
                                      },
                                      "flex": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "order": {
                                  "type": "object",
                                  "properties": {
                                    "orderBy": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "orderBy",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                },
                                "pagination": {
                                  "type": "object",
                                  "properties": {
                                    "totalCount": {
                                      "type": "string",
                                      "enum": [
                                        "include",
                                        "exclude"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "typeId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "typeId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "triggers": {
                        "type": "object",
                        "properties": {
                          "preInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "preInsert",
                          "postInsert",
                          "preUpdate",
                          "postUpdate",
                          "preDelete",
                          "postDelete"
                        ],
                        "additionalProperties": false
                      },
                      "actions": {
                        "type": "array",
                        "items": {
                          "allOf": [
                            {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "send-to-agent"
                                        },
                                        "agentId": {
                                          "type": "string",
                                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action",
                                        "agentId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "echo"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "ruleSet": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "functions": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "additionalProperties": {
                                            "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)$"
                                              },
                                              "params": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "params",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "rules": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "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)$"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "id",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "rules"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "ruleSet"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "hidden": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "objectType": {
                        "type": "string",
                        "const": "external"
                      },
                      "features": {
                        "type": "object",
                        "properties": {
                          "create": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "update": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "read": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "list": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "delete": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "duplicate": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "schema",
                      "display",
                      "defaultListStyle",
                      "objectType",
                      "features"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/[\\$]page/types": {
      "post": {
        "tags": [
          "Types"
        ],
        "summary": "Page types",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Type"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid search provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/types/{typeId}": {
      "get": {
        "tags": [
          "Types"
        ],
        "summary": "Get type by id",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Types"
        ],
        "summary": "Update type by id",
        "parameters": [
          {
            "name": "skipRelationValidation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "system",
                          "custom"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "pluralName": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "schemaVersion": {
                        "type": "string"
                      },
                      "schema": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "relations": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "typeRef": {
                                      "type": "string"
                                    },
                                    "localField": {
                                      "type": "string"
                                    },
                                    "displayField": {
                                      "type": "string"
                                    },
                                    "searchBy": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "field",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "typeRef",
                                    "localField",
                                    "displayField"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "primaryKey": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primaryKey"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "display": {
                        "type": "string",
                        "enum": [
                          "default",
                          "pinned",
                          "setting",
                          "component",
                          "security"
                        ]
                      },
                      "defaultListStyle": {
                        "type": "string",
                        "enum": [
                          "table",
                          "card"
                        ]
                      },
                      "uiSchemas": {
                        "type": "object",
                        "properties": {
                          "createStyle": {},
                          "updateStyle": {},
                          "readStyle": {},
                          "systemStyle": {},
                          "duplicateStyle": {},
                          "listStyle": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "right",
                                        "center"
                                      ]
                                    },
                                    "width": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "flex": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "additionalProperties": {}
                                }
                              },
                              "order": {
                                "type": "object",
                                "properties": {
                                  "orderBy": {
                                    "type": "string"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ]
                                  }
                                },
                                "required": [
                                  "orderBy",
                                  "direction"
                                ],
                                "additionalProperties": false
                              },
                              "pagination": {
                                "type": "object",
                                "properties": {
                                  "totalCount": {
                                    "type": "string",
                                    "enum": [
                                      "include",
                                      "exclude"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "relatedStyle": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "path": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "align": {
                                        "type": "string",
                                        "enum": [
                                          "left",
                                          "right",
                                          "center"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "number",
                                          "string"
                                        ]
                                      },
                                      "flex": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "order": {
                                  "type": "object",
                                  "properties": {
                                    "orderBy": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "orderBy",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                },
                                "pagination": {
                                  "type": "object",
                                  "properties": {
                                    "totalCount": {
                                      "type": "string",
                                      "enum": [
                                        "include",
                                        "exclude"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "typeId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "typeId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "triggers": {
                        "type": "object",
                        "properties": {
                          "preInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "preInsert",
                          "postInsert",
                          "preUpdate",
                          "postUpdate",
                          "preDelete",
                          "postDelete"
                        ],
                        "additionalProperties": false
                      },
                      "actions": {
                        "type": "array",
                        "items": {
                          "allOf": [
                            {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "send-to-agent"
                                        },
                                        "agentId": {
                                          "type": "string",
                                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action",
                                        "agentId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "echo"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "ruleSet": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "functions": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "additionalProperties": {
                                            "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)$"
                                              },
                                              "params": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "params",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "rules": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "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)$"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "id",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "rules"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "ruleSet"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "hidden": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "objectType": {
                        "type": "string",
                        "const": "internal"
                      },
                      "features": {
                        "type": "object",
                        "properties": {
                          "auditTrail": {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "retentionPeriod": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "additionalProperties": false
                          },
                          "version": {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "limit": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "auditTrail",
                          "version"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "schema",
                      "display",
                      "defaultListStyle",
                      "objectType"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "system",
                          "custom"
                        ]
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "pluralName": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "schemaVersion": {
                        "type": "string"
                      },
                      "schema": {
                        "allOf": [
                          {
                            "type": "object",
                            "properties": {
                              "relations": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "object",
                                  "properties": {
                                    "typeRef": {
                                      "type": "string"
                                    },
                                    "localField": {
                                      "type": "string"
                                    },
                                    "displayField": {
                                      "type": "string"
                                    },
                                    "searchBy": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "field": {
                                            "type": "string"
                                          },
                                          "label": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "field",
                                          "label"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "typeRef",
                                    "localField",
                                    "displayField"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "primaryKey": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "primaryKey"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {}
                          }
                        ]
                      },
                      "display": {
                        "type": "string",
                        "enum": [
                          "default",
                          "pinned",
                          "setting",
                          "component",
                          "security"
                        ]
                      },
                      "defaultListStyle": {
                        "type": "string",
                        "enum": [
                          "table",
                          "card"
                        ]
                      },
                      "uiSchemas": {
                        "type": "object",
                        "properties": {
                          "createStyle": {},
                          "updateStyle": {},
                          "readStyle": {},
                          "systemStyle": {},
                          "duplicateStyle": {},
                          "listStyle": {
                            "type": "object",
                            "properties": {
                              "columns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "path": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "align": {
                                      "type": "string",
                                      "enum": [
                                        "left",
                                        "right",
                                        "center"
                                      ]
                                    },
                                    "width": {
                                      "type": [
                                        "number",
                                        "string"
                                      ]
                                    },
                                    "flex": {
                                      "type": "number"
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "additionalProperties": {}
                                }
                              },
                              "order": {
                                "type": "object",
                                "properties": {
                                  "orderBy": {
                                    "type": "string"
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "asc",
                                      "desc"
                                    ]
                                  }
                                },
                                "required": [
                                  "orderBy",
                                  "direction"
                                ],
                                "additionalProperties": false
                              },
                              "pagination": {
                                "type": "object",
                                "properties": {
                                  "totalCount": {
                                    "type": "string",
                                    "enum": [
                                      "include",
                                      "exclude"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          },
                          "relatedStyle": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "columns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "path": {
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      },
                                      "align": {
                                        "type": "string",
                                        "enum": [
                                          "left",
                                          "right",
                                          "center"
                                        ]
                                      },
                                      "width": {
                                        "type": [
                                          "number",
                                          "string"
                                        ]
                                      },
                                      "flex": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ],
                                    "additionalProperties": {}
                                  }
                                },
                                "order": {
                                  "type": "object",
                                  "properties": {
                                    "orderBy": {
                                      "type": "string"
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "asc",
                                        "desc"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "orderBy",
                                    "direction"
                                  ],
                                  "additionalProperties": false
                                },
                                "pagination": {
                                  "type": "object",
                                  "properties": {
                                    "totalCount": {
                                      "type": "string",
                                      "enum": [
                                        "include",
                                        "exclude"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "typeId": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "typeId"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "triggers": {
                        "type": "object",
                        "properties": {
                          "preInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postInsert": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postUpdate": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "preDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "postDelete": {
                            "type": "array",
                            "items": {
                              "allOf": [
                                {
                                  "anyOf": [
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "send-to-agent"
                                            },
                                            "agentId": {
                                              "type": "string",
                                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action",
                                            "agentId"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "type": {
                                              "type": "string",
                                              "const": "system"
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "action": {
                                              "type": "string",
                                              "const": "echo"
                                            }
                                          },
                                          "required": [
                                            "id",
                                            "type",
                                            "name",
                                            "action"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "custom"
                                        },
                                        "ruleSet": {
                                          "type": "object",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "minLength": 1
                                            },
                                            "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)$"
                                            },
                                            "description": {
                                              "type": "string"
                                            },
                                            "functions": {
                                              "type": "object",
                                              "propertyNames": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "additionalProperties": {
                                                "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)$"
                                                  },
                                                  "params": {
                                                    "type": "array",
                                                    "items": {
                                                      "type": "string"
                                                    }
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "id",
                                                  "params",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            },
                                            "rules": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "properties": {
                                                  "name": {
                                                    "type": "string",
                                                    "minLength": 1
                                                  },
                                                  "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)$"
                                                  },
                                                  "description": {
                                                    "type": "string"
                                                  },
                                                  "block": {
                                                    "$ref": "#/components/schemas/__schema0"
                                                  }
                                                },
                                                "required": [
                                                  "name",
                                                  "id",
                                                  "block"
                                                ],
                                                "additionalProperties": false
                                              }
                                            }
                                          },
                                          "required": [
                                            "name",
                                            "id",
                                            "rules"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "ruleSet"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ]
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "disabled": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "preInsert",
                          "postInsert",
                          "preUpdate",
                          "postUpdate",
                          "preDelete",
                          "postDelete"
                        ],
                        "additionalProperties": false
                      },
                      "actions": {
                        "type": "array",
                        "items": {
                          "allOf": [
                            {
                              "anyOf": [
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "send-to-agent"
                                        },
                                        "agentId": {
                                          "type": "string",
                                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action",
                                        "agentId"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "type": {
                                          "type": "string",
                                          "const": "system"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "action": {
                                          "type": "string",
                                          "const": "echo"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "type",
                                        "name",
                                        "action"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "custom"
                                    },
                                    "ruleSet": {
                                      "type": "object",
                                      "properties": {
                                        "name": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "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)$"
                                        },
                                        "description": {
                                          "type": "string"
                                        },
                                        "functions": {
                                          "type": "object",
                                          "propertyNames": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "additionalProperties": {
                                            "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)$"
                                              },
                                              "params": {
                                                "type": "array",
                                                "items": {
                                                  "type": "string"
                                                }
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "id",
                                              "params",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "rules": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "name": {
                                                "type": "string",
                                                "minLength": 1
                                              },
                                              "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)$"
                                              },
                                              "description": {
                                                "type": "string"
                                              },
                                              "block": {
                                                "$ref": "#/components/schemas/__schema0"
                                              }
                                            },
                                            "required": [
                                              "name",
                                              "id",
                                              "block"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "name",
                                        "id",
                                        "rules"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "ruleSet"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "hidden": {
                                  "type": "boolean"
                                }
                              },
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "objectType": {
                        "type": "string",
                        "const": "external"
                      },
                      "features": {
                        "type": "object",
                        "properties": {
                          "create": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "update": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "read": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "list": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "delete": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          },
                          "duplicate": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "functions": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "additionalProperties": {
                                  "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)$"
                                    },
                                    "params": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "params",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "rules": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "block": {
                                      "$ref": "#/components/schemas/__schema0"
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "block"
                                  ],
                                  "additionalProperties": false
                                }
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "rules"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "schema",
                      "display",
                      "defaultListStyle",
                      "objectType",
                      "features"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "patch": {
        "tags": [
          "Types"
        ],
        "summary": "Patch type by id",
        "parameters": [
          {
            "name": "skipRelationValidation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "op": {
                          "type": "string",
                          "const": "add"
                        }
                      },
                      "required": [
                        "path",
                        "value",
                        "op"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "op": {
                          "type": "string",
                          "const": "set"
                        }
                      },
                      "required": [
                        "path",
                        "value",
                        "op"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "op": {
                          "type": "string",
                          "const": "replace"
                        }
                      },
                      "required": [
                        "path",
                        "value",
                        "op"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "op": {
                          "type": "string",
                          "const": "incr"
                        }
                      },
                      "required": [
                        "path",
                        "value",
                        "op"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {}
                            },
                            {
                              "type": "array",
                              "items": {}
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "op": {
                          "type": "string",
                          "const": "increment"
                        }
                      },
                      "required": [
                        "path",
                        "value",
                        "op"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "op": {
                          "type": "string",
                          "const": "remove"
                        },
                        "path": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "op",
                        "path"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "type": "object"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Types"
        ],
        "summary": "Delete type by id",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Type deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/reindex": {
      "put": {
        "tags": [
          "Types"
        ],
        "summary": "Reindex type by id",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    },
    "/types/{typeId}/instances": {
      "delete": {
        "tags": [
          "Types"
        ],
        "summary": "Delete all instances of type by id",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Instances deleted successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    },
    "/[\\$]versions/types/{typeId}": {
      "get": {
        "tags": [
          "Types"
        ],
        "summary": "List type versions",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "pageToken",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Type"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid search provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Types"
        ],
        "summary": "Rollback type to version",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-if-hash-match",
            "in": "header",
            "required": false
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "doNotBump": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "version"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid payload provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type or version not found",
            "content": {}
          }
        }
      }
    },
    "/[\\$]versions/[\\$]page/types/{typeId}": {
      "post": {
        "tags": [
          "Types"
        ],
        "summary": "Page type versions",
        "parameters": [
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Type"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "Invalid search provided": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/[\\$]versions/types/{typeId}/{version}": {
      "get": {
        "tags": [
          "Types"
        ],
        "summary": "Get type by id",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "typeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
            }
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Type"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Type not found",
            "content": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "components": {
    "schemas": {
      "$ListQuery": {
        "type": "object",
        "properties": {
          "pageToken": {
            "type": "string",
            "minLength": 1
          },
          "orderBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "includeTotal": {
            "type": "boolean"
          },
          "filterMode": {
            "anyOf": [
              {
                "type": "string",
                "const": "AND"
              },
              {
                "type": "string",
                "const": "OR"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "Actions": {
        "type": "array",
        "items": {
          "allOf": [
            {
              "anyOf": [
                {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "system"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string",
                          "const": "send-to-agent"
                        },
                        "agentId": {
                          "type": "string",
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "name",
                        "action",
                        "agentId"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "system"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "action": {
                          "type": "string",
                          "const": "echo"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "name",
                        "action"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "type": "object"
                },
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "const": "custom"
                    },
                    "ruleSet": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1
                        },
                        "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)$"
                        },
                        "description": {
                          "type": "string"
                        },
                        "functions": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1
                          },
                          "additionalProperties": {
                            "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)$"
                              },
                              "params": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "block": {
                                "$ref": "#/components/schemas/__schema0"
                              }
                            },
                            "required": [
                              "id",
                              "params",
                              "block"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "rules": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1
                              },
                              "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)$"
                              },
                              "description": {
                                "type": "string"
                              },
                              "block": {
                                "$ref": "#/components/schemas/__schema0"
                              }
                            },
                            "required": [
                              "name",
                              "id",
                              "block"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "name",
                        "id",
                        "rules"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "type",
                    "ruleSet"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            {
              "type": "object",
              "properties": {
                "hidden": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          ]
        }
      },
      "ActionRef": {
        "allOf": [
          {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "const": "system"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "const": "send-to-agent"
                      },
                      "agentId": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "action",
                      "agentId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "const": "system"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "const": "echo"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "action"
                    ],
                    "additionalProperties": false
                  }
                ],
                "type": "object"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "const": "custom"
                  },
                  "ruleSet": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "type",
                  "ruleSet"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "hidden": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "Triggers": {
        "type": "object",
        "properties": {
          "preInsert": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "postInsert": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "preUpdate": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "postUpdate": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "preDelete": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "postDelete": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "send-to-agent"
                            },
                            "agentId": {
                              "type": "string",
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action",
                            "agentId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "system"
                            },
                            "name": {
                              "type": "string"
                            },
                            "description": {
                              "type": "string"
                            },
                            "action": {
                              "type": "string",
                              "const": "echo"
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "name",
                            "action"
                          ],
                          "additionalProperties": false
                        }
                      ],
                      "type": "object"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "const": "custom"
                        },
                        "ruleSet": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "functions": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string",
                                "minLength": 1
                              },
                              "additionalProperties": {
                                "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)$"
                                  },
                                  "params": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "id",
                                  "params",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "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)$"
                                  },
                                  "description": {
                                    "type": "string"
                                  },
                                  "block": {
                                    "$ref": "#/components/schemas/__schema0"
                                  }
                                },
                                "required": [
                                  "name",
                                  "id",
                                  "block"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "rules"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "ruleSet"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "preInsert",
          "postInsert",
          "preUpdate",
          "postUpdate",
          "preDelete",
          "postDelete"
        ],
        "additionalProperties": false
      },
      "TriggerRef": {
        "allOf": [
          {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "const": "system"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "const": "send-to-agent"
                      },
                      "agentId": {
                        "type": "string",
                        "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "action",
                      "agentId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "const": "system"
                      },
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "action": {
                        "type": "string",
                        "const": "echo"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "name",
                      "action"
                    ],
                    "additionalProperties": false
                  }
                ],
                "type": "object"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "const": "custom"
                  },
                  "ruleSet": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "type",
                  "ruleSet"
                ],
                "additionalProperties": false
              }
            ]
          },
          {
            "type": "object",
            "properties": {
              "disabled": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "Type": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "_metaData": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "system",
                  "custom"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "pluralName": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "schemaVersion": {
                "type": "string"
              },
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "relations": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "typeRef": {
                              "type": "string"
                            },
                            "localField": {
                              "type": "string"
                            },
                            "displayField": {
                              "type": "string"
                            },
                            "searchBy": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field",
                                  "label"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "typeRef",
                            "localField",
                            "displayField"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "primaryKey": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "primaryKey"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                ]
              },
              "display": {
                "type": "string",
                "enum": [
                  "default",
                  "pinned",
                  "setting",
                  "component",
                  "security"
                ]
              },
              "defaultListStyle": {
                "type": "string",
                "enum": [
                  "table",
                  "card"
                ]
              },
              "uiSchemas": {
                "type": "object",
                "properties": {
                  "createStyle": {},
                  "updateStyle": {},
                  "readStyle": {},
                  "systemStyle": {},
                  "duplicateStyle": {},
                  "listStyle": {
                    "type": "object",
                    "properties": {
                      "columns": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "path": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "align": {
                              "type": "string",
                              "enum": [
                                "left",
                                "right",
                                "center"
                              ]
                            },
                            "width": {
                              "type": [
                                "number",
                                "string"
                              ]
                            },
                            "flex": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "additionalProperties": {}
                        }
                      },
                      "order": {
                        "type": "object",
                        "properties": {
                          "orderBy": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "asc",
                              "desc"
                            ]
                          }
                        },
                        "required": [
                          "orderBy",
                          "direction"
                        ],
                        "additionalProperties": false
                      },
                      "pagination": {
                        "type": "object",
                        "properties": {
                          "totalCount": {
                            "type": "string",
                            "enum": [
                              "include",
                              "exclude"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "relatedStyle": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "align": {
                                "type": "string",
                                "enum": [
                                  "left",
                                  "right",
                                  "center"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "string"
                                ]
                              },
                              "flex": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": {}
                          }
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "orderBy": {
                              "type": "string"
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "asc",
                                "desc"
                              ]
                            }
                          },
                          "required": [
                            "orderBy",
                            "direction"
                          ],
                          "additionalProperties": false
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "totalCount": {
                              "type": "string",
                              "enum": [
                                "include",
                                "exclude"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "typeId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "typeId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "triggers": {
                "type": "object",
                "properties": {
                  "preInsert": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postInsert": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "preUpdate": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postUpdate": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "preDelete": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postDelete": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "preInsert",
                  "postInsert",
                  "preUpdate",
                  "postUpdate",
                  "preDelete",
                  "postDelete"
                ],
                "additionalProperties": false
              },
              "actions": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "system"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "string",
                                  "const": "send-to-agent"
                                },
                                "agentId": {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "name",
                                "action",
                                "agentId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "system"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "string",
                                  "const": "echo"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "name",
                                "action"
                              ],
                              "additionalProperties": false
                            }
                          ],
                          "type": "object"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "custom"
                            },
                            "ruleSet": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "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)$"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "functions": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "additionalProperties": {
                                    "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)$"
                                      },
                                      "params": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "block": {
                                        "$ref": "#/components/schemas/__schema0"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "params",
                                      "block"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "rules": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "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)$"
                                      },
                                      "description": {
                                        "type": "string"
                                      },
                                      "block": {
                                        "$ref": "#/components/schemas/__schema0"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "id",
                                      "block"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "id",
                                "rules"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "ruleSet"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "hidden": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "objectType": {
                "type": "string",
                "const": "internal"
              },
              "features": {
                "type": "object",
                "properties": {
                  "auditTrail": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "retentionPeriod": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "additionalProperties": false
                  },
                  "version": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "limit": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "auditTrail",
                  "version"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "_metaData",
              "id",
              "type",
              "name",
              "schema",
              "display",
              "defaultListStyle",
              "objectType"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "_metaData": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "createdAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  },
                  "updatedAt": {
                    "type": "string",
                    "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                    "description": "An ISO 8601 date time string",
                    "format": "date-time"
                  }
                },
                "required": [
                  "id",
                  "createdAt"
                ],
                "additionalProperties": false
              },
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "system",
                  "custom"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "pluralName": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "schemaVersion": {
                "type": "string"
              },
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "relations": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "typeRef": {
                              "type": "string"
                            },
                            "localField": {
                              "type": "string"
                            },
                            "displayField": {
                              "type": "string"
                            },
                            "searchBy": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "field": {
                                    "type": "string"
                                  },
                                  "label": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "field",
                                  "label"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "typeRef",
                            "localField",
                            "displayField"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "primaryKey": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "primaryKey"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  }
                ]
              },
              "display": {
                "type": "string",
                "enum": [
                  "default",
                  "pinned",
                  "setting",
                  "component",
                  "security"
                ]
              },
              "defaultListStyle": {
                "type": "string",
                "enum": [
                  "table",
                  "card"
                ]
              },
              "uiSchemas": {
                "type": "object",
                "properties": {
                  "createStyle": {},
                  "updateStyle": {},
                  "readStyle": {},
                  "systemStyle": {},
                  "duplicateStyle": {},
                  "listStyle": {
                    "type": "object",
                    "properties": {
                      "columns": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "path": {
                              "type": "string"
                            },
                            "label": {
                              "type": "string"
                            },
                            "align": {
                              "type": "string",
                              "enum": [
                                "left",
                                "right",
                                "center"
                              ]
                            },
                            "width": {
                              "type": [
                                "number",
                                "string"
                              ]
                            },
                            "flex": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "additionalProperties": {}
                        }
                      },
                      "order": {
                        "type": "object",
                        "properties": {
                          "orderBy": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string",
                            "enum": [
                              "asc",
                              "desc"
                            ]
                          }
                        },
                        "required": [
                          "orderBy",
                          "direction"
                        ],
                        "additionalProperties": false
                      },
                      "pagination": {
                        "type": "object",
                        "properties": {
                          "totalCount": {
                            "type": "string",
                            "enum": [
                              "include",
                              "exclude"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "relatedStyle": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "columns": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              },
                              "label": {
                                "type": "string"
                              },
                              "align": {
                                "type": "string",
                                "enum": [
                                  "left",
                                  "right",
                                  "center"
                                ]
                              },
                              "width": {
                                "type": [
                                  "number",
                                  "string"
                                ]
                              },
                              "flex": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "additionalProperties": {}
                          }
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "orderBy": {
                              "type": "string"
                            },
                            "direction": {
                              "type": "string",
                              "enum": [
                                "asc",
                                "desc"
                              ]
                            }
                          },
                          "required": [
                            "orderBy",
                            "direction"
                          ],
                          "additionalProperties": false
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "totalCount": {
                              "type": "string",
                              "enum": [
                                "include",
                                "exclude"
                              ]
                            }
                          },
                          "additionalProperties": false
                        },
                        "typeId": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "typeId"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "triggers": {
                "type": "object",
                "properties": {
                  "preInsert": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postInsert": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "preUpdate": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postUpdate": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "preDelete": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "postDelete": {
                    "type": "array",
                    "items": {
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "send-to-agent"
                                    },
                                    "agentId": {
                                      "type": "string",
                                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action",
                                    "agentId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "type": {
                                      "type": "string",
                                      "const": "system"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "action": {
                                      "type": "string",
                                      "const": "echo"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type",
                                    "name",
                                    "action"
                                  ],
                                  "additionalProperties": false
                                }
                              ],
                              "type": "object"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "custom"
                                },
                                "ruleSet": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "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)$"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "functions": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "additionalProperties": {
                                        "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)$"
                                          },
                                          "params": {
                                            "type": "array",
                                            "items": {
                                              "type": "string"
                                            }
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "id",
                                          "params",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "rules": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "minLength": 1
                                          },
                                          "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)$"
                                          },
                                          "description": {
                                            "type": "string"
                                          },
                                          "block": {
                                            "$ref": "#/components/schemas/__schema0"
                                          }
                                        },
                                        "required": [
                                          "name",
                                          "id",
                                          "block"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "name",
                                    "id",
                                    "rules"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "ruleSet"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "disabled": {
                              "type": "boolean"
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "preInsert",
                  "postInsert",
                  "preUpdate",
                  "postUpdate",
                  "preDelete",
                  "postDelete"
                ],
                "additionalProperties": false
              },
              "actions": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "anyOf": [
                        {
                          "oneOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "system"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "string",
                                  "const": "send-to-agent"
                                },
                                "agentId": {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "name",
                                "action",
                                "agentId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "type": {
                                  "type": "string",
                                  "const": "system"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "action": {
                                  "type": "string",
                                  "const": "echo"
                                }
                              },
                              "required": [
                                "id",
                                "type",
                                "name",
                                "action"
                              ],
                              "additionalProperties": false
                            }
                          ],
                          "type": "object"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string",
                              "const": "custom"
                            },
                            "ruleSet": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "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)$"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "functions": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "additionalProperties": {
                                    "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)$"
                                      },
                                      "params": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        }
                                      },
                                      "block": {
                                        "$ref": "#/components/schemas/__schema0"
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "params",
                                      "block"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "rules": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "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)$"
                                      },
                                      "description": {
                                        "type": "string"
                                      },
                                      "block": {
                                        "$ref": "#/components/schemas/__schema0"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "id",
                                      "block"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "name",
                                "id",
                                "rules"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "type",
                            "ruleSet"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "hidden": {
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false
                    }
                  ]
                }
              },
              "objectType": {
                "type": "string",
                "const": "external"
              },
              "features": {
                "type": "object",
                "properties": {
                  "create": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  },
                  "update": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  },
                  "read": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  },
                  "list": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  },
                  "delete": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  },
                  "duplicate": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "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)$"
                      },
                      "description": {
                        "type": "string"
                      },
                      "functions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "minLength": 1
                        },
                        "additionalProperties": {
                          "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)$"
                            },
                            "params": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "id",
                            "params",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "rules": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "name": {
                              "type": "string",
                              "minLength": 1
                            },
                            "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)$"
                            },
                            "description": {
                              "type": "string"
                            },
                            "block": {
                              "$ref": "#/components/schemas/__schema0"
                            }
                          },
                          "required": [
                            "name",
                            "id",
                            "block"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "name",
                      "id",
                      "rules"
                    ],
                    "additionalProperties": false
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "_metaData",
              "id",
              "type",
              "name",
              "schema",
              "display",
              "defaultListStyle",
              "objectType",
              "features"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "title": "Native Object Registry Api",
    "description": " ",
    "version": "1.20.6"
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ]
}
