/// /** * This is for OpenApi Util */ import * as $tea from '@alicloud/tea-typescript'; import * as $dara from '@darabonba/typescript'; import Credential from '@alicloud/credentials'; import { Readable } from 'stream'; export declare class GlobalParameters extends $tea.Model { headers?: { [key: string]: string; }; queries?: { [key: string]: string; }; static names(): { [key: string]: string; }; static types(): { [key: string]: any; }; constructor(map?: { [key: string]: any; }); } /** * @remarks * Model for initing client */ export declare class Config extends $tea.Model { /** * @remarks * accesskey id */ accessKeyId?: string; /** * @remarks * accesskey secret */ accessKeySecret?: string; /** * @remarks * security token */ securityToken?: string; /** * @remarks * bearer token * * @example * the-bearer-token */ bearerToken?: string; /** * @remarks * http protocol * * @example * http */ protocol?: string; /** * @remarks * http method * * @example * GET */ method?: string; /** * @remarks * region id * * @example * cn-hangzhou */ regionId?: string; /** * @remarks * read timeout * * @example * 10 */ readTimeout?: number; /** * @remarks * connect timeout * * @example * 10 */ connectTimeout?: number; /** * @remarks * http proxy * * @example * http://localhost */ httpProxy?: string; /** * @remarks * https proxy * * @example * https://localhost */ httpsProxy?: string; /** * @remarks * credential */ credential?: Credential; /** * @remarks * endpoint * * @example * cs.aliyuncs.com */ endpoint?: string; /** * @remarks * proxy white list * * @example * http://localhost */ noProxy?: string; /** * @remarks * max idle conns * * @example * 3 */ maxIdleConns?: number; /** * @remarks * network for endpoint * * @example * public */ network?: string; /** * @remarks * user agent * * @example * Alibabacloud/1 */ userAgent?: string; /** * @remarks * suffix for endpoint * * @example * aliyun */ suffix?: string; /** * @remarks * socks5 proxy */ socks5Proxy?: string; /** * @remarks * socks5 network * * @example * TCP */ socks5NetWork?: string; /** * @remarks * endpoint type * * @example * internal */ endpointType?: string; /** * @remarks * OpenPlatform endpoint * * @example * openplatform.aliyuncs.com */ openPlatformEndpoint?: string; /** * @remarks * credential type * * @example * access_key * * @deprecated */ type?: string; /** * @remarks * Signature Version * * @example * v1 */ signatureVersion?: string; /** * @remarks * Signature Algorithm * * @example * ACS3-HMAC-SHA256 */ signatureAlgorithm?: string; /** * @remarks * Global Parameters */ globalParameters?: GlobalParameters; /** * @remarks * privite key for client certificate * * @example * MIIEvQ */ key?: string; /** * @remarks * client certificate * * @example * -----BEGIN CERTIFICATE----- * xxx-----END CERTIFICATE----- */ cert?: string; /** * @remarks * server certificate * * @example * -----BEGIN CERTIFICATE----- * xxx-----END CERTIFICATE----- */ ca?: string; /** * @remarks * disable HTTP/2 * * @example * false */ disableHttp2?: boolean; tlsMinVersion?: string; /** * @remarks * retry options */ retryOptions?: $dara.RetryOptions; static names(): { [key: string]: string; }; static types(): { [key: string]: any; }; constructor(map?: { [key: string]: any; }); } export declare class OpenApiRequest extends $tea.Model { headers?: { [key: string]: string; }; query?: { [key: string]: string; }; body?: any; stream?: Readable; hostMap?: { [key: string]: string; }; endpointOverride?: string; static names(): { [key: string]: string; }; static types(): { [key: string]: any; }; constructor(map?: { [key: string]: any; }); } export declare class Params extends $tea.Model { action: string; version: string; protocol: string; pathname: string; method: string; authType: string; bodyType: string; reqBodyType: string; style?: string; websocketSubProtocol?: string; static names(): { [key: string]: string; }; static types(): { [key: string]: any; }; constructor(map?: { [key: string]: any; }); } export default class Client { /** * Convert all params of body other than type of readable into content * @param body source Model * @param content target Model * @return void */ static convert(input: $tea.Model, output: $tea.Model): void; /** * If endpointType is internal, use internal endpoint * If serverUse is true and endpointType is accelerate, use accelerate endpoint * Default return endpoint * @param serverUse whether use accelerate endpoint * @param endpointType value must be internal or accelerate * @return the final endpoint */ static getEndpoint(endpoint: string, serverUse: boolean, endpointType: string): string; /** * Get throttling param * @param the response headers * @return time left */ static getThrottlingTimeLeft(headers: { [key: string]: string; }): number | undefined; /** * Hash the raw data with signatureAlgorithm * @param raw hashing data * @param signatureAlgorithm the autograph method * @return hashed bytes */ static hash(raw: Buffer, signatureAlgorithm: string): Buffer; static applyRetryHeaders(headers: { [key: string]: string; }, retriesAttempted: number, backoffDelay: number): void; /** * Generate a nonce string * @return the nonce string */ static getNonce(): string; /** * Get the string to be signed according to request * @param request which contains signed messages * @return the signed string */ static getStringToSign(request: $tea.Request): string; /** * Get signature according to stringToSign, secret * @param stringToSign the signed string * @param secret accesskey secret * @return the signature */ static getROASignature(stringToSign: string, secret: string): string; /** * Parse filter into a form string * @param filter object * @return the string */ static toForm(filter: { [key: string]: any; }): string; /** * Get timestamp * @return the timestamp string */ static getTimestamp(): string; /** * Get UTC string * @return the UTC string */ static getDateUTCString(): string; /** * Parse filter into a object which's type is map[string]string * @param filter query param * @return the object */ static query(filter: { [key: string]: any; }): { [key: string]: string; }; /** * Get signature according to signedParams, method and secret * @param signedParams params which need to be signed * @param method http method e.g. GET * @param secret AccessKeySecret * @return the signature */ static getRPCSignature(signedParams: { [key: string]: string; }, method: string, secret: string): string; /** * Parse array into a string with specified style * @param array the array * @param prefix the prefix string * @style specified style e.g. repeatList * @return the string */ static arrayToStringWithSpecifiedStyle(array: any, prefix: string, style: string): string; static stringifyMapValue(m: { [key: string]: any; }): { [key: string]: string; }; static toArray(input: any): { [key: string]: any; }[]; static getEndpointRules(product: string, regionId: string, endpointType: string, network: string, suffix: string): string; /** * Transform input as map. */ static parseToMap(input: any): { [key: string]: any; }; /** * Get the authorization * @param request request params * @param signatureAlgorithm the autograph method * @param payload the hashed request * @param accessKey the accessKey string * @param accessKeySecret the accessKeySecret string * @return authorization string */ static getAuthorization(request: $tea.Request, signatureAlgorithm: string, payload: string, accessKey: string, accessKeySecret: string): string; static getUserAgent(userAgent: string): string; static signatureMethod(secret: string, source: string, signatureAlgorithm: string): Buffer; /** * Transform a map to a flat style map where keys are prefixed with length info. * Map keys are transformed from "key" to "#length#key" format. * @param input the input object (can be an object, array, or primitive type) * @return the transformed object */ static mapToFlatStyle(input: any): any; }