/** * @license * @preserve * * Copyright 2026 KeeeX SAS * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the "Software"), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ import * as auth from "./parts/auth.js"; import { type ApiFile } from "./types/apifile.js"; import { type AxiosConfig } from "./types/axios.js"; import { type PaginationOutputType } from "./types/pagination.js"; import { type RequestSettings } from "./types/request.js"; import type * as typeAuth from "./types/auth.js"; import type * as typeHook from "./types/hook.js"; import type * as typeMidapi from "./types/midapi.js"; import type * as axios from "axios"; export interface MidSdkParams { /** * Initial auth method headers. * * Those can be changed later on. */ authenticatedHeaders?: typeAuth.AuthMethodHeaders; /** Axios configuration, to do actual requests */ axiosConfig: AxiosConfig; /** Hooks applied to all API calls */ globalHooks?: typeHook.Hooks; requestSettings?: RequestSettings; } /** * Mid-level SDK builder. * * Provides functions to create mid-level API calls. */ export declare class MidSdk { #private; /** Authentication headers automatically applied to authenticated requests. */ protected readonly authenticatedHeaders: auth.AuthenticationHeaders; constructor(params: MidSdkParams); /** * Return an instance of Axios. * * This can be used to perform custom requests. * Axios configuration will be applied (such as `baseURL`, concurrency…). */ protected getAxios: (queue?: string) => Promise; /** Build a API mid-level call that take no input, and produce no output */ protected noInNoOut: (definition: typeMidapi.DefNoInNoOut) => typeMidapi.NoInNoOutFn; /** Build a API mid-level call that take no input, and produce no output (full response) */ protected noInNoOutFull: (definition: typeMidapi.DefNoInNoOut) => typeMidapi.NoInNoOutFn; /** Build a API mid-level call that take Json input, and produce Json output */ protected jsonInJsonOut: (definition: typeMidapi.DefJsonInJsonOut) => typeMidapi.JsonInJsonOutFn; /** Build a API mid-level call that take Json input, and produce Json output (full response) */ protected jsonInJsonOutFull: (definition: typeMidapi.DefJsonInJsonOut) => typeMidapi.JsonInJsonOutFn>; /** Build a API mid-level call that take no input, and produce Json output */ protected noInJsonOut: (definition: typeMidapi.DefNoInJsonOut) => typeMidapi.NoInJsonOutFn; /** Build a API mid-level call that take no input, and produce Json output (full response) */ protected noInJsonOutFull: (definition: typeMidapi.DefNoInJsonOut) => typeMidapi.NoInJsonOutFn>; /** Build a API mid-level call that take JSON input, and produce no output */ protected jsonInNoOut: (definition: typeMidapi.DefJsonInNoOut) => typeMidapi.JsonInNoOutFn; /** Build a API mid-level call that take JSON input, and produce no output (full response) */ protected jsonInNoOutFull: (definition: typeMidapi.DefJsonInNoOut) => typeMidapi.JsonInNoOutFn; /** Build a API mid-level call that take Json input, and produce Json output */ protected paginatedJsonInJsonOut: , ExtraPropsJson = ExtraProps, SortKeys = string>(definition: typeMidapi.DefPaginatedJsonInJsonOut) => typeMidapi.PaginatedJsonInJsonOutFn>; /** Build a API mid-level call that take Json input, and produce Json output (full response) */ protected paginatedJsonInJsonOutFull: , ExtraPropsJson = ExtraProps, SortKeys = string>(definition: typeMidapi.DefPaginatedJsonInJsonOut) => typeMidapi.PaginatedJsonInJsonOutFn>>; /** Build a API mid-level call that take Json input, and return a binary file */ protected jsonInBinOut: (definition: typeMidapi.DefJsonInBinOut) => typeMidapi.JsonInBinOutFn; protected jsonInBinOutFull: (definition: typeMidapi.DefJsonInBinOut) => typeMidapi.JsonInBinOutFn>; /** Build a API mid-level call that take no input, and produce a file */ protected noInBinOut: (definition: typeMidapi.DefNoInBinOut) => typeMidapi.NoInBinOutFn; /** Build a API mid-level call that take no input, and produce a file (full response) */ protected noInBinOutFull: (definition: typeMidapi.DefNoInBinOut) => typeMidapi.NoInBinOutFn>; /** Build a API mid-level call that take a binary input, and return a JSON */ protected binInJsonOut: (definition: typeMidapi.DefBinInJsonOut) => typeMidapi.BinInJsonOutFn; /** Build a API mid-level call that take a binary input, and return a JSON (full response) */ protected binInJsonOutFull: (definition: typeMidapi.DefBinInJsonOut) => typeMidapi.BinInJsonOutFn>; /** Build a API mid-level call that take a binary input, and return a binary output */ protected binInBinOut: (definition: typeMidapi.DefBinInBinOut) => typeMidapi.BinInBinOutFn; /** Build a API mid-level call that take a binary input, and return a binary output (full response) */ protected binInBinOutFull: (definition: typeMidapi.DefBinInBinOut) => typeMidapi.BinInBinOutFn>; /** Build a API mid-level call that take a binary input, and return nothing */ protected binInNoOut: (definition: typeMidapi.DefBinInNoOut) => typeMidapi.BinInNoOutFn; /** Build a API mid-level call that take a binary input, and return nothing (full response) */ protected binInNoOutFull: (definition: typeMidapi.DefBinInNoOut) => typeMidapi.BinInNoOutFn; }