palbase 0.41.3 → 0.42.0

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.
Files changed (46) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{SAEDHCLG.js → 3B26HF2E.js} +1 -1
  8. package/dist/chunks/{DZ42B54P.js → 4FY2JOIE.js} +2 -2
  9. package/dist/chunks/{J2V2M7AR.js → 6RAP4AII.js} +2 -2
  10. package/dist/chunks/{TR4QVM6S.js → AQV3OQRL.js} +2 -2
  11. package/dist/chunks/{SHLEYBMA.js → DS4WQJZM.js} +2 -2
  12. package/dist/chunks/{W7HXA3GG.js → DY65FDLF.js} +1 -1
  13. package/dist/chunks/{TODHBOYI.js → EEYIFP7R.js} +2 -2
  14. package/dist/chunks/{23GI3WXJ.js → I6WTPZ6G.js} +2 -2
  15. package/dist/chunks/{RSSGWX2P.js → L3OT55MV.js} +2 -2
  16. package/dist/chunks/{PHTKXJQC.js → L3W75GPJ.js} +2 -2
  17. package/dist/chunks/{I2XPZKQA.js → LOINJWR3.js} +2 -2
  18. package/dist/chunks/{QYQ7DJGF.js → MS4WUVDW.js} +1 -1
  19. package/dist/chunks/{CYOZ3JBE.js → OYA6Z4VI.js} +1 -1
  20. package/dist/chunks/{SSCQX6RH.js → POCZ4Q2I.js} +1 -1
  21. package/dist/chunks/{ZSPTBM6M.js → QG2BSVEO.js} +3 -3
  22. package/dist/chunks/{HAP72KDI.js → QQKGUVDV.js} +2 -2
  23. package/dist/chunks/{AIFN5SFN.js → RNDFA3AQ.js} +2 -2
  24. package/dist/chunks/{WAOH3WJH.js → RVXJJALR.js} +2 -2
  25. package/dist/chunks/{EOTFJUMQ.js → SMINGDYN.js} +2 -2
  26. package/dist/chunks/{Y6OOWIMM.js → TUMSSUUS.js} +1 -1
  27. package/dist/chunks/{AOH3QHRO.js → UGFLMEVH.js} +2 -2
  28. package/dist/chunks/{FMCESDD6.js → VBROMD5X.js} +1 -1
  29. package/dist/chunks/{KQ2J6PEQ.js → VXH23FMT.js} +2 -2
  30. package/dist/cli.js +118 -118
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/index.js +2 -2
  39. package/dist/web/message.js +2 -2
  40. package/dist/web/palbe.js +2 -2
  41. package/dist/web/paywall.js +2 -2
  42. package/dist/web/push-sw.js +1 -1
  43. package/dist/web/ssr.js +2 -2
  44. package/dist/web/vite.js +2 -2
  45. package/package.json +2 -2
  46. package/types/internal/src/modules/machines.d.ts +74 -22
@@ -160,9 +160,9 @@ export type Machine = {
160
160
  */
161
161
  running_version: number;
162
162
  /**
163
- * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price. shared-512 and shared-1024 are retired: a machine that has one keeps it until it is moved to another size; none is opened at or moved to one.
163
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; standard-8x: 8 vCPU, 16384 MiB; highmem-4x: 4 vCPU, 16384 MiB; highmem-8x: 8 vCPU, 32768 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price. shared-512 and shared-1024 are retired: a machine that has one keeps it until it is moved to another size; none is opened at or moved to one.
164
164
  */
165
- size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
165
+ size: "dedicated-1x" | "dedicated-2x" | "highmem-4x" | "highmem-8x" | "shared-1024" | "shared-256" | "shared-512" | "standard-1x" | "standard-2x" | "standard-4x" | "standard-8x" | "starter";
166
166
  /**
167
167
  * building: no build of it runs yet (its first is on its way — waiting for its commit's checks too — or failed: `state_reason`); starting: on its way up; awake: answering; asleep: idle, and woken by the next request to its address; failed: it cannot start, or its first build failed or was skipped (`state_reason` says why).
168
168
  */
@@ -172,9 +172,9 @@ export type Machine = {
172
172
  */
173
173
  state_reason?: string;
174
174
  /**
175
- * What kind of thing `state_reason` says: waiting — the version asked for waits before it takes traffic (on its commit's checks, its configuration, its tests, its contract, its database or its migration) and rolls out once that is done; not_up — it does not start or answer, or a copy of the one before it stays; given_up — it did not come up, and the one before it serves until the machine's next change; migration — its database migration failed (to start, and the version does not roll out; or to close); stopped — it was put to sleep for a reason; failed — it cannot run. Absent with no `state_reason`.
175
+ * What kind of thing `state_reason` says: waiting — the version asked for waits before it takes traffic (on its commit's checks, its configuration, its tests, its contract, its database or its migration) and rolls out once that is done; not_up — it does not start or answer, or a copy of the one before it stays; given_up — it did not come up, and the one before it serves until the machine's next change; migration — its database migration failed (to start, and the version does not roll out; or to close); stopped — it was put to sleep for a reason; failed — it cannot run; no_room — copies of it wait for room in the cluster: a node is being brought up (a few minutes), and the platform's operators are told if none can be. Absent with no `state_reason`.
176
176
  */
177
- state_reason_kind?: "failed" | "given_up" | "migration" | "not_up" | "stopped" | "waiting";
177
+ state_reason_kind?: "failed" | "given_up" | "migration" | "no_room" | "not_up" | "stopped" | "waiting";
178
178
  updated_at: string;
179
179
  /**
180
180
  * Where the machine answers: the project's own address for `backend`, <name>-<ref> under the app domain for any other.
@@ -206,7 +206,7 @@ export type Machine = {
206
206
  */
207
207
  health_path?: string;
208
208
  /**
209
- * How many copies of the machine run while it is awake, each on a node of its own: a request is sent to one of them, a copy or a node that goes leaves the others serving, and the cluster takes one of them away at a time at most. Every copy is of the machine's size and counts as such against the project's limits and its machine time (a minute in which the number changed is counted at the most it was). What a copy keeps in its own memory or on its own disk the others do not see — a session, a counter, a cache, a timer: a machine with more than one keeps those where every copy reaches them. The machine finds the number in PALBASE_REPLICAS. A long-lived connection (a WebSocket) stays with the copy that took it.
209
+ * How many copies of the machine run while it is awake, up to 100 (one on Free), over two nodes at least and no node holding more than half of them: a request is sent to one of them, a copy or a node that goes leaves the others serving, and the cluster takes one of them away at a time at most. Every copy is of the machine's size and counts as such against the project's limits and its machine time (a minute in which the number changed is counted at the most it was). What a copy keeps in its own memory or on its own disk the others do not see — a session, a counter, a cache, a timer: a machine with more than one keeps those where every copy reaches them. The machine finds the number in PALBASE_REPLICAS. A long-lived connection (a WebSocket) stays with the copy that took it.
210
210
  */
211
211
  replicas: number;
212
212
  /**
@@ -287,9 +287,9 @@ export type MachineCreate = {
287
287
  */
288
288
  port?: number;
289
289
  /**
290
- * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
290
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; standard-8x: 8 vCPU, 16384 MiB; highmem-4x: 4 vCPU, 16384 MiB; highmem-8x: 8 vCPU, 32768 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
291
291
  */
292
- size: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
292
+ size: "dedicated-1x" | "dedicated-2x" | "highmem-4x" | "highmem-8x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "standard-8x" | "starter";
293
293
  /**
294
294
  * What the machine is started with in its environment, besides what the platform sets: PORT (where it listens), PALBASE_URL (its project's address, https://<ref>.<domain>), PALBASE_PROJECT_ID, PALBASE_REPLICAS (how many copies of it run) and, given a database, PALBASE_DB_URL and PALBASE_DB_CONNECTIONS (how many connections to it a copy may hold). PORT is refused here; the others, given here or among the machine's secrets, give way to the platform's. Names are environment variable names; 100 variables and 64 KiB at most. Keep secrets in the project's secrets and start the machine with them (`secrets`).
295
295
  */
@@ -306,7 +306,7 @@ export type MachineCreate = {
306
306
  */
307
307
  health_path?: string;
308
308
  /**
309
- * How many copies of the machine run while it is awake, each on a node of its own: a request is sent to one of them, a copy or a node that goes leaves the others serving, and the cluster takes one of them away at a time at most. Every copy is of the machine's size and counts as such against the project's limits and its machine time (a minute in which the number changed is counted at the most it was). What a copy keeps in its own memory or on its own disk the others do not see — a session, a counter, a cache, a timer: a machine with more than one keeps those where every copy reaches them. The machine finds the number in PALBASE_REPLICAS. A long-lived connection (a WebSocket) stays with the copy that took it. One when left out.
309
+ * How many copies of the machine run while it is awake, up to 100 (one on Free), over two nodes at least and no node holding more than half of them: a request is sent to one of them, a copy or a node that goes leaves the others serving, and the cluster takes one of them away at a time at most. Every copy is of the machine's size and counts as such against the project's limits and its machine time (a minute in which the number changed is counted at the most it was). What a copy keeps in its own memory or on its own disk the others do not see — a session, a counter, a cache, a timer: a machine with more than one keeps those where every copy reaches them. The machine finds the number in PALBASE_REPLICAS. A long-lived connection (a WebSocket) stays with the copy that took it. One when left out.
310
310
  */
311
311
  replicas?: number;
312
312
  /**
@@ -384,9 +384,9 @@ export type MachineUpdate = {
384
384
  */
385
385
  port?: number;
386
386
  /**
387
- * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
387
+ * The machine's size. shared-256 has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a standard size never sleeps — its CPUs are its ceiling, a quarter of them reserved for it, the rest its node's when the other machines there leave them; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB (free); starter: 0.5 vCPU, 512 MiB; standard-1x: 1 vCPU, 2048 MiB; standard-2x: 2 vCPU, 4096 MiB; standard-4x: 4 vCPU, 8192 MiB; standard-8x: 8 vCPU, 16384 MiB; highmem-4x: 4 vCPU, 16384 MiB; highmem-8x: 8 vCPU, 32768 MiB; dedicated-1x: 1 vCPU of its own, 2048 MiB; dedicated-2x: 2 vCPU of its own, 4096 MiB. GET /machines/sizes lists each with its price.
388
388
  */
389
- size?: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "starter";
389
+ size?: "dedicated-1x" | "dedicated-2x" | "highmem-4x" | "highmem-8x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "standard-8x" | "starter";
390
390
  /**
391
391
  * Replaces the machine's environment whole, besides PORT. Names are environment variable names; 100 variables and 64 KiB at most. Keep secrets in the project's secrets and start the machine with them (`secrets`).
392
392
  */
@@ -511,9 +511,9 @@ export type Database = {
511
511
  */
512
512
  pooled_port: number;
513
513
  /**
514
- * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it. shared-1g, shared-2g and shared-4g are retired: a database that has one keeps it until it moves to another size; none is opened at or moved to one.
514
+ * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB; standard-4x: 16 GiB, up to 4 vCPU; standard-8x: 32 GiB, up to 8 vCPU; standard-16x: 64 GiB, up to 16 vCPU; standard-32x: 128 GiB, up to 32 vCPU, 100 GB each (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. The GB of a size that never sleeps are its storage unless `storage_gb` says otherwise (1 or a multiple of 5, up to 4,000), billed by the GB past its first; its size's hours are its CPU and memory. A database past its storage turns read-only — or, `storage_autoscaling` on, grows by half when 90% full. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`). preview: a machine's pull request preview's own database — 0.25 vCPU, 512 MiB, 500 MB, put to sleep when idle — opened with its preview and deleted with it; no database is opened at or moved to it. shared-1g, shared-2g and shared-4g are retired: a database that has one keeps it until it moves to another size; none is opened at or moved to one.
515
515
  */
516
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g" | "standard-1x" | "standard-2x" | "starter";
516
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g" | "standard-16x" | "standard-1x" | "standard-2x" | "standard-32x" | "standard-4x" | "standard-8x" | "starter";
517
517
  /**
518
518
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
519
519
  */
@@ -534,6 +534,10 @@ export type Database = {
534
534
  * Why it is in its state, when that needs saying.
535
535
  */
536
536
  state_reason?: string;
537
+ /**
538
+ * What `state_reason` says, when a client tells it from the words: no_room — it waits for room in the cluster: a node is being brought up for it (a few minutes), and the platform's operators are told if none can be. Absent otherwise.
539
+ */
540
+ state_reason_kind?: "no_room";
537
541
  /**
538
542
  * When it was deleted; it may be taken back until `purge_after`.
539
543
  */
@@ -561,13 +565,21 @@ export type Database = {
561
565
  */
562
566
  used_bytes?: number;
563
567
  /**
564
- * The most its size holds. Past it, it is read-only.
568
+ * The most it holds — its size's, or its storage (`storage_gb`). Past it, it is read-only.
565
569
  */
566
570
  quota_bytes: number;
567
571
  /**
568
572
  * It holds its quota: a transaction takes no writes unless it asks to — BEGIN READ WRITE, to make room with DROP, TRUNCATE, or DELETE and then VACUUM FULL (a DELETE alone frees no room) — and it reads on. Once it holds less than 95% of its quota it takes writes again, within a minute.
569
573
  */
570
574
  read_only: boolean;
575
+ /**
576
+ * What a database of a size on a disk of its own holds, in GB — its `quota_bytes` — as said when it was opened or grown (`DatabaseUpdate.storage_gb`), or its size's. It grows, never shrinks. Absent for a size on the platform's SAN (free, hobby), which holds its size's.
577
+ */
578
+ storage_gb?: number;
579
+ /**
580
+ * Whether it grows by itself: 90% full, its storage grows by half, up to the next multiple of 5 GB (10 to 15, 25 to 40), six hours at least after it last grew, to 4,000 GB. Off, a database past its storage turns read-only, and its organization's owners are told at 90% and when it is full. Absent for a size on the platform's SAN.
581
+ */
582
+ storage_autoscaling?: boolean;
571
583
  /**
572
584
  * A change of its passwords (POST …/password) has not reached the database yet: the new password works once this is false, a few seconds after. A client that hands the new password on waits for it.
573
585
  */
@@ -610,9 +622,9 @@ export type DatabaseCreate = {
610
622
  */
611
623
  name?: string;
612
624
  /**
613
- * The database's size; `free` when left out. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
625
+ * The database's size; `free` when left out. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB; standard-4x: 16 GiB, up to 4 vCPU; standard-8x: 32 GiB, up to 8 vCPU; standard-16x: 64 GiB, up to 16 vCPU; standard-32x: 128 GiB, up to 32 vCPU, 100 GB each (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. The GB of a size that never sleeps are its storage unless `storage_gb` says otherwise (1 or a multiple of 5, up to 4,000), billed by the GB past its first; its size's hours are its CPU and memory. A database past its storage turns read-only — or, `storage_autoscaling` on, grows by half when 90% full. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
614
626
  */
615
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
627
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-16x" | "standard-1x" | "standard-2x" | "standard-32x" | "standard-4x" | "standard-8x" | "starter";
616
628
  /**
617
629
  * Who may connect, as addresses or CIDRs (203.0.113.7, 203.0.113.0/24), 50 at most; anyone with the password when empty.
618
630
  */
@@ -625,6 +637,14 @@ export type DatabaseCreate = {
625
637
  * The ref of the environment called, when given: a new database is bound to the environment whose address it is made at (409 bound_to_environment for another — make it at that environment's address). Its name is the project's one: name_taken when another environment holds a database of that name.
626
638
  */
627
639
  environment?: string;
640
+ /**
641
+ * What it holds, in GB: 1 or a multiple of 5, up to 4,000 — of a size on a disk of its own (400 `storage_not_adjustable` for free and hobby; 400 `invalid_storage` for another number). Its size's (`DatabaseSize.storage_bytes`) when left out. Billed by the GB-month past its first (`DatabaseSize.storage_price_micros_per_gb_month`).
642
+ */
643
+ storage_gb?: number;
644
+ /**
645
+ * Whether it grows by itself: 90% full, by half, to the next multiple of 5 GB, six hours at least after it last grew; off when left out. Of a size on a disk of its own.
646
+ */
647
+ storage_autoscaling?: boolean;
628
648
  };
629
649
  /**
630
650
  * A change to a database; a field left out stays as it is.
@@ -639,9 +659,17 @@ export type DatabaseUpdate = {
639
659
  */
640
660
  backup_days?: number;
641
661
  /**
642
- * The database's size (see `Database.size`); one that is paid for is open to the platform's own project and those named for it alone, as it is opened (403 `size_not_available`). One of the same machine and disk and no larger volume — hobby to free — changes in place. Any other moves through an instance of the new size beside the one that serves, made where the new size lives (a disk of its own, or a SAN volume of its own), which then takes over: the database serves on meanwhile (`state` resizing); its sessions on the direct port end once, when its primary moves, and new logins and transactions wait a few seconds for it. One asleep is woken for its move — its awake hours or disk traffic spent or not, when the size it moves to has no such limit; to one whose it has spent, it sleeps — and the move's time counts against none of them. One down for want of room, moved to a size of a larger volume, is given that room first, in place, and moves once it serves. A move that has not come to its switchover within two hours, and a second for every 10 MB the database holds, is let go: the database stays its size, and `state_reason` says why until its size is changed again — as is one whose primary went down three times before it came to its switchover. One whose primary moves where the move did not ask is stopped, both its instances kept (`state_reason`); onto its instance of the new size, ready — as a node drained moves it — it has come to its switchover. One whose instance of the new size does not take over within five minutes of its switchover says so in `state_reason`, and moves on once it does. Its disk never shrinks. While it moves it serves with the connections of the one of the two sizes that takes fewer; the machines given it are rolled out to their share of the new size's — at once when it takes fewer, once it has moved when it takes more. A size smaller than what it holds is refused (409 `database_too_large`), as is one of a smaller quota while what it holds is not measured yet (409 `database_not_measured`, Retry-After), and so is one the project's limit has no room for (409 `machines_over_limit`), a second free database (409 `free_database_taken`), or one whose connections are too few for the copies the machines given it run (409 `database_connections_short`).
662
+ * The database's size (see `Database.size`); one that is paid for is open to the platform's own project and those named for it alone, as it is opened (403 `size_not_available`). One of the same machine and disk and no larger volume — hobby to free — changes in place. Any other moves through an instance of the new size beside the one that serves, made where the new size lives (a disk of its own, or a SAN volume of its own), which then takes over: the database serves on meanwhile (`state` resizing); its sessions on the direct port end once, when its primary moves, and new logins and transactions wait a few seconds for it. One asleep is woken for its move — its awake hours or disk traffic spent or not, when the size it moves to has no such limit; to one whose it has spent, it sleeps — and the move's time counts against none of them. One down for want of room, moved to a size of a larger volume, is given that room first, in place, and moves once it serves. A move that has not come to its switchover within two hours, and a second for every 10 MB the database holds, is let go: the database stays its size, and `state_reason` says why until its size is changed again — as is one whose primary went down three times before it came to its switchover. One whose primary moves where the move did not ask is stopped, both its instances kept (`state_reason`); onto its instance of the new size, ready — as a node drained moves it — it has come to its switchover. One whose instance of the new size does not take over within five minutes of its switchover says so in `state_reason`, and moves on once it does. Its disk never shrinks, and a database on a disk of its own keeps its storage (`storage_gb`) through the change. While it moves it serves with the connections of the one of the two sizes that takes fewer; the machines given it are rolled out to their share of the new size's — at once when it takes fewer, once it has moved when it takes more. A size smaller than what it holds is refused (409 `database_too_large`), as is one of a smaller quota while what it holds is not measured yet (409 `database_not_measured`, Retry-After), and so is one the project's limit has no room for (409 `machines_over_limit`), a second free database (409 `free_database_taken`), or one whose connections are too few for the copies the machines given it run (409 `database_connections_short`).
663
+ */
664
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-16x" | "standard-1x" | "standard-2x" | "standard-32x" | "standard-4x" | "standard-8x" | "starter";
665
+ /**
666
+ * What it holds, grown, in GB: more than it holds, 1 or a multiple of 5, up to 4,000 — never less (409 `storage_shrinks`), and six hours at least after it last grew (409 `storage_grew_recently`, Retry-After). It grows where it is, serving on; it holds the same through a change of size.
667
+ */
668
+ storage_gb?: number;
669
+ /**
670
+ * Whether it grows by itself: 90% full, by half, to the next multiple of 5 GB, six hours at least after it last grew; off when left out. Of a size on a disk of its own.
643
671
  */
644
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
672
+ storage_autoscaling?: boolean;
645
673
  };
646
674
  /**
647
675
  * Whose password is made new.
@@ -965,9 +993,9 @@ export type DatabaseCreated = {
965
993
  */
966
994
  pooled_port: number;
967
995
  /**
968
- * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. A database past its size's storage turns read-only. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
996
+ * The database's size. free: 0.25 vCPU, 512 MiB, 1 GB, put to sleep when idle (woken by the next connection in about 10 s), awake 400 hours a month at most, archived after a week asleep (its next connection brings it back from its backup); hobby: 0.25 vCPU, 512 MiB, 5 GB, put to sleep when idle, no monthly limit; starter: 1 GiB, up to 0.5 vCPU, 10 GB; standard-1x: 2 GiB, up to 1 vCPU, 25 GB; standard-2x: 4 GiB, up to 2 vCPU, 50 GB; standard-4x: 16 GiB, up to 4 vCPU; standard-8x: 32 GiB, up to 8 vCPU; standard-16x: 64 GiB, up to 16 vCPU; standard-32x: 128 GiB, up to 32 vCPU, 100 GB each (a quarter of their CPU reserved for them); dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The standard and dedicated sizes never sleep and live on a Premium SSD v2 disk of their own; free and hobby on the platform's SAN. The GB of a size that never sleeps are its storage unless `storage_gb` says otherwise (1 or a multiple of 5, up to 4,000), billed by the GB past its first; its size's hours are its CPU and memory. A database past its storage turns read-only — or, `storage_autoscaling` on, grows by half when 90% full. What a project's machines and databases reserve between them is held to its limit: a size that does not fit is refused (409 `machines_over_limit`).
969
997
  */
970
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
998
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-16x" | "standard-1x" | "standard-2x" | "standard-32x" | "standard-4x" | "standard-8x" | "starter";
971
999
  /**
972
1000
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
973
1001
  */
@@ -988,6 +1016,10 @@ export type DatabaseCreated = {
988
1016
  * Why it is in its state, when that needs saying.
989
1017
  */
990
1018
  state_reason?: string;
1019
+ /**
1020
+ * What `state_reason` says, when a client tells it from the words: no_room — it waits for room in the cluster: a node is being brought up for it (a few minutes), and the platform's operators are told if none can be. Absent otherwise.
1021
+ */
1022
+ state_reason_kind?: "no_room";
991
1023
  /**
992
1024
  * When it was deleted; it may be taken back until `purge_after`.
993
1025
  */
@@ -1015,13 +1047,21 @@ export type DatabaseCreated = {
1015
1047
  */
1016
1048
  used_bytes?: number;
1017
1049
  /**
1018
- * The most its size holds. Past it, it is read-only.
1050
+ * The most it holds — its size's, or its storage (`storage_gb`). Past it, it is read-only.
1019
1051
  */
1020
1052
  quota_bytes: number;
1021
1053
  /**
1022
1054
  * It holds its quota: a transaction takes no writes unless it asks to — BEGIN READ WRITE, to make room with DROP, TRUNCATE, or DELETE and then VACUUM FULL (a DELETE alone frees no room) — and it reads on. Once it holds less than 95% of its quota it takes writes again, within a minute.
1023
1055
  */
1024
1056
  read_only: boolean;
1057
+ /**
1058
+ * What a database of a size on a disk of its own holds, in GB — its `quota_bytes` — as said when it was opened or grown (`DatabaseUpdate.storage_gb`), or its size's. It grows, never shrinks. Absent for a size on the platform's SAN (free, hobby), which holds its size's.
1059
+ */
1060
+ storage_gb?: number;
1061
+ /**
1062
+ * Whether it grows by itself: 90% full, its storage grows by half, up to the next multiple of 5 GB (10 to 15, 25 to 40), six hours at least after it last grew, to 4,000 GB. Off, a database past its storage turns read-only, and its organization's owners are told at 90% and when it is full. Absent for a size on the platform's SAN.
1063
+ */
1064
+ storage_autoscaling?: boolean;
1025
1065
  /**
1026
1066
  * A change of its passwords (POST …/password) has not reached the database yet: the new password works once this is false, a few seconds after. A client that hands the new password on waits for it.
1027
1067
  */
@@ -1224,7 +1264,7 @@ export type DatabaseSize = {
1224
1264
  */
1225
1265
  memory_mib: number;
1226
1266
  /**
1227
- * The most it may hold; past it it turns read-only.
1267
+ * What it holds unless said otherwise: its size's; past it it turns read-only. A size that is `storage_adjustable` holds what its database says (`storage_gb`).
1228
1268
  */
1229
1269
  storage_bytes: number;
1230
1270
  /**
@@ -1252,9 +1292,21 @@ export type DatabaseSize = {
1252
1292
  */
1253
1293
  pooled_connections: number;
1254
1294
  /**
1255
- * What an hour of a database of this size awake costs on Pay as you go, in micro-USD (the price table's; a free size's past its free hours).
1295
+ * What an hour of a database of this size awake costs on Pay as you go, in micro-USD (the price table's; a free size's past its free hours) — of a size on a disk of its own, its CPU and memory alone: its storage is billed by the GB (`storage_price_micros_per_gb_month`).
1256
1296
  */
1257
1297
  price_micros_per_hour: number;
1298
+ /**
1299
+ * A database of this size holds the storage it says (`storage_gb`), up to `max_storage_gb`, and grows; one of another (free, hobby) holds its size's.
1300
+ */
1301
+ storage_adjustable: boolean;
1302
+ /**
1303
+ * The most a database of this size may hold, in GB: 4,000. Absent when it is not `storage_adjustable`.
1304
+ */
1305
+ max_storage_gb?: number;
1306
+ /**
1307
+ * What a GB of its storage costs a month past its first GB, awake, in micro-USD: Render's 0.30 USD. Absent when it is not `storage_adjustable`.
1308
+ */
1309
+ storage_price_micros_per_gb_month?: number;
1258
1310
  /**
1259
1311
  * A size counted against the project's free databases; the others are paid for.
1260
1312
  */