Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
feat: rename and export LegacyAlfrescoApi in public-api (#1382)
Browse files Browse the repository at this point in the history
* feat: rename and export LegacyAlfrescoApi in public-api
  • Loading branch information
mserwicki authored May 13, 2022
1 parent e19d6ce commit a50e297
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
export * from './src/api-legacy/legacy';
export * from './src/api-legacy/content-rest-api/src/index';
export * from './src/api-legacy/activiti-rest-api/src/index';
export * from './src/api-legacy/legacy-alfresco-api';
export * from './src/api/content-rest-api/index';
export * from './src/api/content-custom-api/index';
export * from './src/api/discovery-rest-api/index';
Expand Down
4 changes: 2 additions & 2 deletions src/alfrescoApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import { ProcessClient } from './processClient';
import { Storage } from './storage';
import { AlfrescoApiConfig } from './alfrescoApiConfig';
import { Authentication } from './authentication/authentication';
import { LegacyAlfrescoApiHelper } from './to-deprecate/legacy-alfresco-api.helper';
import { LegacyAlfrescoApi } from './api-legacy/legacy-alfresco-api';
import { AlfrescoApiType } from './to-deprecate/alfresco-api-type';

export class AlfrescoApi extends LegacyAlfrescoApiHelper implements Emitter, AlfrescoApiType {
export class AlfrescoApi extends LegacyAlfrescoApi implements Emitter, AlfrescoApiType {
storage: Storage;
config: AlfrescoApiConfig;
contentClient: ContentClient;
Expand Down
4 changes: 2 additions & 2 deletions src/api-clients/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

import { AlfrescoApiType } from "../to-deprecate/alfresco-api-type";
import { LegacyAlfrescoApiHelper } from "../to-deprecate/legacy-alfresco-api.helper";
import { LegacyAlfrescoApi } from "../api-legacy/legacy-alfresco-api";
import { HttpClient, RequestOptions } from "./http-client.interface";

export abstract class ApiClient {
Expand All @@ -32,7 +32,7 @@ export abstract class ApiClient {
constructor(httpClient: HttpClient);
constructor(httpClient?: AlfrescoApiType | HttpClient) {
// TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!
if (httpClient instanceof LegacyAlfrescoApiHelper) {
if (httpClient instanceof LegacyAlfrescoApi) {
this.alfrescoApi = httpClient as AlfrescoApiType;
} else {
this.httpClient = httpClient as HttpClient;
Expand Down
20 changes: 20 additions & 0 deletions src/api-legacy/legacy-alfresco-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*!
* @license
* Copyright 2018 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.
*/

// Empty class exist only to help differentiate with HttpClient interface
// and "instance of" LegacyAlfrescoApi and to break existing circular deps
export class LegacyAlfrescoApi {}
20 changes: 0 additions & 20 deletions src/to-deprecate/legacy-alfresco-api.helper.ts

This file was deleted.

0 comments on commit a50e297

Please sign in to comment.