There are two types of patterns, SINGLE_DAY that spans shifts on a single day and MULTI_DAY that spans shift on multiple days. The satisfiability clause ensures either a PREFERRED (soft requirement) or a PROHIBITED (hard restriction) constraint. The elements are the sequences based on shift tags.

Single day pattern examples

preferrably no late after an early shift
{
  "type": "SINGLE_DAY",
  "satisfy": "PREFERRED",
  "elements": [
    {
      "type": "ON",
      "includes": [
        "EARLY"
      ]
    },
    {
      "type": "OFF",
      "includes": [
        "LATE"
      ]
    }
  ]
}

Multi day pattern examples

preferred combo of early, late, late shift
{
  "type": "MULTI_DAY",
  "satisfy": "PREFERRED",
  "elements": [
    {
      "type": "ON",
      "includes": [
        "EARLY"
      ]
    },
    {
      "type": "ON",
      "includes": [
        "LATE"
      ]
    }
  ]
}
no early after late shift
{
  "type": "MULTI_DAY",
  "satisfy": "PROHIBITED",
  "elements": [
    {
      "type": "ON",
      "includes": [
        "LATE"
      ]
    },
    {
      "type": "ON",
      "includes": [
        "EARLY"
      ]
    }
  ]
}