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( 'getPlatformDesiredState', ); return await request.fire({ identity: cloudlyClientRef.identity, }); } public static async getPlatformCapabilities(cloudlyClientRef: CloudlyApiClient) { const request = cloudlyClientRef.typedsocketClient.createTypedRequest( 'getPlatformCapabilities', ); return await request.fire({ identity: cloudlyClientRef.identity, }); } public static async getPlatformProviderConfigs( cloudlyClientRef: CloudlyApiClient, capability?: plugins.servezoneInterfaces.platform.TPlatformCapability, ) { const request = cloudlyClientRef.typedsocketClient.createTypedRequest( '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( 'upsertPlatformProviderConfig', ); return await request.fire({ identity: cloudlyClientRef.identity, providerConfig, }); } public static async deletePlatformProviderConfigById( cloudlyClientRef: CloudlyApiClient, providerConfigId: string, ) { const request = cloudlyClientRef.typedsocketClient.createTypedRequest( '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( '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( '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( 'updatePlatformBindingStatus', ); return await request.fire({ identity: cloudlyClientRef.identity, ...optionsArg, }); } public static async deletePlatformBindingById(cloudlyClientRef: CloudlyApiClient, bindingId: string) { const request = cloudlyClientRef.typedsocketClient.createTypedRequest( 'deletePlatformBindingById', ); return await request.fire({ identity: cloudlyClientRef.identity, bindingId, }); } }