palbase 0.38.0 → 0.40.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 (47) 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/{JLRUWZ5F.js → 4PBWRT4P.js} +2 -2
  8. package/dist/chunks/{JRTLS5CM.js → 565OM5B4.js} +2 -2
  9. package/dist/chunks/{TGQPGUJJ.js → A2D7FD7W.js} +1 -1
  10. package/dist/chunks/{GZEEHPBE.js → AG7NTVAG.js} +2 -2
  11. package/dist/chunks/{FM3BAHZZ.js → BKIIOP4S.js} +1 -1
  12. package/dist/chunks/{RSQV7RNP.js → C2QJHZUF.js} +1 -1
  13. package/dist/chunks/{6SKJE2BU.js → C4YKYPTT.js} +2 -2
  14. package/dist/chunks/{4NXMQWCX.js → CTSLJSZE.js} +2 -2
  15. package/dist/chunks/{L5S55A54.js → FQTHVNTU.js} +2 -2
  16. package/dist/chunks/{6SDU7XE2.js → FULS6XEF.js} +2 -2
  17. package/dist/chunks/{UDOERJLL.js → JWARTQKO.js} +2 -2
  18. package/dist/chunks/{JJ5KC2LB.js → JY4SEIMB.js} +2 -2
  19. package/dist/chunks/{F3D326PD.js → LT3QQ7XF.js} +1 -1
  20. package/dist/chunks/{7EDHWR5A.js → M5RJHNP6.js} +2 -2
  21. package/dist/chunks/{5DUY3VP2.js → MDWMGUWL.js} +2 -2
  22. package/dist/chunks/{KCKE34OI.js → MSMA7KGA.js} +2 -2
  23. package/dist/chunks/{LRXCOKXA.js → QSON7FZZ.js} +2 -2
  24. package/dist/chunks/{IIZT54SQ.js → RZF2I4FM.js} +2 -2
  25. package/dist/chunks/{WHJSFH5J.js → SCZSNZ7Q.js} +2 -2
  26. package/dist/chunks/{JFHJPS5G.js → UVBIMGFU.js} +1 -1
  27. package/dist/chunks/{2WLJWZTT.js → VFZBC3RM.js} +2 -2
  28. package/dist/chunks/{CL6S7PER.js → YJV5IDVY.js} +1 -1
  29. package/dist/chunks/{Z4ULG52U.js → YZHSYYPA.js} +1 -1
  30. package/dist/cli.js +148 -145
  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/cloud/src/generated/project.d.ts +1 -1
  47. package/types/internal/src/modules/machines.d.ts +335 -19
@@ -160,9 +160,9 @@ export type Machine = {
160
160
  */
161
161
  running_version: number;
162
162
  /**
163
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
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.
164
164
  */
165
- size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
165
+ size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512" | "standard-1x" | "standard-2x" | "standard-4x" | "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
  */
@@ -287,9 +287,9 @@ export type MachineCreate = {
287
287
  */
288
288
  port?: number;
289
289
  /**
290
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
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.
291
291
  */
292
- size: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
292
+ size: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "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
  */
@@ -384,9 +384,9 @@ export type MachineUpdate = {
384
384
  */
385
385
  port?: number;
386
386
  /**
387
- * The machine's size. A shared size has a fraction of a CPU as its ceiling and is put to sleep when it is idle; a dedicated size has whole CPUs of its own and never sleeps. shared-256: 0.2 vCPU, 256 MiB; shared-512: 0.5 vCPU, 512 MiB; shared-1024: 1 vCPU, 1024 MiB; dedicated-1x: 1 vCPU, 2048 MiB; dedicated-2x: 2 vCPU, 4096 MiB.
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.
388
388
  */
389
- size?: "dedicated-1x" | "dedicated-2x" | "shared-1024" | "shared-256" | "shared-512";
389
+ size?: "dedicated-1x" | "dedicated-2x" | "shared-256" | "standard-1x" | "standard-2x" | "standard-4x" | "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; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared 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.
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.
515
515
  */
516
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g";
516
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "preview" | "shared-1g" | "shared-2g" | "shared-4g" | "standard-1x" | "standard-2x" | "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
  */
@@ -610,9 +610,9 @@ export type DatabaseCreate = {
610
610
  */
611
611
  name?: string;
612
612
  /**
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; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared 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`).
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`).
614
614
  */
615
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
615
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
616
616
  /**
617
617
  * 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
618
  */
@@ -641,7 +641,7 @@ export type DatabaseUpdate = {
641
641
  /**
642
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`).
643
643
  */
644
- size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
644
+ size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
645
645
  };
646
646
  /**
647
647
  * Whose password is made new.
@@ -965,9 +965,9 @@ export type DatabaseCreated = {
965
965
  */
966
966
  pooled_port: number;
967
967
  /**
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; shared-1g: 1 GiB, up to 1 vCPU, 10 GB; shared-2g: 2 GiB, up to 2 vCPU, 25 GB; shared-4g: 4 GiB, up to 2 vCPU, 50 GB; dedicated-1x: 1 vCPU of its own, 4 GiB, 25 GB; dedicated-2x: 2 vCPU of its own, 8 GiB, 50 GB. The shared 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`).
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`).
969
969
  */
970
- size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "shared-1g" | "shared-2g" | "shared-4g";
970
+ size: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-1x" | "standard-2x" | "starter";
971
971
  /**
972
972
  * Where its data lives, as its size says: san, the platform's SAN; premium, a Premium SSD v2 disk of its own.
973
973
  */
@@ -1158,15 +1158,15 @@ export type MachineSize = {
1158
1158
  */
1159
1159
  name: string;
1160
1160
  /**
1161
- * shared: a fraction of a CPU as its ceiling, put to sleep when idle; dedicated: whole CPUs of its own, never asleep.
1161
+ * shared: a fraction of a CPU as its ceiling, put to sleep when idle; standard: its CPUs as its ceiling, a quarter of them reserved for it, never asleep; dedicated: whole CPUs of its own, never asleep.
1162
1162
  */
1163
- class: "shared" | "dedicated";
1163
+ class: "shared" | "standard" | "dedicated";
1164
1164
  /**
1165
1165
  * Its CPU ceiling, in CPUs.
1166
1166
  */
1167
1167
  vcpu: number;
1168
1168
  /**
1169
- * Its memory, its own in either class.
1169
+ * Its memory, its own in every class.
1170
1170
  */
1171
1171
  memory_mib: number;
1172
1172
  /**
@@ -1177,6 +1177,10 @@ export type MachineSize = {
1177
1177
  * An idle machine of this size is put to sleep, and woken by its next request.
1178
1178
  */
1179
1179
  sleeps: boolean;
1180
+ /**
1181
+ * What an hour of a copy of this size costs on Pay as you go, in micro-USD (the price table's; a free size's past its free hours).
1182
+ */
1183
+ price_micros_per_hour: number;
1180
1184
  /**
1181
1185
  * A size open to every project; the others are paid for.
1182
1186
  */
@@ -1247,6 +1251,10 @@ export type DatabaseSize = {
1247
1251
  * How many transactions its pooled port (6543) runs at once, however many of its clients are connected: a transaction that finds none of them free within 20 s is refused (53300).
1248
1252
  */
1249
1253
  pooled_connections: number;
1254
+ /**
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).
1256
+ */
1257
+ price_micros_per_hour: number;
1250
1258
  /**
1251
1259
  * A size counted against the project's free databases; the others are paid for.
1252
1260
  */
@@ -1539,6 +1547,11 @@ export type Site = {
1539
1547
  * Why the site's last move to another environment was not made, when it was not: the environment it was moving to holds a site of its name by then, has one of its domains added, or is gone.
1540
1548
  */
1541
1549
  move_note?: string;
1550
+ server: SiteServer;
1551
+ /**
1552
+ * Its previews — its pull requests' and its branches' — are its team's alone (Vercel's Deployment Protection; true by default): a visitor signs in with Studio, or holds one of its share links. What a protected preview answers is kept by no CDN.
1553
+ */
1554
+ previews_protected: boolean;
1542
1555
  };
1543
1556
  /**
1544
1557
  * The release a site serves; none before its first.
@@ -1589,9 +1602,14 @@ export type SiteCreate = {
1589
1602
  * The ref of the environment called, when given: a new site 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 site of that name.
1590
1603
  */
1591
1604
  environment?: string;
1605
+ server?: SiteServer;
1606
+ /**
1607
+ * Whether its previews are its team's alone; none is true.
1608
+ */
1609
+ previews_protected?: boolean;
1592
1610
  };
1593
1611
  /**
1594
- * What to change of a site; a field left out is unchanged.
1612
+ * What to change of a site; a field left out is unchanged — in build too: each of its fields given changes alone, an empty one is found in the source again, and env, when given, is all of the build's settings from then on.
1595
1613
  */
1596
1614
  export type SiteUpdate = {
1597
1615
  spa?: boolean;
@@ -1605,6 +1623,11 @@ export type SiteUpdate = {
1605
1623
  * Whether a fork's pull requests are previewed (Site.preview_forks).
1606
1624
  */
1607
1625
  preview_forks?: boolean;
1626
+ server?: SiteServer;
1627
+ /**
1628
+ * Whether its previews are its team's alone from now on.
1629
+ */
1630
+ previews_protected?: boolean;
1608
1631
  };
1609
1632
  /**
1610
1633
  * One upload of a site's files.
@@ -1730,7 +1753,7 @@ export type SiteBuild = {
1730
1753
  * The commit's message, its first line.
1731
1754
  */
1732
1755
  message: string;
1733
- state: "queued" | "building" | "succeeded" | "failed";
1756
+ state: "queued" | "building" | "succeeded" | "failed" | "cancelled";
1734
1757
  /**
1735
1758
  * Why it failed.
1736
1759
  */
@@ -1803,6 +1826,10 @@ export type Preview = {
1803
1826
  */
1804
1827
  export type PreviewList = {
1805
1828
  previews: Preview[];
1829
+ /**
1830
+ * A site's branches' previews, newest first: none of a machine's.
1831
+ */
1832
+ branches?: BranchPreview[];
1806
1833
  };
1807
1834
  /**
1808
1835
  * One record of a domain's DNS.
@@ -1978,6 +2005,141 @@ export type DatabaseMove = {
1978
2005
  */
1979
2006
  with_machines?: boolean;
1980
2007
  };
2008
+ /**
2009
+ * A deploy hook: a URL that builds the site's or machine's branch head when it is POSTed to, with no key — the URL is the secret, given once as the hook is made.
2010
+ */
2011
+ export type DeployHook = {
2012
+ id: string;
2013
+ /**
2014
+ * What calls it: a CMS, a schedule.
2015
+ */
2016
+ name: string;
2017
+ /**
2018
+ * Where it is POSTed to: https://deploy-hooks.<domain>/pbh_…, given once, as it is made.
2019
+ */
2020
+ url?: string;
2021
+ created_at: string;
2022
+ last_used_at: string | null;
2023
+ };
2024
+ /**
2025
+ * A site's or machine's deploy hooks, oldest first: 5 at most.
2026
+ */
2027
+ export type DeployHookList = {
2028
+ hooks: DeployHook[];
2029
+ };
2030
+ /**
2031
+ * A deploy hook to make.
2032
+ */
2033
+ export type DeployHookCreate = {
2034
+ /**
2035
+ * What calls it: letters, digits, spaces, dots, dashes and underscores, 64 at most.
2036
+ */
2037
+ name: string;
2038
+ };
2039
+ /**
2040
+ * A site's server: the machine of its environment that answers, on every address of the site, the paths `paths` names — each a prefix ending in /, an /api/ of the site's own — as it answers at its own address (woken, held to the environment's limits); none named, every path: a web app that runs on a server (Next.js, Nuxt, SvelteKit, Remix, Express), whose site is its address and domains. A pull request's preview of the site is answered by the machine's own preview of it once that is built. 10 paths at most; `/` is every path.
2041
+ */
2042
+ export type SiteServer = ({
2043
+ /**
2044
+ * The machine's name; empty takes the server away (in a change).
2045
+ */
2046
+ machine: string;
2047
+ paths: string[];
2048
+ }) | null;
2049
+ /**
2050
+ * What a directory of a repository is found to be, as Vercel's import finds it: a static web app (`static`: a site, its build in `build`), a web app that runs on a server (`server`: a machine, and a site with no files of its own whose server it is — the site's address and domains), or a backend (`backend`: a machine). A proposal: each of it is changed before the project is made; nothing is made here.
2051
+ */
2052
+ export type ProjectDetection = {
2053
+ repository: string;
2054
+ branch: string;
2055
+ path: string;
2056
+ /**
2057
+ * The branch's head it was read at.
2058
+ */
2059
+ commit: string;
2060
+ kind: "static" | "server" | "backend";
2061
+ /**
2062
+ * next, nuxt, sveltekit, react-router, astro, vite, gatsby, docusaurus, vitepress, create-react-app, angular, vue, parcel — or empty for none known.
2063
+ */
2064
+ framework: string;
2065
+ framework_name: string;
2066
+ /**
2067
+ * What told it.
2068
+ */
2069
+ why: string;
2070
+ build?: SiteBuildSettings;
2071
+ /**
2072
+ * The Node.js line a static web app's build runs (its .nvmrc, .node-version or engines.node; 24 when none says).
2073
+ */
2074
+ node?: number;
2075
+ /**
2076
+ * A server or backend is built from its own Dockerfile; without one, its language is found as it builds.
2077
+ */
2078
+ dockerfile: boolean;
2079
+ warnings: string[];
2080
+ };
2081
+ /**
2082
+ * A site's preview of one of its repository's branches: a push to a branch other than its own, while it previews, builds that branch's head into a release of its own, answered at <name>-git-<branch>-<ref> until the branch is deleted or a month goes by without a push.
2083
+ */
2084
+ export type BranchPreview = {
2085
+ branch: string;
2086
+ commit: string;
2087
+ url: string;
2088
+ state: "building" | "ready" | "failed" | "closed";
2089
+ created_at: string;
2090
+ updated_at: string;
2091
+ closed_at: string | null;
2092
+ };
2093
+ /**
2094
+ * Where a member goes with a pass: the https address of one of the site's open previews.
2095
+ */
2096
+ export type PreviewPassAsk = {
2097
+ to: string;
2098
+ };
2099
+ /**
2100
+ * A member's pass to a site's previews, 12 hours: url is the preview's address with the pass in its query once (the edge moves it into a cookie of the preview's own host).
2101
+ */
2102
+ export type PreviewPass = {
2103
+ url: string;
2104
+ expires_at: string;
2105
+ };
2106
+ /**
2107
+ * A share link to make.
2108
+ */
2109
+ export type PreviewLinkCreate = {
2110
+ name?: string;
2111
+ /**
2112
+ * Days it opens the previews; 7 when none.
2113
+ */
2114
+ days?: number;
2115
+ };
2116
+ /**
2117
+ * A share link of a site's previews: its token — given once, as it is made — opens any of them, added to its address as ?_palbase_pass=<token>. Deleting it closes them to it at once.
2118
+ */
2119
+ export type PreviewLink = {
2120
+ id: string;
2121
+ name: string;
2122
+ token?: string;
2123
+ made_by: string;
2124
+ expires_at: string;
2125
+ created_at: string;
2126
+ };
2127
+ /**
2128
+ * A site's share links that have not ended, newest first: 20 at most.
2129
+ */
2130
+ export type PreviewLinkList = {
2131
+ links: PreviewLinkListed[];
2132
+ };
2133
+ /**
2134
+ * A share link as its site lists it — never its token.
2135
+ */
2136
+ export type PreviewLinkListed = {
2137
+ id: string;
2138
+ name: string;
2139
+ made_by: string;
2140
+ expires_at: string;
2141
+ created_at: string;
2142
+ };
1981
2143
  /** Palbase Machines */
1982
2144
  export declare function client(t: Transport): {
1983
2145
  /**
@@ -2735,7 +2897,7 @@ export declare function client(t: Transport): {
2735
2897
  /**
2736
2898
  * Finish a release
2737
2899
  *
2738
- * Finishes a release whose files are all kept — refused, naming them, while one is missing — and the site serves it at once. Finishing one finished before has the site serve it again.
2900
+ * Finishes a release whose files are all kept — refused, naming them, while one is missing — and the site serves it at once. Finishing one finished before has the site serve it again. A release whose `/_redirects` or `/_headers` does not hold is refused (400 `invalid_rules`), the description naming the file, each line and why.
2739
2901
  */
2740
2902
  finishSiteRelease(input: {
2741
2903
  path: {
@@ -2923,5 +3085,159 @@ export declare function client(t: Transport): {
2923
3085
  body: DatabaseMove; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
2924
3086
  signal?: AbortSignal;
2925
3087
  }): Promise<Reply<200, Database> | Reply<202, Database>>;
3088
+ /**
3089
+ * Cancel a site's build
3090
+ *
3091
+ * Ends a build that is queued or building (`build_not_cancellable`, 409, for one that ended): its run is stopped, its commit's check says it was cancelled, and the site serves what it served. A push, a deploy or a deploy hook builds again.
3092
+ */
3093
+ cancelSiteBuild(input: {
3094
+ path: {
3095
+ name: string; /** The build's id. */
3096
+ build: string;
3097
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3098
+ signal?: AbortSignal;
3099
+ }): Promise<Reply<200, SiteBuild>>;
3100
+ /**
3101
+ * Cancel a build
3102
+ *
3103
+ * Ends a build that has not rolled out — queued, waiting for its checks or its configuration, building (`build_not_cancellable`, 409, for one being tested or ended): its run is stopped, its commit's check says it was cancelled, and the machine serves what it served. A push, a deploy or a deploy hook builds again.
3104
+ */
3105
+ cancelBuild(input: {
3106
+ path: {
3107
+ name: string; /** The build's id. */
3108
+ build: string;
3109
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3110
+ signal?: AbortSignal;
3111
+ }): Promise<Reply<200, Build>>;
3112
+ /**
3113
+ * List a site's deploy hooks
3114
+ *
3115
+ * The site's deploy hooks, oldest first: their names and when each was last called, never their URLs.
3116
+ */
3117
+ listSiteHooks(input: {
3118
+ path: {
3119
+ name: string;
3120
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3121
+ signal?: AbortSignal;
3122
+ }): Promise<Reply<200, DeployHookList>>;
3123
+ /**
3124
+ * Make a site deploy hook
3125
+ *
3126
+ * Makes a URL that builds the site's branch head when it is POSTed to (https://deploy-hooks.<domain>/<token>), held to the project's builds as a push is, at most once in five seconds. Its URL is in the answer alone: keep it as a secret, and delete the hook if it leaks. 5 at most (`too_many_hooks`, 409); a site built from no repository has none (409).
3127
+ */
3128
+ createSiteHook(input: {
3129
+ path: {
3130
+ name: string;
3131
+ };
3132
+ body: DeployHookCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3133
+ signal?: AbortSignal;
3134
+ }): Promise<Reply<201, DeployHook>>;
3135
+ /**
3136
+ * Delete a site deploy hook
3137
+ *
3138
+ * Deletes a deploy hook: its URL builds nothing from now on.
3139
+ */
3140
+ deleteSiteHook(input: {
3141
+ path: {
3142
+ name: string; /** The deploy hook's id. */
3143
+ hook: string;
3144
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3145
+ signal?: AbortSignal;
3146
+ }): Promise<Reply<204, undefined>>;
3147
+ /**
3148
+ * List a machine's deploy hooks
3149
+ *
3150
+ * The machine's deploy hooks, oldest first: their names and when each was last called, never their URLs.
3151
+ */
3152
+ listMachineHooks(input: {
3153
+ path: {
3154
+ name: string;
3155
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3156
+ signal?: AbortSignal;
3157
+ }): Promise<Reply<200, DeployHookList>>;
3158
+ /**
3159
+ * Make a machine deploy hook
3160
+ *
3161
+ * Makes a URL that builds the machine's branch head when it is POSTed to (https://deploy-hooks.<domain>/<token>), held to the project's builds as a push is, at most once in five seconds. Its URL is in the answer alone: keep it as a secret, and delete the hook if it leaks. 5 at most (`too_many_hooks`, 409); a machine read with its caller's tokens has none (409).
3162
+ */
3163
+ createMachineHook(input: {
3164
+ path: {
3165
+ name: string;
3166
+ };
3167
+ body: DeployHookCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3168
+ signal?: AbortSignal;
3169
+ }): Promise<Reply<201, DeployHook>>;
3170
+ /**
3171
+ * Delete a machine deploy hook
3172
+ *
3173
+ * Deletes a deploy hook: its URL builds nothing from now on.
3174
+ */
3175
+ deleteMachineHook(input: {
3176
+ path: {
3177
+ name: string; /** The deploy hook's id. */
3178
+ hook: string;
3179
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3180
+ signal?: AbortSignal;
3181
+ }): Promise<Reply<204, undefined>>;
3182
+ /**
3183
+ * Tell what a repository's directory is
3184
+ *
3185
+ * Reads a directory of a repository one of the project's installations reaches, at its branch's head — its package.json, its framework's configuration, its lockfiles, its Node.js version file — and says what it is and how it is built, as Vercel's import does. Nothing is made: a static web app is then opened as a site (POST /sites, with this build), a web app that runs on a server as a machine (POST /machines) and a site whose server it is (POST /sites with `server`), a backend as a machine. `project_not_detected` (422) when nothing there says what it is.
3186
+ */
3187
+ detectProject(input: {
3188
+ query: {
3189
+ repository: string; /** Its branch, read at its head. */
3190
+ branch: string; /** The directory in the repository; none for its root. */
3191
+ path?: string;
3192
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3193
+ signal?: AbortSignal;
3194
+ }): Promise<Reply<200, ProjectDetection>>;
3195
+ /**
3196
+ * Give a member a pass to a preview
3197
+ *
3198
+ * Makes a pass to the site's previews for the caller — Studio asks for one as a signed-in member comes from a protected preview (the edge sent them there) — and answers where to go with it: `to`, one of the site's open previews' addresses, with the pass in its query once. 12 hours.
3199
+ */
3200
+ createPreviewPass(input: {
3201
+ path: {
3202
+ name: string;
3203
+ };
3204
+ body: PreviewPassAsk; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3205
+ signal?: AbortSignal;
3206
+ }): Promise<Reply<201, PreviewPass>>;
3207
+ /**
3208
+ * List a site's share links
3209
+ *
3210
+ * The site's share links that have not ended, newest first — never their tokens.
3211
+ */
3212
+ listPreviewLinks(input: {
3213
+ path: {
3214
+ name: string;
3215
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3216
+ signal?: AbortSignal;
3217
+ }): Promise<Reply<200, PreviewLinkList>>;
3218
+ /**
3219
+ * Make a share link of a site's previews
3220
+ *
3221
+ * Makes a link that opens the site's protected previews to anyone holding it, for 1 to 30 days (7 when none): its token is in the answer alone. 20 at most (`too_many_links`, 409).
3222
+ */
3223
+ createPreviewLink(input: {
3224
+ path: {
3225
+ name: string;
3226
+ };
3227
+ body: PreviewLinkCreate; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3228
+ signal?: AbortSignal;
3229
+ }): Promise<Reply<201, PreviewLink>>;
3230
+ /**
3231
+ * Delete a share link
3232
+ *
3233
+ * Deletes a share link: the site's previews close to it at once.
3234
+ */
3235
+ deletePreviewLink(input: {
3236
+ path: {
3237
+ name: string; /** The share link's id. */
3238
+ link: string;
3239
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
3240
+ signal?: AbortSignal;
3241
+ }): Promise<Reply<204, undefined>>;
2926
3242
  };
2927
3243
  export type Client = ReturnType<typeof client>;