{
  "operations": [
    {
      "name": "getGroup",
      "params": [
        "spp_id",
        "callback"
      ],
      "docs": {
        "description": "get group information from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getGroup(\"GRP_Q4VGGZPF\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "The spp_id of the group",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getIndividual",
      "params": [
        "spp_id",
        "callback"
      ],
      "docs": {
        "description": "get individual information from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getIndividual(\"IND_Q4VGGZPF\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "The spp_id of the individual",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getGroupMembers",
      "params": [
        "spp_id",
        "options",
        "callback"
      ],
      "docs": {
        "description": "get group members information from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getGroupMembers(\"GRP_Q4VGGZPF\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "The name of the group",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "Searching options, eg: limit for limiting number of records returning, order for searching order, offset for skipping records",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "object"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getServicePoint",
      "params": [
        "spp_id",
        "callback"
      ],
      "docs": {
        "description": "get service points information from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getServicePoint(\"SVP_8P4KP4RT\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "The spp_id of the agent",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "searchGroup",
      "params": [
        "domain",
        "options",
        "callback"
      ],
      "docs": {
        "description": "get groups from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "searchGroup([[\"spp_id\", \"=\", \"GRP_Q4VGGZPF\"]])",
            "caption": "search group by domain"
          },
          {
            "title": "example",
            "description": "searchGroup([[\"spp_id\", \"ilike\", \"GRP\"]], { offset: 100 }})",
            "caption": "search group by domain with offset"
          },
          {
            "title": "example",
            "description": "searchGroup([[\"address\", \"!=\", false], [\"phone\", \"!=\", false]])",
            "caption": "search group by complex domain for more accuracy"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "searching domain",
            "type": {
              "type": "NameExpression",
              "name": "Array"
            },
            "name": "domain"
          },
          {
            "title": "param",
            "description": "Searching options, eg: limit for limiting number of records returning, order for ordering search, offset for skipping records",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "object"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "searchIndividual",
      "params": [
        "domain",
        "options",
        "callback"
      ],
      "docs": {
        "description": "get individuals from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "searchIndividual([[\"spp_id\", \"=\", \"IND_Q4VGGZPF\"]])",
            "caption": "search individual by domain"
          },
          {
            "title": "example",
            "description": "searchIndividual([[\"spp_id\", \"ilike\", \"IND\"]], { offset: 100 })",
            "caption": "search individual by domain with offset"
          },
          {
            "title": "example",
            "description": "searchIndividual([[\"address\", \"!=\", false], [\"birthdate\", \"=\", false]])",
            "caption": "search individual by complex domain for more accuracy"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "searching domain",
            "type": {
              "type": "NameExpression",
              "name": "Array"
            },
            "name": "domain"
          },
          {
            "title": "param",
            "description": "Searching options, eg: limit for limiting number of records returning, order for searching order, offset for skipping records",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "object"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getProgram",
      "params": [
        "program_id",
        "callback"
      ],
      "docs": {
        "description": "get program information from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getProgram(\"PROG_2023_00000001\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "searching domain",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "program_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getPrograms",
      "params": [
        "options",
        "callback"
      ],
      "docs": {
        "description": "get programs list from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getPrograms(100)"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "offset from start",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "number"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getEnrolledPrograms",
      "params": [
        "spp_id",
        "callback"
      ],
      "docs": {
        "description": "get programs list for specific registrant from OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getEnrolledPrograms(\"IND_Q4VGGZPF\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "spp_id of group / individual wanted to search",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "enroll",
      "params": [
        "spp_id",
        "program_id"
      ],
      "docs": {
        "description": "enroll registrant to program in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "enroll(\"IND_Q4VGGZPF\", \"PROG_2023_00000001\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "spp_id of group / individual wanted to enroll",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "program_id of program",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "program_id"
          }
        ]
      },
      "valid": true
    },
    {
      "name": "unenroll",
      "params": [
        "spp_id",
        "program_id"
      ],
      "docs": {
        "description": "unenroll registrant from program in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "unenroll(\"IND_Q4VGGZPF\", \"PROG_2023_00000001\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "spp_id of group / individual wanted to unenroll",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "program_id of program",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "program_id"
          }
        ]
      },
      "valid": true
    },
    {
      "name": "createIndividual",
      "params": [
        "data",
        "callback"
      ],
      "docs": {
        "description": "create new individual for OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "createIndividual({ name: \"Individual 1\" })"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "registrant create data",
            "type": {
              "type": "NameExpression",
              "name": "object"
            },
            "name": "data"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "createGroup",
      "params": [
        "data",
        "callback"
      ],
      "docs": {
        "description": "create new group for OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "createGroup({ name: \"Group 1\" })"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "registrant create data",
            "type": {
              "type": "NameExpression",
              "name": "object"
            },
            "name": "data"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "updateGroup",
      "params": [
        "group_id",
        "data"
      ],
      "docs": {
        "description": "update group for OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "updateGroup(\"GRP_B2BRHJN2\", { name: \"Group 1\" })"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "group registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "group_id"
          },
          {
            "title": "param",
            "description": "registrant update data",
            "type": {
              "type": "NameExpression",
              "name": "object"
            },
            "name": "data"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "updateIndividual",
      "params": [
        "individual_id",
        "data"
      ],
      "docs": {
        "description": "update individual for OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "updateIndividual(\"IND_8DUQL4M4\", { name: \"Individual 1\" })"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "individual registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "individual_id"
          },
          {
            "title": "param",
            "description": "registrant update data",
            "type": {
              "type": "NameExpression",
              "name": "object"
            },
            "name": "data"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "addToGroup",
      "params": [
        "group_id",
        "individual_id",
        "role"
      ],
      "docs": {
        "description": "add individual to group in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "addToGroup(\"GRP_B2BRHJN2\", \"IND_8DUQL4M4\", \"Head\")",
            "caption": "create a new head for group"
          },
          {
            "title": "example",
            "description": "addToGroup(\"GRP_B2BRHJN2\", \"IND_8DUQL4M4\")",
            "caption": "create a new ordinary member for group"
          },
          {
            "title": "example",
            "description": "addToGroup(\"GRP_B2BRHJN2\", \"IND_8DUQL4M4\", \"new-role-name\")",
            "caption": "create a new member with new role for group"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "group registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "group_id"
          },
          {
            "title": "param",
            "description": "individual registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "individual_id"
          },
          {
            "title": "param",
            "description": "individual role in group",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "role"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "removeFromGroup",
      "params": [
        "group_id",
        "individual_id"
      ],
      "docs": {
        "description": "remove individual from group in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "removeFromGroup(\"GRP_B2BRHJN2\", \"IND_8DUQL4M4\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "group registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "group_id"
          },
          {
            "title": "param",
            "description": "individual registrant id",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "individual_id"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "searchServicePoint",
      "params": [
        "domain",
        "options",
        "callback"
      ],
      "docs": {
        "description": "searching for service point in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "searchServicePoint([[\"name\", \"ilike\", \"agent 1\"]])",
            "caption": "search without offset"
          },
          {
            "title": "example",
            "description": "searchServicePoint([[\"name\", \"ilike\", \"agent 1\"]], { offset: 100 })",
            "caption": "search with offset"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "searching domain",
            "type": {
              "type": "NameExpression",
              "name": "Array"
            },
            "name": "domain"
          },
          {
            "title": "param",
            "description": "Searching options, eg: limit for limiting number of records returning, order for searching order, offset for skipping records",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "object"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "getArea",
      "params": [
        "spp_id",
        "callback"
      ],
      "docs": {
        "description": "get area by id in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "getArea(\"LOC_7M92NLDH\")"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "spp_id of area",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "spp_id"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "searchArea",
      "params": [
        "domain",
        "options",
        "callback"
      ],
      "docs": {
        "description": "searching for service point in OpenSPP",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "searchArea([[\"code\", \"=\", \"10732\"]])",
            "caption": "search without offset"
          },
          {
            "title": "example",
            "description": "searchArea([[\"kind\", \"=\", 1]], { offset: 10 }})",
            "caption": "search with offset"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "param",
            "description": "searching domain",
            "type": {
              "type": "NameExpression",
              "name": "Array"
            },
            "name": "domain"
          },
          {
            "title": "param",
            "description": "Searching options, eg: limit for limiting number of records returning, order for searching order, offset for skipping records",
            "type": {
              "type": "OptionalType",
              "expression": {
                "type": "NameExpression",
                "name": "object"
              }
            },
            "name": "options",
            "default": "{}"
          },
          {
            "title": "param",
            "description": "An optional callback function",
            "type": {
              "type": "NameExpression",
              "name": "function"
            },
            "name": "callback"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    }
  ],
  "exports": [],
  "common": [
    {
      "name": "fn",
      "params": [
        "func"
      ],
      "docs": {
        "description": "Creates a custom step (or operation) for more flexible job writing.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "fn(state => {\n  // do some things to state\n  return state;\n});"
          },
          {
            "title": "param",
            "description": "is the function",
            "type": {
              "type": "NameExpression",
              "name": "Function"
            },
            "name": "func"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "fnIf",
      "params": [
        "condition",
        "operation"
      ],
      "docs": {
        "description": "Execute a function only when the condition returns true",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "fnIf((state) => state?.data?.name, get(\"https://example.com\"));"
          },
          {
            "title": "param",
            "description": "The condition that returns true",
            "type": {
              "type": "NameExpression",
              "name": "Boolean"
            },
            "name": "condition"
          },
          {
            "title": "param",
            "description": "The operation needed to be executed.",
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            },
            "name": "operation"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "sourceValue",
      "params": [
        "path"
      ],
      "docs": {
        "description": "Picks out a single value from source data.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "sourceValue('$.key')"
          },
          {
            "title": "param",
            "description": "JSONPath referencing a point in `state`.",
            "type": {
              "type": "NameExpression",
              "name": "String"
            },
            "name": "path"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "dataPath",
      "params": [
        "path"
      ],
      "docs": {
        "description": "Ensures a path points at the data.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "dataPath('key')"
          },
          {
            "title": "param",
            "description": "JSONPath referencing a point in `data`.",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "path"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "string"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "dataValue",
      "params": [
        "path"
      ],
      "docs": {
        "description": "Picks out a single value from the source data object—usually `state.data`.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "dataValue('key')"
          },
          {
            "title": "param",
            "description": "JSONPath referencing a point in `data`.",
            "type": {
              "type": "NameExpression",
              "name": "String"
            },
            "name": "path"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "lastReferenceValue",
      "params": [
        "path"
      ],
      "docs": {
        "description": "Picks out the last reference value from source data.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "lastReferenceValue('key')"
          },
          {
            "title": "param",
            "description": "JSONPath referencing a point in `references`.",
            "type": {
              "type": "NameExpression",
              "name": "String"
            },
            "name": "path"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "each",
      "params": [
        "dataSource",
        "operation"
      ],
      "docs": {
        "description": "Iterates over an array of items and invokes an operation upon each one, where the state\nobject is _scoped_ so that state.data is the item under iteration.\nThe rest of the state object is untouched and can be referenced as usual.\nYou can pass an array directly, or use lazy state or a JSONPath string to\nreference a slice of state.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "each(\n  $.data,\n  // Inside the callback operation, `$.data` is scoped to the item under iteration\n  insert(\"patient\", {\n    patient_name: $.data.properties.case_name,\n    patient_id: $.data.case_id,\n  })\n);",
            "caption": "Using lazy state ($) to iterate over items in state.data and pass each into an \"insert\" operation"
          },
          {
            "title": "example",
            "description": "each(\n  $.data,\n  insert(\"patient\", (state) => ({\n    patient_id: state.data.case_id,\n    ...state.data\n  }))\n);",
            "caption": "Iterate over items in state.data and pass each one into an \"insert\" operation"
          },
          {
            "title": "example",
            "description": "each(\n  \"$.data[*]\",\n  insert(\"patient\", (state) => ({\n    patient_name: state.data.properties.case_name,\n    patient_id: state.data.case_id,\n  }))\n);",
            "caption": "Using JSON path to iterate over items in state.data and pass each one into an \"insert\" operation"
          },
          {
            "title": "param",
            "description": "JSONPath referencing a point in `state`.",
            "type": {
              "type": "NameExpression",
              "name": "DataSource"
            },
            "name": "dataSource"
          },
          {
            "title": "param",
            "description": "The operation needed to be repeated.",
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            },
            "name": "operation"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "combine",
      "params": [
        "operations"
      ],
      "docs": {
        "description": "Combines two operations into one",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "combine(\n  create('foo'),\n  delete('bar')\n)"
          },
          {
            "title": "param",
            "description": "Operations to be performed.",
            "type": {
              "type": "NameExpression",
              "name": "Operations"
            },
            "name": "operations"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "field",
      "params": [
        "key",
        "value"
      ],
      "docs": {
        "description": "Returns a key, value pair in an array.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "field('destination_field_name__c', 'value')"
          },
          {
            "title": "param",
            "description": "Name of the field",
            "type": {
              "type": "NameExpression",
              "name": "string"
            },
            "name": "key"
          },
          {
            "title": "param",
            "description": "The value itself or a sourceable operation.",
            "type": {
              "type": "NameExpression",
              "name": "Value"
            },
            "name": "value"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Field"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "fields",
      "params": [
        "fields"
      ],
      "docs": {
        "description": "Zips key value pairs into an object.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "fields(list_of_fields)"
          },
          {
            "title": "param",
            "description": "a list of fields",
            "type": {
              "type": "NameExpression",
              "name": "Fields"
            },
            "name": "fields"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Object"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "merge",
      "params": [
        "dataSource",
        "fields"
      ],
      "docs": {
        "description": "Merges fields into each item in an array.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "example",
            "description": "merge(\n  \"$.books[*]\",\n  fields(\n    field( \"publisher\", sourceValue(\"$.publisher\") )\n  )\n)"
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "param",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "DataSource"
            },
            "name": "dataSource"
          },
          {
            "title": "param",
            "description": "Group of fields to merge in.",
            "type": {
              "type": "NameExpression",
              "name": "Object"
            },
            "name": "fields"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "DataSource"
            }
          }
        ]
      },
      "valid": true
    },
    {
      "name": "log",
      "params": [
        "args"
      ],
      "docs": {
        "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
        "tags": [
          {
            "title": "public",
            "description": null,
            "type": null
          },
          {
            "title": "function",
            "description": null,
            "name": null
          },
          {
            "title": "example",
            "description": "log('Patient List::', $.patients);",
            "caption": "Log values from state"
          },
          {
            "title": "example",
            "description": "fn((state) => {\n  console.log(state.data);\n  return state;\n})",
            "caption": "Use console.log inside a callback or fn block"
          },
          {
            "title": "param",
            "description": "A value or message to display in the logs",
            "type": {
              "type": "NameExpression",
              "name": "any"
            },
            "name": "args"
          },
          {
            "title": "returns",
            "description": null,
            "type": {
              "type": "NameExpression",
              "name": "Operation"
            }
          }
        ]
      },
      "valid": true
    }
  ]
}