126 lines
4.3 KiB
TypeScript
126 lines
4.3 KiB
TypeScript
import * as plugins from './plugins.js';
|
|
import type { CloudlyApiClient } from './classes.cloudlyapiclient.js';
|
|
|
|
export class Platform {
|
|
public static async getPlatformDesiredState(cloudlyClientRef: CloudlyApiClient) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_GetPlatformDesiredState>(
|
|
'getPlatformDesiredState',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
});
|
|
}
|
|
|
|
public static async getPlatformCapabilities(cloudlyClientRef: CloudlyApiClient) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_GetPlatformCapabilities>(
|
|
'getPlatformCapabilities',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
});
|
|
}
|
|
|
|
public static async getPlatformProviderConfigs(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
capability?: plugins.servezoneInterfaces.platform.TPlatformCapability,
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_GetPlatformProviderConfigs>(
|
|
'getPlatformProviderConfigs',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
capability,
|
|
});
|
|
}
|
|
|
|
public static async upsertPlatformProviderConfig(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
providerConfig: plugins.servezoneInterfaces.platform.IPlatformProviderConfig,
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_UpsertPlatformProviderConfig>(
|
|
'upsertPlatformProviderConfig',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
providerConfig,
|
|
});
|
|
}
|
|
|
|
public static async deletePlatformProviderConfigById(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
providerConfigId: string,
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_DeletePlatformProviderConfigById>(
|
|
'deletePlatformProviderConfigById',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
providerConfigId,
|
|
});
|
|
}
|
|
|
|
public static async getPlatformBindings(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
optionsArg: {
|
|
serviceId?: string;
|
|
capability?: plugins.servezoneInterfaces.platform.TPlatformCapability;
|
|
} = {},
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_GetPlatformBindings>(
|
|
'getPlatformBindings',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
...optionsArg,
|
|
});
|
|
}
|
|
|
|
public static async upsertPlatformBinding(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
binding: plugins.servezoneInterfaces.platform.IPlatformBinding,
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_UpsertPlatformBinding>(
|
|
'upsertPlatformBinding',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
binding,
|
|
});
|
|
}
|
|
|
|
public static async updatePlatformBindingStatus(
|
|
cloudlyClientRef: CloudlyApiClient,
|
|
optionsArg: Omit<
|
|
plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_UpdatePlatformBindingStatus['request'],
|
|
'identity'
|
|
>,
|
|
) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_UpdatePlatformBindingStatus>(
|
|
'updatePlatformBindingStatus',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
...optionsArg,
|
|
});
|
|
}
|
|
|
|
public static async deletePlatformBindingById(cloudlyClientRef: CloudlyApiClient, bindingId: string) {
|
|
const request =
|
|
cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.platform.IReq_Any_Cloudly_DeletePlatformBindingById>(
|
|
'deletePlatformBindingById',
|
|
);
|
|
return await request.fire({
|
|
identity: cloudlyClientRef.identity,
|
|
bindingId,
|
|
});
|
|
}
|
|
}
|