import { IRequestOptions, IAuthenticationManager } from "@esri/arcgis-rest-request"; import { IRegisteredAppResponse, IApp } from "./types/appType.js"; import { IApiKeyInfo } from "./types/apiKeyType.js"; import { IOAuthAppInfo } from "./types/oAuthType.js"; /** * @internal * Encode special params value (e.g. array type...) in advance in order to make {@linkcode encodeParam} works correctly. Usage is case by case. */ export declare const stringifyArrays: (requestOptions: IRequestOptions) => void; /** * @internal * Used to convert {@linkcode IRegisteredAppResponse} to {@linkcode IApp}. */ export declare function registeredAppResponseToApp(response: IRegisteredAppResponse): IApp; /** * @internal * Used to convert {@linkcode IApp} to {@linkcode IApiKeyInfo} only if `appType` is "apikey". */ export declare function appToApiKeyProperties(response: IApp): IApiKeyInfo; /** * @internal * Used to convert {@linkcode IApp} to {@linkcode IOAuthAppInfo}. */ export declare function appToOAuthAppProperties(response: IApp): IOAuthAppInfo; /** * @internal * Used to extract base request options from a hybrid option and exclude `params` and `authentication`. */ export declare function extractBaseRequestOptions(options: T): Partial; /** * @internal * Used to create a new object including only specified keys from another object. */ export declare function filterKeys(object: T, includedKeys: Array): any; /** * Used to determine if a generated key is in slot 1 or slot 2 key. The full API key should be passed. `undefined` will be returned if the proper slot could not be identified. */ export declare function slotForKey(key: string): 1 | 2; /** * @internal * Used to determine which slot to invalidate a key in given a number or a full or patial key. */ export declare function slotForInvalidationKey(param: string | 1 | 2): 2 | 1; interface IGenerateApiKeyTokenOptions extends IRequestOptions { authentication: IAuthenticationManager; } /** * @internal * Used to generate tokens in slot 1 and/or 2 of an API key. */ export declare function generateApiKeyTokens(itemId: string, slots: Array<1 | 2>, requestOptions: IGenerateApiKeyTokenOptions): Promise<{ [key: string]: string; }>; /** * @internal * Convert boolean flags to an array of slots for {@linkcode generateApiKeyTokens}. */ export declare function generateOptionsToSlots(generateToken1: boolean, generateToken2: boolean): Array<1 | 2>; type expirationDateParams = { apiToken1ExpirationDate: Date | -1; apiToken2ExpirationDate: Date | -1; } | { apiToken1ExpirationDate: Date | -1; } | { apiToken2ExpirationDate: Date | -1; } | {}; /** * @internal * Build params for updating expiration dates */ export declare function buildExpirationDateParams(requestOptions: { apiToken1ExpirationDate?: Date; apiToken2ExpirationDate?: Date; }, fillDefaults?: boolean): expirationDateParams; export {};