Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.3 #6

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- @diogopms @skirsten @philipkrueck
* @diogopms @skirsten @philipkrueck
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@genesiscloud/genesiscloud-js",
"version": "1.0.2",
"version": "1.0.3",
"description": "JavaScript client for the Genesis Cloud API",
"main": "dist/index.js",
"type": "commonjs",
Expand All @@ -23,5 +23,9 @@
"prettier": "^3.2.5",
"typescript": "^5.4.5",
"yaml": "^2.4.1"
}
},
"engines": {
"node": "^22"
},
"packageManager": "[email protected]+sha512.4abf725084d7bcbafbd728bfc7bee61f2f791f977fd87542b3579dcb23504d170d46337945e4c66485cd12d588a0c0e570ed9c477e7ccdd8507cf05f3f92eaca"
}
115 changes: 93 additions & 22 deletions src/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,17 @@ export const $Filesystem_Status = {
enum: ["creating", "created", "deleting"],
} as const;

export const $SecurityGroupId = {
type: "string",
description: `A unique identifier for each security group. This is automatically generated.
`,
} as const;

export const $SecurityGroup = {
type: "object",
properties: {
id: {
type: "string",
description: `A unique identifier for each security group. This is automatically generated.
`,
$ref: "#/components/schemas/SecurityGroupId",
},
name: {
type: "string",
Expand Down Expand Up @@ -508,7 +512,7 @@ export const $Instance = {
type: "object",
properties: {
id: {
$ref: "#/components/schemas/Instance.SecurityGroupId",
$ref: "#/components/schemas/SecurityGroupId",
},
name: {
type: "string",
Expand Down Expand Up @@ -600,26 +604,9 @@ export const $Instance_SSHKeyId = {
description: "The ssh key ID.",
} as const;

export const $Instance_SecurityGroupIds = {
type: "array",
description: `An array of security group ids.
**Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
You can override this behavior by providing a different Security Group.
`,
minItems: 1,
items: {
$ref: "#/components/schemas/Instance.SecurityGroupId",
},
} as const;

export const $Instance_SecurityGroupId = {
type: "string",
description: "The security group ID.",
} as const;

export const $Instance_DiskSize = {
type: "integer",
description: `The storage size of the instance's boot volume given in GiB (Min: 80GiB).
description: `The storage size of the instance's boot volume given in GiB.
`,
} as const;

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

export const $Instance_UpdateSecurityGroups = {
oneOf: [
{
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.List",
},
{
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.Attach",
},
{
$ref: "#/components/schemas/Instance.UpdateSecurityGroups.Detach",
},
],
} as const;

export const $Instance_UpdateSecurityGroups_List = {
type: "array",
description: "The instance's security group IDs.",
items: {
$ref: "#/components/schemas/SecurityGroupId",
},
} as const;

export const $Instance_UpdateSecurityGroups_Attach = {
type: "object",
properties: {
attach: {
$ref: "#/components/schemas/SecurityGroupId",
},
},
required: ["attach"],
} as const;

export const $Instance_UpdateSecurityGroups_Detach = {
type: "object",
properties: {
detach: {
$ref: "#/components/schemas/SecurityGroupId",
},
},
required: ["detach"],
} as const;

export const $Instance_UpdateVolumes = {
oneOf: [
{
$ref: "#/components/schemas/Instance.UpdateVolumes.List",
},
{
$ref: "#/components/schemas/Instance.UpdateVolumes.Attach",
},
{
$ref: "#/components/schemas/Instance.UpdateVolumes.Detach",
},
],
} as const;

export const $Instance_UpdateVolumes_List = {
type: "array",
description: "The instance's volume IDs.",
items: {
$ref: "#/components/schemas/VolumeId",
},
} as const;

export const $Instance_UpdateVolumes_Attach = {
type: "object",
properties: {
attach: {
$ref: "#/components/schemas/VolumeId",
},
},
required: ["attach"],
} as const;

export const $Instance_UpdateVolumes_Detach = {
type: "object",
properties: {
detach: {
$ref: "#/components/schemas/VolumeId",
},
},
required: ["detach"],
} as const;

export const $SSHKey = {
type: "object",
properties: {
Expand Down
92 changes: 62 additions & 30 deletions src/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ export type Filesystem = {

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

/**
* A unique identifier for each security group. This is automatically generated.
*
*/
export type SecurityGroupId = string;

export type SecurityGroup = {
/**
* A unique identifier for each security group. This is automatically generated.
*
*/
id: string;
id: SecurityGroupId;
/**
* The human-readable name for the security group.
*
Expand Down Expand Up @@ -288,7 +290,7 @@ export type Instance = {
* The security groups of the instance.
*/
security_groups: Array<{
id: Instance_SecurityGroupId;
id: SecurityGroupId;
/**
* The name of the security group.
*/
Expand Down Expand Up @@ -341,20 +343,7 @@ export type ImageId = string;
export type Instance_SSHKeyId = string;

/**
* An array of security group ids.
* **Please Note**: By default the **standard security group** is set if you don"t specify any Security Groups.
* You can override this behavior by providing a different Security Group.
*
*/
export type Instance_SecurityGroupIds = Array<Instance_SecurityGroupId>;

/**
* The security group ID.
*/
export type Instance_SecurityGroupId = string;

/**
* The storage size of the instance's boot volume given in GiB (Min: 80GiB).
* The storage size of the instance's boot volume given in GiB.
*
*/
export type Instance_DiskSize = number;
Expand Down Expand Up @@ -436,6 +425,42 @@ export type Instance_BillingType =
*/
export type Instance_ReuseLongTermSubscription = string;

export type Instance_UpdateSecurityGroups =
| Instance_UpdateSecurityGroups_List
| Instance_UpdateSecurityGroups_Attach
| Instance_UpdateSecurityGroups_Detach;

/**
* The instance's security group IDs.
*/
export type Instance_UpdateSecurityGroups_List = Array<SecurityGroupId>;

export type Instance_UpdateSecurityGroups_Attach = {
attach: SecurityGroupId;
};

export type Instance_UpdateSecurityGroups_Detach = {
detach: SecurityGroupId;
};

export type Instance_UpdateVolumes =
| Instance_UpdateVolumes_List
| Instance_UpdateVolumes_Attach
| Instance_UpdateVolumes_Detach;

/**
* The instance's volume IDs.
*/
export type Instance_UpdateVolumes_List = Array<VolumeId>;

export type Instance_UpdateVolumes_Attach = {
attach: VolumeId;
};

export type Instance_UpdateVolumes_Detach = {
detach: VolumeId;
};

export type SSHKey = {
/**
* A unique identifier for each SSH key. This is automatically generated.
Expand Down Expand Up @@ -636,7 +661,7 @@ export type $OpenApiTs = {
*/
name: string;
/**
* The storage size of this snapshot given in GiB (Min: 1GiB).
* The storage size of this snapshot given in GiB (min: 1GiB).
*
*/
size: number;
Expand Down Expand Up @@ -738,7 +763,7 @@ export type $OpenApiTs = {
description?: string;
type?: VolumeType;
/**
* The storage size of this volume given in GiB (Min: 1GiB).
* The storage size of this volume given in GiB (min: 1GiB).
*
*/
size: number;
Expand Down Expand Up @@ -797,6 +822,11 @@ export type $OpenApiTs = {
* The human-readable description set for the volume.
*/
description?: string;
/**
* The storage size of this volume given in GiB (min: previous size).
*
*/
size?: number;
};
volumeId: string;
};
Expand Down Expand Up @@ -837,7 +867,7 @@ export type $OpenApiTs = {
description?: string;
type?: FilesystemType;
/**
* The storage size of this filesystem given in GiB (Min: 1GiB).
* The storage size of this filesystem given in GiB (min: 1GiB).
*
*/
size: number;
Expand Down Expand Up @@ -898,7 +928,8 @@ export type $OpenApiTs = {
*/
description?: string;
/**
* The storage size of this filesystem given in GiB.
* The storage size of this filesystem given in GiB (min: previous size).
*
*/
size?: number;
};
Expand Down Expand Up @@ -1060,6 +1091,11 @@ export type $OpenApiTs = {
*
*/
ssh_keys?: Array<Instance_SSHKeyId>;
/**
* An array of security group ids.
*
*/
security_groups?: Array<SecurityGroupId>;
/**
* An array of volume ids.
*
Expand All @@ -1078,7 +1114,6 @@ export type $OpenApiTs = {
*
*/
placement_option?: string;
security_groups?: Instance_SecurityGroupIds;
is_protected?: Instance_IsProtected;
destroy_on_shutdown?: Instance_DestroyOnShutdown;
public_ipv6?: Instance_PublicIpv6;
Expand Down Expand Up @@ -1148,11 +1183,8 @@ export type $OpenApiTs = {
*
*/
reservation_id?: string;
security_groups?: Instance_SecurityGroupIds;
/**
* The instance's volumes IDs.
*/
volumes?: Array<VolumeId>;
security_groups?: Instance_UpdateSecurityGroups;
volumes?: Instance_UpdateVolumes;
disk_size?: Instance_DiskSize;
};
};
Expand Down
Loading