{
  "meta": {
    "$_GET": [
      {
        "type": "text",
        "name": "sort"
      },
      {
        "type": "text",
        "name": "dir"
      },
      {
        "type": "text",
        "name": "type_id"
      }
    ]
  },
  "exec": {
    "steps": [
      {
        "name": "",
        "module": "auth",
        "action": "restrict",
        "options": {
          "provider": "security",
          "permissions": [
            "Active"
          ]
        }
      },
      {
        "name": "list",
        "module": "dbconnector",
        "action": "select",
        "options": {
          "connection": "db",
          "sql": {
            "type": "SELECT",
            "columns": [
              {
                "table": "collections",
                "column": "name"
              },
              {
                "table": "collections",
                "column": "id"
              }
            ],
            "params": [
              {
                "operator": "equal",
                "type": "expression",
                "name": ":P1",
                "value": "{{$_GET.type_id}}",
                "test": ""
              }
            ],
            "table": {
              "name": "collections"
            },
            "primary": "id",
            "joins": [],
            "wheres": {
              "condition": "AND",
              "rules": [
                {
                  "id": "collections.collectiontype_id",
                  "field": "collections.collectiontype_id",
                  "type": "double",
                  "operator": "equal",
                  "value": "{{$_GET.type_id}}",
                  "data": {
                    "table": "collections",
                    "column": "collectiontype_id",
                    "type": "number",
                    "columnObj": {
                      "type": "reference",
                      "primary": false,
                      "nullable": false,
                      "references": "id",
                      "inTable": "collection_type",
                      "referenceType": "integer",
                      "onUpdate": "RESTRICT",
                      "onDelete": "RESTRICT",
                      "name": "collectiontype_id"
                    }
                  },
                  "operation": "="
                }
              ],
              "conditional": null,
              "valid": true
            },
            "query": "select `name`, `id` from `collections` where `collections`.`collectiontype_id` = ?"
          }
        },
        "output": true,
        "meta": [
          {
            "type": "text",
            "name": "name"
          },
          {
            "type": "number",
            "name": "id"
          }
        ],
        "outputType": "array"
      }
    ]
  }
}