/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { SuperAgentRequest } from 'superagent'; import { RequestOptions, HttpClient, SecurityOptions, Emitters } from './api-clients/http-client.interface'; export declare class SuperagentHttpClient implements HttpClient { /** * The default HTTP timeout for all API calls. */ timeout: number | { deadline?: number; response?: number; }; post(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise; put(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise; get(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise; delete(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise; request(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise; private buildRequest; setCsrfToken(request: SuperAgentRequest): void; /** * Applies authentication headers to the request. * @param request The request object created by a superagent() call. * @param authentications authentications */ private applyAuthToRequest; private progress; private static createCSRFToken; /** * Deserializes an HTTP response body into a value of the specified type. * @param response A SuperAgent response object. * @param returnType The type to return. Pass a string for simple types * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: * all properties on data will be converted to this type. * @returns A value of the specified type. */ private static deserialize; /** * Normalizes parameter values: *
    *
  • remove nils
  • *
  • keep files and arrays
  • *
  • format to string with `paramToString` for other cases
  • *
* @param params The parameters as object properties. * @returns normalized parameters. */ private static normalizeParams; /** * Checks whether the given parameter value represents file-like content. * @param param The parameter to check. * @returns true if param represents a file. */ private static isFileParam; }