Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit a50e297

Browse files
authored
feat: rename and export LegacyAlfrescoApi in public-api (#1382)
* feat: rename and export LegacyAlfrescoApi in public-api
1 parent e19d6ce commit a50e297

File tree

5 files changed

+25
-24
lines changed

5 files changed

+25
-24
lines changed

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
export * from './src/api-legacy/legacy';
1919
export * from './src/api-legacy/content-rest-api/src/index';
2020
export * from './src/api-legacy/activiti-rest-api/src/index';
21+
export * from './src/api-legacy/legacy-alfresco-api';
2122
export * from './src/api/content-rest-api/index';
2223
export * from './src/api/content-custom-api/index';
2324
export * from './src/api/discovery-rest-api/index';

src/alfrescoApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import { ProcessClient } from './processClient';
2424
import { Storage } from './storage';
2525
import { AlfrescoApiConfig } from './alfrescoApiConfig';
2626
import { Authentication } from './authentication/authentication';
27-
import { LegacyAlfrescoApiHelper } from './to-deprecate/legacy-alfresco-api.helper';
27+
import { LegacyAlfrescoApi } from './api-legacy/legacy-alfresco-api';
2828
import { AlfrescoApiType } from './to-deprecate/alfresco-api-type';
2929

30-
export class AlfrescoApi extends LegacyAlfrescoApiHelper implements Emitter, AlfrescoApiType {
30+
export class AlfrescoApi extends LegacyAlfrescoApi implements Emitter, AlfrescoApiType {
3131
storage: Storage;
3232
config: AlfrescoApiConfig;
3333
contentClient: ContentClient;

src/api-clients/api-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

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

2222
export abstract class ApiClient {
@@ -32,7 +32,7 @@ export abstract class ApiClient {
3232
constructor(httpClient: HttpClient);
3333
constructor(httpClient?: AlfrescoApiType | HttpClient) {
3434
// TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!
35-
if (httpClient instanceof LegacyAlfrescoApiHelper) {
35+
if (httpClient instanceof LegacyAlfrescoApi) {
3636
this.alfrescoApi = httpClient as AlfrescoApiType;
3737
} else {
3838
this.httpClient = httpClient as HttpClient;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*!
2+
* @license
3+
* Copyright 2018 Alfresco Software, Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
// Empty class exist only to help differentiate with HttpClient interface
19+
// and "instance of" LegacyAlfrescoApi and to break existing circular deps
20+
export class LegacyAlfrescoApi {}

src/to-deprecate/legacy-alfresco-api.helper.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)