{
  "contexts" : {
    "AgentControlContext" : {
      "description" : "Allows workflows to request lifecycle actions on the running agent.",
      "longDescription" : "Allows workflows to request lifecycle actions on the running agent. This is currently in beta and not supported",
      "functions" : [ {
        "id" : "agentControl-shutdownAgent",
        "name" : "shutdownAgent",
        "description" : "Request that the agent begins shutting down. Workflows must enable bootstrap.agentControl.workflowCanShutdownAgent or this will throw an error.",
        "context" : "AgentControlContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AgentControlContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "shutdownAgent()",
            "id" : "shutdownagent-no-args"
          }
        } ]
      } ]
    },
    "AuthenticationJavascriptContext" : {
      "description" : "This is a specialised Javascript Context for authentication steps.",
      "longDescription" : "This is a specialised Javascript Context for authentication steps. Most of the methods on Javascript Context are still available, the methods listed below are specialisations. sendMetric and",
      "functions" : [ {
        "id" : "addSplitReturnItem",
        "name" : "addSplitReturnItem",
        "description" : "When the current step is a \"scripted-split-aggregate\" type (see Step) the processed item must be added to the returned aggregate using this method.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "item" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "item" ],
          "examples" : [ {
            "code" : "context.addSplitReturnItem(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "addSplitReturnItem(item)",
            "id" : "addsplitreturnitem-java-lang-string"
          }
        } ]
      }, {
        "id" : "addSystemError",
        "name" : "addSystemError",
        "description" : "Adds an error not intended for a user outside the agent. It will also mark the context as in an error state. System errors would generally be thrown or handled.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "error" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "System error"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "addSystemError(error)",
            "id" : "addsystemerror-java-lang-string"
          }
        } ]
      }, {
        "id" : "addUserError",
        "name" : "addUserError",
        "description" : "Adds an error intended for a user outside the agent. It will also mark the context as in an error state. User errors would generally make their way to a human.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "error" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "User error"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "addUserError(error)",
            "id" : "addusererror-java-lang-string"
          }
        } ]
      }, {
        "id" : "bytes",
        "name" : "bytes",
        "description" : "Obtain a Byte context for working with bytes",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "ByteContext",
        "returns" : "ByteContext",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "bytes()",
            "id" : "bytes-no-args"
          }
        } ]
      }, {
        "id" : "counter",
        "name" : "counter",
        "description" : "Atomically add to (or subtract from) a thread safe atomic counter and return the updated value To just get the value pass 0 for the add parameter add",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the counter to add or update"
            },
            "add" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "the value to add to the counter - it can be negative or 0 if you want to get the value"
            }
          }
        },
        "output" : "number",
        "returns" : "number",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "name", "add" ],
          "examples" : [ {
            "code" : "var value = context.counter(\"myCounter\", 0); // just get the value\nvar added = context.counter(\"myCounter\", 10); // 10 is added and the final value returned\nvar subtracted = context.counter(\"myCounter\", -10); // 10 is subtracted and the final value returned"
          } ],
          "usage" : {
            "signature" : "counter(name, add)",
            "id" : "counter-java-lang-string-double"
          }
        } ]
      }, {
        "id" : "crypto",
        "name" : "crypto",
        "description" : "Obtain a Cryptography context for working with cryptography",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "CryptoContext",
        "returns" : "CryptoContext",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "crypto()",
            "id" : "crypto-no-args"
          }
        } ]
      }, {
        "id" : "delta",
        "name" : "delta",
        "description" : "Returns the differences between the current value and the last value stored for given key",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to lookup in persistence"
            },
            "currentValue" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "the current value to compare to the last value stored"
            }
          }
        },
        "output" : "number",
        "returns" : "number",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key", "currentValue" ],
          "examples" : [ {
            "code" : "delta = context.delta(\"myTs\", 12);"
          } ],
          "usage" : {
            "signature" : "delta(key, currentValue)",
            "id" : "delta-java-lang-string-java-lang-double"
          }
        } ]
      }, {
        "id" : "diagnosticLog",
        "name" : "diagnosticLog",
        "description" : "Write a diagnostic log. This will only be emitted in development mode, or in Production mode if the step is enabled via a \"enableDiagnostics\" message",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "message" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to log"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "message" ],
          "examples" : [ {
            "code" : "context.diagnosticLog(\"Hello World\");"
          } ],
          "usage" : {
            "signature" : "diagnosticLog(message)",
            "id" : "diagnosticlog-java-lang-string"
          }
        } ]
      }, {
        "id" : "end",
        "name" : "end",
        "description" : "Terminates the running flow and returns immediately.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "context.end();"
          } ],
          "usage" : {
            "signature" : "end()",
            "id" : "end-no-args"
          }
        } ]
      }, {
        "id" : "getAllErrors",
        "name" : "getAllErrors",
        "description" : "Retrieves a list of all error messages associated with the current context.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getAllErrors()",
            "id" : "getallerrors-no-args"
          }
        } ]
      }, {
        "id" : "getAuthenticationPropertiesFromStep",
        "name" : "getAuthenticationPropertiesFromStep",
        "description" : "Gets the authentication properties from another step. These properties can expire.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "security" : {
          "AuthenticationJavascriptContext" : true
        },
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to fetch the property from"
            },
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "property to fetch"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "stepId", "key" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getAuthenticationPropertiesFromStep(stepId, key)",
            "id" : "getauthenticationpropertiesfromstep-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "getBody",
        "name" : "getBody",
        "description" : "A shorthand for: check getMessageBodyAsString()then check getPassedMessageAsString() @return the contents eiter passed into the step or set by the step.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getBody();"
          } ],
          "usage" : {
            "signature" : "getBody()",
            "id" : "getbody-no-args"
          }
        } ]
      }, {
        "id" : "getData",
        "name" : "getData",
        "description" : "",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "data = JSON.parse(context.getData());"
          } ],
          "usage" : {
            "signature" : "getData()",
            "id" : "getdata-no-args"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "data = context.getData(key);"
          } ],
          "usage" : {
            "signature" : "getData(key)",
            "id" : "getdata-java-lang-string"
          }
        } ]
      }, {
        "id" : "getFirstError",
        "name" : "getFirstError",
        "description" : "Retrieves the first error message from a given list of errors, if available.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "errors" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "description" : "the list of error messages to retrieve the first error from"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "errors" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getFirstError(errors)",
            "id" : "getfirsterror-java-util-list-java-lang-string"
          }
        } ]
      }, {
        "id" : "getHeader",
        "name" : "getHeader",
        "description" : "Get a header from the previous request/response - note: it always returns an array string",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the name of the header to get"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "name" ],
          "examples" : [ {
            "code" : "headerArray = context.getHeader(\"aHeader\");\nheader = JSON.parse(headerArray)[0];"
          } ],
          "usage" : {
            "signature" : "getHeader(name)",
            "id" : "getheader-java-lang-string"
          }
        } ]
      }, {
        "id" : "getMessageBodyAsString",
        "name" : "getMessageBodyAsString",
        "description" : "Get the current message body, this could be the response from an http call for example",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getMessageBodyAsString();"
          } ],
          "usage" : {
            "signature" : "getMessageBodyAsString()",
            "id" : "getmessagebodyasstring-no-args"
          }
        } ]
      }, {
        "id" : "getPassedMessageAsString",
        "name" : "getPassedMessageAsString",
        "description" : "Get the message body that was passed to this step.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "passedMessage = context.getPassedMessageAsString();"
          } ],
          "usage" : {
            "signature" : "getPassedMessageAsString()",
            "id" : "getpassedmessageasstring-no-args"
          }
        } ]
      }, {
        "id" : "getPersistedItem",
        "name" : "getPersistedItem",
        "description" : "Gets an item from the step persistence",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the key of the item"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "item = context.getPersistedItem(\"myItem\");"
          } ],
          "usage" : {
            "signature" : "getPersistedItem(key)",
            "id" : "getpersisteditem-java-lang-string"
          }
        } ]
      }, {
        "id" : "getProperty",
        "name" : "getProperty",
        "description" : "Gets a property from this running context",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the property to get"
            }
          }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "property = context.getProperty(\"aKey\");"
          } ],
          "usage" : {
            "signature" : "getProperty(key)",
            "id" : "getproperty-java-lang-string"
          }
        } ]
      }, {
        "id" : "getRestrictedDataFromHost",
        "name" : "getRestrictedDataFromHost",
        "description" : "Gets the json string of restricted data for a host name",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "security" : {
          "AuthenticationJavascriptContext" : true
        },
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "host" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to get the restricted data from"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "host" ],
          "examples" : [ {
            "code" : "hostData = JSON.parse(context.getRestrictedDataFromHost(\"myhost\"));"
          } ],
          "usage" : {
            "signature" : "getRestrictedDataFromHost(host)",
            "id" : "getrestricteddatafromhost-java-lang-string"
          }
        } ]
      }, {
        "id" : "getStepProperties",
        "name" : "getStepProperties",
        "description" : "Returns the set properties for the Step. These properties will persist after requests but not over config reloads/restarts",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "property = context.getStepProperties().put(\"myProperty\", \"ok\");"
          } ],
          "usage" : {
            "signature" : "getStepProperties()",
            "id" : "getstepproperties-no-args"
          }
        } ]
      }, {
        "id" : "getSystemErrors",
        "name" : "getSystemErrors",
        "description" : "Retrieves a list of system-specific error messages associated with the current context.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getSystemErrors()",
            "id" : "getsystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "getTimestamp",
        "name" : "getTimestamp",
        "description" : "Get the current UTC timestamp (note that the timestamp might be set by a test or other mechanism) in milliseconds since 1970-01-01T00:00:00Z (UTC)",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "integer",
        "returns" : "integer",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "ts = context.getTimestamp();\n\ndate = new Date(context.getTimestamp())"
          } ],
          "usage" : {
            "signature" : "getTimestamp()",
            "id" : "gettimestamp-no-args"
          }
        } ]
      }, {
        "id" : "getTimestampManager",
        "name" : "getTimestampManager",
        "description" : "The timestamp manager allows for persistence of timestamps",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "TimestampManager",
        "returns" : "TimestampManager",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "tm = context.getTimestampManager();"
          } ],
          "usage" : {
            "signature" : "getTimestampManager()",
            "id" : "gettimestampmanager-no-args"
          }
        } ]
      }, {
        "id" : "getUserErrors",
        "name" : "getUserErrors",
        "description" : "Retrieves a list of user-specific error messages associated with the current context.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getUserErrors()",
            "id" : "getusererrors-no-args"
          }
        } ]
      }, {
        "id" : "hasSystemErrors",
        "name" : "hasSystemErrors",
        "description" : "Checks if there are any system-specific errors in the current context.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasSystemErrors()",
            "id" : "hassystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "hasUserErrors",
        "name" : "hasUserErrors",
        "description" : "Checks if there are any user-specific errors in the current context.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasUserErrors()",
            "id" : "hasusererrors-no-args"
          }
        } ]
      }, {
        "id" : "hash",
        "name" : "hash",
        "description" : "Note : This is a non-cryptographic hash and is intended to be used for obfuscation. When hashing a value, the original and the hash are emitted to the log to be referred to at a later date. The hash can be used in metrics etc so that the original value is not transmitted. The intention is that the raw value can remain in the originating network and the hash value can be transmitted out of network.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "toHash" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "toHash" ],
          "examples" : [ {
            "code" : "hashedValue = context.hash(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "hash(toHash)",
            "id" : "hash-java-lang-string"
          }
        } ]
      }, {
        "id" : "isErrored",
        "name" : "isErrored",
        "description" : "Indicates whether the current context is in an errored state.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "isErrored()",
            "id" : "iserrored-no-args"
          }
        } ]
      }, {
        "id" : "jsonPath",
        "name" : "jsonPath",
        "description" : "Returns the result from a JSONPath expression",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "json" : {
              "schema" : {
                "type" : "string"
              }
            },
            "expression" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "json", "expression" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "jsonPath(json, expression)",
            "id" : "jsonpath-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "licensing",
        "name" : "licensing",
        "description" : "Obtain licensing information. This is currently a BETA feature and is unsupported.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "LicensingContext",
        "returns" : "LicensingContext",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "licensing()",
            "id" : "licensing-no-args"
          }
        } ]
      }, {
        "id" : "mergeJsonStrings",
        "name" : "mergeJsonStrings",
        "description" : "Returns a merged json string",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "one" : {
              "schema" : {
                "type" : "string"
              }
            },
            "two" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "one", "two" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "mergeJsonStrings(one, two)",
            "id" : "mergejsonstrings-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue",
        "name" : "queue",
        "description" : "Returns the high performance persistent queue",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "PersistentQueueContext",
        "returns" : "PersistentQueueContext",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "queue()",
            "id" : "queue-no-args"
          }
        } ]
      }, {
        "id" : "regexMatch",
        "name" : "regexMatch",
        "description" : "Returns the regex matches",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "regex" : {
              "schema" : {
                "type" : "string"
              }
            },
            "input" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "regex", "input" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "regexMatch(regex, input)",
            "id" : "regexmatch-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "removeAllHeaders",
        "name" : "removeAllHeaders",
        "description" : "Remove all headers from the current state",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "context.removeAllHeaders();"
          } ],
          "usage" : {
            "signature" : "removeAllHeaders()",
            "id" : "removeallheaders-no-args"
          }
        } ]
      }, {
        "id" : "removeHeader",
        "name" : "removeHeader",
        "description" : "Remove a header from the current state",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "name" ],
          "examples" : [ {
            "code" : "context.removeHeader(\"aHeader\");"
          } ],
          "usage" : {
            "signature" : "removeHeader(name)",
            "id" : "removeheader-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStep",
        "name" : "sendToStep",
        "description" : "Send a message to another step and return a completed context upon completion",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send to"
            },
            "body" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send"
            },
            "deploymentAccessId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "allowDeploymentAccess id"
            },
            "headers" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to send"
            }
          }
        },
        "output" : "JavascriptStateContext",
        "returns" : "JavascriptStateContext",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "stepName", "body" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStep(stepName, body)",
            "id" : "sendtostep-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"appBridge\", \"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStep(deploymentAccessId, stepName, body)",
            "id" : "sendtostep-java-lang-string-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"appBridge\", \"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStep(deploymentAccessId, stepName, body, headers)",
            "id" : "sendtostep-java-lang-string-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStepAndForget",
        "name" : "sendToStepAndForget",
        "description" : "Send a message to another step and returns immediately. The step called will be processed in another thread, and you will not be able to access to the result.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send to"
            },
            "body" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send"
            },
            "deploymentAccessId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "allowDeploymentAccess id"
            },
            "headers" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to send"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "stepName", "body" ],
          "examples" : [ {
            "code" : "context.sendToStep(\"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(stepName, body)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body" ],
          "examples" : [ {
            "code" : "context.sendToStepAndForget(\"appBridge\", \"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(deploymentAccessId, stepName, body)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "context.sendToStep(\"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(stepName, body, headers)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "context.sendToStepAndForget(\"appBridge\", \"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(deploymentAccessId, stepName, body, headers)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setAuthenticationPropertiesOnStep",
        "name" : "setAuthenticationPropertiesOnStep",
        "description" : "Sets the authentication properties from another step. These properties can expire.",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "security" : {
          "AuthenticationJavascriptContext" : true
        },
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the name of the step to set properties on"
            },
            "expiresInMs" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "duration in milliseconds until the properties expire"
            },
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "property key to set"
            },
            "authenticationProperties" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "json string of authentication properties to store"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "stepName", "expiresInMs", "key", "authenticationProperties" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setAuthenticationPropertiesOnStep(stepName, expiresInMs, key, authenticationProperties)",
            "id" : "setauthenticationpropertiesonstep-java-lang-string-java-lang-long-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setBody",
        "name" : "setBody",
        "description" : "An alias for setMessage(...)",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "body" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to set"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "body" ],
          "examples" : [ {
            "code" : "context.setBody(\"hello\");"
          } ],
          "usage" : {
            "signature" : "setBody(body)",
            "id" : "setbody-java-lang-object"
          }
        } ]
      }, {
        "id" : "setCounter",
        "name" : "setCounter",
        "description" : "Atomically set the counter to an absolute value",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the counter to add or update"
            },
            "value" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "to set the counter to"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "name", "value" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setCounter(name, value)",
            "id" : "setcounter-java-lang-string-double"
          }
        } ]
      }, {
        "id" : "setData",
        "name" : "setData",
        "description" : "Set the JSON data for this step",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "data" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "data" ],
          "examples" : [ {
            "code" : "context.setData(JSON.stringify(data));"
          } ],
          "usage" : {
            "signature" : "setData(data)",
            "id" : "setdata-java-lang-string"
          }
        } ]
      }, {
        "id" : "setHeader",
        "name" : "setHeader",
        "description" : "Add a header to the next http request",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              }
            },
            "value" : {
              "schema" : {
                "type" : "object"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "name", "value" ],
          "examples" : [ {
            "code" : "context.setHeader(\"aHeader\", \"aValue\");"
          } ],
          "usage" : {
            "signature" : "setHeader(name, value)",
            "id" : "setheader-java-lang-string-java-lang-object"
          }
        } ]
      }, {
        "id" : "setHttpMethod",
        "name" : "setHttpMethod",
        "description" : "Set the HTTP method for the next http action This is generally used when a method other than the default is required. The HTTP method will default to GET unless there is a payload body then it will default to POST",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "method" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "method" ],
          "examples" : [ {
            "code" : "context.setHttpMethod(\"POST\");"
          } ],
          "usage" : {
            "signature" : "setHttpMethod(method)",
            "id" : "sethttpmethod-java-lang-string"
          }
        } ]
      }, {
        "id" : "setMessage",
        "name" : "setMessage",
        "description" : "Sets the message body for this running exchange",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "message" : {
              "schema" : {
                "type" : "object"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "message" ],
          "examples" : [ {
            "code" : "context.setMessage(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "setMessage(message)",
            "id" : "setmessage-java-lang-object"
          }
        } ]
      }, {
        "id" : "setPersistedItem",
        "name" : "setPersistedItem",
        "description" : "Sets an item to the step persistence",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              }
            },
            "value" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ {
            "code" : "context.setPersistedItem(\"myItem\", \"theValue\");"
          } ],
          "usage" : {
            "signature" : "setPersistedItem(key, value)",
            "id" : "setpersisteditem-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setProperty",
        "name" : "setProperty",
        "description" : "Sets a property onto this running context to be available in downstream step execution This differs from setPersistedItem in that setPersistedItem sets onto the STEP to be available on THIS STEP in future runs, while setProperty makes an item available to OTHER steps",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the property to set"
            },
            "value" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "of the property to set"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ {
            "code" : "context.setProperty(\"aKey\", \"aValue\");"
          } ],
          "usage" : {
            "signature" : "setProperty(key, value)",
            "id" : "setproperty-java-lang-string-java-lang-object"
          }
        } ]
      }, {
        "id" : "setUrl",
        "name" : "setUrl",
        "description" : "Set the url for the next http action with reference to a named host The path can start with a / even if the named host ends in a / - the result will be a single '/'",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "hostref" : {
              "schema" : {
                "type" : "string"
              }
            },
            "path" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "hostref", "path" ],
          "examples" : [ {
            "code" : "context.setUrl(\"myHost\", \"/a/path\");"
          } ],
          "usage" : {
            "signature" : "setUrl(hostref, path)",
            "id" : "seturl-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "sleep",
        "name" : "sleep",
        "description" : "Force the currently running script to sleep for the given milliseconds",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "ms" : {
              "schema" : {
                "type" : "integer"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "ms" ],
          "examples" : [ {
            "code" : "context.sleep(100);"
          } ],
          "usage" : {
            "signature" : "sleep(ms)",
            "id" : "sleep-long"
          }
        } ]
      }, {
        "id" : "xmlToJson",
        "name" : "xmlToJson",
        "description" : "Returns a json string from an xml string",
        "context" : "AuthenticationJavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "xml" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "AuthenticationJavascriptContext" ],
          "required" : [ "xml" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "xmlToJson(xml)",
            "id" : "xmltojson-java-lang-string"
          }
        } ]
      } ]
    },
    "ByteContext" : {
      "description" : "A low-level byte buffer manipulation interface providing minimal primitives for binary data operations.",
      "longDescription" : "A low-level byte buffer manipulation interface providing minimal primitives for binary data operations. Most operations either take or return a ByteBufferHandle. The byte buffer handle is a reference to a byte buffer in the agent - you will never interact with the buffer itself, rather you delegate the functionality to the agent. The ByteContext offers the following categories of functionality: - conversion to and from text encoded bytes (base64, hex) - creating new byte arrays (create, createFromByteArray, createFromString) - byte array manipulation (concat, copy, getSize, resize, slice, release) - byte compression (gzip, gunzip, zip, unzip) - writing to byte buffer (writeByte, writeBytes) - reading from byte buffer (readByte, reader.available, reader.read, reader.readAll) All high-level operations (multi-byte integers, strings, etc.) should be implemented in JavaScript using these primitives. References: - (Blog) - (Blog)",
      "functions" : [ {
        "id" : "bytes-base64ToBinary",
        "name" : "base64ToBinary",
        "description" : "Converts a Base64 encoded String into a binary buffer.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "base64" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the Base64 encoded string to be converted"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "base64" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.base64ToBinary(\"aGVsbG8=\"); // \"Hello\""
          } ],
          "usage" : {
            "signature" : "base64ToBinary(base64)",
            "id" : "base64tobinary-java-lang-string"
          }
        } ]
      }, {
        "id" : "bytes-binaryToBase64",
        "name" : "binaryToBase64",
        "description" : "Converts buffer contents to a Base64 encoded string.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "the binary buffer to convert"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.createFrom([72, 101, 108, 108, 111]); // \"Hello\"\nlet b64 = byteContext.binaryToBase64(buffer);\nconsole.log(b64); // \"aGVsbG8=\""
          } ],
          "usage" : {
            "signature" : "binaryToBase64(buffer)",
            "id" : "binarytobase64-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-binaryToHex",
        "name" : "binaryToHex",
        "description" : "Converts buffer contents to a hexadecimal string representation.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to convert"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.createFrom([72, 101, 108, 108, 111]); // \"Hello\"\nlet hex = byteContext.binaryToHex(buffer);\nconsole.log(hex); // \"48656C6C6F\""
          } ],
          "usage" : {
            "signature" : "binaryToHex(buffer)",
            "id" : "binarytohex-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-concat",
        "name" : "concat",
        "description" : "Combines two buffers into a new buffer containing all bytes from both.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffers" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "object",
                  "$ref" : "#ByteBufferHandle"
                }
              },
              "description" : "A list of buffers to concatenate"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffers" ],
          "examples" : [ {
            "code" : "let header = byteContext.createFrom([0xFF, 0xFE]); // Magic bytes\nlet data = byteContext.createFrom([1, 2, 3, 4]);   // Payload\nlet packet = byteContext.concat([header, data]);\n// packet contains: [0xFF, 0xFE, 1, 2, 3, 4]"
          } ],
          "usage" : {
            "signature" : "concat(buffers)",
            "id" : "concat-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-copy",
        "name" : "copy",
        "description" : "Creates a deep copy of an existing buffer.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "sourceBuffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to copy"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "sourceBuffer" ],
          "examples" : [ {
            "code" : "let original = byteContext.create(10);\nlet copy = byteContext.copy(original);\n// Modifying copy won't affect original\ncopy = byteContext.writeByte(copy, 0, 255);\nconsole.log(byteContext.readByte(original, 0)); // 0 (unchanged)"
          } ],
          "usage" : {
            "signature" : "copy(sourceBuffer)",
            "id" : "copy-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-create",
        "name" : "create",
        "description" : "Creates a new buffer of the specified size, initialized with zeros.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "size" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The size of the buffer in bytes"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "size" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(1024);  // 1KB buffer of zeros\nconsole.log(byteContext.getSize(buffer)); // 1024"
          } ],
          "usage" : {
            "signature" : "create(size)",
            "id" : "create-int"
          }
        } ]
      }, {
        "id" : "bytes-createFromByteArray",
        "name" : "createFromByteArray",
        "description" : "Creates a new buffer from a byte array.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "bytes" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "integer"
                }
              },
              "description" : "The byte array to copy from"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "bytes" ],
          "examples" : [ {
            "code" : "// Create from existing data\nlet bytes = [0x48, 0x65, 0x6C, 0x6C, 0x6F]; // \"Hello\" in ASCII\nlet buffer = byteContext.createFrom(bytes);\nconsole.log(byteContext.getSize(buffer)); // 5"
          } ],
          "usage" : {
            "signature" : "createFromByteArray(bytes)",
            "id" : "createfrombytearray-byte"
          }
        } ]
      }, {
        "id" : "bytes-createFromString",
        "name" : "createFromString",
        "description" : "Creates a new buffer from a string.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "string" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The string to convert to a buffer using UTF-8 encoding"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "string" ],
          "examples" : [ {
            "code" : "// Create buffer from UTF-8 string\nlet text = \"Hello, 世界!\";  // Unicode text\nlet buffer = byteContext.createFrom(text);"
          } ],
          "usage" : {
            "signature" : "createFromString(string)",
            "id" : "createfromstring-java-lang-string"
          }
        } ]
      }, {
        "id" : "bytes-getSize",
        "name" : "getSize",
        "description" : "Returns the current size of a buffer in bytes.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to measure"
            }
          }
        },
        "output" : "integer",
        "returns" : "integer",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(42);\nconsole.log(byteContext.getSize(buffer)); // 42"
          } ],
          "usage" : {
            "signature" : "getSize(buffer)",
            "id" : "getsize-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-gunzip",
        "name" : "gunzip",
        "description" : "Decompresses GZIP-compressed buffer contents.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The GZIP-compressed buffer to decompress"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let compressed = byteContext.gzip(originalBuffer);\nlet decompressed = byteContext.gunzip(compressed);"
          } ],
          "usage" : {
            "signature" : "gunzip(buffer)",
            "id" : "gunzip-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-gzip",
        "name" : "gzip",
        "description" : "Compresses buffer contents using GZIP compression.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to compress"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let compressed = byteContext.gzip(originalBuffer);\nlet decompressed = byteContext.gunzip(compressed);"
          } ],
          "usage" : {
            "signature" : "gzip(buffer)",
            "id" : "gzip-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-hash",
        "name" : "hash",
        "description" : "Computes a CRC32 hash of the buffer contents.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "the buffer to hash"
            }
          }
        },
        "output" : "integer",
        "returns" : "integer",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.createFrom([1, 2, 3, 4]);\nlet hash = byteContext.hash(buffer);\nconsole.log(hash); // Unsigned 32-bit CRC value as a number"
          } ],
          "usage" : {
            "signature" : "hash(buffer)",
            "id" : "hash-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-hexToBinary",
        "name" : "hexToBinary",
        "description" : "Converts a hexadecimal string to binary buffer data.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "hex" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "Hexadecimal string (case-insensitive, no 0x prefix)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "hex" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.hexToBinary(\"48656C6C6F\"); // \"Hello\" in hex"
          } ],
          "usage" : {
            "signature" : "hexToBinary(hex)",
            "id" : "hextobinary-java-lang-string"
          }
        } ]
      }, {
        "id" : "bytes-readByte",
        "name" : "readByte",
        "description" : "Reads a single byte from the buffer at the specified offset.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "fromBuffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to read from"
            },
            "offset" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The position to read from (0-based)"
            }
          }
        },
        "output" : "integer",
        "returns" : "integer",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "fromBuffer", "offset" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(5);\nbuffer = byteContext.writeByte(buffer, 2, 170); // 0xAA\nlet value = byteContext.readByte(buffer, 2);\nconsole.log(value); // 170"
          } ],
          "usage" : {
            "signature" : "readByte(fromBuffer, offset)",
            "id" : "readbyte-co-opscotch-model-workflow-bytebufferhandle-int"
          }
        } ]
      }, {
        "id" : "bytes-reader",
        "name" : "reader",
        "description" : "Creates a sequential reader for efficient forward-only reading of buffer data. This is more efficient than random access for sequential operations.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to create a reader for"
            }
          }
        },
        "output" : "ByteReader",
        "returns" : "ByteReader",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let reader = byteContext.reader(buffer);\n\n// examples\nlet byte = reader.readByte();\nlet int32 = reader.readInt32BE();\nlet bytes = reader.readBytes(length);"
          } ],
          "usage" : {
            "signature" : "reader(buffer)",
            "id" : "reader-co-opscotch-model-workflow-bytebufferhandle"
          }
        }, {
          "contexts" : [ "ByteContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "reader()",
            "id" : "reader-no-args"
          }
        } ]
      }, {
        "id" : "bytes-release",
        "name" : "release",
        "description" : "Securely releases (erase) buffers from memory.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffers" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "object",
                  "$ref" : "#ByteBufferHandle"
                }
              },
              "description" : "The buffers to release"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffers" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "release(buffers)",
            "id" : "release-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-resize",
        "name" : "resize",
        "description" : "Changes the size of a buffer. If enlarged, new bytes are zero-filled. If shrunk, excess bytes are discarded.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to resize"
            },
            "newSize" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The new size in bytes"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer", "newSize" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(10);\nbuffer = byteContext.resize(buffer, 20); // Grow to 20 bytes (zeros added)\nbuffer = byteContext.resize(buffer, 5);  // Shrink to 5 bytes"
          } ],
          "usage" : {
            "signature" : "resize(buffer, newSize)",
            "id" : "resize-co-opscotch-model-workflow-bytebufferhandle-int"
          }
        } ]
      }, {
        "id" : "bytes-sha256",
        "name" : "sha256",
        "description" : "Computes a SHA-256 digest of the buffer contents.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "the buffer to hash"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "sha256(buffer)",
            "id" : "sha256-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-slice",
        "name" : "slice",
        "description" : "Extracts a portion of a buffer without modifying the original.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "sourceBuffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to extract from"
            },
            "offset" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The starting position (0-based)"
            },
            "length" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The number of bytes to extract"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "sourceBuffer", "offset", "length" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(100);\nlet middle = byteContext.slice(buffer, 25, 50); // Extract bytes 25-74\nconsole.log(byteContext.getSize(middle)); // 50\n\n// Extract from offset to end\nlet tail = byteContext.slice(buffer, 80, byteContext.getSize(buffer) - 80);"
          } ],
          "usage" : {
            "signature" : "slice(sourceBuffer, offset, length)",
            "id" : "slice-co-opscotch-model-workflow-bytebufferhandle-int-int"
          }
        } ]
      }, {
        "id" : "bytes-split",
        "name" : "split",
        "description" : "Splits a buffer by a delimiter buffer.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to split"
            },
            "delimiter" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The delimiter buffer"
            },
            "includeDelimiter" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "-1 include delimiter on the left, 0 exclude it, 1 include on the right"
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer", "delimiter", "includeDelimiter" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.createFrom([1, 2, 3, 2, 4]);\nlet delimiter = byteContext.createFrom([2]);\nlet parts = byteContext.split(buffer, delimiter, 0); // [[1], [3], [4]]"
          } ],
          "usage" : {
            "signature" : "split(buffer, delimiter, includeDelimiter)",
            "id" : "split-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-int"
          }
        } ]
      }, {
        "id" : "bytes-toString",
        "name" : "toString",
        "description" : "",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "toString(buffer)",
            "id" : "tostring-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-unzip",
        "name" : "unzip",
        "description" : "Decompresses ZIP-compressed buffer contents.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The ZIP-compressed buffer to decompress"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let compressed = byteContext.zip(originalBuffer);\nlet decompressed = byteContext.unzip(compressed);"
          } ],
          "usage" : {
            "signature" : "unzip(buffer)",
            "id" : "unzip-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "bytes-writeByte",
        "name" : "writeByte",
        "description" : "Writes a single byte to the buffer at the specified offset.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to write to"
            },
            "offset" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The position to write at (0-based)"
            },
            "value" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The byte value (0-255, will be masked to 8 bits)"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer", "offset", "value" ],
          "examples" : [ {
            "code" : "let buffer = byteContext.create(10);\nbuffer = byteContext.writeByte(buffer, 0, 0xFF);  // Write 255\nbuffer = byteContext.writeByte(buffer, 1, 0x00);  // Write 0\n\n// Build a 32-bit big-endian integer\nfunction writeInt32BE(buffer, offset, value) {\nbuffer = byteContext.writeByte(buffer, offset,     (value >>> 24) & 0xFF);\nbuffer = byteContext.writeByte(buffer, offset + 1, (value >>> 16) & 0xFF);\nbuffer = byteContext.writeByte(buffer, offset + 2, (value >>> 8)  & 0xFF);\nbuffer = byteContext.writeByte(buffer, offset + 3,  value         & 0xFF);\nreturn buffer;\n}"
          } ],
          "usage" : {
            "signature" : "writeByte(buffer, offset, value)",
            "id" : "writebyte-co-opscotch-model-workflow-bytebufferhandle-int-int"
          }
        } ]
      }, {
        "id" : "bytes-writeBytes",
        "name" : "writeBytes",
        "description" : "Copies bytes from one buffer to another. This is the most efficient way to move large amounts of data between buffers.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "toBuffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The destination buffer"
            },
            "offset" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The position in the destination to start writing"
            },
            "sourceBuffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The source buffer to copy from"
            },
            "sourceOffset" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The position in the source to start reading"
            },
            "length" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The number of bytes to copy"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "toBuffer", "offset", "sourceBuffer", "sourceOffset", "length" ],
          "examples" : [ {
            "code" : "let source = byteContext.createFrom([1, 2, 3, 4, 5]);\nlet dest = byteContext.create(10);\n\n// Copy bytes 1-3 from source to position 2 in dest\nbyteContext.writeBytes(dest, 2, source, 1, 3);\n// dest now contains: [0, 0, 2, 3, 4, 0, 0, 0, 0, 0]"
          } ],
          "usage" : {
            "signature" : "writeBytes(toBuffer, offset, sourceBuffer, sourceOffset, length)",
            "id" : "writebytes-co-opscotch-model-workflow-bytebufferhandle-int-co-opscotch-model-workflow-bytebufferhandle-int-int"
          }
        } ]
      }, {
        "id" : "bytes-zip",
        "name" : "zip",
        "description" : "Compresses buffer contents using ZIP compression.",
        "context" : "ByteContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The buffer to compress"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "ByteContext" ],
          "required" : [ "buffer" ],
          "examples" : [ {
            "code" : "let compressed = byteContext.zip(originalBuffer);\nlet decompressed = byteContext.unzip(compressed);"
          } ],
          "usage" : {
            "signature" : "zip(buffer)",
            "id" : "zip-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      } ]
    },
    "CryptoContext" : {
      "description" : "The Crypto context provides cryptographic operations for signing, encryption and random byte generation.",
      "longDescription" : "The Crypto context provides cryptographic operations for signing, encryption and random byte generation. It works with the byte context, and all parameters and returns are byte buffer handles. The opscotch cryptography functions use the libsodium implementation, which is a high-grade industry standard. Some notes about keys: - Keys need to be a specific kind and size for each function and must be registered (either in the bootstrap or during a workflow) before used - see registerKey. - You can generate a key for a specific function using generateKeyPair - You can validate a key for a given function using validateKey - For key requirements see Key References: - (Blog) The following cryptographic functions are provided for use within workflows: - Public key signatures - Used to create and verify digital signatures that ensure message authenticity and integrity. A private key is used to generate a unique signature for a message, while the corresponding public key allows anyone to verify the signature. A verified signature proves it was created by the owner of the private key, and the message hasn't been tampered with. - methods: - sign - verifySignature - Algorithm used: Ed25519 - You can provide your own Ed25519 keys - Authenticated public key encryption - Used to encrypt messages that can only be decrypted by a specific intended recipient and authenticates the sender's identity. The recipient can verify the message came from the claimed sender, while ensuring message confidentiality. This provides both encryption and authentication in a single operation. - methods: - encryptPublicKey - decryptPublicKey - Algorithms used: - Key exchange: X25519 - Encryption: XSalsa20 - Authentication: Poly1305 - You can provide your own X25519 keys - Anonymous public key encryption - Used for one-way encryption where only the recipient can decrypt the message using their private key. The sender remains anonymous as no authentication is performed. This provides message confidentiality without revealing the sender's identity. - methods: - encryptAnonymous - decryptAnonymous - Algorithms used: - Key exchange: X25519 - Encryption: XSalsa20 stream cipher - You can provide your own X25519 keys - Symmetric secret key encryption - Used when both parties share a single secret key that is used for both encryption and decryption. The same key must be securely shared between parties beforehand. This provides fast and secure encryption for parties who have already established a shared secret key. - methods: - encryptSymmetric - decryptSymmetric - Algorithm used: XSalsa20 stream cipher - You can provide your own 32-byte secret key - Random byte generation - Generate cryptographically random byte array - methods: - randomBytes - Hahsing - Generate cryptographically secure hash values - methods: - hash - hmacSha256 - Key management - Various functions for working with keys: - methods: - generateKeyPair - registerKey - validateKey",
      "functions" : [ {
        "id" : "crypto-decryptAnonymous",
        "name" : "decryptAnonymous",
        "description" : "Decrypts a payload using anonymous public-key encryption.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to decrypt"
            },
            "registeredPublicKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the recipient public key used for decryption. (For key requirements see Key)"
            },
            "registeredPrivateKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the recipient secret key used for decryption. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "registeredPublicKeyId", "registeredPrivateKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "decryptAnonymous(payloadBytes, registeredPublicKeyId, registeredPrivateKeyId)",
            "id" : "decryptanonymous-co-opscotch-model-workflow-bytebufferhandle-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-decryptPublicKey",
        "name" : "decryptPublicKey",
        "description" : "Decrypts a payload using authenticated public-key encryption.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to decrypt"
            },
            "nonceBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for the unique 24-byte nonce for this encryption"
            },
            "registeredPublicKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the sender public key used for decryption. (For key requirements see Key)"
            },
            "registeredPrivateKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the recipient public key used for decryption. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "nonceBytes", "registeredPublicKeyId", "registeredPrivateKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "decryptPublicKey(payloadBytes, nonceBytes, registeredPublicKeyId, registeredPrivateKeyId)",
            "id" : "decryptpublickey-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-decryptSymmetric",
        "name" : "decryptSymmetric",
        "description" : "Decrypts a payload using symmetric decryption.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "encryptedBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for encrypted bytes to decrypt"
            },
            "nonceBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for the 24-byte nonce used during encryption"
            },
            "registeredSharedKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id for the secret key used for decryption (same as used for encryption). (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "encryptedBytes", "nonceBytes", "registeredSharedKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "decryptSymmetric(encryptedBytes, nonceBytes, registeredSharedKeyId)",
            "id" : "decryptsymmetric-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-encryptAnonymous",
        "name" : "encryptAnonymous",
        "description" : "Encrypts a payload using anonymous public-key encryption. This will be used when the sender uses the recipient public key to encrypt and the payload is only openable by the holder of the secret key. There is no sender identity or verification.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to decrypt"
            },
            "registeredPublicKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the recipient public key used for decryption. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "registeredPublicKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "encryptAnonymous(payloadBytes, registeredPublicKeyId)",
            "id" : "encryptanonymous-co-opscotch-model-workflow-bytebufferhandle-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-encryptPublicKey",
        "name" : "encryptPublicKey",
        "description" : "Encrypts a payload using authenticated public-key encryption. This is used when the recipient knows the sender and vice versa. The payload will only be openable by the intended recipient and will only be openable if verified from the sender.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to encrypt"
            },
            "nonceBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for the unique 24-byte nonce for this encryption"
            },
            "registeredPublicKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of the recipient public key used for encryption. (For key requirements see Key)"
            },
            "registeredPrivateKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id of a sender secret key used for encryption. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "nonceBytes", "registeredPublicKeyId", "registeredPrivateKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "encryptPublicKey(payloadBytes, nonceBytes, registeredPublicKeyId, registeredPrivateKeyId)",
            "id" : "encryptpublickey-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-encryptSymmetric",
        "name" : "encryptSymmetric",
        "description" : "Encrypts a payload using symmetric encryption.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to encrypt"
            },
            "nonceBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for the unique 24-byte nonce for this encryption"
            },
            "registeredSharedKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id for the shared secret key used for encryption. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "nonceBytes", "registeredSharedKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "encryptSymmetric(payloadBytes, nonceBytes, registeredSharedKeyId)",
            "id" : "encryptsymmetric-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-generateKeyPair",
        "name" : "generateKeyPair",
        "description" : "Generate a new public/private key pair for the given type",
        "context" : "CryptoContext",
        "deterministic" : false,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "purpose" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the purpose of key to generate (sign, box, secretbox)"
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "purpose" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "generateKeyPair(purpose)",
            "id" : "generatekeypair-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-hash",
        "name" : "hash",
        "description" : "Generates a consistent hash for the same input",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "input" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for input to hash"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "input" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hash(input)",
            "id" : "hash-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "crypto-hmacSha256",
        "name" : "hmacSha256",
        "description" : "Generates an HMAC using SHA-256.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for the HMAC key (any length)"
            },
            "bytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for input bytes to authenticate"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "key", "bytes" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hmacSha256(key, bytes)",
            "id" : "hmacsha256-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "crypto-passwordHash",
        "name" : "passwordHash",
        "description" : "Given a user-provided password, create a safe, high-entropy key/hash you can use for encryption or password verification This version of the function uses the minimum safe parameters for the lowest memory and CPU usage. Using higher resource settings will make the calculation take longer, which means any attacks on a password will also take longer. See notes on the other passwordHash function.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "password" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "the byte buffer handle for the input password"
            },
            "salt" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "the byte buffer handle for the 16 bit salt"
            },
            "hashLength" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "the length of the output hash/key"
            },
            "pwhashAlg" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "the pwhash algorithm to use: 1) Argon2i 1.3, 2) Argon 2id 1.3"
            },
            "pwhashOpsLimit" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "represents the maximum amount of computations to perform. Raising this number will make the function require more CPU cycles to compute a key. This number must be between 1 and 4"
            },
            "pwhashMemLimit" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "is the maximum amount of RAM in bytes that the function will use. This number must be between 8MB (8 1024 1024) and 1GB (1024 1024 1024)"
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "password" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "passwordHash(password)",
            "id" : "passwordhash-co-opscotch-model-workflow-bytebufferhandle"
          }
        }, {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "password", "salt", "hashLength", "pwhashAlg", "pwhashOpsLimit", "pwhashMemLimit" ],
          "examples" : [ {
            "code" : "{\n     \"pwhashAlg\" : 0,\n     \"pwhashOpsLimit\" : 0,\n     \"pwhashMemLimit\" : 0,\n     \"pwhashSalt\" : \"<base64 encoded string>\",\n     \"keyHash\" : \"<base64 encoded string>\",\n}"
          } ],
          "usage" : {
            "signature" : "passwordHash(password, salt, hashLength, pwhashAlg, pwhashOpsLimit, pwhashMemLimit)",
            "id" : "passwordhash-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-int-int-long-long"
          }
        } ]
      }, {
        "id" : "crypto-randomBytes",
        "name" : "randomBytes",
        "description" : "Generates random bytes that are cryptographically secure.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "length" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "The number of random bytes to generate"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "length" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "randomBytes(length)",
            "id" : "randombytes-int"
          }
        } ]
      }, {
        "id" : "crypto-registerKey",
        "name" : "registerKey",
        "description" : "Registers a cryptographic key and returns a registered key id for use in the current context. WARNING: THE INPUT KEY BYTES ARE ZEROED OUT - THIS DESTROYS THE INPUT. If you need the input key you must make a copy with context.bytes().copy(KEY) Public and secret keys need to be registered separately. The purpose is important and can be one of the following cryptographic primitives: - sign - used for sign and verifySignature using public/secret keys - authenticated - used for encryptPublicKey and decryptPublicKey for mutually authenticated public-key encryption - symmetric - used for encryptSymmetric and decryptSymmetric - this only uses a secret key - anonymous - used for encryptAnonymous and decryptAnonymous - this is the classic public/private key encryption The type will either be public or secret depending on the key being registered. Each permutation of purpose and type will have a specific required key length in bytes and an error will be thrown if the byte length (not the hex character length) does not match.",
        "context" : "CryptoContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "purpose" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "one of: sign, authenticated, symmetric, anonymous"
            },
            "type" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "one of public or secret"
            },
            "key" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "byte buffer handle for the key bytes"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "purpose", "type", "key" ],
          "examples" : [ {
            "code" : "const keyId = context.crypto().registerKey(\"sign\", \"secret\", context.bytes().hexToBinary(\"6250E4....0E4\"));"
          } ],
          "usage" : {
            "signature" : "registerKey(purpose, type, key)",
            "id" : "registerkey-java-lang-string-java-lang-string-co-opscotch-model-workflow-bytebufferhandle"
          }
        } ]
      }, {
        "id" : "crypto-sign",
        "name" : "sign",
        "description" : "Signs a payload using a secret key and returns the signature.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "payloadBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for payload bytes to sign"
            },
            "registeredKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The key id for the secret key bytes used for signing. (For key requirements see Key)"
            }
          }
        },
        "output" : "ByteBufferHandle",
        "returns" : "ByteBufferHandle",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "payloadBytes", "registeredKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "sign(payloadBytes, registeredKeyId)",
            "id" : "sign-co-opscotch-model-workflow-bytebufferhandle-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-validateKey",
        "name" : "validateKey",
        "description" : "Determines if a given key id matches a registered key with the given purpose and type",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "id" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the key to find"
            },
            "purpose" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "intended purpose of the key"
            },
            "type" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "intended type of the key"
            }
          }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "id", "purpose", "type" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "validateKey(id, purpose, type)",
            "id" : "validatekey-java-lang-string-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "crypto-verifySignature",
        "name" : "verifySignature",
        "description" : "Verifies that a signature matches a message using a public key.",
        "context" : "CryptoContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "signatureBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for signature bytes to verify"
            },
            "messageBytes" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "The byte buffer handle for message bytes that was signed"
            },
            "registeredPublicKeyId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The registered key id for the public key bytes to verify against. (For key requirements see Key)"
            }
          }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "CryptoContext" ],
          "required" : [ "signatureBytes", "messageBytes", "registeredPublicKeyId" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "verifySignature(signatureBytes, messageBytes, registeredPublicKeyId)",
            "id" : "verifysignature-co-opscotch-model-workflow-bytebufferhandle-co-opscotch-model-workflow-bytebufferhandle-java-lang-string"
          }
        } ]
      } ]
    },
    "DiagnosticsContext" : {
      "description" : "An interface for interacting with OpenTelemetry",
      "longDescription" : "An interface for interacting with OpenTelemetry",
      "functions" : [ {
        "id" : "diagnostic-errored",
        "name" : "errored",
        "description" : "Mark the trace as errored and records the error message",
        "context" : "DiagnosticsContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "error" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to add to trace"
            },
            "type" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "string type that will be set on the trace"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "errored(error)",
            "id" : "errored-java-lang-string"
          }
        }, {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "type", "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "errored(type, error)",
            "id" : "errored-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "diagnostic-event",
        "name" : "event",
        "description" : "Add an event to a trace",
        "context" : "DiagnosticsContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "event" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to add to trace."
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "event" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "event(event)",
            "id" : "event-java-lang-string"
          }
        } ]
      }, {
        "id" : "diagnostic-setAttribute",
        "name" : "setAttribute",
        "description" : "Set an attribute onto the trace",
        "context" : "DiagnosticsContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the attribute"
            },
            "value" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the attribute"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setAttribute(key, value)",
            "id" : "setattribute-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setAttribute(key, value)",
            "id" : "setattribute-java-lang-string-int"
          }
        }, {
          "contexts" : [ "DiagnosticsContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setAttribute(key, value)",
            "id" : "setattribute-java-lang-string-double"
          }
        } ]
      } ]
    },
    "Doc" : {
      "description" : "Documentation and schema validation for a JavaScript step.",
      "longDescription" : "Documentation and schema validation for a JavaScript step. The Doc model allows JavaScript steps to declare input/output/data schemas for validation, describe their purpose, and define execution logic. The doc model is available in the JavaScript resource as doc Usage in JavaScript:",
      "functions" : [ {
        "id" : "doc-asUserErrors",
        "name" : "asUserErrors",
        "description" : "Marks errors as user error when the user is expected to resolve the error. When enabled, validation errors will be added the user error context rather than the system error context",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "asUserErrors()",
            "id" : "asusererrors-no-args"
          }
        } ]
      }, {
        "id" : "doc-dataSchema",
        "name" : "dataSchema",
        "description" : "Defines the JSON Schema for the data object validation. The schema is used to validate the data object (passed via JavaScriptSource.data) before the step executes. If validation fails, a user-friendly error is returned.",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "schema" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "The JSON Schema to validate against (as a JavaScript object)"
            }
          }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ "schema" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "dataSchema(schema)",
            "id" : "dataschema-java-lang-object"
          }
        } ]
      }, {
        "id" : "doc-description",
        "name" : "description",
        "description" : "Provides a human-readable description of what the step does. This description is used for documentation and may be displayed in error messages or API documentation.",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "description" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "The description of the step"
            }
          }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ "description" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "description(description)",
            "id" : "description-java-lang-string"
          }
        } ]
      }, {
        "id" : "doc-inSchema",
        "name" : "inSchema",
        "description" : "Defines the JSON Schema for input validation. The schema is used to validate the incoming request body before the step executes. If validation fails, a user-friendly error is returned.",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "schema" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "The JSON Schema to validate against (as a JavaScript object)"
            }
          }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ "schema" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "inSchema(schema)",
            "id" : "inschema-java-lang-object"
          }
        } ]
      }, {
        "id" : "doc-outSchema",
        "name" : "outSchema",
        "description" : "Defines the JSON Schema for output validation. The schema is used to validate the step's output before it's returned. If validation fails, a user-friendly error is returned.",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "schema" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "The JSON Schema to validate against (as a JavaScript object)"
            }
          }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ "schema" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "outSchema(schema)",
            "id" : "outschema-java-lang-object"
          }
        } ]
      }, {
        "id" : "doc-run",
        "name" : "run",
        "description" : "Sets the execution function for the step. This function is called when the step executes. It should contain the main logic for the step.",
        "context" : "Doc",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "run" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "The function to execute"
            }
          }
        },
        "output" : "Doc",
        "returns" : "Doc",
        "variants" : [ {
          "contexts" : [ "Doc" ],
          "required" : [ "run" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "run(run)",
            "id" : "run-java-lang-object"
          }
        } ]
      } ]
    },
    "FilesContext" : {
      "description" : "The FileContext provides workflow access to files.",
      "longDescription" : "The FileContext provides workflow access to files. Only files defined in the bootstrap allowFileAccess property can be accessed.",
      "functions" : [ {
        "id" : "files-copy",
        "name" : "copy",
        "description" : "Copies a file from one location to another",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "srcPath" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to this bootstrap FilePermitter path context"
            },
            "dstFileId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the FilePermitter id for the copy destination"
            },
            "dstPath" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to this bootstrap FilePermitter path context"
            },
            "mkdir" : {
              "schema" : {
                "type" : "boolean"
              },
              "description" : "true to make destination directories"
            },
            "overwrite" : {
              "schema" : {
                "type" : "boolean"
              },
              "description" : "true to allow overwriting existing files"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "srcPath", "dstFileId", "dstPath", "mkdir", "overwrite" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "copy(srcPath, dstFileId, dstPath, mkdir, overwrite)",
            "id" : "copy-java-lang-string-java-lang-string-java-lang-string-boolean-boolean"
          }
        } ]
      }, {
        "id" : "files-delete",
        "name" : "delete",
        "description" : "Delete a file",
        "context" : "FilesContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "file" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to be deleted"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "file" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "delete(file)",
            "id" : "delete-java-lang-string"
          }
        } ]
      }, {
        "id" : "files-list",
        "name" : "list",
        "description" : "Lists the directory",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "path" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to the bootstrap FilePermitter path"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "path" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "list(path)",
            "id" : "list-java-lang-string"
          }
        } ]
      }, {
        "id" : "files-move",
        "name" : "move",
        "description" : "Moves a file from one location to another",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "srcPath" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to this bootstrap FilePermitter path context"
            },
            "dstFileId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the FilePermitter id for the move destination"
            },
            "dstPath" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to this bootstrap FilePermitter path context"
            },
            "mkdir" : {
              "schema" : {
                "type" : "boolean"
              },
              "description" : "true to make destination directories"
            },
            "overwrite" : {
              "schema" : {
                "type" : "boolean"
              },
              "description" : "true to allow overwriting existing files"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "srcPath", "dstFileId", "dstPath", "mkdir", "overwrite" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "move(srcPath, dstFileId, dstPath, mkdir, overwrite)",
            "id" : "move-java-lang-string-java-lang-string-java-lang-string-boolean-boolean"
          }
        } ]
      }, {
        "id" : "files-read",
        "name" : "read",
        "description" : "Read the contents of the file as a string",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "file" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to the bootstrap FilePermitter path"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "file" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "read(file)",
            "id" : "read-java-lang-string"
          }
        } ]
      }, {
        "id" : "files-reader",
        "name" : "reader",
        "description" : "Creates a byte reader on the contents of the file",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "file" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to the bootstrap FilePermitter path"
            }
          }
        },
        "output" : "ByteReader",
        "returns" : "ByteReader",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "file" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "reader(file)",
            "id" : "reader-java-lang-string"
          }
        } ]
      }, {
        "id" : "files-write",
        "name" : "write",
        "description" : "Write the string contents to a file",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "file" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to the bootstrap FilePermitter path"
            },
            "body" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "as a string"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "file", "body" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "write(file, body)",
            "id" : "write-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "files-writeBinary",
        "name" : "writeBinary",
        "description" : "Write the binary contents from the byte buffer to a file",
        "context" : "FilesContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "file" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "relative to the bootstrap FilePermitter path"
            },
            "buffer" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteBufferHandle"
              },
              "description" : "byte handle of the buffer to read from"
            },
            "offSet" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "to start writing"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "FilesContext" ],
          "required" : [ "file", "buffer", "offSet" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "writeBinary(file, buffer, offSet)",
            "id" : "writebinary-java-lang-string-co-opscotch-model-workflow-bytebufferhandle-long"
          }
        } ]
      } ]
    },
    "JavascriptContext" : {
      "description" : "This is the entry point to the agent functionality from javascript.",
      "longDescription" : "This is the entry point to the agent functionality from javascript.",
      "functions" : [ {
        "id" : "addSplitReturnItem",
        "name" : "addSplitReturnItem",
        "description" : "When the current step is a \"scripted-split-aggregate\" type (see Step) the processed item must be added to the returned aggregate using this method.",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "item" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "item" ],
          "examples" : [ {
            "code" : "context.addSplitReturnItem(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "addSplitReturnItem(item)",
            "id" : "addsplitreturnitem-java-lang-string"
          }
        } ]
      }, {
        "id" : "addSystemError",
        "name" : "addSystemError",
        "description" : "Adds an error not intended for a user outside the agent. It will also mark the context as in an error state. System errors would generally be thrown or handled.",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "error" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "System error"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "addSystemError(error)",
            "id" : "addsystemerror-java-lang-string"
          }
        } ]
      }, {
        "id" : "addUserError",
        "name" : "addUserError",
        "description" : "Adds an error intended for a user outside the agent. It will also mark the context as in an error state. User errors would generally make their way to a human.",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "error" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "User error"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "error" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "addUserError(error)",
            "id" : "addusererror-java-lang-string"
          }
        } ]
      }, {
        "id" : "agentControl",
        "name" : "agentControl",
        "description" : "Obtain an Agent Control context for influencing the agent lifecycle. This is currently in beta and not supported",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "AgentControlContext",
        "returns" : "AgentControlContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "agentControl()",
            "id" : "agentcontrol-no-args"
          }
        } ]
      }, {
        "id" : "bytes",
        "name" : "bytes",
        "description" : "Obtain a Byte context for working with bytes",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "ByteContext",
        "returns" : "ByteContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "bytes()",
            "id" : "bytes-no-args"
          }
        } ]
      }, {
        "id" : "counter",
        "name" : "counter",
        "description" : "Atomically add to (or subtract from) a thread safe atomic counter and return the updated value To just get the value pass 0 for the add parameter add",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the counter to add or update"
            },
            "add" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "the value to add to the counter - it can be negative or 0 if you want to get the value"
            }
          }
        },
        "output" : "number",
        "returns" : "number",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "name", "add" ],
          "examples" : [ {
            "code" : "var value = context.counter(\"myCounter\", 0); // just get the value\nvar added = context.counter(\"myCounter\", 10); // 10 is added and the final value returned\nvar subtracted = context.counter(\"myCounter\", -10); // 10 is subtracted and the final value returned"
          } ],
          "usage" : {
            "signature" : "counter(name, add)",
            "id" : "counter-java-lang-string-double"
          }
        } ]
      }, {
        "id" : "crypto",
        "name" : "crypto",
        "description" : "Obtain a Cryptography context for working with cryptography",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "CryptoContext",
        "returns" : "CryptoContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "crypto()",
            "id" : "crypto-no-args"
          }
        } ]
      }, {
        "id" : "delta",
        "name" : "delta",
        "description" : "Returns the differences between the current value and the last value stored for given key",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to lookup in persistence"
            },
            "currentValue" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "the current value to compare to the last value stored"
            }
          }
        },
        "output" : "number",
        "returns" : "number",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key", "currentValue" ],
          "examples" : [ {
            "code" : "delta = context.delta(\"myTs\", 12);"
          } ],
          "usage" : {
            "signature" : "delta(key, currentValue)",
            "id" : "delta-java-lang-string-java-lang-double"
          }
        } ]
      }, {
        "id" : "diagnostic",
        "name" : "diagnostic",
        "description" : "Obtain a Trace context for adding data to sent traces",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "DiagnosticsContext",
        "returns" : "DiagnosticsContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "diagnostic()",
            "id" : "diagnostic-no-args"
          }
        } ]
      }, {
        "id" : "diagnosticLog",
        "name" : "diagnosticLog",
        "description" : "Write a diagnostic log. This will only be emitted in development mode, or in Production mode if the step is enabled via a \"enableDiagnostics\" message",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "message" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to log"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "message" ],
          "examples" : [ {
            "code" : "context.diagnosticLog(\"Hello World\");"
          } ],
          "usage" : {
            "signature" : "diagnosticLog(message)",
            "id" : "diagnosticlog-java-lang-string"
          }
        } ]
      }, {
        "id" : "end",
        "name" : "end",
        "description" : "Terminates the running flow and returns immediately.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "context.end();"
          } ],
          "usage" : {
            "signature" : "end()",
            "id" : "end-no-args"
          }
        } ]
      }, {
        "id" : "files",
        "name" : "files",
        "description" : "Request access to the bootstrap file permission",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "id" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "in bootstrap for the file permission"
            }
          }
        },
        "output" : "FilesContext",
        "returns" : "FilesContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "id" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "files(id)",
            "id" : "files-java-lang-string"
          }
        } ]
      }, {
        "id" : "getAllErrors",
        "name" : "getAllErrors",
        "description" : "Retrieves a list of all error messages associated with the current context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getAllErrors()",
            "id" : "getallerrors-no-args"
          }
        } ]
      }, {
        "id" : "getBody",
        "name" : "getBody",
        "description" : "A shorthand for: check getMessageBodyAsString()then check getPassedMessageAsString() @return the contents eiter passed into the step or set by the step.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getBody();"
          } ],
          "usage" : {
            "signature" : "getBody()",
            "id" : "getbody-no-args"
          }
        } ]
      }, {
        "id" : "getData",
        "name" : "getData",
        "description" : "",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "data = JSON.parse(context.getData());"
          } ],
          "usage" : {
            "signature" : "getData()",
            "id" : "getdata-no-args"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "data = context.getData(key);"
          } ],
          "usage" : {
            "signature" : "getData(key)",
            "id" : "getdata-java-lang-string"
          }
        } ]
      }, {
        "id" : "getFirstError",
        "name" : "getFirstError",
        "description" : "Retrieves the first error message from a given list of errors, if available.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "errors" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "description" : "the list of error messages to retrieve the first error from"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "errors" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getFirstError(errors)",
            "id" : "getfirsterror-java-util-list-java-lang-string"
          }
        } ]
      }, {
        "id" : "getHeader",
        "name" : "getHeader",
        "description" : "Get a header from the previous request/response - note: it always returns an array string",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the name of the header to get"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "name" ],
          "examples" : [ {
            "code" : "headerArray = context.getHeader(\"aHeader\");\nheader = JSON.parse(headerArray)[0];"
          } ],
          "usage" : {
            "signature" : "getHeader(name)",
            "id" : "getheader-java-lang-string"
          }
        } ]
      }, {
        "id" : "getMessageBodyAsString",
        "name" : "getMessageBodyAsString",
        "description" : "Get the current message body, this could be the response from an http call for example",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getMessageBodyAsString();"
          } ],
          "usage" : {
            "signature" : "getMessageBodyAsString()",
            "id" : "getmessagebodyasstring-no-args"
          }
        } ]
      }, {
        "id" : "getPassedMessageAsString",
        "name" : "getPassedMessageAsString",
        "description" : "Get the message body that was passed to this step.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "passedMessage = context.getPassedMessageAsString();"
          } ],
          "usage" : {
            "signature" : "getPassedMessageAsString()",
            "id" : "getpassedmessageasstring-no-args"
          }
        } ]
      }, {
        "id" : "getPersistedItem",
        "name" : "getPersistedItem",
        "description" : "Gets an item from the step persistence",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the key of the item"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "item = context.getPersistedItem(\"myItem\");"
          } ],
          "usage" : {
            "signature" : "getPersistedItem(key)",
            "id" : "getpersisteditem-java-lang-string"
          }
        } ]
      }, {
        "id" : "getProperty",
        "name" : "getProperty",
        "description" : "Gets a property from this running context",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the property to get"
            }
          }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "property = context.getProperty(\"aKey\");"
          } ],
          "usage" : {
            "signature" : "getProperty(key)",
            "id" : "getproperty-java-lang-string"
          }
        } ]
      }, {
        "id" : "getStepProperties",
        "name" : "getStepProperties",
        "description" : "Returns the set properties for the Step. These properties will persist after requests but not over config reloads/restarts",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "property = context.getStepProperties().put(\"myProperty\", \"ok\");"
          } ],
          "usage" : {
            "signature" : "getStepProperties()",
            "id" : "getstepproperties-no-args"
          }
        } ]
      }, {
        "id" : "getStream",
        "name" : "getStream",
        "description" : "Get the stream on the context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "ByteReader",
        "returns" : "ByteReader",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getStream()",
            "id" : "getstream-no-args"
          }
        } ]
      }, {
        "id" : "getSystemErrors",
        "name" : "getSystemErrors",
        "description" : "Retrieves a list of system-specific error messages associated with the current context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getSystemErrors()",
            "id" : "getsystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "getTimestamp",
        "name" : "getTimestamp",
        "description" : "Get the current UTC timestamp (note that the timestamp might be set by a test or other mechanism) in milliseconds since 1970-01-01T00:00:00Z (UTC)",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "integer",
        "returns" : "integer",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "ts = context.getTimestamp();\n\ndate = new Date(context.getTimestamp())"
          } ],
          "usage" : {
            "signature" : "getTimestamp()",
            "id" : "gettimestamp-no-args"
          }
        } ]
      }, {
        "id" : "getTimestampManager",
        "name" : "getTimestampManager",
        "description" : "The timestamp manager allows for persistence of timestamps",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "TimestampManager",
        "returns" : "TimestampManager",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "tm = context.getTimestampManager();"
          } ],
          "usage" : {
            "signature" : "getTimestampManager()",
            "id" : "gettimestampmanager-no-args"
          }
        } ]
      }, {
        "id" : "getUserErrors",
        "name" : "getUserErrors",
        "description" : "Retrieves a list of user-specific error messages associated with the current context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getUserErrors()",
            "id" : "getusererrors-no-args"
          }
        } ]
      }, {
        "id" : "hasSystemErrors",
        "name" : "hasSystemErrors",
        "description" : "Checks if there are any system-specific errors in the current context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasSystemErrors()",
            "id" : "hassystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "hasUserErrors",
        "name" : "hasUserErrors",
        "description" : "Checks if there are any user-specific errors in the current context.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasUserErrors()",
            "id" : "hasusererrors-no-args"
          }
        } ]
      }, {
        "id" : "hash",
        "name" : "hash",
        "description" : "Note : This is a non-cryptographic hash and is intended to be used for obfuscation. When hashing a value, the original and the hash are emitted to the log to be referred to at a later date. The hash can be used in metrics etc so that the original value is not transmitted. The intention is that the raw value can remain in the originating network and the hash value can be transmitted out of network.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "toHash" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "toHash" ],
          "examples" : [ {
            "code" : "hashedValue = context.hash(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "hash(toHash)",
            "id" : "hash-java-lang-string"
          }
        } ]
      }, {
        "id" : "isErrored",
        "name" : "isErrored",
        "description" : "Indicates whether the current context is in an errored state.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "isErrored()",
            "id" : "iserrored-no-args"
          }
        } ]
      }, {
        "id" : "jsonPath",
        "name" : "jsonPath",
        "description" : "Returns the result from a JSONPath expression",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "json" : {
              "schema" : {
                "type" : "string"
              }
            },
            "expression" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "json", "expression" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "jsonPath(json, expression)",
            "id" : "jsonpath-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "licensing",
        "name" : "licensing",
        "description" : "Obtain licensing information. This is currently a BETA feature and is unsupported.",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "LicensingContext",
        "returns" : "LicensingContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "licensing()",
            "id" : "licensing-no-args"
          }
        } ]
      }, {
        "id" : "mergeJsonStrings",
        "name" : "mergeJsonStrings",
        "description" : "Returns a merged json string",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "one" : {
              "schema" : {
                "type" : "string"
              }
            },
            "two" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "one", "two" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "mergeJsonStrings(one, two)",
            "id" : "mergejsonstrings-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue",
        "name" : "queue",
        "description" : "Returns the high performance persistent queue",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "PersistentQueueContext",
        "returns" : "PersistentQueueContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "queue()",
            "id" : "queue-no-args"
          }
        } ]
      }, {
        "id" : "regexMatch",
        "name" : "regexMatch",
        "description" : "Returns the regex matches",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "regex" : {
              "schema" : {
                "type" : "string"
              }
            },
            "input" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "regex", "input" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "regexMatch(regex, input)",
            "id" : "regexmatch-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "removeAllHeaders",
        "name" : "removeAllHeaders",
        "description" : "Remove all headers from the current state",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "context.removeAllHeaders();"
          } ],
          "usage" : {
            "signature" : "removeAllHeaders()",
            "id" : "removeallheaders-no-args"
          }
        } ]
      }, {
        "id" : "removeHeader",
        "name" : "removeHeader",
        "description" : "Remove a header from the current state",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "name" ],
          "examples" : [ {
            "code" : "context.removeHeader(\"aHeader\");"
          } ],
          "usage" : {
            "signature" : "removeHeader(name)",
            "id" : "removeheader-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendMetric",
        "name" : "sendMetric",
        "description" : "Send a metric",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the metric"
            },
            "value" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "of the metric"
            },
            "routingToken" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "the routing token for the metric"
            },
            "timestamp" : {
              "schema" : {
                "type" : "integer"
              },
              "description" : "the timestamp of the metric"
            },
            "metadata" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "additional metadata for the metric as key-value pairs"
            },
            "outputId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "id of the output configured in the bootstrap"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ {
            "code" : "context.sendMetric(\"theKey\", 123);"
          } ],
          "usage" : {
            "signature" : "sendMetric(key, value)",
            "id" : "sendmetric-java-lang-string-double"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "routingToken", "timestamp", "key", "value", "metadata" ],
          "examples" : [ {
            "code" : "context.sendMetric(\"theRoutingToken\", theTimestamp, \"theKey\", 123, { \"someMeta\" : \"Data\"});"
          } ],
          "usage" : {
            "signature" : "sendMetric(routingToken, timestamp, key, value, metadata)",
            "id" : "sendmetric-java-lang-string-long-java-lang-string-double-java-util-map-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "outputId", "key", "value" ],
          "examples" : [ {
            "code" : "context.sendMetric(\"my-output\", \"theKey\", 123);"
          } ],
          "usage" : {
            "signature" : "sendMetric(outputId, key, value)",
            "id" : "sendmetric-java-lang-string-java-lang-string-double"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "outputId", "timestamp", "key", "value" ],
          "examples" : [ {
            "code" : "context.sendMetric(\"my-output\", theTimestamp, \"theKey\", 123);"
          } ],
          "usage" : {
            "signature" : "sendMetric(outputId, timestamp, key, value)",
            "id" : "sendmetric-java-lang-string-long-java-lang-string-double"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "outputId", "key", "value", "metadata" ],
          "examples" : [ {
            "code" : "context.sendMetric(\"my-output\", \"theKey\", 123, { \"someMeta\" : \"Data\"});"
          } ],
          "usage" : {
            "signature" : "sendMetric(outputId, key, value, metadata)",
            "id" : "sendmetric-java-lang-string-java-lang-string-double-java-util-map-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "timestamp", "key", "value" ],
          "examples" : [ {
            "code" : "context.sendMetric(theTimestamp, \"theKey\", 123);"
          } ],
          "usage" : {
            "signature" : "sendMetric(timestamp, key, value)",
            "id" : "sendmetric-long-java-lang-string-double"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "timestamp", "key", "value", "metadata" ],
          "examples" : [ {
            "code" : "context.sendMetric(theTimestamp, \"theKey\", 123, { \"someMeta\" : \"Data\"});"
          } ],
          "usage" : {
            "signature" : "sendMetric(timestamp, key, value, metadata)",
            "id" : "sendmetric-long-java-lang-string-double-java-util-map-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStep",
        "name" : "sendToStep",
        "description" : "Send a message to another step and return a completed context upon completion",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send to"
            },
            "body" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send"
            },
            "deploymentAccessId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "allowDeploymentAccess id"
            },
            "headers" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to send"
            }
          }
        },
        "output" : "JavascriptStateContext",
        "returns" : "JavascriptStateContext",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "stepName", "body" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStep(stepName, body)",
            "id" : "sendtostep-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"appBridge\", \"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStep(deploymentAccessId, stepName, body)",
            "id" : "sendtostep-java-lang-string-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStep(stepName, body, headers)",
            "id" : "sendtostep-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "var completedContext = context.sendToStep(\"appBridge\", \"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStep(deploymentAccessId, stepName, body, headers)",
            "id" : "sendtostep-java-lang-string-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStepAndForget",
        "name" : "sendToStepAndForget",
        "description" : "Send a message to another step and returns immediately. The step called will be processed in another thread, and you will not be able to access to the result.",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "stepName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send to"
            },
            "body" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to send"
            },
            "deploymentAccessId" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "allowDeploymentAccess id"
            },
            "headers" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to send"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "stepName", "body" ],
          "examples" : [ {
            "code" : "context.sendToStep(\"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(stepName, body)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body" ],
          "examples" : [ {
            "code" : "context.sendToStepAndForget(\"appBridge\", \"myStep\", \"theBody\");"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(deploymentAccessId, stepName, body)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "context.sendToStep(\"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(stepName, body, headers)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        }, {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "deploymentAccessId", "stepName", "body", "headers" ],
          "examples" : [ {
            "code" : "context.sendToStepAndForget(\"appBridge\", \"myStep\", \"theBody\", { \"header1\" : \"abc\"});"
          } ],
          "usage" : {
            "signature" : "sendToStepAndForget(deploymentAccessId, stepName, body, headers)",
            "id" : "sendtostepandforget-java-lang-string-java-lang-string-java-lang-string-java-util-map-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setBody",
        "name" : "setBody",
        "description" : "An alias for setMessage(...)",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "body" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "to set"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "body" ],
          "examples" : [ {
            "code" : "context.setBody(\"hello\");"
          } ],
          "usage" : {
            "signature" : "setBody(body)",
            "id" : "setbody-java-lang-object"
          }
        } ]
      }, {
        "id" : "setCounter",
        "name" : "setCounter",
        "description" : "Atomically set the counter to an absolute value",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the counter to add or update"
            },
            "value" : {
              "schema" : {
                "type" : "number"
              },
              "description" : "to set the counter to"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "name", "value" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setCounter(name, value)",
            "id" : "setcounter-java-lang-string-double"
          }
        } ]
      }, {
        "id" : "setData",
        "name" : "setData",
        "description" : "Set the JSON data for this step",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "data" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "data" ],
          "examples" : [ {
            "code" : "context.setData(JSON.stringify(data));"
          } ],
          "usage" : {
            "signature" : "setData(data)",
            "id" : "setdata-java-lang-string"
          }
        } ]
      }, {
        "id" : "setHeader",
        "name" : "setHeader",
        "description" : "Add a header to the next http request",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "name" : {
              "schema" : {
                "type" : "string"
              }
            },
            "value" : {
              "schema" : {
                "type" : "object"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "name", "value" ],
          "examples" : [ {
            "code" : "context.setHeader(\"aHeader\", \"aValue\");"
          } ],
          "usage" : {
            "signature" : "setHeader(name, value)",
            "id" : "setheader-java-lang-string-java-lang-object"
          }
        } ]
      }, {
        "id" : "setHttpMethod",
        "name" : "setHttpMethod",
        "description" : "Set the HTTP method for the next http action This is generally used when a method other than the default is required. The HTTP method will default to GET unless there is a payload body then it will default to POST",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "method" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "method" ],
          "examples" : [ {
            "code" : "context.setHttpMethod(\"POST\");"
          } ],
          "usage" : {
            "signature" : "setHttpMethod(method)",
            "id" : "sethttpmethod-java-lang-string"
          }
        } ]
      }, {
        "id" : "setHttpMultipartType",
        "name" : "setHttpMultipartType",
        "description" : "Enables multipart HTTP requests and sets the content type and part names.",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "textPartName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "form field name for the body part"
            },
            "contentType" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "content type for the body part"
            },
            "binaryPartName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "form field name for the binary part"
            },
            "binaryContentType" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "content type for the binary part"
            },
            "binaryFileName" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "filename to use for the binary part"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "textPartName", "contentType", "binaryPartName", "binaryContentType", "binaryFileName" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setHttpMultipartType(textPartName, contentType, binaryPartName, binaryContentType, binaryFileName)",
            "id" : "sethttpmultiparttype-java-lang-string-java-lang-string-java-lang-string-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setMessage",
        "name" : "setMessage",
        "description" : "Sets the message body for this running exchange",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "message" : {
              "schema" : {
                "type" : "object"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "message" ],
          "examples" : [ {
            "code" : "context.setMessage(\"hello world\");"
          } ],
          "usage" : {
            "signature" : "setMessage(message)",
            "id" : "setmessage-java-lang-object"
          }
        } ]
      }, {
        "id" : "setPersistedItem",
        "name" : "setPersistedItem",
        "description" : "Sets an item to the step persistence",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              }
            },
            "value" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ {
            "code" : "context.setPersistedItem(\"myItem\", \"theValue\");"
          } ],
          "usage" : {
            "signature" : "setPersistedItem(key, value)",
            "id" : "setpersisteditem-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "setProperty",
        "name" : "setProperty",
        "description" : "Sets a property onto this running context to be available in downstream step execution This differs from setPersistedItem in that setPersistedItem sets onto the STEP to be available on THIS STEP in future runs, while setProperty makes an item available to OTHER steps",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the property to set"
            },
            "value" : {
              "schema" : {
                "type" : "object"
              },
              "description" : "of the property to set"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "key", "value" ],
          "examples" : [ {
            "code" : "context.setProperty(\"aKey\", \"aValue\");"
          } ],
          "usage" : {
            "signature" : "setProperty(key, value)",
            "id" : "setproperty-java-lang-string-java-lang-object"
          }
        } ]
      }, {
        "id" : "setStream",
        "name" : "setStream",
        "description" : "Sets the body content from the provided byte buffer. @param reader name containing the body content to be set",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "reader" : {
              "schema" : {
                "type" : "object",
                "$ref" : "#ByteReader"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "reader" ],
          "examples" : [ {
            "code" : "context.setStream(buffer);"
          } ],
          "usage" : {
            "signature" : "setStream(reader)",
            "id" : "setstream-co-opscotch-model-workflow-bytereader"
          }
        } ]
      }, {
        "id" : "setStreamFromString",
        "name" : "setStreamFromString",
        "description" : "Sets a stream from a string",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "streamString" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to set as a stream"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "streamString" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "setStreamFromString(streamString)",
            "id" : "setstreamfromstring-java-lang-string"
          }
        } ]
      }, {
        "id" : "setUrl",
        "name" : "setUrl",
        "description" : "Set the url for the next http action with reference to a named host The path can start with a / even if the named host ends in a / - the result will be a single '/'",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "hostref" : {
              "schema" : {
                "type" : "string"
              }
            },
            "path" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "hostref", "path" ],
          "examples" : [ {
            "code" : "context.setUrl(\"myHost\", \"/a/path\");"
          } ],
          "usage" : {
            "signature" : "setUrl(hostref, path)",
            "id" : "seturl-java-lang-string-java-lang-string"
          }
        } ]
      }, {
        "id" : "sleep",
        "name" : "sleep",
        "description" : "Force the currently running script to sleep for the given milliseconds",
        "context" : "JavascriptContext",
        "deterministic" : false,
        "sideEffects" : true,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "ms" : {
              "schema" : {
                "type" : "integer"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "ms" ],
          "examples" : [ {
            "code" : "context.sleep(100);"
          } ],
          "usage" : {
            "signature" : "sleep(ms)",
            "id" : "sleep-long"
          }
        } ]
      }, {
        "id" : "xmlToJson",
        "name" : "xmlToJson",
        "description" : "Returns a json string from an xml string",
        "context" : "JavascriptContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "xml" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptContext" ],
          "required" : [ "xml" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "xmlToJson(xml)",
            "id" : "xmltojson-java-lang-string"
          }
        } ]
      } ]
    },
    "JavascriptStateContext" : {
      "description" : "The Javascript State Context is a reduced version of the JavascriptContext containing readonly functions.",
      "longDescription" : "The Javascript State Context is a reduced version of the JavascriptContext containing readonly functions. This context is returned from context.sendToStep(..) and contains the completed context of the step that was sent to.",
      "functions" : [ {
        "id" : "sendToStep-getAllErrors",
        "name" : "getAllErrors",
        "description" : "Retrieves a list of all error messages associated with the current context.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getAllErrors()",
            "id" : "getallerrors-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-getBody",
        "name" : "getBody",
        "description" : "A shorthand for: check getMessageBodyAsString()then check getPassedMessageAsString() @return the contents eiter passed into the step or set by the step.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getBody();"
          } ],
          "usage" : {
            "signature" : "getBody()",
            "id" : "getbody-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-getFirstError",
        "name" : "getFirstError",
        "description" : "Retrieves the first error message from a given list of errors, if available.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "errors" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "description" : "the list of error messages to retrieve the first error from"
            }
          }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ "errors" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getFirstError(errors)",
            "id" : "getfirsterror-java-util-list-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStep-getMessageBodyAsString",
        "name" : "getMessageBodyAsString",
        "description" : "Get the current message body, this could be the response from an http call for example",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "string",
        "returns" : "string",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "body = context.getMessageBodyAsString();"
          } ],
          "usage" : {
            "signature" : "getMessageBodyAsString()",
            "id" : "getmessagebodyasstring-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-getProperty",
        "name" : "getProperty",
        "description" : "Gets a property from this running context",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "key" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "of the property to get"
            }
          }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ "key" ],
          "examples" : [ {
            "code" : "property = context.getProperty(\"aKey\");"
          } ],
          "usage" : {
            "signature" : "getProperty(key)",
            "id" : "getproperty-java-lang-string"
          }
        } ]
      }, {
        "id" : "sendToStep-getStepProperties",
        "name" : "getStepProperties",
        "description" : "Returns the set properties for the Step. These properties will persist after requests but not over config reloads/restarts",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "object",
        "returns" : "object",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ {
            "code" : "property = context.getStepProperties().put(\"myProperty\", \"ok\");"
          } ],
          "usage" : {
            "signature" : "getStepProperties()",
            "id" : "getstepproperties-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-getSystemErrors",
        "name" : "getSystemErrors",
        "description" : "Retrieves a list of system-specific error messages associated with the current context.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getSystemErrors()",
            "id" : "getsystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-getUserErrors",
        "name" : "getUserErrors",
        "description" : "Retrieves a list of user-specific error messages associated with the current context.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "getUserErrors()",
            "id" : "getusererrors-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-hasSystemErrors",
        "name" : "hasSystemErrors",
        "description" : "Checks if there are any system-specific errors in the current context.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasSystemErrors()",
            "id" : "hassystemerrors-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-hasUserErrors",
        "name" : "hasUserErrors",
        "description" : "Checks if there are any user-specific errors in the current context.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "hasUserErrors()",
            "id" : "hasusererrors-no-args"
          }
        } ]
      }, {
        "id" : "sendToStep-isErrored",
        "name" : "isErrored",
        "description" : "Indicates whether the current context is in an errored state.",
        "context" : "JavascriptStateContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : { }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "JavascriptStateContext" ],
          "required" : [ ],
          "examples" : [ ],
          "usage" : {
            "signature" : "isErrored()",
            "id" : "iserrored-no-args"
          }
        } ]
      } ]
    },
    "LicensingContext" : {
      "description" : "Obtain licensing information.",
      "longDescription" : "Obtain licensing information. This is currently a BETA feature and is unsupported.",
      "functions" : [ {
        "id" : "licensing-isRegistered",
        "name" : "isRegistered",
        "description" : "",
        "context" : "LicensingContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "licenseKey" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "boolean",
        "returns" : "boolean",
        "variants" : [ {
          "contexts" : [ "LicensingContext" ],
          "required" : [ "licenseKey" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "isRegistered(licenseKey)",
            "id" : "isregistered-java-lang-string"
          }
        } ]
      } ]
    },
    "PersistentQueueContext" : {
      "description" : "A high performance implementation of persistent FIFO queue.",
      "longDescription" : "A high performance implementation of persistent FIFO queue. The persistence context is got via context.queue(). Once the queue is obtained, items can be added and removed over multiple runs. The queue will store a small amount of items in memory and overflow to disk. Queue items will persist over agent restarts.",
      "functions" : [ {
        "id" : "queue-push",
        "name" : "push",
        "description" : "Add an item to the end of the persistent queue.",
        "context" : "PersistentQueueContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "item" : {
              "schema" : {
                "type" : "string"
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "PersistentQueueContext" ],
          "required" : [ "item" ],
          "examples" : [ {
            "code" : "context.queue().push(\"adding item\");"
          } ],
          "usage" : {
            "signature" : "push(item)",
            "id" : "push-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue-pushArray",
        "name" : "pushArray",
        "description" : "Add the contents of an array of item to the end of the persistent queue.",
        "context" : "PersistentQueueContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "array" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              }
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "PersistentQueueContext" ],
          "required" : [ "array" ],
          "examples" : [ {
            "code" : "context.queue().pushArray([\"adding\", \"multiple\", \"items\"]);"
          } ],
          "usage" : {
            "signature" : "pushArray(array)",
            "id" : "pusharray-java-util-collection-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue-returnArray",
        "name" : "returnArray",
        "description" : "Return the array items to the head of the queue",
        "context" : "PersistentQueueContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "array" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                }
              },
              "description" : "of items to add"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "PersistentQueueContext" ],
          "required" : [ "array" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "returnArray(array)",
            "id" : "returnarray-java-util-collection-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue-returnItem",
        "name" : "returnItem",
        "description" : "Return the item to the head of the queue",
        "context" : "PersistentQueueContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "item" : {
              "schema" : {
                "type" : "string"
              },
              "description" : "to return"
            }
          }
        },
        "output" : "null",
        "returns" : "null",
        "variants" : [ {
          "contexts" : [ "PersistentQueueContext" ],
          "required" : [ "item" ],
          "examples" : [ ],
          "usage" : {
            "signature" : "returnItem(item)",
            "id" : "returnitem-java-lang-string"
          }
        } ]
      }, {
        "id" : "queue-take",
        "name" : "take",
        "description" : "Request the given amount of items from the queue or an empty array when no items available. NOTE: the returned amount may not be the entire available items. The method should be called repeatedly until the desired amount is collected. This function waits for a short period for data to be loaded from file and may not load all the data.",
        "context" : "PersistentQueueContext",
        "deterministic" : true,
        "sideEffects" : false,
        "input" : {
          "type" : "object",
          "required" : [ ],
          "additionalProperties" : false,
          "properties" : {
            "count" : {
              "schema" : {
                "type" : "integer"
              }
            }
          }
        },
        "output" : "array",
        "returns" : "array",
        "variants" : [ {
          "contexts" : [ "PersistentQueueContext" ],
          "required" : [ "count" ],
          "examples" : [ {
            "code" : "var items = context.queue().take(1000);"
          } ],
          "usage" : {
            "signature" : "take(count)",
            "id" : "take-int"
          }
        } ]
      } ]
    }
  }
}