import { ReqUser } from "../lib/models/ReqUser"; import { HttpClient } from "./HttpClient"; /** * A backend client for making requests to the Fairtrail API. * * Provides authentication functions and provides internal methods for making requests to internal endpoints. */ export declare class FairtrailClient extends HttpClient { private reqUser; private reqAsGlobal; private reqAsOrganizationManager; private reqOrganizationId; protected get internal(): { get: (options: Parameters[0]) => Promise>; post: (options: Parameters[0]) => Promise>; put: (options: Parameters[0]) => Promise>; patch: (options: Parameters[0]) => Promise>; delete: (options: Parameters[0]) => Promise>; }; private getNewInstance; /** * Makes any subsequent requests as the provided user. * @param user can be a partial user object, only the provided fields will be used, will default to the service user for any missing fields. */ asUser(user?: Partial): Omit; /** * Makes any subsequent requests as the global user. * @param useAsGlobal typically not used, but can be used with conditional logic to determine if the request should be made as a global user */ asGlobal(useAsGlobal?: boolean): Omit; /** * Makes any subsequent requests as an organization manager. * @param useAsOrganizationManagerOrOrganizationId typically not used, but can be used with conditional logic to determine if the request should be made as an organization manager. Can also be used to specify the organization id to manage. */ asOrganizationManager(useAsOrganizationManagerOrOrganizationId?: boolean | string): Omit; private get serviceApiUser(); protected getAuthHeaders(): Promise>; }