hetznercloud/ts/types.ts
2024-02-18 01:17:15 +01:00

42 lines
1.2 KiB
TypeScript

import * as plugins from './hetznercloud.plugins.js';
// datacenters
export type TDatacenters = plugins.hetznerOpenapi.paths['/datacenters']['get']['responses']['200']['content']['application/json'];
// servers
export type IServer = plugins.hetznerOpenapi.paths['/servers/{id}']['get']['responses']['200']['content']['application/json']['server'];
export type TServersGetRequestBody = {};
export type TServersGetResponseBody = plugins.hetznerOpenapi.paths['/servers']['get']['responses']['200']['content']['application/json'];
export type TServerCreateRequestBody = plugins.hetznerOpenapi.paths['/servers']['post']['requestBody']['content']['application/json'];
export type TServerCreateResponseBody = plugins.hetznerOpenapi.paths['/servers']['post']['responses']['201']['content']['application/json'];
// server types
export type THetznerCloudServerName =
| 'cx11'
| 'cx21'
| 'cx31'
| 'cx41'
| 'cx51'
| 'ccx11'
| 'ccx21'
| 'ccx31'
| 'ccx41'
| 'ccx51'
| 'ccx13'
| 'ccx23'
| 'ccx33'
| 'ccx43'
| 'ccx53'
| 'ccx63'
| 'cpx11'
| 'cpx21'
| 'cpx31'
| 'cpx41'
| 'cpx51'
| 'cpx61'
| 'cpx70'
| 'cpx71'
| 'cpx90';
// location types
export type THetznerCloudLocationName = 'fsn1' | 'nbg1' | 'hel1' | 'ash' | 'hil';