mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Updated Extensions manager code to be functional after rebase
This commit is contained in:
@@ -34,6 +34,7 @@ export * from './queries.api';
|
||||
export * from './ratings.api';
|
||||
export * from './renditions.api';
|
||||
export * from './search-ai.api';
|
||||
export * from './settings.api';
|
||||
export * from './sharedlinks.api';
|
||||
export * from './sites.api';
|
||||
export * from './tags.api';
|
||||
|
63
lib/js-api/src/api/content-rest-api/api/settings.api.ts
Normal file
63
lib/js-api/src/api/content-rest-api/api/settings.api.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
* @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 { BaseApi } from './base.api';
|
||||
import { throwIfNotDefined } from '../../../assert';
|
||||
|
||||
export class SettingsApi extends BaseApi {
|
||||
/**
|
||||
* Gets the published extension configuration from
|
||||
* the database
|
||||
* @param instanceId Unique ID for a running instance of ADW
|
||||
* for which configuration is to be fetched
|
||||
*/
|
||||
getSavedExtensionState(instanceId: string): Promise<any> {
|
||||
throwIfNotDefined(instanceId, 'instanceId');
|
||||
|
||||
const pathParams = {
|
||||
instanceId
|
||||
};
|
||||
|
||||
return this.get({
|
||||
path: '/settings/{instanceId}',
|
||||
pathParams
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Publish the extension configuration for an ADW instance
|
||||
* in the database
|
||||
* @param instanceId Unique ID for a running instance of ADW
|
||||
* for which configuration is to be published
|
||||
* @param extensionConfig Extension configuration that is to
|
||||
* be saved
|
||||
*/
|
||||
publishExtensionConfig(instanceId: string, extensionConfig: any): Promise<void> {
|
||||
throwIfNotDefined(instanceId, 'instanceId');
|
||||
throwIfNotDefined(extensionConfig, 'extensionConfig');
|
||||
|
||||
const pathParams = {
|
||||
instanceId
|
||||
};
|
||||
|
||||
return this.put({
|
||||
path: '/settings/{instanceId}',
|
||||
pathParams,
|
||||
bodyParam: extensionConfig
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user