|
| 1 | +/** |
| 2 | + * Represents a cloud provider. |
| 3 | + */ |
| 4 | +interface Provider { |
| 5 | + id: string; |
| 6 | + name: string; |
| 7 | +} |
| 8 | +/** |
| 9 | + * Represents the response for getting a list of cloud providers. |
| 10 | + */ |
| 11 | +interface GetProviderListResponse { |
| 12 | + providers: Provider[]; |
| 13 | +} |
| 14 | +/** |
| 15 | + * Represents a region. |
| 16 | + */ |
| 17 | +interface Region { |
| 18 | + id: string; |
| 19 | + name: string; |
| 20 | +} |
| 21 | +/** |
| 22 | + * Represents the response for getting a list of regions. |
| 23 | + */ |
| 24 | +interface GetRegionListResponse { |
| 25 | + regions: { |
| 26 | + [provider: string]: Region[]; |
| 27 | + }; |
| 28 | +} |
| 29 | +/** |
| 30 | + * Represents the response for getting a list of server sizes. |
| 31 | + */ |
| 32 | +interface GetServerSizesListResponse { |
| 33 | + sizes: { |
| 34 | + [provider: string]: string[]; |
| 35 | + }; |
| 36 | +} |
| 37 | +/** |
| 38 | + * Represents a single app version. |
| 39 | + */ |
| 40 | +interface AppVersion { |
| 41 | + app_version: string; |
| 42 | + application: string; |
| 43 | +} |
| 44 | +/** |
| 45 | + * Represents an app with its versions. |
| 46 | + */ |
| 47 | +interface App { |
| 48 | + label: string; |
| 49 | + versions: AppVersion[]; |
| 50 | +} |
| 51 | +/** |
| 52 | + * Represents the response for getting a list of apps. |
| 53 | + */ |
| 54 | +interface GetAppListResponse { |
| 55 | + [appName: string]: App; |
| 56 | +} |
| 57 | +/** |
| 58 | + * Represents the versions of a specific package. |
| 59 | + */ |
| 60 | +interface PackageVersions { |
| 61 | + [version: string]: string; |
| 62 | +} |
| 63 | +/** |
| 64 | + * Represents a package type with its versions. |
| 65 | + */ |
| 66 | +interface PackageType { |
| 67 | + [osVersion: string]: PackageVersions; |
| 68 | +} |
| 69 | +/** |
| 70 | + * Represents the response for getting a list of packages. |
| 71 | + */ |
| 72 | +interface GetPackageListResponse { |
| 73 | + packages: { |
| 74 | + [packageName: string]: PackageType; |
| 75 | + }; |
| 76 | +} |
| 77 | +/** |
| 78 | + * Represents the settings options. |
| 79 | + */ |
| 80 | +interface SettingsOptions { |
| 81 | + [option: string]: string; |
| 82 | +} |
| 83 | +/** |
| 84 | + * Represents the response for getting a list of settings. |
| 85 | + */ |
| 86 | +interface GetSettingsListResponse { |
| 87 | + settings: { |
| 88 | + [setting: string]: SettingsOptions; |
| 89 | + }; |
| 90 | +} |
| 91 | +/** |
| 92 | + * Represents a backup frequency option. |
| 93 | + */ |
| 94 | +interface BackupFrequency { |
| 95 | + id: string; |
| 96 | + label: string; |
| 97 | +} |
| 98 | +/** |
| 99 | + * Represents a country with its ISO code and name. |
| 100 | + */ |
| 101 | +interface Country { |
| 102 | + iso: string; |
| 103 | + name: string; |
| 104 | +} |
| 105 | +/** |
| 106 | + * Represents the response for getting monitoring durations. |
| 107 | + */ |
| 108 | +interface GetMonitorDurationsResponse { |
| 109 | + durations: string[]; |
| 110 | +} |
| 111 | +/** |
| 112 | + * Represents the response for getting monitor targets. |
| 113 | + */ |
| 114 | +interface GetMonitorTargetsResponse { |
| 115 | + targets: { |
| 116 | + [provider: string]: string[]; |
| 117 | + }; |
| 118 | +} |
| 119 | + |
| 120 | +/** |
| 121 | + * Gets a list of available cloud providers. |
| 122 | + * @returns Promise<GetProviderListResponse> - The response with cloud providers. |
| 123 | + */ |
| 124 | +declare function getProviderList(): Promise<GetProviderListResponse>; |
| 125 | +/** |
| 126 | + * Gets a list of regions. |
| 127 | + * @returns Promise<GetRegionListResponse> - The response with regions. |
| 128 | + */ |
| 129 | +declare function getRegionList(): Promise<GetRegionListResponse>; |
| 130 | +/** |
| 131 | + * Gets a list of server sizes available. |
| 132 | + * @returns Promise<GetServerSizesListResponse> - The response with server sizes. |
| 133 | + */ |
| 134 | +declare function getServerSizesList(): Promise<GetServerSizesListResponse>; |
| 135 | +/** |
| 136 | + * Gets a list of available apps and their versions. |
| 137 | + * @returns Promise<GetAppListResponse> - The response with available apps and their versions. |
| 138 | + */ |
| 139 | +declare function getAppList(): Promise<GetAppListResponse>; |
| 140 | +/** |
| 141 | + * Gets a list of available packages and versions. |
| 142 | + * @returns Promise<GetPackageListResponse> - The response with available packages and versions. |
| 143 | + */ |
| 144 | +declare function getPackageList(): Promise<GetPackageListResponse>; |
| 145 | +/** |
| 146 | + * Gets a list of available settings and corresponding values. |
| 147 | + * @returns Promise<GetSettingsListResponse> - The response with settings. |
| 148 | + */ |
| 149 | +declare function getSettingsList(): Promise<GetSettingsListResponse>; |
| 150 | +/** |
| 151 | + * Gets possible backup frequencies. |
| 152 | + * @returns Promise<GetBackupFrequenciesResponse> - The response with backup frequencies. |
| 153 | + */ |
| 154 | +declare function getBackupFrequencies(): Promise<BackupFrequency[]>; |
| 155 | +/** |
| 156 | + * Gets the list of countries. |
| 157 | + * @returns Promise<GetCountriesListResponse> - The response with the list of countries. |
| 158 | + */ |
| 159 | +declare function getCountriesList(): Promise<Country[]>; |
| 160 | +/** |
| 161 | + * Gets possible monitoring durations. |
| 162 | + * @returns Promise<GetMonitorDurationsResponse> - The response with monitoring durations. |
| 163 | + */ |
| 164 | +declare function getMonitorDurations(): Promise<GetMonitorDurationsResponse>; |
| 165 | +/** |
| 166 | + * Gets a list of server monitoring graph types. |
| 167 | + * @returns Promise<GetMonitorTargetsResponse> - The response with monitoring targets. |
| 168 | + */ |
| 169 | +declare function getMonitorTargets(): Promise<GetMonitorTargetsResponse>; |
| 170 | + |
| 171 | +export { getAppList, getBackupFrequencies, getCountriesList, getMonitorDurations, getMonitorTargets, getPackageList, getProviderList, getRegionList, getServerSizesList, getSettingsList }; |
0 commit comments