refactor(cloudly): consume external interfaces package
This commit is contained in:
@@ -139,7 +139,7 @@ export class CloudlyApiClient {
|
||||
*/
|
||||
public async getServerConfigFromCloudlyByIdentity(
|
||||
identityArg: plugins.servezoneInterfaces.data.IIdentity = this.identity
|
||||
): Promise<plugins.servezoneInterfaces.data.IServer> {
|
||||
): Promise<plugins.servezoneInterfaces.requests.config.IRequest_Any_Cloudly_GetServerConfig['response']['configData']> {
|
||||
const serverConfigRequest =
|
||||
this.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.config.IRequest_Any_Cloudly_GetServerConfig>(
|
||||
'getServerConfig'
|
||||
@@ -355,11 +355,12 @@ export class CloudlyApiClient {
|
||||
}> => {
|
||||
const op = 'updateSettings';
|
||||
const wsReq = this.createWsRequest<plugins.servezoneInterfaces.requests.settings.IRequest_UpdateSettings>(op);
|
||||
const payload = { identity: this.identity, updates } as any;
|
||||
if (wsReq) {
|
||||
return wsReq.fire({ identity: this.identity, updates });
|
||||
return wsReq.fire(payload);
|
||||
}
|
||||
const httpReq = this.createHttpRequest<plugins.servezoneInterfaces.requests.settings.IRequest_UpdateSettings>(op);
|
||||
return httpReq.fire({ identity: this.identity, updates });
|
||||
return httpReq.fire(payload);
|
||||
},
|
||||
testProviderConnection: async (provider: string): Promise<{
|
||||
connectionValid: boolean;
|
||||
@@ -367,11 +368,12 @@ export class CloudlyApiClient {
|
||||
}> => {
|
||||
const op = 'testProviderConnection';
|
||||
const wsReq = this.createWsRequest<plugins.servezoneInterfaces.requests.settings.IRequest_TestProviderConnection>(op);
|
||||
const payload = { identity: this.identity, provider: provider as any } as any;
|
||||
if (wsReq) {
|
||||
return wsReq.fire({ identity: this.identity, provider: provider as any });
|
||||
return wsReq.fire(payload);
|
||||
}
|
||||
const httpReq = this.createHttpRequest<plugins.servezoneInterfaces.requests.settings.IRequest_TestProviderConnection>(op);
|
||||
return httpReq.fire({ identity: this.identity, provider: provider as any });
|
||||
return httpReq.fire(payload);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ export class ExternalRegistry implements plugins.servezoneInterfaces.data.IExter
|
||||
);
|
||||
const response = await updateRegistryTR.fire({
|
||||
identity: this.cloudlyClientRef.identity,
|
||||
registryId: this.id,
|
||||
registryData: this.data,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user