@krovacloud/sdk 0.4.6 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -211,6 +211,11 @@ const mapping = await krova.tcpMappings.create("space_123", "cube_123", {
211
211
  cubePort: 5432,
212
212
  whitelistedIps: ["203.0.113.4/32"],
213
213
  });
214
+ // `mapping.host` is where to connect — the Cube's OWN stable hostname, which
215
+ // survives migration to another server. Use it rather than the Cube's
216
+ // `serverDomain`, which is the current physical host and changes when the
217
+ // Cube moves. Null only when the Cube has no server assigned.
218
+ console.log(`psql -h ${mapping.host} -p ${mapping.hostPort}`);
214
219
  await krova.tcpMappings.list("space_123", "cube_123");
215
220
  await krova.tcpMappings.delete("space_123", "cube_123", mapping.id);
216
221
  ```
package/dist/index.d.cts CHANGED
@@ -1834,7 +1834,7 @@ interface components {
1834
1834
  id: string;
1835
1835
  name: string;
1836
1836
  /** @enum {string} */
1837
- state: "pending" | "booting" | "running" | "stopped" | "stopping" | "error" | "deleted";
1837
+ state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
1838
1838
  publicIpv4: string | null;
1839
1839
  resources: {
1840
1840
  vcpu: number;
@@ -1947,6 +1947,8 @@ interface components {
1947
1947
  id: string;
1948
1948
  cubeId: string;
1949
1949
  cubePort: number;
1950
+ /** @description Where to connect for this mapping: `host:hostPort`. The Cube's own stable hostname, which survives migration to another server, falling back to the server's public IP when the Cube has no DNS record yet. Identical to `host` from GET .../ssh, and the same value for every mapping on a Cube. Null only when the Cube has no server assigned, in which case there is nowhere to connect. Do NOT use `serverDomain` from the Cube object — that is the current physical host and changes when the Cube moves. */
1951
+ host: string | null;
1950
1952
  hostPort: number;
1951
1953
  label: string | null;
1952
1954
  status: string;
@@ -2167,7 +2169,7 @@ declare class KrovaClient {
2167
2169
  cubes: {
2168
2170
  id: string;
2169
2171
  name: string;
2170
- state: "pending" | "booting" | "running" | "stopped" | "stopping" | "error" | "deleted";
2172
+ state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
2171
2173
  publicIpv4: string | null;
2172
2174
  resources: {
2173
2175
  vcpu: number;
package/dist/index.d.ts CHANGED
@@ -1834,7 +1834,7 @@ interface components {
1834
1834
  id: string;
1835
1835
  name: string;
1836
1836
  /** @enum {string} */
1837
- state: "pending" | "booting" | "running" | "stopped" | "stopping" | "error" | "deleted";
1837
+ state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
1838
1838
  publicIpv4: string | null;
1839
1839
  resources: {
1840
1840
  vcpu: number;
@@ -1947,6 +1947,8 @@ interface components {
1947
1947
  id: string;
1948
1948
  cubeId: string;
1949
1949
  cubePort: number;
1950
+ /** @description Where to connect for this mapping: `host:hostPort`. The Cube's own stable hostname, which survives migration to another server, falling back to the server's public IP when the Cube has no DNS record yet. Identical to `host` from GET .../ssh, and the same value for every mapping on a Cube. Null only when the Cube has no server assigned, in which case there is nowhere to connect. Do NOT use `serverDomain` from the Cube object — that is the current physical host and changes when the Cube moves. */
1951
+ host: string | null;
1950
1952
  hostPort: number;
1951
1953
  label: string | null;
1952
1954
  status: string;
@@ -2167,7 +2169,7 @@ declare class KrovaClient {
2167
2169
  cubes: {
2168
2170
  id: string;
2169
2171
  name: string;
2170
- state: "pending" | "booting" | "running" | "stopped" | "stopping" | "error" | "deleted";
2172
+ state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
2171
2173
  publicIpv4: string | null;
2172
2174
  resources: {
2173
2175
  vcpu: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krovacloud/sdk",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Official TypeScript SDK for Krova Cloud — a typed client for provisioning and managing Cubes (Firecracker microVMs) with dedicated resources.",
5
5
  "license": "MIT",
6
6
  "type": "module",