File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ export type {
3030 ListTaxesRequestOrderBy ,
3131 ListTaxesResponse ,
3232 ListTaxesResponseTax ,
33+ RedeemCouponRequest ,
3334} from './types.gen'
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type {
55 IpState ,
66 PrivateNICState ,
77 SecurityGroupState ,
8+ ServerFilesystemState ,
89 ServerIpState ,
910 ServerState ,
1011 SnapshotState ,
@@ -27,6 +28,12 @@ export const SECURITY_GROUP_TRANSIENT_STATUSES: SecurityGroupState[] = [
2728 'syncing' ,
2829]
2930
31+ /** Lists transient statutes of the enum {@link ServerFilesystemState}. */
32+ export const SERVER_FILESYSTEM_TRANSIENT_STATUSES : ServerFilesystemState [ ] = [
33+ 'attaching' ,
34+ 'detaching' ,
35+ ]
36+
3037/** Lists transient statutes of the enum {@link ServerIpState}. */
3138export const SERVER_IP_TRANSIENT_STATUSES : ServerIpState [ ] = [ 'pending' ]
3239
Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ export type {
131131 ServerActionRequestVolumeBackupTemplate ,
132132 ServerActionResponse ,
133133 ServerCompatibleTypes ,
134+ ServerFilesystem ,
135+ ServerFilesystemState ,
134136 ServerIp ,
135137 ServerIpIpFamily ,
136138 ServerIpProvisioningMode ,
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ import type {
8484 ServerActionRequestVolumeBackupTemplate ,
8585 ServerActionResponse ,
8686 ServerCompatibleTypes ,
87+ ServerFilesystem ,
8788 ServerIp ,
8889 ServerIpv6 ,
8990 ServerLocation ,
@@ -303,6 +304,19 @@ const unmarshalSecurityGroupSummary = (data: unknown): SecurityGroupSummary => {
303304 } as SecurityGroupSummary
304305}
305306
307+ const unmarshalServerFilesystem = ( data : unknown ) : ServerFilesystem => {
308+ if ( ! isJSONObject ( data ) ) {
309+ throw new TypeError (
310+ `Unmarshalling the type 'ServerFilesystem' failed as data isn't a dictionary.` ,
311+ )
312+ }
313+
314+ return {
315+ filesystemId : data . filesystem_id ,
316+ state : data . state ,
317+ } as ServerFilesystem
318+ }
319+
306320const unmarshalServerIp = ( data : unknown ) : ServerIp => {
307321 if ( ! isJSONObject ( data ) ) {
308322 throw new TypeError (
@@ -409,6 +423,10 @@ const unmarshalServer = (data: unknown): Server => {
409423 dynamicIpRequired : data . dynamic_ip_required ,
410424 enableIpv6 : data . enable_ipv6 ,
411425 endOfService : data . end_of_service ,
426+ filesystems : unmarshalArrayOfObject (
427+ data . filesystems ,
428+ unmarshalServerFilesystem ,
429+ ) ,
412430 hostname : data . hostname ,
413431 id : data . id ,
414432 image : data . image ? unmarshalImage ( data . image ) : undefined ,
Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ export type ServerAction =
6262 | 'reboot'
6363 | 'enable_routed_ip'
6464
65+ export type ServerFilesystemState =
66+ | 'unknown_state'
67+ | 'attaching'
68+ | 'available'
69+ | 'detaching'
70+
6571export type ServerIpIpFamily = 'inet' | 'inet6'
6672
6773export type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac'
@@ -334,6 +340,11 @@ export interface SecurityGroupSummary {
334340 name : string
335341}
336342
343+ export interface ServerFilesystem {
344+ filesystemId : string
345+ state : ServerFilesystemState
346+ }
347+
337348export interface ServerIp {
338349 /**
339350 * Unique ID of the IP address.
@@ -636,6 +647,10 @@ export interface Server {
636647 * This value is reset when admin_password_encryption_ssh_key_id is set to an empty string.
637648 */
638649 adminPasswordEncryptedValue ?: string
650+ /**
651+ * List of attached filesystems.
652+ */
653+ filesystems : ServerFilesystem [ ]
639654 /**
640655 * True if the Instance type has reached end of service.
641656 */
You can’t perform that action at this time.
0 commit comments