palbase 0.42.0 → 0.43.1
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/dist/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{6RAP4AII.js → 2MAP5CJ6.js} +2 -2
- package/dist/chunks/{AQV3OQRL.js → 2W3ELCC2.js} +2 -2
- package/dist/chunks/{VBROMD5X.js → 3BBJOHNC.js} +1 -1
- package/dist/chunks/{POCZ4Q2I.js → AX7C33RW.js} +1 -1
- package/dist/chunks/{TUMSSUUS.js → B5IZJXZU.js} +1 -1
- package/dist/chunks/{EEYIFP7R.js → CEXZKCGA.js} +2 -2
- package/dist/chunks/{L3W75GPJ.js → CKVGJBDE.js} +2 -2
- package/dist/chunks/{3B26HF2E.js → DDUOUX5Y.js} +1 -1
- package/dist/chunks/EI3CP3O7.js +22 -0
- package/dist/chunks/{I6WTPZ6G.js → IQMWDELL.js} +2 -2
- package/dist/chunks/{UGFLMEVH.js → ISTUIM3X.js} +2 -2
- package/dist/chunks/{DY65FDLF.js → JS6QFPSR.js} +1 -1
- package/dist/chunks/{MS4WUVDW.js → KZDJTCZ6.js} +1 -1
- package/dist/chunks/{RVXJJALR.js → LJM66WKM.js} +2 -2
- package/dist/chunks/{4FY2JOIE.js → P5PHOIEQ.js} +2 -2
- package/dist/chunks/{VXH23FMT.js → QDP5IIMZ.js} +2 -2
- package/dist/chunks/{QQKGUVDV.js → QINBTLCQ.js} +2 -2
- package/dist/chunks/{L3OT55MV.js → SVUVPTA4.js} +2 -2
- package/dist/chunks/{SMINGDYN.js → U5ZYNBB2.js} +2 -2
- package/dist/chunks/{DS4WQJZM.js → USJJR7ID.js} +2 -2
- package/dist/chunks/{LOINJWR3.js → WDVR33AO.js} +2 -2
- package/dist/chunks/{RNDFA3AQ.js → Y5S3P3BL.js} +2 -2
- package/dist/chunks/{OYA6Z4VI.js → YGF3LZZE.js} +1 -1
- package/dist/cli.js +120 -120
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/cloud/src/generated/studio.d.ts +92 -61
- package/types/internal/src/modules/machines.d.ts +17 -17
- package/types/web/src/socket.d.ts +19 -1
- package/dist/chunks/QG2BSVEO.js +0 -22
|
@@ -347,10 +347,10 @@ export declare function client(t: Transport): {
|
|
|
347
347
|
signal?: AbortSignal;
|
|
348
348
|
}): Promise<Reply<200, ({
|
|
349
349
|
id: string;
|
|
350
|
-
organization_id: string;
|
|
351
350
|
name: string;
|
|
352
|
-
created_by: string | null;
|
|
353
351
|
created_at: string;
|
|
352
|
+
created_by: string | null;
|
|
353
|
+
organization_id: string;
|
|
354
354
|
}) | null>>;
|
|
355
355
|
addEnvironment(input: {
|
|
356
356
|
path: {
|
|
@@ -1336,13 +1336,6 @@ export declare function client(t: Transport): {
|
|
|
1336
1336
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1337
1337
|
signal?: AbortSignal;
|
|
1338
1338
|
}): Promise<Reply<200, {
|
|
1339
|
-
environments: ({
|
|
1340
|
-
platform_id: string;
|
|
1341
|
-
ref: string;
|
|
1342
|
-
name: string;
|
|
1343
|
-
project_id: string;
|
|
1344
|
-
project_name: string;
|
|
1345
|
-
})[];
|
|
1346
1339
|
organization_id: string;
|
|
1347
1340
|
exempt: boolean;
|
|
1348
1341
|
has_account: boolean;
|
|
@@ -1374,14 +1367,11 @@ export declare function client(t: Transport): {
|
|
|
1374
1367
|
owed_micros?: number;
|
|
1375
1368
|
projects: ({
|
|
1376
1369
|
project_id: string;
|
|
1377
|
-
ref: string;
|
|
1378
1370
|
name: string;
|
|
1379
1371
|
plan: "free" | "pay_as_you_go";
|
|
1380
1372
|
paid: boolean;
|
|
1381
|
-
frozen: boolean;
|
|
1382
1373
|
at_limit: boolean;
|
|
1383
1374
|
gone: boolean;
|
|
1384
|
-
deleted: boolean;
|
|
1385
1375
|
monthly_limit_micros?: number | null;
|
|
1386
1376
|
charged_micros?: number;
|
|
1387
1377
|
gross_micros?: number;
|
|
@@ -1392,6 +1382,20 @@ export declare function client(t: Transport): {
|
|
|
1392
1382
|
gross_micros?: number;
|
|
1393
1383
|
micros?: number;
|
|
1394
1384
|
})[];
|
|
1385
|
+
environments: ({
|
|
1386
|
+
id: string;
|
|
1387
|
+
ref: string;
|
|
1388
|
+
name: string;
|
|
1389
|
+
paid: boolean;
|
|
1390
|
+
frozen: boolean;
|
|
1391
|
+
deleted: boolean;
|
|
1392
|
+
items: ({
|
|
1393
|
+
item: string;
|
|
1394
|
+
units: number;
|
|
1395
|
+
gross_micros?: number;
|
|
1396
|
+
micros?: number;
|
|
1397
|
+
})[];
|
|
1398
|
+
})[];
|
|
1395
1399
|
})[];
|
|
1396
1400
|
}>>;
|
|
1397
1401
|
confirm(input: {
|
|
@@ -1539,13 +1543,7 @@ export declare function client(t: Transport): {
|
|
|
1539
1543
|
units: number;
|
|
1540
1544
|
gross_micros: number;
|
|
1541
1545
|
micros: number;
|
|
1542
|
-
|
|
1543
|
-
platform_id: string;
|
|
1544
|
-
ref: string;
|
|
1545
|
-
name: string;
|
|
1546
|
-
project_id: string;
|
|
1547
|
-
project_name: string;
|
|
1548
|
-
}) | null;
|
|
1546
|
+
project: string | null;
|
|
1549
1547
|
})[];
|
|
1550
1548
|
owed_micros: {
|
|
1551
1549
|
[key: string]: number;
|
|
@@ -1563,9 +1561,6 @@ export declare function client(t: Transport): {
|
|
|
1563
1561
|
invoices(input: {
|
|
1564
1562
|
path: {
|
|
1565
1563
|
id: string;
|
|
1566
|
-
};
|
|
1567
|
-
query?: {
|
|
1568
|
-
environment?: string;
|
|
1569
1564
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1570
1565
|
signal?: AbortSignal;
|
|
1571
1566
|
}): Promise<Reply<200, {
|
|
@@ -1584,10 +1579,8 @@ export declare function client(t: Transport): {
|
|
|
1584
1579
|
created_at: string;
|
|
1585
1580
|
number: string | null;
|
|
1586
1581
|
environment: ({
|
|
1587
|
-
platform_id: string;
|
|
1588
1582
|
ref: string;
|
|
1589
1583
|
name: string;
|
|
1590
|
-
project_id: string;
|
|
1591
1584
|
project_name: string;
|
|
1592
1585
|
}) | null;
|
|
1593
1586
|
})[];
|
|
@@ -1604,13 +1597,6 @@ export declare function client(t: Transport): {
|
|
|
1604
1597
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1605
1598
|
signal?: AbortSignal;
|
|
1606
1599
|
}): Promise<Reply<200, {
|
|
1607
|
-
environments: ({
|
|
1608
|
-
platform_id: string;
|
|
1609
|
-
ref: string;
|
|
1610
|
-
name: string;
|
|
1611
|
-
project_id: string;
|
|
1612
|
-
project_name: string;
|
|
1613
|
-
})[];
|
|
1614
1600
|
organization_id: string;
|
|
1615
1601
|
exempt: boolean;
|
|
1616
1602
|
has_account: boolean;
|
|
@@ -1642,14 +1628,11 @@ export declare function client(t: Transport): {
|
|
|
1642
1628
|
owed_micros?: number;
|
|
1643
1629
|
projects: ({
|
|
1644
1630
|
project_id: string;
|
|
1645
|
-
ref: string;
|
|
1646
1631
|
name: string;
|
|
1647
1632
|
plan: "free" | "pay_as_you_go";
|
|
1648
1633
|
paid: boolean;
|
|
1649
|
-
frozen: boolean;
|
|
1650
1634
|
at_limit: boolean;
|
|
1651
1635
|
gone: boolean;
|
|
1652
|
-
deleted: boolean;
|
|
1653
1636
|
monthly_limit_micros?: number | null;
|
|
1654
1637
|
charged_micros?: number;
|
|
1655
1638
|
gross_micros?: number;
|
|
@@ -1660,6 +1643,20 @@ export declare function client(t: Transport): {
|
|
|
1660
1643
|
gross_micros?: number;
|
|
1661
1644
|
micros?: number;
|
|
1662
1645
|
})[];
|
|
1646
|
+
environments: ({
|
|
1647
|
+
id: string;
|
|
1648
|
+
ref: string;
|
|
1649
|
+
name: string;
|
|
1650
|
+
paid: boolean;
|
|
1651
|
+
frozen: boolean;
|
|
1652
|
+
deleted: boolean;
|
|
1653
|
+
items: ({
|
|
1654
|
+
item: string;
|
|
1655
|
+
units: number;
|
|
1656
|
+
gross_micros?: number;
|
|
1657
|
+
micros?: number;
|
|
1658
|
+
})[];
|
|
1659
|
+
})[];
|
|
1663
1660
|
})[];
|
|
1664
1661
|
}>>;
|
|
1665
1662
|
paid(input: {
|
|
@@ -1671,7 +1668,7 @@ export declare function client(t: Transport): {
|
|
|
1671
1668
|
organizations: ({
|
|
1672
1669
|
organization_id: string;
|
|
1673
1670
|
name: string;
|
|
1674
|
-
|
|
1671
|
+
projects: number;
|
|
1675
1672
|
pay_as_you_go: number;
|
|
1676
1673
|
})[];
|
|
1677
1674
|
}>>;
|
|
@@ -1705,9 +1702,8 @@ export declare function client(t: Transport): {
|
|
|
1705
1702
|
owed_micros: number;
|
|
1706
1703
|
charged_micros: number;
|
|
1707
1704
|
gross_micros: number;
|
|
1708
|
-
|
|
1705
|
+
projects: ({
|
|
1709
1706
|
project_id: string;
|
|
1710
|
-
ref: string;
|
|
1711
1707
|
name: string;
|
|
1712
1708
|
owed_micros: number;
|
|
1713
1709
|
charged_micros: number;
|
|
@@ -1718,13 +1714,15 @@ export declare function client(t: Transport): {
|
|
|
1718
1714
|
gross_micros: number;
|
|
1719
1715
|
micros: number;
|
|
1720
1716
|
})[];
|
|
1721
|
-
|
|
1722
|
-
|
|
1717
|
+
environments: ({
|
|
1718
|
+
id: string;
|
|
1723
1719
|
ref: string;
|
|
1724
1720
|
name: string;
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1721
|
+
items: ({
|
|
1722
|
+
item: string;
|
|
1723
|
+
units: number;
|
|
1724
|
+
})[];
|
|
1725
|
+
})[];
|
|
1728
1726
|
})[];
|
|
1729
1727
|
})[];
|
|
1730
1728
|
}>>;
|
|
@@ -1737,22 +1735,19 @@ export declare function client(t: Transport): {
|
|
|
1737
1735
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1738
1736
|
signal?: AbortSignal;
|
|
1739
1737
|
}): Promise<Reply<number, Response>>;
|
|
1740
|
-
|
|
1738
|
+
project(input: {
|
|
1741
1739
|
path: {
|
|
1742
1740
|
id: string;
|
|
1743
|
-
|
|
1741
|
+
project: string;
|
|
1744
1742
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1745
1743
|
signal?: AbortSignal;
|
|
1746
1744
|
}): Promise<Reply<200, {
|
|
1747
1745
|
project_id: string;
|
|
1748
|
-
ref: string;
|
|
1749
1746
|
name: string;
|
|
1750
1747
|
plan: "free" | "pay_as_you_go";
|
|
1751
1748
|
paid: boolean;
|
|
1752
|
-
frozen: boolean;
|
|
1753
1749
|
at_limit: boolean;
|
|
1754
1750
|
gone: boolean;
|
|
1755
|
-
deleted: boolean;
|
|
1756
1751
|
monthly_limit_micros?: number | null;
|
|
1757
1752
|
charged_micros?: number;
|
|
1758
1753
|
gross_micros?: number;
|
|
@@ -1763,38 +1758,41 @@ export declare function client(t: Transport): {
|
|
|
1763
1758
|
gross_micros?: number;
|
|
1764
1759
|
micros?: number;
|
|
1765
1760
|
})[];
|
|
1766
|
-
|
|
1767
|
-
|
|
1761
|
+
environments: ({
|
|
1762
|
+
id: string;
|
|
1768
1763
|
ref: string;
|
|
1769
1764
|
name: string;
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1765
|
+
paid: boolean;
|
|
1766
|
+
frozen: boolean;
|
|
1767
|
+
deleted: boolean;
|
|
1768
|
+
items: ({
|
|
1769
|
+
item: string;
|
|
1770
|
+
units: number;
|
|
1771
|
+
gross_micros?: number;
|
|
1772
|
+
micros?: number;
|
|
1773
|
+
})[];
|
|
1774
|
+
})[];
|
|
1773
1775
|
}>>;
|
|
1774
1776
|
steer(input: {
|
|
1775
1777
|
path: {
|
|
1776
1778
|
id: string;
|
|
1777
|
-
|
|
1779
|
+
project: string;
|
|
1778
1780
|
};
|
|
1779
1781
|
headers?: {
|
|
1780
1782
|
"Idempotency-Key"?: string;
|
|
1781
1783
|
};
|
|
1782
1784
|
body?: {
|
|
1783
1785
|
plan?: "free" | "pay_as_you_go";
|
|
1784
|
-
frozen?: boolean;
|
|
1785
1786
|
monthly_limit_micros?: number | null;
|
|
1786
1787
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1787
1788
|
signal?: AbortSignal;
|
|
1788
1789
|
}): Promise<Reply<200, {
|
|
1789
1790
|
project_id: string;
|
|
1790
|
-
ref: string;
|
|
1791
1791
|
name: string;
|
|
1792
1792
|
plan: "free" | "pay_as_you_go";
|
|
1793
1793
|
paid: boolean;
|
|
1794
|
-
frozen: boolean;
|
|
1795
1794
|
at_limit: boolean;
|
|
1796
1795
|
gone: boolean;
|
|
1797
|
-
deleted: boolean;
|
|
1798
1796
|
monthly_limit_micros?: number | null;
|
|
1799
1797
|
charged_micros?: number;
|
|
1800
1798
|
gross_micros?: number;
|
|
@@ -1805,13 +1803,46 @@ export declare function client(t: Transport): {
|
|
|
1805
1803
|
gross_micros?: number;
|
|
1806
1804
|
micros?: number;
|
|
1807
1805
|
})[];
|
|
1808
|
-
|
|
1809
|
-
|
|
1806
|
+
environments: ({
|
|
1807
|
+
id: string;
|
|
1810
1808
|
ref: string;
|
|
1811
1809
|
name: string;
|
|
1812
|
-
|
|
1813
|
-
|
|
1810
|
+
paid: boolean;
|
|
1811
|
+
frozen: boolean;
|
|
1812
|
+
deleted: boolean;
|
|
1813
|
+
items: ({
|
|
1814
|
+
item: string;
|
|
1815
|
+
units: number;
|
|
1816
|
+
gross_micros?: number;
|
|
1817
|
+
micros?: number;
|
|
1818
|
+
})[];
|
|
1819
|
+
})[];
|
|
1820
|
+
}>>;
|
|
1821
|
+
freeze(input: {
|
|
1822
|
+
path: {
|
|
1823
|
+
id: string;
|
|
1824
|
+
ref: string;
|
|
1825
|
+
};
|
|
1826
|
+
headers?: {
|
|
1827
|
+
"Idempotency-Key"?: string;
|
|
1814
1828
|
};
|
|
1829
|
+
body: {
|
|
1830
|
+
frozen: boolean;
|
|
1831
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1832
|
+
signal?: AbortSignal;
|
|
1833
|
+
}): Promise<Reply<200, {
|
|
1834
|
+
id: string;
|
|
1835
|
+
ref: string;
|
|
1836
|
+
name: string;
|
|
1837
|
+
paid: boolean;
|
|
1838
|
+
frozen: boolean;
|
|
1839
|
+
deleted: boolean;
|
|
1840
|
+
items: ({
|
|
1841
|
+
item: string;
|
|
1842
|
+
units: number;
|
|
1843
|
+
gross_micros?: number;
|
|
1844
|
+
micros?: number;
|
|
1845
|
+
})[];
|
|
1815
1846
|
}>>;
|
|
1816
1847
|
};
|
|
1817
1848
|
accessRequests: {
|
|
@@ -210,7 +210,7 @@ export type Machine = {
|
|
|
210
210
|
*/
|
|
211
211
|
replicas: number;
|
|
212
212
|
/**
|
|
213
|
-
* Kept awake: a machine of a size that sleeps is never put to sleep when idle, and is started again at once when it is asleep — while its
|
|
213
|
+
* Kept awake: a machine of a size that sleeps is never put to sleep when idle, and is started again at once when it is asleep — while its project is on Pay as you go, which pays its every hour. Without them it sleeps as any; a dedicated size never sleeps.
|
|
214
214
|
*/
|
|
215
215
|
always_on: boolean;
|
|
216
216
|
/**
|
|
@@ -310,7 +310,7 @@ export type MachineCreate = {
|
|
|
310
310
|
*/
|
|
311
311
|
replicas?: number;
|
|
312
312
|
/**
|
|
313
|
-
* Keeps it awake (Machine.always_on): open to
|
|
313
|
+
* Keeps it awake (Machine.always_on): open to a project on Pay as you go, refused `always_on_not_available` otherwise.
|
|
314
314
|
*/
|
|
315
315
|
always_on?: boolean;
|
|
316
316
|
/**
|
|
@@ -407,7 +407,7 @@ export type MachineUpdate = {
|
|
|
407
407
|
*/
|
|
408
408
|
replicas?: number;
|
|
409
409
|
/**
|
|
410
|
-
* Whether it is kept awake from now on (Machine.always_on): no version changes. Turning it on is open to
|
|
410
|
+
* Whether it is kept awake from now on (Machine.always_on): no version changes. Turning it on is open to a project on Pay as you go, refused `always_on_not_available` otherwise.
|
|
411
411
|
*/
|
|
412
412
|
always_on?: boolean;
|
|
413
413
|
/**
|
|
@@ -553,13 +553,13 @@ export type Database = {
|
|
|
553
553
|
*/
|
|
554
554
|
awake_hours?: number;
|
|
555
555
|
/**
|
|
556
|
-
* How long a Free
|
|
556
|
+
* How long a Free project's free and preview databases may run in a month between them — every environment's together, not each environment's — in hours (project_awake_hours): past it, they all sleep until the month ends, and a client is told so. Absent for a size with no such limit.
|
|
557
557
|
*/
|
|
558
558
|
awake_hours_limit?: number;
|
|
559
559
|
/**
|
|
560
|
-
* How long the
|
|
560
|
+
* How long the free and preview databases of every environment of the project have run this month between them, deleted ones too, in hours: what awake_hours_limit holds — a database deleted and opened again gets no new hours. Present with awake_hours_limit.
|
|
561
561
|
*/
|
|
562
|
-
|
|
562
|
+
project_awake_hours?: number;
|
|
563
563
|
/**
|
|
564
564
|
* How much it held when last measured — every database in it summed, the ones its owner made too — measured while it is awake. Absent before its first measure.
|
|
565
565
|
*/
|
|
@@ -659,7 +659,7 @@ export type DatabaseUpdate = {
|
|
|
659
659
|
*/
|
|
660
660
|
backup_days?: number;
|
|
661
661
|
/**
|
|
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`),
|
|
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`), or one whose connections are too few for the copies the machines given it run (409 `database_connections_short`).
|
|
663
663
|
*/
|
|
664
664
|
size?: "dedicated-1x" | "dedicated-2x" | "free" | "hobby" | "standard-16x" | "standard-1x" | "standard-2x" | "standard-32x" | "standard-4x" | "standard-8x" | "starter";
|
|
665
665
|
/**
|
|
@@ -1035,13 +1035,13 @@ export type DatabaseCreated = {
|
|
|
1035
1035
|
*/
|
|
1036
1036
|
awake_hours?: number;
|
|
1037
1037
|
/**
|
|
1038
|
-
* How long a Free
|
|
1038
|
+
* How long a Free project's free and preview databases may run in a month between them — every environment's together, not each environment's — in hours (project_awake_hours): past it, they all sleep until the month ends, and a client is told so. Absent for a size with no such limit.
|
|
1039
1039
|
*/
|
|
1040
1040
|
awake_hours_limit?: number;
|
|
1041
1041
|
/**
|
|
1042
|
-
* How long the
|
|
1042
|
+
* How long the free and preview databases of every environment of the project have run this month between them, deleted ones too, in hours: what awake_hours_limit holds — a database deleted and opened again gets no new hours. Present with awake_hours_limit.
|
|
1043
1043
|
*/
|
|
1044
|
-
|
|
1044
|
+
project_awake_hours?: number;
|
|
1045
1045
|
/**
|
|
1046
1046
|
* How much it held when last measured — every database in it summed, the ones its owner made too — measured while it is awake. Absent before its first measure.
|
|
1047
1047
|
*/
|
|
@@ -1308,7 +1308,7 @@ export type DatabaseSize = {
|
|
|
1308
1308
|
*/
|
|
1309
1309
|
storage_price_micros_per_gb_month?: number;
|
|
1310
1310
|
/**
|
|
1311
|
-
* A size
|
|
1311
|
+
* A free size: its databases, as many as the project opens, share the project's free database hours (every environment's together); the others are paid for.
|
|
1312
1312
|
*/
|
|
1313
1313
|
free: boolean;
|
|
1314
1314
|
/**
|
|
@@ -2409,7 +2409,7 @@ export declare function client(t: Transport): {
|
|
|
2409
2409
|
/**
|
|
2410
2410
|
* Add a domain to a machine
|
|
2411
2411
|
*
|
|
2412
|
-
* Adds a domain of the customer's own the machine answers at too, once its owner has added the records the answer names to its DNS. Refused when another environment has it (domain_taken), when it is one of the platform's, or past the environment's twenty.
|
|
2412
|
+
* Adds a domain of the customer's own the machine answers at too, once its owner has added the records the answer names to its DNS. Refused when another environment has it (domain_taken), when it is one of the platform's, or past the project's domains, every environment's together: twenty on Free, a hundred on Pay as you go (too_many_domains).
|
|
2413
2413
|
*/
|
|
2414
2414
|
addMachineDomain(input: {
|
|
2415
2415
|
path: {
|
|
@@ -2506,7 +2506,7 @@ export declare function client(t: Transport): {
|
|
|
2506
2506
|
/**
|
|
2507
2507
|
* List database sizes
|
|
2508
2508
|
*
|
|
2509
|
-
* Every database size, the ones that sleep first: what a database of it is given and may hold, its monthly limits, and whether this project may open one of it now. A size that is not open says why (`reason`): a size that is paid for is open to a project that may pay
|
|
2509
|
+
* Every database size, the ones that sleep first: what a database of it is given and may hold, its monthly limits, and whether this project may open one of it now. A size that is not open says why (`reason`): a size that is paid for is open to a project that may pay; the free size is open to every project, its databases of it — as many as it opens — sharing its free database hours.
|
|
2510
2510
|
*/
|
|
2511
2511
|
listDatabaseSizes(input?: {
|
|
2512
2512
|
signal?: AbortSignal;
|
|
@@ -3025,7 +3025,7 @@ export declare function client(t: Transport): {
|
|
|
3025
3025
|
/**
|
|
3026
3026
|
* Add a domain to a site
|
|
3027
3027
|
*
|
|
3028
|
-
* Adds a domain of the customer's own the site answers at too, once its owner has added the records the answer names to its DNS. Refused when another environment has it (domain_taken), when it is one of the platform's, or past the environment's twenty.
|
|
3028
|
+
* Adds a domain of the customer's own the site answers at too, once its owner has added the records the answer names to its DNS. Refused when another environment has it (domain_taken), when it is one of the platform's, or past the project's domains, every environment's together: twenty on Free, a hundred on Pay as you go (too_many_domains).
|
|
3029
3029
|
*/
|
|
3030
3030
|
addSiteDomain(input: {
|
|
3031
3031
|
path: {
|
|
@@ -3112,7 +3112,7 @@ export declare function client(t: Transport): {
|
|
|
3112
3112
|
/**
|
|
3113
3113
|
* Move a machine to another environment of its project
|
|
3114
3114
|
*
|
|
3115
|
-
* Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so, and what ran where it left answers until it is up in the new one (moved_from; ten minutes at most). It answers at the address it had too, for good (former_urls; the user's call of 2026-11-02). Its domains of its own move with it, and answer throughout: none of them may be added in the new environment too (domain_in_environment)
|
|
3115
|
+
* Binds the machine to another environment of its project (the user's call of 2026-11-01): it takes that environment's settings, secrets and modules from its next start, and its address names it (<name>-<the environment's ref>). The operator moves it — out of the environment it leaves, into the new one at the version it serves — in its own pass: the machine says where it is moving (moving_to) until it has, a second or so, and what ran where it left answers until it is up in the new one (moved_from; ten minutes at most). It answers at the address it had too, for good (former_urls; the user's call of 2026-11-02). Its domains of its own move with it, and answer throughout: none of them may be added in the new environment too (domain_in_environment); they are the project's, counted across its environments, and take no room there. Its pull requests' previews are closed; a new push opens them in the new environment. The database it is given stays where it is kept, given across environments. Its name is the project's one (name_taken when the new environment holds a machine of that name). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found).
|
|
3116
3116
|
*/
|
|
3117
3117
|
moveMachine(input: {
|
|
3118
3118
|
path: {
|
|
@@ -3124,7 +3124,7 @@ export declare function client(t: Transport): {
|
|
|
3124
3124
|
/**
|
|
3125
3125
|
* Move a site to another environment of its project
|
|
3126
3126
|
*
|
|
3127
|
-
* Binds the site to another environment of its project (the user's call of 2026-11-01), as a machine moves: the operator copies its files and releases to the new environment while it serves on where it is, then moves it — its releases, its builds, its domains of its own — in one transaction, a few seconds after the request; its address names the new environment from then on (<name>-<the environment's ref>), and it answers at the one it had too, for good (urls; the user's call of 2026-11-02). Its pull requests' previews are closed; a new push opens them in the new environment. A build of it going on is stopped and built again there; the GitHub installation it is built through is linked to the new environment when it is not. Meanwhile a change of it is refused (409 site_moving), and a move to its own environment lets the move go. The new environment must have room for
|
|
3127
|
+
* Binds the site to another environment of its project (the user's call of 2026-11-01), as a machine moves: the operator copies its files and releases to the new environment while it serves on where it is, then moves it — its releases, its builds, its domains of its own — in one transaction, a few seconds after the request; its address names the new environment from then on (<name>-<the environment's ref>), and it answers at the one it had too, for good (urls; the user's call of 2026-11-02). Its pull requests' previews are closed; a new push opens them in the new environment. A build of it going on is stopped and built again there; the GitHub installation it is built through is linked to the new environment when it is not. Meanwhile a change of it is refused (409 site_moving), and a move to its own environment lets the move go. The new environment must have room for a site more (too_many_sites), no site of its name (name_taken) and none of its domains added too (domain_in_environment); its files and its domains are the project's, counted across its environments, and take no room there. A site the platform's operator took down moves nowhere (site_taken_down). It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the site says why (move_note).
|
|
3128
3128
|
*/
|
|
3129
3129
|
moveSite(input: {
|
|
3130
3130
|
path: {
|
|
@@ -3136,7 +3136,7 @@ export declare function client(t: Transport): {
|
|
|
3136
3136
|
/**
|
|
3137
3137
|
* Move a database to another environment of its project
|
|
3138
3138
|
*
|
|
3139
|
-
* Binds the database to another environment of its project (the user's call of 2026-11-01): what it is — its row, what it is counted and paid for from then on, its address — becomes the new environment's, a few seconds after the request; what holds its data stays where it was made, so nothing is copied and it answers throughout. Its host names the new environment from then on (<name>-<the environment's ref>), and the one it had answers too, for good (former_hosts; the user's call of 2026-11-02); the machines given it are rolled out to the new host, beside the version that serves. Its migrations are the machines' of the environment that keeps it: the machines that run them move with it when with_machines says so — said to move in one step, each after the database — or the move is refused (migrations_where_kept, with the machines). A pull request preview's own database moves with nothing (preview_database); one being resized, restored or archived moves once that is done (database_busy). The new environment must have room for it as for a database opened there (
|
|
3139
|
+
* Binds the database to another environment of its project (the user's call of 2026-11-01): what it is — its row, what it is counted and paid for from then on, its address — becomes the new environment's, a few seconds after the request; what holds its data stays where it was made, so nothing is copied and it answers throughout. Its host names the new environment from then on (<name>-<the environment's ref>), and the one it had answers too, for good (former_hosts; the user's call of 2026-11-02); the machines given it are rolled out to the new host, beside the version that serves. Its migrations are the machines' of the environment that keeps it: the machines that run them move with it when with_machines says so — said to move in one step, each after the database — or the move is refused (migrations_where_kept, with the machines). A pull request preview's own database moves with nothing (preview_database); one being resized, restored or archived moves once that is done (database_busy). The new environment must have room for it as for a database opened there (too_many_databases, size_not_available, backup_days_not_available) and no database of its name (name_taken). Meanwhile a change of it is refused (409 database_moving), and a move to its own environment lets the move go. It needs the admin role in both environments (environment_role_required); an environment's own token or key moves nothing out of it (environment_not_found). A move that cannot be made is let go of, and the database says why (move_note).
|
|
3140
3140
|
*/
|
|
3141
3141
|
moveDatabase(input: {
|
|
3142
3142
|
path: {
|
|
@@ -8,6 +8,8 @@ export interface SocketOptions {
|
|
|
8
8
|
webSocket?: typeof WebSocket;
|
|
9
9
|
/** Pauses before each reconnection attempt, in ms; the last repeats. Jittered ±20%. */
|
|
10
10
|
backoff?: number[];
|
|
11
|
+
/** Pauses before a refused (or unreached) join is asked again, in ms; the last repeats. Jittered ±20%. */
|
|
12
|
+
refusedBackoff?: number[];
|
|
11
13
|
heartbeatMs?: number;
|
|
12
14
|
replyTimeoutMs?: number;
|
|
13
15
|
}
|
|
@@ -101,8 +103,24 @@ export declare class RealtimeSocket {
|
|
|
101
103
|
channel(name: string, opts?: ChannelOptions): Channel;
|
|
102
104
|
/** Closes the socket; every channel is closed (the app joins again — as the next user, if one signs in). */
|
|
103
105
|
disconnect(): void;
|
|
104
|
-
/** A new token for every joined channel (the session was refreshed). */
|
|
106
|
+
/** A new token for every joined channel (the session was refreshed) — and a refused one asked again with it. */
|
|
105
107
|
tokenChanged(): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Every refused channel asked again now, without waiting out its pause: what it was refused for may be gone — a
|
|
110
|
+
* new token, the network back.
|
|
111
|
+
*/
|
|
112
|
+
askRefusedAgain(): void;
|
|
113
|
+
/** A join's outcome; one not joined — refused, or never reaching the server — is asked again later: it may hold. */
|
|
114
|
+
private settle;
|
|
115
|
+
/**
|
|
116
|
+
* A refused (or unreached) join is asked again after a pause that grows with each refusal: its reason may not last
|
|
117
|
+
* — a token the server took for a stale one, a server not ready, a socket that did not open (03.11: an app's calls
|
|
118
|
+
* channel asked once while its socket could not open, never again — its rings unheard). Left, or closed for the next
|
|
119
|
+
* user, it is not.
|
|
120
|
+
*/
|
|
121
|
+
private askAgainLater;
|
|
122
|
+
/** A refused channel joined again now — unless a reconnect is on its way: that one asks for it. */
|
|
123
|
+
private askAgain;
|
|
106
124
|
private open;
|
|
107
125
|
private dropped;
|
|
108
126
|
private sendJoin;
|