UNPKG

@itwin/insights-client

Version:

Insights client for the iTwin platform

57 lines 2.5 kB
import { PreferReturn } from "./Common"; export declare const REPORTING_BASE_PATH = "https://api.bentley.com/insights/reporting"; export declare const GROUPING_AND_MAPPING_BASE_PATH = "https://api.bentley.com/grouping-and-mapping"; export declare const CARBON_CALCULATION_BASE_PATH = "https://api.bentley.com/insights/carbon-calculation"; export declare const NAMED_GROUPS_BASE_PATH = "https://api.bentley.com/named-groups"; export declare class OperationsBase { protected readonly basePath: string; constructor(basePath: string); /** * Creates a request body and headers * @param {string} operation string specifying which operation will be performed * @param {string} accessToken OAuth access token with scope `insights:read` * @param {string} content request body * @memberof OperationsBase */ protected createRequest(operation: string, accessToken: string, content?: string, preferReturn?: PreferReturn): RequestInit; /** * retrieves specified data * @param {string} nextUrl url for the fetch * @param {RequestInit} requestOptions information about the fetch * @memberof OperationsBase */ protected fetchData(nextUrl: string, requestOptions: RequestInit): Promise<Response>; /** * retrieves specified data * @param {string} nextUrl url for the fetch * @param {RequestInit} requestOptions information about the fetch * @memberof OperationsBase */ protected fetchJSON<T>(nextUrl: string, requestOptions: RequestInit): Promise<T>; /** * Checks if a given string is within the maximum allowed characters * @param {string} input The string to check * @param {number} maxLength The maximum allowed length * @memberof OperationsBase */ protected isWithinMaxAllowedCharacters(input: string, maxLength: number): boolean; /** * checks if given string is a simpleIdentifier * @param {string} name * @memberof OperationsBase */ protected isSimpleIdentifier(name: string | null | undefined): boolean; /** * checks if given string is null or whitespace * @param {string} input * @memberof OperationsBase */ protected isNullOrWhitespace(input: string | null | undefined): boolean; /** * checks if given number is in a range * @param {number | undefined} top * @memberof OperationsBase */ protected topIsValid(top: number | undefined): boolean; } //# sourceMappingURL=OperationsBase.d.ts.map