palbase 0.32.1 → 0.34.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 (51) hide show
  1. package/README.md +2 -2
  2. package/dist/ai/index.js +2 -2
  3. package/dist/backend/engine.js +2 -2
  4. package/dist/backend/env.js +1 -1
  5. package/dist/backend/index.js +3 -3
  6. package/dist/backend/stack.js +1 -1
  7. package/dist/backend/test.js +2 -2
  8. package/dist/chunks/{GSLXEXTS.js → 23NFADPH.js} +1 -1
  9. package/dist/chunks/{L6YOR3QZ.js → 2KUOCM4W.js} +1 -1
  10. package/dist/chunks/{ZFG4PBFW.js → 3WO4MSQK.js} +2 -2
  11. package/dist/chunks/{KKRFDTTG.js → 56CR6XQX.js} +1 -1
  12. package/dist/chunks/{YXQ7M62L.js → 7KAQJOKQ.js} +2 -2
  13. package/dist/chunks/{KQPEQLGE.js → AAJTXVUF.js} +2 -2
  14. package/dist/chunks/{MYO4NTVQ.js → BORV4XQE.js} +2 -2
  15. package/dist/chunks/{YJ2Q5HKO.js → CVZYB52V.js} +2 -2
  16. package/dist/chunks/{NWYIDVMD.js → DP7HCIWR.js} +2 -2
  17. package/dist/chunks/{VVEFYBL2.js → FFLUB3R2.js} +2 -2
  18. package/dist/chunks/{2PGS7DYV.js → HJTZ5RUV.js} +2 -2
  19. package/dist/chunks/{GMH6MCXU.js → I6FOJBJG.js} +2 -2
  20. package/dist/chunks/{FYRXV2SV.js → JNARDSKO.js} +2 -2
  21. package/dist/chunks/{CEZTHZAV.js → QLGKS7OC.js} +2 -2
  22. package/dist/chunks/{DHI6EIYN.js → SVEMN34N.js} +1 -1
  23. package/dist/chunks/{CYVDM52S.js → TGGBNVFF.js} +1 -1
  24. package/dist/chunks/{GLQSFPDP.js → TO7DBGJO.js} +2 -2
  25. package/dist/chunks/{DNUDAS5M.js → TSZBPILF.js} +1 -1
  26. package/dist/chunks/{EFXXXNO2.js → TXPV2FZL.js} +2 -2
  27. package/dist/chunks/{UWNRC3CL.js → U2OSMAAB.js} +1 -1
  28. package/dist/chunks/{KUQHUWPG.js → VYJZI4ZF.js} +2 -2
  29. package/dist/chunks/{ATEDA4UC.js → WFXZMNDL.js} +2 -2
  30. package/dist/chunks/{KEQSDOPL.js → ZXOT7B45.js} +2 -2
  31. package/dist/cli.js +137 -137
  32. package/dist/cloud/index.js +2 -2
  33. package/dist/refuse/ai.js +1 -1
  34. package/dist/refuse/backend.js +1 -1
  35. package/dist/refuse/cloud.js +1 -1
  36. package/dist/refuse/server.js +1 -1
  37. package/dist/server/index.js +2 -2
  38. package/dist/server/testing.js +2 -2
  39. package/dist/web/calls-ui.js +2 -2
  40. package/dist/web/index.js +2 -2
  41. package/dist/web/message.js +2 -2
  42. package/dist/web/palbe.js +2 -2
  43. package/dist/web/paywall.js +2 -2
  44. package/dist/web/push-sw.js +1 -1
  45. package/dist/web/ssr.js +2 -2
  46. package/dist/web/vite.js +2 -2
  47. package/package.json +2 -2
  48. package/types/cloud/src/cloud.d.ts +4 -1
  49. package/types/cloud/src/generated/studio.d.ts +195 -117
  50. package/types/internal/src/modules/ai.d.ts +8 -4
  51. package/types/internal/src/modules/machines.d.ts +25 -9
@@ -38,6 +38,21 @@ export declare function client(t: Transport): {
38
38
  created_at: string;
39
39
  })[];
40
40
  }>>;
41
+ create(input: {
42
+ headers?: {
43
+ "Idempotency-Key"?: string;
44
+ };
45
+ body: {
46
+ name: string;
47
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
48
+ signal?: AbortSignal;
49
+ }): Promise<Reply<200, {
50
+ id: string;
51
+ name: string;
52
+ role: "owner" | "admin" | "member";
53
+ created_by: string | null;
54
+ created_at: string;
55
+ }>>;
41
56
  get(input: {
42
57
  path: {
43
58
  id: string;
@@ -50,6 +65,33 @@ export declare function client(t: Transport): {
50
65
  created_by: string | null;
51
66
  created_at: string;
52
67
  }>>;
68
+ takeAway(input: {
69
+ path: {
70
+ id: string;
71
+ };
72
+ headers?: {
73
+ "Idempotency-Key"?: string;
74
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
75
+ signal?: AbortSignal;
76
+ }): Promise<Reply<204, undefined>>;
77
+ rename(input: {
78
+ path: {
79
+ id: string;
80
+ };
81
+ headers?: {
82
+ "Idempotency-Key"?: string;
83
+ };
84
+ body: {
85
+ name: string;
86
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
87
+ signal?: AbortSignal;
88
+ }): Promise<Reply<200, {
89
+ id: string;
90
+ name: string;
91
+ role: "owner" | "admin" | "member";
92
+ created_by: string | null;
93
+ created_at: string;
94
+ }>>;
53
95
  members(input: {
54
96
  path: {
55
97
  id: string;
@@ -287,9 +329,6 @@ export declare function client(t: Transport): {
287
329
  path: {
288
330
  id: string;
289
331
  };
290
- query?: {
291
- move_credit_to?: string;
292
- };
293
332
  headers?: {
294
333
  "Idempotency-Key"?: string;
295
334
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -363,9 +402,6 @@ export declare function client(t: Transport): {
363
402
  path: {
364
403
  ref: string;
365
404
  };
366
- query?: {
367
- move_credit_to?: string;
368
- };
369
405
  headers?: {
370
406
  "Idempotency-Key"?: string;
371
407
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -1306,6 +1342,11 @@ export declare function client(t: Transport): {
1306
1342
  organization_id: string;
1307
1343
  exempt: boolean;
1308
1344
  has_account: boolean;
1345
+ paid_by: ({
1346
+ organization_id: string;
1347
+ name: string;
1348
+ held: boolean;
1349
+ }) | null;
1309
1350
  paying: boolean;
1310
1351
  enforced: boolean;
1311
1352
  account: ({
@@ -1313,11 +1354,18 @@ export declare function client(t: Transport): {
1313
1354
  payment_method: string | null;
1314
1355
  terms_version: string | null;
1315
1356
  terms_accepted_at: string | null;
1357
+ threshold_micros: number;
1358
+ owed_micros: number;
1359
+ unpaid_micros: number;
1360
+ past_due_since: string | null;
1361
+ free_on: string | null;
1362
+ held: ("unpaid" | "disputed") | null;
1363
+ paid_organizations: number;
1316
1364
  }) | null;
1317
1365
  period: string;
1318
1366
  charged_micros?: number;
1319
1367
  gross_micros?: number;
1320
- taken_micros?: number;
1368
+ owed_micros?: number;
1321
1369
  projects: ({
1322
1370
  project_id: string;
1323
1371
  ref: string;
@@ -1328,19 +1376,10 @@ export declare function client(t: Transport): {
1328
1376
  at_limit: boolean;
1329
1377
  gone: boolean;
1330
1378
  deleted: boolean;
1331
- wallet?: {
1332
- balance_micros: number;
1333
- auto_topup: boolean;
1334
- auto_threshold_micros: number;
1335
- auto_amount_micros: number;
1336
- monthly_limit_micros: number | null;
1337
- low_balance_days: number;
1338
- exhausted: boolean;
1339
- topup_failures: number;
1340
- };
1379
+ monthly_limit_micros?: number | null;
1341
1380
  charged_micros?: number;
1342
1381
  gross_micros?: number;
1343
- taken_micros?: number;
1382
+ owed_micros?: number;
1344
1383
  items: ({
1345
1384
  item: string;
1346
1385
  units: number;
@@ -1359,7 +1398,6 @@ export declare function client(t: Transport): {
1359
1398
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1360
1399
  signal?: AbortSignal;
1361
1400
  }): Promise<Reply<200, {
1362
- paid: boolean;
1363
1401
  saved: boolean;
1364
1402
  }>>;
1365
1403
  cards(input: {
@@ -1503,7 +1541,7 @@ export declare function client(t: Transport): {
1503
1541
  project_name: string;
1504
1542
  }) | null;
1505
1543
  })[];
1506
- taken_micros: {
1544
+ owed_micros: {
1507
1545
  [key: string]: number;
1508
1546
  };
1509
1547
  }>>;
@@ -1527,7 +1565,7 @@ export declare function client(t: Transport): {
1527
1565
  }): Promise<Reply<200, {
1528
1566
  invoices: ({
1529
1567
  id: string;
1530
- kind: "checkout" | "auto" | "card" | "bank_transfer";
1568
+ kind: "month" | "threshold" | "checkout" | "auto" | "card" | "bank_transfer";
1531
1569
  project_id: string | null;
1532
1570
  project_ref: string | null;
1533
1571
  project_name: string | null;
@@ -1548,7 +1586,7 @@ export declare function client(t: Transport): {
1548
1586
  }) | null;
1549
1587
  })[];
1550
1588
  }>>;
1551
- transfer(input: {
1589
+ payer(input: {
1552
1590
  path: {
1553
1591
  id: string;
1554
1592
  };
@@ -1556,16 +1594,141 @@ export declare function client(t: Transport): {
1556
1594
  "Idempotency-Key"?: string;
1557
1595
  };
1558
1596
  body: {
1559
- from: string;
1560
- to: string;
1561
- amount_micros?: number;
1597
+ account: string | null;
1598
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1599
+ signal?: AbortSignal;
1600
+ }): Promise<Reply<200, {
1601
+ environments: ({
1602
+ platform_id: string;
1603
+ ref: string;
1604
+ name: string;
1605
+ project_id: string;
1606
+ project_name: string;
1607
+ })[];
1608
+ organization_id: string;
1609
+ exempt: boolean;
1610
+ has_account: boolean;
1611
+ paid_by: ({
1612
+ organization_id: string;
1613
+ name: string;
1614
+ held: boolean;
1615
+ }) | null;
1616
+ paying: boolean;
1617
+ enforced: boolean;
1618
+ account: ({
1619
+ stripe_mode: "live" | "test";
1620
+ payment_method: string | null;
1621
+ terms_version: string | null;
1622
+ terms_accepted_at: string | null;
1623
+ threshold_micros: number;
1624
+ owed_micros: number;
1625
+ unpaid_micros: number;
1626
+ past_due_since: string | null;
1627
+ free_on: string | null;
1628
+ held: ("unpaid" | "disputed") | null;
1629
+ paid_organizations: number;
1630
+ }) | null;
1631
+ period: string;
1632
+ charged_micros?: number;
1633
+ gross_micros?: number;
1634
+ owed_micros?: number;
1635
+ projects: ({
1636
+ project_id: string;
1637
+ ref: string;
1638
+ name: string;
1639
+ plan: "free" | "pay_as_you_go";
1640
+ paid: boolean;
1641
+ frozen: boolean;
1642
+ at_limit: boolean;
1643
+ gone: boolean;
1644
+ deleted: boolean;
1645
+ monthly_limit_micros?: number | null;
1646
+ charged_micros?: number;
1647
+ gross_micros?: number;
1648
+ owed_micros?: number;
1649
+ items: ({
1650
+ item: string;
1651
+ units: number;
1652
+ gross_micros?: number;
1653
+ micros?: number;
1654
+ })[];
1655
+ })[];
1656
+ }>>;
1657
+ paid(input: {
1658
+ path: {
1659
+ id: string;
1660
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1661
+ signal?: AbortSignal;
1662
+ }): Promise<Reply<200, {
1663
+ organizations: ({
1664
+ organization_id: string;
1665
+ name: string;
1666
+ environments: number;
1667
+ pay_as_you_go: number;
1668
+ })[];
1669
+ }>>;
1670
+ stopPaying(input: {
1671
+ path: {
1672
+ id: string;
1673
+ org: string;
1674
+ };
1675
+ headers?: {
1676
+ "Idempotency-Key"?: string;
1677
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1678
+ signal?: AbortSignal;
1679
+ }): Promise<Reply<204, undefined>>;
1680
+ report(input: {
1681
+ path: {
1682
+ id: string;
1683
+ };
1684
+ query?: {
1685
+ period?: string;
1562
1686
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1563
1687
  signal?: AbortSignal;
1564
1688
  }): Promise<Reply<200, {
1565
- moved_micros: number;
1566
- from: string;
1567
- to: string;
1689
+ account: string;
1690
+ period: string;
1691
+ owed_micros: number;
1692
+ charged_micros: number;
1693
+ gross_micros: number;
1694
+ organizations: ({
1695
+ organization_id: string;
1696
+ name: string;
1697
+ owed_micros: number;
1698
+ charged_micros: number;
1699
+ gross_micros: number;
1700
+ environments: ({
1701
+ project_id: string;
1702
+ ref: string;
1703
+ name: string;
1704
+ owed_micros: number;
1705
+ charged_micros: number;
1706
+ gross_micros: number;
1707
+ items: ({
1708
+ item: string;
1709
+ units: number;
1710
+ gross_micros: number;
1711
+ micros: number;
1712
+ })[];
1713
+ environment: ({
1714
+ platform_id: string;
1715
+ ref: string;
1716
+ name: string;
1717
+ project_id: string;
1718
+ project_name: string;
1719
+ }) | null;
1720
+ })[];
1721
+ })[];
1568
1722
  }>>;
1723
+ reportCsv(input: {
1724
+ path: {
1725
+ id: string;
1726
+ };
1727
+ query?: {
1728
+ period?: string;
1729
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1730
+ signal?: AbortSignal;
1731
+ }): Promise<Reply<number, Response>>;
1569
1732
  environment(input: {
1570
1733
  path: {
1571
1734
  id: string;
@@ -1582,19 +1745,10 @@ export declare function client(t: Transport): {
1582
1745
  at_limit: boolean;
1583
1746
  gone: boolean;
1584
1747
  deleted: boolean;
1585
- wallet?: {
1586
- balance_micros: number;
1587
- auto_topup: boolean;
1588
- auto_threshold_micros: number;
1589
- auto_amount_micros: number;
1590
- monthly_limit_micros: number | null;
1591
- low_balance_days: number;
1592
- exhausted: boolean;
1593
- topup_failures: number;
1594
- };
1748
+ monthly_limit_micros?: number | null;
1595
1749
  charged_micros?: number;
1596
1750
  gross_micros?: number;
1597
- taken_micros?: number;
1751
+ owed_micros?: number;
1598
1752
  items: ({
1599
1753
  item: string;
1600
1754
  units: number;
@@ -1621,10 +1775,6 @@ export declare function client(t: Transport): {
1621
1775
  plan?: "free" | "pay_as_you_go";
1622
1776
  frozen?: boolean;
1623
1777
  monthly_limit_micros?: number | null;
1624
- auto_topup?: boolean;
1625
- auto_threshold_micros?: number;
1626
- auto_amount_micros?: number;
1627
- low_balance_days?: number;
1628
1778
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1629
1779
  signal?: AbortSignal;
1630
1780
  }): Promise<Reply<200, {
@@ -1637,19 +1787,10 @@ export declare function client(t: Transport): {
1637
1787
  at_limit: boolean;
1638
1788
  gone: boolean;
1639
1789
  deleted: boolean;
1640
- wallet?: {
1641
- balance_micros: number;
1642
- auto_topup: boolean;
1643
- auto_threshold_micros: number;
1644
- auto_amount_micros: number;
1645
- monthly_limit_micros: number | null;
1646
- low_balance_days: number;
1647
- exhausted: boolean;
1648
- topup_failures: number;
1649
- };
1790
+ monthly_limit_micros?: number | null;
1650
1791
  charged_micros?: number;
1651
1792
  gross_micros?: number;
1652
- taken_micros?: number;
1793
+ owed_micros?: number;
1653
1794
  items: ({
1654
1795
  item: string;
1655
1796
  units: number;
@@ -1664,69 +1805,6 @@ export declare function client(t: Transport): {
1664
1805
  project_name: string;
1665
1806
  };
1666
1807
  }>>;
1667
- topUp(input: {
1668
- path: {
1669
- id: string;
1670
- ref: string;
1671
- };
1672
- headers?: {
1673
- "Idempotency-Key"?: string;
1674
- };
1675
- body: {
1676
- amount_micros: number;
1677
- payment_method?: string;
1678
- plan?: "pay_as_you_go";
1679
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1680
- signal?: AbortSignal;
1681
- }): Promise<Reply<200, {
1682
- invoice_id: string;
1683
- status: string;
1684
- hosted_url?: string;
1685
- }>>;
1686
- bankTransfer(input: {
1687
- path: {
1688
- id: string;
1689
- ref: string;
1690
- };
1691
- headers?: {
1692
- "Idempotency-Key"?: string;
1693
- };
1694
- body: {
1695
- amount_micros: number;
1696
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1697
- signal?: AbortSignal;
1698
- }): Promise<Reply<200, {
1699
- invoice_id: string;
1700
- status: string;
1701
- hosted_url?: string;
1702
- }>>;
1703
- ledger(input: {
1704
- path: {
1705
- id: string;
1706
- ref: string;
1707
- };
1708
- query?: {
1709
- before?: number;
1710
- kind?: string;
1711
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1712
- signal?: AbortSignal;
1713
- }): Promise<Reply<200, {
1714
- lines: ({
1715
- from_environment?: string | null;
1716
- to_environment?: string | null;
1717
- id: number;
1718
- kind: "topup" | "bonus" | "usage" | "expiry" | "refund" | "adjustment" | "transfer" | "forfeit";
1719
- amount_micros: number;
1720
- ref: string;
1721
- remaining_micros: number | null;
1722
- expires_at: string | null;
1723
- created_at: string;
1724
- via: string | null;
1725
- invoice: string | null;
1726
- from_project?: string;
1727
- to_project?: string;
1728
- })[];
1729
- }>>;
1730
1808
  };
1731
1809
  accessRequests: {
1732
1810
  request(input: {
@@ -1256,7 +1256,7 @@ export type MessageAttachment = {
1256
1256
  */
1257
1257
  content_type: string;
1258
1258
  /**
1259
- * image: a picture the model is shown with the message; file: a file put in the chat's workspace.
1259
+ * image: a picture the model is shown with the message; file: a file the agent is given as read_as says, and put in the chat's workspace when it has one.
1260
1260
  */
1261
1261
  kind: "image" | "file";
1262
1262
  /**
@@ -1276,12 +1276,16 @@ export type MessageAttachment = {
1276
1276
  */
1277
1277
  size: number;
1278
1278
  /**
1279
- * Where a file is in the chat's workspace: .palbase/attachments/<message id>/<name>.
1279
+ * How the agent's model is given a file: picture (shown), document (a PDF, given whole), text (its text, drawn out of a Word, Excel or PowerPoint file, or a text file). None: a file of the chat's workspace alone.
1280
+ */
1281
+ read_as?: "picture" | "document" | "text";
1282
+ /**
1283
+ * Where a file is in the chat's workspace: .palbase/attachments/<message id>/<name>. None in a chat that works in no workspace.
1280
1284
  */
1281
1285
  workspace_path?: string;
1282
1286
  };
1283
1287
  /**
1284
- * A file of the project's storage a message puts in its chat's workspace.
1288
+ * A file of the project's storage a message gives its chat's agent, and puts in its workspace when it has one.
1285
1289
  */
1286
1290
  export type MessageFileRequest = {
1287
1291
  /**
@@ -1349,7 +1353,7 @@ export type MessageRequest = {
1349
1353
  */
1350
1354
  delivery?: "next" | "now";
1351
1355
  /**
1352
- * Files of the project's storage put in the chat's workspace before the agent reads the message, at .palbase/attachments/<message id>/<filename>, and the agent is told where (8 at most, 15 MiB each at most). A chat that works in no workspace takes none (409 no_workspace). Copied for the chat, and who may attach which, as images; an object the message names twice — a picture of it and a file of it too — is read once.
1356
+ * Files of the project's storage given to the agent with the message (8 at most, 50 MB each at most), by what their bytes are: a PDF whole, each page as its text and as a picture; a picture (png, jpeg, webp or gif, 5 MiB at most) shown, while the message shows fewer than 4; a Word, Excel or PowerPoint file (.docx, .xlsx, .pptx) or a text file as its text, drawn out by the platform (400,000 bytes of it at most). In a chat that works in a workspace each is also put in it before the agent reads the message, at .palbase/attachments/<message id>/<filename>, and the agent is told where. A chat that works in no workspace refuses a file its agent is given nothing of (415, 413 or 422 unreadable_attachment). Copied for the chat, and who may attach which, as images; an object the message names twice — a picture of it and a file of it too — is read once.
1353
1357
  */
1354
1358
  files?: MessageFileRequest[];
1355
1359
  /**
@@ -214,7 +214,7 @@ export type Machine = {
214
214
  */
215
215
  always_on: boolean;
216
216
  /**
217
- * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's: the pull request's code runs with the environment's secrets.
217
+ * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Any environment previews, production's too: the pull request's code runs with the environment's settings, secrets and users, with a database of its own when the machine runs its database's migrations.
218
218
  */
219
219
  previews: boolean;
220
220
  /**
@@ -307,7 +307,7 @@ export type MachineCreate = {
307
307
  */
308
308
  always_on?: boolean;
309
309
  /**
310
- * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's: the pull request's code runs with the environment's secrets. A machine read with a platform's tokens (source.access token) previews what its platform puts (PUT /machines/{name}/previews/{pull_request}), no comment written.
310
+ * Whether a pull request opened against its branch is previewed: its head built into a machine of its own, <name>-pr<n>, in this environment, with this environment's settings and secrets, answering at <name>-pr<n>-<ref> until the pull request closes; the pull request is told where in a comment. Any environment previews, production's too: the pull request's code runs with the environment's settings, secrets and users, with a database of its own when the machine runs its database's migrations. A machine read with a platform's tokens (source.access token) previews what its platform puts (PUT /machines/{name}/previews/{pull_request}), no comment written.
311
311
  */
312
312
  previews?: boolean;
313
313
  /**
@@ -802,6 +802,14 @@ export type DatabaseLimits = {
802
802
  * The connections it takes (Postgres' max_connections).
803
803
  */
804
804
  connections: number;
805
+ /**
806
+ * The sessions its direct port (5432) takes at once.
807
+ */
808
+ direct_connections: number;
809
+ /**
810
+ * The transactions its pooled port (6543) runs at once.
811
+ */
812
+ pooled_connections: number;
805
813
  };
806
814
  /**
807
815
  * One bucket of a database's usage.
@@ -1197,6 +1205,14 @@ export type DatabaseSize = {
1197
1205
  * A week asleep, its volume is taken back and its next connection brings it back from its backup.
1198
1206
  */
1199
1207
  archives: boolean;
1208
+ /**
1209
+ * How many sessions its direct port (5432) takes at once: a session holds one until it ends, and a client past them is refused (53300).
1210
+ */
1211
+ direct_connections: number;
1212
+ /**
1213
+ * 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).
1214
+ */
1215
+ pooled_connections: number;
1200
1216
  /**
1201
1217
  * A size counted against the project's free databases; the others are paid for.
1202
1218
  */
@@ -1476,7 +1492,7 @@ export type Site = {
1476
1492
  source: SiteSourceView;
1477
1493
  build: SiteBuildSettings;
1478
1494
  /**
1479
- * Whether a pull request opened against its source's branch is previewed: its head built, with this environment's build settings, into a release of its own that answers at <name>-pr<n>-<ref> until the pull request closes — never what the site serves, none of its releases; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's.
1495
+ * Whether a pull request opened against its source's branch is previewed: its head built, with this environment's build settings, into a release of its own that answers at <name>-pr<n>-<ref> until the pull request closes — never what the site serves, none of its releases; the pull request is told where in a comment. Any environment previews, production's too: the pull request's build runs with the environment's settings.
1480
1496
  */
1481
1497
  previews: boolean;
1482
1498
  /**
@@ -1522,7 +1538,7 @@ export type SiteCreate = {
1522
1538
  source?: SiteSource;
1523
1539
  build?: SiteBuildSettings;
1524
1540
  /**
1525
- * Whether a pull request opened against its source's branch is previewed: its head built, with this environment's build settings, into a release of its own that answers at <name>-pr<n>-<ref> until the pull request closes — never what the site serves, none of its releases; the pull request is told where in a comment. Turn it on in an environment kept for previews, not production's.
1541
+ * Whether a pull request opened against its source's branch is previewed: its head built, with this environment's build settings, into a release of its own that answers at <name>-pr<n>-<ref> until the pull request closes — never what the site serves, none of its releases; the pull request is told where in a comment. Any environment previews, production's too: the pull request's build runs with the environment's settings.
1526
1542
  */
1527
1543
  previews?: boolean;
1528
1544
  /**
@@ -1858,7 +1874,7 @@ export type PreviewOpened = {
1858
1874
  commit: string;
1859
1875
  };
1860
1876
  /**
1861
- * A platform's pull request: its branch — one of the machine's repository's own — the head its machine's preview builds, and the token it is read with.
1877
+ * A platform's pull request: its branch — one of the machine's repository's own — the head its machine's preview builds, and, for a machine read with a platform's tokens, the token it is read with.
1862
1878
  */
1863
1879
  export type PreviewDeploy = {
1864
1880
  /**
@@ -1870,9 +1886,9 @@ export type PreviewDeploy = {
1870
1886
  */
1871
1887
  commit?: string;
1872
1888
  /**
1873
- * A GitHub App installation's token (ghs_…) for the machine's repository alone, read-only: used once, never kept.
1889
+ * For a machine read with a platform's tokens (source.access token), and required for one: a GitHub App installation's token (ghs_…) for the machine's repository alone, read-only, used once, never kept. A machine read with Palbase's GitHub App takes none (400 token_not_taken): its branch is read with the project's installation.
1874
1890
  */
1875
- git_access_token: string;
1891
+ git_access_token?: string;
1876
1892
  };
1877
1893
  /** Palbase Machines */
1878
1894
  export declare function client(t: Transport): {
@@ -2044,7 +2060,7 @@ export declare function client(t: Transport): {
2044
2060
  /**
2045
2061
  * Open or update a platform's pull request preview
2046
2062
  *
2047
- * For a machine read with a platform's tokens (source.access token: PalCore's, whose repositories have no Palbase App, so no pull request is heard here): opens the preview of the pull request at the head of its branch — one of the machine's repository's own: a fork's is not built — its own machine, <name>-pr<n>, and a database of its own when the machine runs its database's migrations — or builds the open one at it, and opens one that went idle again. The branch is read with git_access_token, a GitHub App installation's token for the machine's repository alone (ghs_…), once; a commit named must be the branch's head (409 commit_not_head). Its address and state are read with GET /machines/{name}/previews; the platform tells its pull request itself. Refused in a production environment (409 previews_in_production), for a machine read with Palbase's GitHub App (409 previews_from_github), with previews off (409 previews_off), and when the environment's limits refuse the preview (409 preview_refused, with why).
2063
+ * For a platform — PalCore — that previews its product's machine itself: one read with its tokens (source.access token), whose pull requests are not heard here, or one read with Palbase's GitHub App, whose numbers then are the platform's (a pull request GitHub told of keeps its own: 409 preview_taken). Opens the preview of the pull request at the head of its branch — one of the machine's repository's own: a fork's is not built — its own machine, <name>-pr<n>, and a database of its own when the machine runs its database's migrations — or builds the open one at it, and opens one that went idle again. A machine read with tokens has its branch read with git_access_token, a GitHub App installation's token for the machine's repository alone (ghs_…), once (400 token_required without); one read with Palbase's App, with the project's installation (400 token_not_taken with one). A commit named must be the branch's head (409 commit_not_head). Any environment previews, production's too: the preview runs with its settings, secrets and users. Its address and state are read with GET /machines/{name}/previews; the platform tells its pull request itself. Refused with previews off (409 previews_off), and when the environment's limits refuse the preview (409 preview_refused, with why).
2048
2064
  */
2049
2065
  putMachinePreview(input: {
2050
2066
  path: {
@@ -2057,7 +2073,7 @@ export declare function client(t: Transport): {
2057
2073
  /**
2058
2074
  * Close a platform's pull request preview
2059
2075
  *
2060
- * For a machine read with a platform's tokens: closes the preview of the pull request, its pull request closed — its machine and its own database are deleted at once. A machine read with Palbase's GitHub App has its previews closed as GitHub tells (409 previews_from_github).
2076
+ * Closes a preview its platform put (PUT): its machine and its own database are deleted at once. A preview GitHub told of closes as its pull request does (409 previews_from_github).
2061
2077
  */
2062
2078
  deleteMachinePreview(input: {
2063
2079
  path: {