/** * 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 national ID * @example * registerChild({ * babyData: { * dateOfBirth: "string", * fatherName: "string", * forenames: "string", * gender: "string", * lightwaveETrackerID: "string", * motherName: "string", * noSiblingsInDelivery: "string", * placeOfBirth: "string", * surname: "string", * timeOfbirth: "string", * weightAtBirth: "string", * babyPicture: "string" * }, * personVouching: { * etrackerLightwaveID: "string", * ghanaCardPIN: "string", * relationToBaby: "string", * relativePhone: "string", * relativePicture: "string" * } * }) * @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 registerChild(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 { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";