/** * State object * @typedef {Object} IntuitState * @property data - The response body (as JSON) * @property response - The HTTP response from the Quickbook(intuit) server (excluding the body) * @property references - An array of all previous data objects used in the Job * @private */ /** * Options object * @typedef {Object} IntuitOptions * @property {object} query - An object of query parameters to be encoded into the URL * @property {object} headers - An object of all request headers * @property {string} [parseAs='json'] - The response format to parse (e.g., 'json', 'text', or 'stream') */ /** * Make a GET request to any intuit endpoint * @example Get intuit user company information. * http.get("/v3/company/9341453908059456/companyinfo/9341453908059456"); * @function * @public * @param {string} path - Path to resource * @param {IntuitOptions} [options={}] - An object containing query and headers for the request * @state {IntuitState} * @returns {Operation} */ export function get(path: string, options?: IntuitOptions): Operation; /** * Make a POST request to any Intuit endpoint * @example Create an account on intuit. * http.post("/v3/company/9341453908059456/account", * { * "Name": "MyJobs_testing", * "AccountType": "Accounts Receivable" * }, * { * query: { * minorversion: 40, * }, * }) * @function * @public * @param {string} path - Path to resource * @param {object} data - The request body (as JSON) * @param {IntuitOptions} [options={}] - An object containing query, and headers for the request * @state {IntuitState} * @returns {Operation} */ export function post(path: string, data: object, options?: IntuitOptions): Operation; /** * State object */ export type IntuitState = { /** * - The response body (as JSON) */ data: any; /** * - The HTTP response from the Quickbook(intuit) server (excluding the body) */ response: any; /** * - An array of all previous data objects used in the Job */ references: any; }; /** * Options object */ export type IntuitOptions = { /** * - An object of query parameters to be encoded into the URL */ query: object; /** * - An object of all request headers */ headers: object; /** * - The response format to parse (e.g., 'json', 'text', or 'stream') */ parseAs?: string; };