/**
* Execute a sequence of operations.
* Wraps `language-common/execute` to make working with this API easier.
* @example
* execute(
* create('foo'),
* delete('bar')
* )(state)
* @private
* @param {Operations} operations - Operations to be performed.
* @returns {Operation}
*/
export function execute(...operations: Operations): Operation;
/**
* Create some resource in msgraph
* @public
* @example
* create("applications", {"displayName": "My App"})
* @function
* @param {string} resource - The type of entity that will be created
* @param {object} data - The data to create the new resource
* @param {function} callback - An optional callback function
* @returns {Operation}
*/
export function create(resource: string, data: object, callback: Function): Operation;
/**
* Make a GET request to msgraph resource
* @public
* @example
* get('sites/root/lists')
* @function
* @param {string} path - Path to resource
* @param {object} query - Query, Headers and Authentication parameters
* @param {function} callback - (Optional) Callback function
* @returns {Operation}
*/
export function get(path: string, query: object, callback?: Function): Operation;
/**
* Get a Drive or SharePoint document library. The drive metadata will be written
* to state.drives, where it can be used by other adaptor functions.
* Pass { id } to get a drive by id or { id, owner } to get default drive for
* some parent resource, like a group
* @public
* @example
Get a drive by ID
* getDrive({ id: "YXzpkoLwR06bxC8tNdg71m" })
* @example Get the default drive for a site
* getDrive({ id: "openfn.sharepoint.com", owner: "sites" })
* @param specifier {Object} - A definition of the drive to retrieve
* - id {string} - The ID of the resource or owner.
* - owner {string} - The type of drive owner (e.g. sites, groups).
* @param {string} name - The local name of the drive used to write to state.drives, ie, state.drives[name]
* @param {function} [callback = s => s] (Optional) Callback function
* @return {Operation}
*/
export function getDrive(specifier: any, name?: string, callback?: Function): Operation;
/**
* Get the contents or metadata of a folder.
* @public
* @example Get a folder by ID
* getFolder('01LUM6XOCKDTZKQC7AVZF2VMHE2I3O6OY3')
* @example Get a folder for a named drive by id
* getFolder("01LUM6XOCKDTZKQC7AVZF2VMHE2I3O6OY3",{ driveName: "mydrive"})
* @param {string} pathOrId - A path to a folder or folder id
* @param {object} options - (Optional) Query parameters
* @param {function} [callback = s => s] (Optional) Callback function
* @return {Operation}
*/
export function getFolder(pathOrId: string, options: object, callback?: Function): Operation;
/**
* Get file metadata or file content.
* @public
* @example Get a file by ID
* getFile('01LUM6XOGRONYNTZ26DBBJPTN5IFTQPBIW')
* @example Get a file for a named drive by id
* getFile("01LUM6XOGRONYNTZ26DBBJPTN5IFTQPBIW",{ driveName: "mydrive"})
* @param {string} pathOrId - A path to a file or file id
* @param {object} options - (Optional) Query parameters
* @param {function} [callback = s => s] (Optional) Callback function
* @return {Operation}
*/
export function getFile(pathOrId: string, options: object, callback?: Function): Operation;
/**
* Upload a file to a drive
* @public
* @example
* Upload Excel file to a drive using `driveId` and `parantItemId`
* uploadFile(
* state => ({
* driveId: state.driveId,
* folderId: state.folderId,
* fileName: `Tracker.xlsx`,
* }),
* state => state.buffer
* );
* @example
* Upload Excel file to a SharePoint drive using `siteId` and `parantItemId`
* uploadFile(
* state => ({
* siteId: state.siteId,
* folderId: state.folderId,
* fileName: `Report.xlsx`,
* }),
* state => state.buffer
* );
* @function
* @param {Object} resource - Resource Object
* @param {String} [resource.driveId] - Drive Id
* @param {String} [resource.driveId] - Site Id
* @param {String} [resource.folderId] - Parent folder id
* @param {String} [resource.contentType] - Resource content-type
* @param {String} [resource.onConflict] - Specify conflict behavior if file with the same name exists. Can be "rename | fail | replace"
* @param {Object} data - A buffer containing the file.
* @param {Function} callback - Optional callback function
* @returns {Operation}
*/
export function uploadFile(resource: {
driveId?: string;
driveId?: string;
folderId?: string;
contentType?: string;
onConflict?: string;
}, data: any, callback: Function): Operation;
export { request, sheetToBuffer } from "./Utils.js";
export { as, combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, parseCsv, sourceValue } from "@openfn/language-common";