import type { EC3JobStatus, IEC3ConfigurationsClient, IEC3JobsClient, IOdataClient, IReportsClient, Report } from "@itwin/insights-client"; import type { GetAccessTokenFn } from "../context/APIContext"; export declare const EC3URI = "https://buildingtransparency.org/"; /** * EC3 Config Common Props * @beta */ export interface EC3ConfigCommonProps { /** * The OAuth client ID used to authenticate with the EC3 API. */ clientId: string; iTwinId: string; /** * A callback function that returns an access token for authenticating API requests. * If not specified, it defaults to the authorizationClient of the IModelApp. */ getAccessToken?: GetAccessTokenFn; /** * The URI of the EC3 API. If not specified, it defaults to "https://buildingtransparency.org/". */ ec3Uri?: string; /** * The base path for the Reporting API endpoints. If not specified, it defaults to REPORTING_BASE_PATH from @itwin/insights-client. */ reportingBasePath?: string; /** * The base path for the Carbon Calculation API endpoints. If not specified, it defaults to CARBON_CALCULATION_BASE_PATH from @itwin/insights-client. */ carbonCalculationBasePath?: string; /** * A custom implementation of ReportsClient. If provided, reportingBasePath is ignored. */ reportsClient?: IReportsClient; /** * A custom implementation of OdataClient. If provided, reportingBasePath is ignored. */ oDataClient?: IOdataClient; /** * A custom implementation of EC3JobsClient. If provided, carbonCalculationBasePath is ignored. */ ec3JobsClient?: IEC3JobsClient; /** * A custom implementation of EC3ConfigurationClient. If provided, carbonCalculationBasePath is ignored. */ ec3ConfigurationsClient?: IEC3ConfigurationsClient; } /** * EC3 Config Props with Redirect URI * @beta */ export declare type EC3ConfigPropsWithRedirectUri = EC3ConfigCommonProps & { /** * The OAuth redirect URI used to authenticate with the EC3 API. */ redirectUri: string; }; /** * EC3 Config Props with EC3 Access Token * @beta */ export declare type EC3ConfigPropsWithGetEC3AccessToken = EC3ConfigCommonProps & { /** * A callback function that returns an access token for the EC3 API. */ getEC3AccessToken: GetAccessTokenFn; }; /** * EC3 Config Props with default report * @beta */ export declare type EC3ConfigPropsWithDefaultReport = EC3ConfigCommonProps & { /** * The default report to be used for EC3 configuration */ defaultReport?: Report; }; export declare type EC3ConfigPropsWithCallbacks = EC3ConfigCommonProps & { /** * The callback function for export status. */ onExportResult?: (status: EC3JobStatus, templateId: string | undefined) => void; }; /** * EC3 Config Props * @beta */ export declare type EC3ConfigProps = EC3ConfigPropsWithRedirectUri | EC3ConfigPropsWithGetEC3AccessToken | EC3ConfigPropsWithDefaultReport | EC3ConfigPropsWithCallbacks; export declare const getDefaultEC3Uri: (ec3Uri?: string | undefined) => string; export declare class EC3Config { readonly clientId: string; readonly scope = "read%20write"; readonly ec3Uri?: string; readonly reportingBasePath: string; readonly carbonCalculationBasePath: string; readonly iTwinId: string; readonly getAccessToken: GetAccessTokenFn; readonly getEC3AccessToken: GetAccessTokenFn; readonly defaultReport?: Report; private token?; private readonly redirectUri?; readonly reportsClient: IReportsClient; readonly oDataClient: IOdataClient; readonly ec3JobsClient: IEC3JobsClient; readonly ec3ConfigurationsClient: IEC3ConfigurationsClient; constructor(props: EC3ConfigProps); private tokenExpired; private getAuthWindowToken; private getAuthorizationUrl; } //# sourceMappingURL=EC3Config.d.ts.map