diff --git a/demo-shell/src/app/app.module.ts b/demo-shell/src/app/app.module.ts index c736763b8c..6be93f9082 100644 --- a/demo-shell/src/app/app.module.ts +++ b/demo-shell/src/app/app.module.ts @@ -20,7 +20,7 @@ import { APP_INITIALIZER, NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FlexLayoutModule } from '@angular/flex-layout'; import { ChartsModule } from 'ng2-charts'; -import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; +import { HttpClientModule } from '@angular/common/http'; import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations'; import { TranslateModule } from '@ngx-translate/core'; import { @@ -28,8 +28,7 @@ import { TRANSLATION_PROVIDER, DebugAppConfigService, CoreModule, - CoreAutomationService, - AuthBearerInterceptor + CoreAutomationService } from '@alfresco/adf-core'; import { ExtensionsModule } from '@alfresco/adf-extensions'; import { AppComponent } from './app.component'; @@ -115,6 +114,7 @@ import localeSv from '@angular/common/locales/sv'; import { setupAppNotifications } from './services/app-notifications-factory'; import { AppNotificationsService } from './services/app-notifications.service'; import { SearchFilterChipsComponent } from './components/search/search-filter-chips.component'; +import { AlfrescoApiModule } from '@alfresco/adf-core/alfresco-api'; registerLocaleData(localeFr); registerLocaleData(localeDe); @@ -153,6 +153,7 @@ registerLocaleData(localeSv); ThemePickerModule, ChartsModule, AppCloudSharedModule, + AlfrescoApiModule, MonacoEditorModule.forRoot() ], declarations: [ @@ -209,10 +210,6 @@ registerLocaleData(localeSv); SearchFilterChipsComponent ], providers: [ - { - provide: HTTP_INTERCEPTORS, useClass: - AuthBearerInterceptor, multi: true - }, { provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production { provide: TRANSLATION_PROVIDER, diff --git a/lib/core/alfresco-api/alfresco-api.module.ts b/lib/core/alfresco-api/alfresco-api.module.ts new file mode 100644 index 0000000000..62c675f84a --- /dev/null +++ b/lib/core/alfresco-api/alfresco-api.module.ts @@ -0,0 +1,54 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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. + */ + +/*tslint:disable*/ // => because of ADF file naming problems... Try to remove it, if you don't believe me :P + +import { HttpClientModule, HttpClientXsrfModule, HTTP_INTERCEPTORS } from '@angular/common/http'; +import { APP_INITIALIZER, NgModule } from '@angular/core'; +import { AngularAlfrescoApi } from './services/angular-alfresco-api'; +import { AlfrescoApiClientFactory } from './services/alfresco-api-client.factory'; +import { AngularAlfrescoApiLoaderService } from './services/angular-alfresco-api-loader.service'; +import { createAngularAlfrescoApiService } from './services/angular-alfresco-service.factory'; +import { AuthBearerInterceptor } from './services/auth-bearer.interceptor'; + +@NgModule({ + imports: [ + HttpClientModule, + HttpClientXsrfModule.withOptions({ + cookieName: 'CSRF-TOKEN', + headerName: 'X-CSRF-TOKEN' + }) + ], + providers: [ + AngularAlfrescoApi, + AngularAlfrescoApiLoaderService, + AlfrescoApiClientFactory, + { + provide: APP_INITIALIZER, + useFactory: createAngularAlfrescoApiService, + deps: [ + AngularAlfrescoApiLoaderService + ], + multi: true + }, + { + provide: HTTP_INTERCEPTORS, useClass: + AuthBearerInterceptor, multi: true + } + ] +}) +export class AlfrescoApiModule {} diff --git a/lib/core/alfresco-api/index.ts b/lib/core/alfresco-api/index.ts new file mode 100644 index 0000000000..dfccbdf309 --- /dev/null +++ b/lib/core/alfresco-api/index.ts @@ -0,0 +1,20 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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. + */ + +export * from './alfresco-api.module'; +export * from './services/angular-alfresco-api'; +export * from './services/alfresco-api-client.factory'; diff --git a/lib/core/alfresco-api/js-api/js-api-http-client.ts b/lib/core/alfresco-api/js-api/js-api-http-client.ts new file mode 100644 index 0000000000..8547807419 --- /dev/null +++ b/lib/core/alfresco-api/js-api/js-api-http-client.ts @@ -0,0 +1,58 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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 { RequestOptions } from '@alfresco/js-api'; + +export interface JsApiHttpClient { + basePath: string; + request(options: RequestOptions): Promise; + post(options: RequestOptions): Promise; + put(options: RequestOptions): Promise; + get(options: RequestOptions): Promise; + delete(options: RequestOptions): Promise; + /** @deprecated */ + callApi( + path: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string, + url?: string + ): Promise; + /** @deprecated */ + callCustomApi( + path: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string + ): Promise; +} diff --git a/lib/core/alfresco-api/public-api.ts b/lib/core/alfresco-api/public-api.ts new file mode 100644 index 0000000000..9c0055665e --- /dev/null +++ b/lib/core/alfresco-api/public-api.ts @@ -0,0 +1,18 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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. + */ + +// Experimental module, nothing is published! diff --git a/lib/core/alfresco-api/services/alfresco-api-client.factory.ts b/lib/core/alfresco-api/services/alfresco-api-client.factory.ts new file mode 100644 index 0000000000..918f6b1890 --- /dev/null +++ b/lib/core/alfresco-api/services/alfresco-api-client.factory.ts @@ -0,0 +1,48 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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. + */ + +/*tslint:disable*/ // => because of ADF file naming problems... Try to remove it, if you don't believe me :P + +import { Injectable } from '@angular/core'; +import { DiscoveryApi } from '@alfresco/js-api'; +import { AngularAlfrescoApi } from './angular-alfresco-api'; + +@Injectable() +export class AlfrescoApiClientFactory { + // Here we should all the APIs from js-api + private discoveryApi: DiscoveryApi = null; + + constructor( + private angularAlfrescoApi?: AngularAlfrescoApi) { + } + + getDiscoveryApi() { + // DiscoveryApi needs to rely on a lot thinner interface: JsApiHttpClient; + this.discoveryApi = this.discoveryApi || new DiscoveryApi(this.angularAlfrescoApi as any); + return this.discoveryApi; + } + + getNodesApi () { + // TODO + } + + getSearchApi() { + // TODO + } + + // etc... +} diff --git a/lib/core/alfresco-api/services/angular-alfresco-api-loader.service.ts b/lib/core/alfresco-api/services/angular-alfresco-api-loader.service.ts new file mode 100644 index 0000000000..637fc1a519 --- /dev/null +++ b/lib/core/alfresco-api/services/angular-alfresco-api-loader.service.ts @@ -0,0 +1,65 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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 { Injectable } from '@angular/core'; +import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api'; +import { AppConfigService, AppConfigValues } from '../../app-config/app-config.service'; +import { OauthConfigModel } from '../../models/oauth-config.model'; +import { StorageService } from '../../services/storage.service'; +import { AngularAlfrescoApi } from './angular-alfresco-api'; + +@Injectable() +export class AngularAlfrescoApiLoaderService { + + protected alfrescoApi: AlfrescoApi; + + constructor( + protected appConfig: AppConfigService, + protected storageService: StorageService, + private angularAlfrescoApi?: AngularAlfrescoApi) { + } + + async load() { + await this.appConfig.load().then(() => { + this.storageService.prefix = this.appConfig.get(AppConfigValues.STORAGE_PREFIX, ''); + this.initAngularAlfrescoApi(); + }); + } + + protected initAngularAlfrescoApi() { + const oauth: OauthConfigModel = Object.assign({}, this.appConfig.get(AppConfigValues.OAUTHCONFIG, null)); + if (oauth) { + oauth.redirectUri = window.location.origin + window.location.pathname; + oauth.redirectUriLogout = window.location.origin + window.location.pathname; + } + + const config = new AlfrescoApiConfig({ + provider: this.appConfig.get(AppConfigValues.PROVIDERS), + hostEcm: this.appConfig.get(AppConfigValues.ECMHOST), + hostBpm: this.appConfig.get(AppConfigValues.BPMHOST), + authType: this.appConfig.get(AppConfigValues.AUTHTYPE, 'BASIC'), + contextRootBpm: this.appConfig.get(AppConfigValues.CONTEXTROOTBPM), + contextRoot: this.appConfig.get(AppConfigValues.CONTEXTROOTECM), + disableCsrf: this.appConfig.get(AppConfigValues.DISABLECSRF), + withCredentials: this.appConfig.get(AppConfigValues.AUTH_WITH_CREDENTIALS, false), + domainPrefix : this.appConfig.get(AppConfigValues.STORAGE_PREFIX), + oauth2: oauth + }); + + this.angularAlfrescoApi.init(config); + } +} diff --git a/lib/core/alfresco-api/services/angular-alfresco-api.ts b/lib/core/alfresco-api/services/angular-alfresco-api.ts new file mode 100644 index 0000000000..e54bd941f9 --- /dev/null +++ b/lib/core/alfresco-api/services/angular-alfresco-api.ts @@ -0,0 +1,85 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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 { AlfrescoApiConfig } from '@alfresco/js-api'; +import { Injectable } from '@angular/core'; +import { JsApiHttpClient } from '../js-api/js-api-http-client'; +import { JsApiAngularHttpClient } from './js-api-angular-http-client'; +import { HttpClient } from '@angular/common/http'; + +@Injectable() +export class AngularAlfrescoApi { + public contentPrivateClient: JsApiHttpClient; + public contentClient: JsApiHttpClient; + public authClient: JsApiHttpClient; + public searchClient: JsApiHttpClient; + public discoveryClient: JsApiHttpClient; + public gsClient: JsApiHttpClient; + public processClient: JsApiHttpClient; + + constructor(private httpClient: HttpClient) {} + + init(config: AlfrescoApiConfig) { + this.contentPrivateClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api/${config.tenant}/private/alfresco/versions/1`, + this.httpClient + ); + + this.contentClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api/${config.tenant}/public/alfresco/versions/1`, + this.httpClient + ); + + this.authClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api/${config.tenant}/public/authentication/versions/1`, + this.httpClient + ); + + this.searchClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api/${config.tenant}/public/search/versions/1`, + this.httpClient + ); + this.discoveryClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api`, + this.httpClient + ); + + this.gsClient = new JsApiAngularHttpClient( + config.hostEcm, + config.contextRoot, + `/api/${config.tenant}/public/gs/versions/1`, + this.httpClient + ); + + this.processClient = new JsApiAngularHttpClient( + config.hostBpm, + config.contextRootBpm, + '', + this.httpClient + ); + } +} diff --git a/lib/core/alfresco-api/services/angular-alfresco-service.factory.ts b/lib/core/alfresco-api/services/angular-alfresco-service.factory.ts new file mode 100644 index 0000000000..5a27830df7 --- /dev/null +++ b/lib/core/alfresco-api/services/angular-alfresco-service.factory.ts @@ -0,0 +1,23 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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 { AngularAlfrescoApiLoaderService } from './angular-alfresco-api-loader.service'; + +// eslint-disable-next-line prefer-arrow/prefer-arrow-functions +export function createAngularAlfrescoApiService(angularAlfrescoApiService: AngularAlfrescoApiLoaderService) { + return () => angularAlfrescoApiService.load(); +} diff --git a/lib/core/services/auth-bearer.interceptor.ts b/lib/core/alfresco-api/services/auth-bearer.interceptor.ts similarity index 97% rename from lib/core/services/auth-bearer.interceptor.ts rename to lib/core/alfresco-api/services/auth-bearer.interceptor.ts index 9c82c2eecc..327de33757 100644 --- a/lib/core/services/auth-bearer.interceptor.ts +++ b/lib/core/alfresco-api/services/auth-bearer.interceptor.ts @@ -21,7 +21,7 @@ import { HttpHandler, HttpInterceptor, HttpRequest, HttpSentEvent, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpUserEvent, HttpHeaders } from '@angular/common/http'; -import { AuthenticationService } from './authentication.service'; +import { AuthenticationService } from '../../services/authentication.service'; import { catchError, mergeMap } from 'rxjs/operators'; @Injectable() diff --git a/lib/core/alfresco-api/services/js-api-angular-http-client.ts b/lib/core/alfresco-api/services/js-api-angular-http-client.ts new file mode 100644 index 0000000000..7a34c04138 --- /dev/null +++ b/lib/core/alfresco-api/services/js-api-angular-http-client.ts @@ -0,0 +1,190 @@ +/*! + * @license + * Copyright 2019 Alfresco Software, Ltd. + * + * 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 { + paramToString, + RequestOptions +} from '@alfresco/js-api'; +import { JsApiHttpClient } from '../js-api/js-api-http-client'; +import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; + +/** tslint:disable-next line */ +export class JsApiAngularHttpClient implements JsApiHttpClient { + public basePath: string; + + constructor ( + private host: string, + private contextRoot: string, + private servicePath: string, + private httpClient: HttpClient + ) { + this.basePath = `${this.host}/${this.contextRoot}${this.servicePath}`; + } + + request(options: RequestOptions): Promise { + + const responseType = this.getResponseType(options); + + return this.httpClient.request( + options.httpMethod, + options.url, + { + ...(options.bodyParam ? { body: options.bodyParam } : {}), + ...(options.headerParams ? { headers: new HttpHeaders(options.headerParams) } : {}), + observe: 'body', + ...(options.queryParams ? { params: new HttpParams({ fromObject: options.queryParams })} : {}), + ...(responseType ? { responseType } : {}), + }).toPromise() as unknown as Promise; + } + + private getResponseType(options: RequestOptions): 'arraybuffer' | 'blob' | 'json' | 'text' { + let responseType = null; + + if (options.returnType?.toString().toLowerCase() === 'blob' || options.responseType?.toString().toLowerCase() === 'blob') { + responseType = 'blob'; + } else if (options.returnType === 'String') { + responseType = 'text'; + } + + return responseType; + } + + post(options: RequestOptions): Promise { + return this.request({ + ...options, + httpMethod: 'POST', + contentTypes: options.contentTypes || ['application/json'], + accepts: options.accepts || ['application/json'] + }); + } + + put(options: RequestOptions): Promise { + return this.request({ + ...options, + httpMethod: 'PUT', + contentTypes: options.contentTypes || ['application/json'], + accepts: options.accepts || ['application/json'] + }); + } + + get(options: RequestOptions): Promise { + return this.request({ + ...options, + httpMethod: 'GET', + contentTypes: options.contentTypes || ['application/json'], + accepts: options.accepts || ['application/json'] + }); + } + + delete(options: RequestOptions): Promise { + return this.request({ + ...options, + httpMethod: 'DELETE', + contentTypes: options.contentTypes || ['application/json'], + accepts: options.accepts || ['application/json'] + }); + } + + /** @deprecated */ + callApi( + path: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string, + url?: string + ): Promise { + + const basePath = contextRoot ? `${this.host}/${contextRoot}` : this.basePath; + url = url ?? this.buildUrl(basePath, path, pathParams); + + return this.request({ + path, + httpMethod, + pathParams, + queryParams, + headerParams, + formParams, + bodyParam, + contentTypes, + accepts, + returnType, + contextRoot, + responseType, + url + }); + } + + /** @deprecated */ + callCustomApi( + fullPath: string, + httpMethod: string, + pathParams?: any, + queryParams?: any, + headerParams?: any, + formParams?: any, + bodyParam?: any, + contentTypes?: string[], + accepts?: string[], + returnType?: any, + contextRoot?: string, + responseType?: string + ): Promise { + const url = this.buildUrl(fullPath, '', pathParams); + + return this.request({ + path: fullPath, + httpMethod, + pathParams, + queryParams, + headerParams, + formParams, + bodyParam, + contentTypes, + accepts, + returnType, + contextRoot, + responseType, + url + }); + } + + private buildUrl(basePath: string, path: string, pathParams: any): string { + if (path && path !== '' && !path.match(/^\//)) { + path = '/' + path; + } + let url = basePath + path; + + url = url.replace(/\{([\w-]+)\}/g, function (fullMatch, key) { + let value; + if (pathParams.hasOwnProperty(key)) { + value = paramToString(pathParams[key]); + } else { + value = fullMatch; + } + return encodeURIComponent(value); + }); + return url; + } +} diff --git a/lib/core/services/discovery-api.service.ts b/lib/core/services/discovery-api.service.ts index be9310ec9b..8a0fdebc54 100644 --- a/lib/core/services/discovery-api.service.ts +++ b/lib/core/services/discovery-api.service.ts @@ -18,11 +18,12 @@ import { Injectable } from '@angular/core'; import { from, Observable, throwError, Subject } from 'rxjs'; import { catchError, map, switchMap, filter, take } from 'rxjs/operators'; -import { AboutApi, DiscoveryApi, RepositoryInfo, SystemPropertiesApi, SystemPropertiesRepresentation } from '@alfresco/js-api'; +import { AboutApi, RepositoryInfo, SystemPropertiesApi, SystemPropertiesRepresentation } from '@alfresco/js-api'; import { BpmProductVersionModel } from '../models/product-version.model'; import { AlfrescoApiService } from './alfresco-api.service'; import { AuthenticationService } from './authentication.service'; +import { AlfrescoApiClientFactory } from '../alfresco-api'; @Injectable({ providedIn: 'root' @@ -36,7 +37,8 @@ export class DiscoveryApiService { constructor( private apiService: AlfrescoApiService, - private authenticationService: AuthenticationService) { + private authenticationService: AuthenticationService, + private alfrescoApiClientFactory: AlfrescoApiClientFactory) { this.authenticationService.onLogin .pipe( @@ -53,7 +55,8 @@ export class DiscoveryApiService { * @returns ProductVersionModel containing product details */ getEcmProductInfo(): Observable { - const discoveryApi = new DiscoveryApi(this.apiService.getInstance()); + // const discoveryApi = new DiscoveryApi(this.apiService.getInstance()); + const discoveryApi = this.alfrescoApiClientFactory.getDiscoveryApi(); return from(discoveryApi.getRepositoryInformation()) .pipe( diff --git a/lib/core/services/public-api.ts b/lib/core/services/public-api.ts index 2b4d8a377b..74d12dadbf 100644 --- a/lib/core/services/public-api.ts +++ b/lib/core/services/public-api.ts @@ -62,7 +62,7 @@ export * from './identity-user.service'; export * from './identity-group.service'; export * from './identity-role.service'; export * from './version-compatibility.service'; -export * from './auth-bearer.interceptor'; +export * from '../alfresco-api/services/auth-bearer.interceptor'; export * from './oauth2.service'; export * from './language.service'; export * from './identity-user.service.interface'; diff --git a/tsconfig.json b/tsconfig.json index a06ac98956..251b8b25c3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,6 +32,7 @@ "@alfresco/js-api": ["node_modules/@alfresco/js-api"], "@alfresco/adf-extensions": ["lib/extensions"], "@alfresco/adf-core": ["lib/core"], + "@alfresco/adf-core/*": ["lib/core/*"], "@alfresco/adf-content-services": ["lib/content-services"], "@alfresco/adf-process-services": ["lib/process-services"], "@alfresco/adf-insights": ["lib/insights"],