/** * Executes an operation. * @function * @private * @param {Operation} operations - Operations * @returns {State} */ export function execute(...operations: Operation): State; /** /** * State object * @typedef {Object} HttpState * @property data - the parsed response body * @property response - the response from the HTTP server, including headers, statusCode, body, etc * @property references - an array of all previous data objects used in the Job * @private **/ /** * Make a GET request * @example * get("patient"); * @function * @public * @param {string} path - Path to resource * @param {object} query - An object of query parameters to be encoded into the URL. * @returns {Operation} * @state {HttpState} */ export function get(path: string, query: object): Operation; /** * Make a POST request * @example * post("patient", { "name":"Bukayo" }); * @function * @public * @param {string} path - Path to resource * @param {object} data - body data to append to the request. JSON will be converted to a string (but a content-type header will not be attached to the request). * @returns {Operation} * @state {HttpState} */ export function post(path: string, data: object): Operation; /** * Generate a birth certificate * @example * sendBirthNotification({ * registry_code: 'abc123', * child: {}, * mother: {}, * father: {}, * }) * @function * @public * @param {object} data - body data to append to the request. JSON will be converted to a string (but a content-type header will not be attached to the request). * @returns {Operation} * @state {HttpState} */ export function sendBirthNotification(data: object): Operation; /** * /** * State object */ export type HttpState = { /** * - the parsed response body */ data: any; /** * - the response from the HTTP server, including headers, statusCode, body, etc */ response: any; /** * - an array of all previous data objects used in the Job */ references: any; }; export { fn, fnIf, each, merge, field, fields, cursor, dateFns, dataPath, dataValue, sourceValue, lastReferenceValue } from "@openfn/language-common";