Skip to content

Commit ddd459e

Browse files
authored
Merge pull request #6 from genesiscloud/release-v1.0.3
Release v1.0.3
2 parents 0e655ce + 4093194 commit ddd459e

File tree

5 files changed

+162
-56
lines changed

5 files changed

+162
-56
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- @diogopms @skirsten @philipkrueck
1+
* @diogopms @skirsten @philipkrueck

.nvmrc

-1
This file was deleted.

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@genesiscloud/genesiscloud-js",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "JavaScript client for the Genesis Cloud API",
55
"main": "dist/index.js",
66
"type": "commonjs",
@@ -23,5 +23,9 @@
2323
"prettier": "^3.2.5",
2424
"typescript": "^5.4.5",
2525
"yaml": "^2.4.1"
26-
}
26+
},
27+
"engines": {
28+
"node": "^22"
29+
},
30+
"packageManager": "[email protected]+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
2731
}

src/schemas.gen.ts

+93-22
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,17 @@ export const $Filesystem_Status = {
316316
enum: ["creating", "created", "deleting"],
317317
} as const;
318318

319+
export const $SecurityGroupId = {
320+
type: "string",
321+
description: `A unique identifier for each security group. This is automatically generated.
322+
`,
323+
} as const;
324+
319325
export const $SecurityGroup = {
320326
type: "object",
321327
properties: {
322328
id: {
323-
type: "string",
324-
description: `A unique identifier for each security group. This is automatically generated.
325-
`,
329+
$ref: "#/components/schemas/SecurityGroupId",
326330
},
327331
name: {
328332
type: "string",
@@ -508,7 +512,7 @@ export const $Instance = {
508512
type: "object",
509513
properties: {
510514
id: {
511-
$ref: "#/components/schemas/Instance.SecurityGroupId",
515+
$ref: "#/components/schemas/SecurityGroupId",
512516
},
513517
name: {
514518
type: "string",
@@ -600,26 +604,9 @@ export const $Instance_SSHKeyId = {
600604
description: "The ssh key ID.",
601605
} as const;
602606

603-
export const $Instance_SecurityGroupIds = {
604-
type: "array",
605-
description: `An array of security group ids.
606-
**Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
607-
You can override this behavior by providing a different Security Group.
608-
`,
609-
minItems: 1,
610-
items: {
611-
$ref: "#/components/schemas/Instance.SecurityGroupId",
612-
},
613-
} as const;
614-
615-
export const $Instance_SecurityGroupId = {
616-
type: "string",
617-
description: "The security group ID.",
618-
} as const;
619-
620607
export const $Instance_DiskSize = {
621608
type: "integer",
622-
description: `The storage size of the instance's boot volume given in GiB (Min: 80GiB).
609+
description: `The storage size of the instance's boot volume given in GiB.
623610
`,
624611
} as const;
625612

@@ -724,6 +711,90 @@ If not provided, the billing_type will default to on-demand.
724711
`,
725712
} as const;
726713

714+
export const $Instance_UpdateSecurityGroups = {
715+
oneOf: [
716+
{
717+
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.List",
718+
},
719+
{
720+
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.Attach",
721+
},
722+
{
723+
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.Detach",
724+
},
725+
],
726+
} as const;
727+
728+
export const $Instance_UpdateSecurityGroups_List = {
729+
type: "array",
730+
description: "The instance's security group IDs.",
731+
items: {
732+
$ref: "#/components/schemas/SecurityGroupId",
733+
},
734+
} as const;
735+
736+
export const $Instance_UpdateSecurityGroups_Attach = {
737+
type: "object",
738+
properties: {
739+
attach: {
740+
$ref: "#/components/schemas/SecurityGroupId",
741+
},
742+
},
743+
required: ["attach"],
744+
} as const;
745+
746+
export const $Instance_UpdateSecurityGroups_Detach = {
747+
type: "object",
748+
properties: {
749+
detach: {
750+
$ref: "#/components/schemas/SecurityGroupId",
751+
},
752+
},
753+
required: ["detach"],
754+
} as const;
755+
756+
export const $Instance_UpdateVolumes = {
757+
oneOf: [
758+
{
759+
$ref: "#/components/schemas/Instance.UpdateVolumes.List",
760+
},
761+
{
762+
$ref: "#/components/schemas/Instance.UpdateVolumes.Attach",
763+
},
764+
{
765+
$ref: "#/components/schemas/Instance.UpdateVolumes.Detach",
766+
},
767+
],
768+
} as const;
769+
770+
export const $Instance_UpdateVolumes_List = {
771+
type: "array",
772+
description: "The instance's volume IDs.",
773+
items: {
774+
$ref: "#/components/schemas/VolumeId",
775+
},
776+
} as const;
777+
778+
export const $Instance_UpdateVolumes_Attach = {
779+
type: "object",
780+
properties: {
781+
attach: {
782+
$ref: "#/components/schemas/VolumeId",
783+
},
784+
},
785+
required: ["attach"],
786+
} as const;
787+
788+
export const $Instance_UpdateVolumes_Detach = {
789+
type: "object",
790+
properties: {
791+
detach: {
792+
$ref: "#/components/schemas/VolumeId",
793+
},
794+
},
795+
required: ["detach"],
796+
} as const;
797+
727798
export const $SSHKey = {
728799
type: "object",
729800
properties: {

src/types.gen.ts

+62-30
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,14 @@ export type Filesystem = {
171171

172172
export type Filesystem_Status = "creating" | "created" | "deleting";
173173

174+
/**
175+
* A unique identifier for each security group. This is automatically generated.
176+
*
177+
*/
178+
export type SecurityGroupId = string;
179+
174180
export type SecurityGroup = {
175-
/**
176-
* A unique identifier for each security group. This is automatically generated.
177-
*
178-
*/
179-
id: string;
181+
id: SecurityGroupId;
180182
/**
181183
* The human-readable name for the security group.
182184
*
@@ -288,7 +290,7 @@ export type Instance = {
288290
* The security groups of the instance.
289291
*/
290292
security_groups: Array<{
291-
id: Instance_SecurityGroupId;
293+
id: SecurityGroupId;
292294
/**
293295
* The name of the security group.
294296
*/
@@ -341,20 +343,7 @@ export type ImageId = string;
341343
export type Instance_SSHKeyId = string;
342344

343345
/**
344-
* An array of security group ids.
345-
* **Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
346-
* You can override this behavior by providing a different Security Group.
347-
*
348-
*/
349-
export type Instance_SecurityGroupIds = Array<Instance_SecurityGroupId>;
350-
351-
/**
352-
* The security group ID.
353-
*/
354-
export type Instance_SecurityGroupId = string;
355-
356-
/**
357-
* The storage size of the instance's boot volume given in GiB (Min: 80GiB).
346+
* The storage size of the instance's boot volume given in GiB.
358347
*
359348
*/
360349
export type Instance_DiskSize = number;
@@ -436,6 +425,42 @@ export type Instance_BillingType =
436425
*/
437426
export type Instance_ReuseLongTermSubscription = string;
438427

428+
export type Instance_UpdateSecurityGroups =
429+
| Instance_UpdateSecurityGroups_List
430+
| Instance_UpdateSecurityGroups_Attach
431+
| Instance_UpdateSecurityGroups_Detach;
432+
433+
/**
434+
* The instance's security group IDs.
435+
*/
436+
export type Instance_UpdateSecurityGroups_List = Array<SecurityGroupId>;
437+
438+
export type Instance_UpdateSecurityGroups_Attach = {
439+
attach: SecurityGroupId;
440+
};
441+
442+
export type Instance_UpdateSecurityGroups_Detach = {
443+
detach: SecurityGroupId;
444+
};
445+
446+
export type Instance_UpdateVolumes =
447+
| Instance_UpdateVolumes_List
448+
| Instance_UpdateVolumes_Attach
449+
| Instance_UpdateVolumes_Detach;
450+
451+
/**
452+
* The instance's volume IDs.
453+
*/
454+
export type Instance_UpdateVolumes_List = Array<VolumeId>;
455+
456+
export type Instance_UpdateVolumes_Attach = {
457+
attach: VolumeId;
458+
};
459+
460+
export type Instance_UpdateVolumes_Detach = {
461+
detach: VolumeId;
462+
};
463+
439464
export type SSHKey = {
440465
/**
441466
* A unique identifier for each SSH key. This is automatically generated.
@@ -636,7 +661,7 @@ export type $OpenApiTs = {
636661
*/
637662
name: string;
638663
/**
639-
* The storage size of this snapshot given in GiB (Min: 1GiB).
664+
* The storage size of this snapshot given in GiB (min: 1GiB).
640665
*
641666
*/
642667
size: number;
@@ -738,7 +763,7 @@ export type $OpenApiTs = {
738763
description?: string;
739764
type?: VolumeType;
740765
/**
741-
* The storage size of this volume given in GiB (Min: 1GiB).
766+
* The storage size of this volume given in GiB (min: 1GiB).
742767
*
743768
*/
744769
size: number;
@@ -797,6 +822,11 @@ export type $OpenApiTs = {
797822
* The human-readable description set for the volume.
798823
*/
799824
description?: string;
825+
/**
826+
* The storage size of this volume given in GiB (min: previous size).
827+
*
828+
*/
829+
size?: number;
800830
};
801831
volumeId: string;
802832
};
@@ -837,7 +867,7 @@ export type $OpenApiTs = {
837867
description?: string;
838868
type?: FilesystemType;
839869
/**
840-
* The storage size of this filesystem given in GiB (Min: 1GiB).
870+
* The storage size of this filesystem given in GiB (min: 1GiB).
841871
*
842872
*/
843873
size: number;
@@ -898,7 +928,8 @@ export type $OpenApiTs = {
898928
*/
899929
description?: string;
900930
/**
901-
* The storage size of this filesystem given in GiB.
931+
* The storage size of this filesystem given in GiB (min: previous size).
932+
*
902933
*/
903934
size?: number;
904935
};
@@ -1060,6 +1091,11 @@ export type $OpenApiTs = {
10601091
*
10611092
*/
10621093
ssh_keys?: Array<Instance_SSHKeyId>;
1094+
/**
1095+
* An array of security group ids.
1096+
*
1097+
*/
1098+
security_groups?: Array<SecurityGroupId>;
10631099
/**
10641100
* An array of volume ids.
10651101
*
@@ -1078,7 +1114,6 @@ export type $OpenApiTs = {
10781114
*
10791115
*/
10801116
placement_option?: string;
1081-
security_groups?: Instance_SecurityGroupIds;
10821117
is_protected?: Instance_IsProtected;
10831118
destroy_on_shutdown?: Instance_DestroyOnShutdown;
10841119
public_ipv6?: Instance_PublicIpv6;
@@ -1148,11 +1183,8 @@ export type $OpenApiTs = {
11481183
*
11491184
*/
11501185
reservation_id?: string;
1151-
security_groups?: Instance_SecurityGroupIds;
1152-
/**
1153-
* The instance's volumes IDs.
1154-
*/
1155-
volumes?: Array<VolumeId>;
1186+
security_groups?: Instance_UpdateSecurityGroups;
1187+
volumes?: Instance_UpdateVolumes;
11561188
disk_size?: Instance_DiskSize;
11571189
};
11581190
};

0 commit comments

Comments
 (0)