import { Billability } from "../models/entry.js"; import { type RequestHeaders } from "./requests.js"; import { axiosClient } from "./symbols.js"; /** * Allows additional properties to be present on the params object. This is * necessary so that the SDK doesn't disallow unknown params that we haven't * implemented yet. */ export type Params = Record> = KnownParams & Record, unknown>; export type ParamsWithPage = { page?: number; itemsPerPage?: number; }; export type ParamsWithSort = { sort?: Array; }; export type Paging = { itemsPerPage: number; currentPage: number; countPages: number; countItems: number; }; type BooleanAsNumber = 0 | 1; export type Filter = { usersId: number; customersId: number; projectsId: number; servicesId: number; lumpsumServicesId: number; billable: Billability; text: string; textsId: number; budgetType: string; timeSince: string; timeUntil: string; active: BooleanAsNumber; fulltext: string; }; export type ResponseWithPaging = { paging: Paging; }; export type ResponseWithoutPaging = Omit; export type ResponseWithFilter = { filter: null | Partial>; }; export type Authentication = { user: string; apiKey: string; }; export type Config = { /** * Information about the client that is going to do the requests. Will be sent * as X-Clockodo-External-Application. */ client: { /** Name of the application or your company */ name: string; /** E-mail address of a technical contact person */ email: string; }; /** Authentication for all requests. Uses cookie authentication if undefined. */ authentication?: Authentication | undefined; /** The API base url. Falls back to "https://my.clockodo.com/api" if undefined. */ baseUrl?: string | undefined; /** Will be sent as Accept-Language header. */ locale?: string | undefined; }; export declare class Api { private [axiosClient]; defaultHeaders: undefined | (() => RequestHeaders); _config: Partial; constructor({ baseUrl, authentication, client, locale, }: Config); set config(config: Partial); get config(): Partial; get(url: string, queryParams?: {}): Promise; getPagesStreaming(...args: Parameters): AsyncGenerator; getAllPages(...args: Parameters): Promise>; post(url: string, body?: {}, headers?: RequestHeaders): Promise; put(url: string, body?: {}, headers?: RequestHeaders): Promise; delete(url: string, body?: {}, headers?: RequestHeaders): Promise; } export {}; //# sourceMappingURL=api.d.ts.map