/*! * @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 { ContentAuth } from './authentication/contentAuth'; import { ProcessAuth } from './authentication/processAuth'; import { Oauth2Auth } from './authentication/oauth2Auth'; import { ContentClient } from './contentClient'; import { ProcessClient } from './processClient'; import { AlfrescoApiConfig } from './alfrescoApiConfig'; import { Authentication } from './authentication/authentication'; import { AlfrescoApiType } from './to-deprecate/alfresco-api-type'; import { HttpClient } from './api-clients/http-client.interface'; import { AlfrescoApiClient } from './alfrescoApiClient'; export declare class AlfrescoApi extends AlfrescoApiClient implements AlfrescoApiType { __type: string; contentClient: ContentClient; contentPrivateClient: ContentClient; processClient: ProcessClient; searchClient: ContentClient; discoveryClient: ContentClient; gsClient: ContentClient; authClient: ContentClient; hxiConnectorClient: ContentClient; oauth2Auth: Oauth2Auth; processAuth: ProcessAuth; contentAuth: ContentAuth; bufferEvents: string[]; username: string; constructor(config?: AlfrescoApiConfig, httpClient?: HttpClient); setConfig(config: AlfrescoApiConfig): void; private initConfig; private validateTicket; private initAuth; private clientsFactory; /**@private? */ errorListeners(): void; ticketMismatchListeners(): void; /**@private? */ errorHandler(error: { status?: number; }): void; ticketMismatchHandler(error: { newTicket?: string; }): void; changeWithCredentialsConfig(withCredentials: boolean): void; changeCsrfConfig(disableCsrf: boolean): void; changeEcmHost(hostEcm: string): void; changeBpmHost(hostBpm: string): void; /** * login Alfresco API * @param username Username to login * @param password Password to login * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected. */ login(username: string, password: string): Promise; isCredentialValid(credential: string): boolean; implicitLogin(): Promise; setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication): void; /** * login Tickets * @param ticketEcm alfresco ticket * @param ticketBpm alfresco ticket */ loginTicket(ticketEcm: string, ticketBpm: string): Promise; private loginBPMECM; /** * logout Alfresco API */ logout(): Promise; private _logoutBPMECM; /** * If the client is logged in return true */ isLoggedIn(): boolean; isBpmLoggedIn(): boolean; isEcmLoggedIn(): boolean; getBpmUsername(): string; getEcmUsername(): string; /** * refresh token */ refreshToken(): Promise; getTicketAuth(): string; /** * Set the current Ticket * @param ticketEcm ecm ticket * @param ticketBpm bpm ticket */ setTicket(ticketEcm: string, ticketBpm: string): void; /** * invalidate the current session */ invalidateSession(): void; /** * Get the current Ticket for the Bpm */ getTicketBpm(): string; /** * Get the current Ticket for the Ecm */ getTicketEcm(): string; /** * Get the current Ticket for the Ecm and BPM */ getTicket(): [string, string]; isBpmConfiguration(): boolean; isEcmConfiguration(): boolean; isOauthConfiguration(): boolean; isPublicUrl(): boolean; isEcmBpmConfiguration(): boolean; private emitBuffer; reply(event: string, callback?: any): void; }