better-supabase 0.25.0 → 0.28.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 (180) hide show
  1. package/dist/{access-sql-bjWFUWlk.js → access-sql-CTDNuxRv.js} +177 -12
  2. package/dist/ai-sdk/agents/index.d.ts +2 -2
  3. package/dist/{app-tables-xij_MI5H.d.ts → app-tables-62GqZIhd.d.ts} +1 -1
  4. package/dist/{authorization-BJV2i8xB.d.ts → authorization-BCG1v0iC.d.ts} +24 -3
  5. package/dist/{bind-vKDmdu_4.d.ts → bind-C54jD0r3.d.ts} +1 -1
  6. package/dist/{block-env-wVLz0KMV.d.ts → block-env-CM-LFfj4.d.ts} +3 -3
  7. package/dist/blocks/ai-chat/index.d.ts +3 -3
  8. package/dist/blocks/announcements/index.d.ts +3 -3
  9. package/dist/blocks/api-keys/index.d.ts +1 -1
  10. package/dist/blocks/attachments/index.d.ts +1 -1
  11. package/dist/blocks/audit/index.d.ts +2 -2
  12. package/dist/blocks/automations/index.d.ts +1 -1
  13. package/dist/blocks/billing/index.d.ts +1 -1
  14. package/dist/blocks/bookings/index.d.ts +1 -1
  15. package/dist/blocks/calendar/index.d.ts +1 -1
  16. package/dist/blocks/comments/index.d.ts +4 -4
  17. package/dist/blocks/custom-fields/index.js +1 -1
  18. package/dist/blocks/drive/index.d.ts +1 -1
  19. package/dist/blocks/employees/index.js +1 -1
  20. package/dist/blocks/entitlements/index.d.ts +2 -2
  21. package/dist/blocks/forms/index.d.ts +1 -1
  22. package/dist/blocks/inbox/index.d.ts +4 -4
  23. package/dist/blocks/index.d.ts +1 -1
  24. package/dist/blocks/messaging/index.d.ts +4 -4
  25. package/dist/blocks/mfa/index.d.ts +1 -1
  26. package/dist/blocks/notifications/index.d.ts +3 -3
  27. package/dist/blocks/onboarding/index.d.ts +1 -1
  28. package/dist/blocks/organizations/index.d.ts +2 -2
  29. package/dist/blocks/permissions/index.d.ts +1 -1
  30. package/dist/blocks/push/index.d.ts +1 -1
  31. package/dist/blocks/reactions/index.d.ts +3 -3
  32. package/dist/blocks/reminders/index.d.ts +1 -1
  33. package/dist/blocks/saved-views/index.d.ts +1 -1
  34. package/dist/blocks/search/index.d.ts +2 -2
  35. package/dist/blocks/sessions/index.d.ts +1 -1
  36. package/dist/blocks/settings/index.d.ts +1 -1
  37. package/dist/blocks/subjects/index.d.ts +1 -1
  38. package/dist/blocks/tags/index.d.ts +1 -1
  39. package/dist/blocks/tasks/index.d.ts +1 -1
  40. package/dist/blocks/tasks/index.js +1 -1
  41. package/dist/blocks/undo/index.d.ts +1 -1
  42. package/dist/blocks/usage/index.d.ts +1 -1
  43. package/dist/blocks/workflow-editor/index.d.ts +3 -3
  44. package/dist/blocks/workflows/index.d.ts +3 -3
  45. package/dist/cli/{add-C2pNvVpu.js → add-BKcE_g9D.js} +2 -2
  46. package/dist/cli/{add-BTVrOGJF.js → add-DUyg9qna.js} +40 -15
  47. package/dist/cli/add-pDOlqWUa.js +1 -0
  48. package/dist/cli/{backfill-BicVPugb.js → backfill-r9RELEEh.js} +4 -4
  49. package/dist/cli/bin.js +1 -1
  50. package/dist/cli/{blocks-sScN-ik-.js → blocks-DTOFdrxL.js} +1 -1
  51. package/dist/cli/{blocks-BmYOH4T-.js → blocks-k1OG8XDs.js} +2 -2
  52. package/dist/cli/{cache-1TfBy2K4.js → cache-Czfw7Iow.js} +1 -1
  53. package/dist/cli/{codemod-ylE6wGLo.js → codemod-ClmbiLuL.js} +3 -3
  54. package/dist/cli/{command-BWEEXmtz.js → command-CVzTJSLp.js} +31 -0
  55. package/dist/cli/{completion-8EDK21xj.js → completion-CNCqE-Gb.js} +1 -1
  56. package/dist/cli/{completion-BfnKI4QZ.js → completion-Dpk6vh0p.js} +2 -2
  57. package/dist/cli/{completion-Bt7LMypX.js → completion-DxEXxFpz.js} +2 -2
  58. package/dist/cli/{config-CeaQMrvS.js → config-D2YUlzrl.js} +1 -1
  59. package/dist/cli/{config-WKDixoGK.js → config-EjNj3HfT.js} +1 -1
  60. package/dist/cli/{config-BVfeG3A5.js → config-KvV-sLZL.js} +290 -10
  61. package/dist/cli/{content-mapper-hUW2nb92.js → content-mapper-ez_mT0d4.js} +2 -2
  62. package/dist/cli/{db-DwjyUbAh.js → db-uYN6O5Eg.js} +38 -14
  63. package/dist/cli/{doctor-D3WKFBSv.js → doctor-BD9oo4MG.js} +31 -28
  64. package/dist/cli/{env-DMgjB_4y.js → env-BK0xKMeU.js} +1 -2
  65. package/dist/cli/{env-C-Bl6Awn.js → env-Bat6ogep.js} +1 -1
  66. package/dist/cli/env-Cy2lWBRC.js +1 -0
  67. package/dist/cli/{env-BCgVZkcb.js → env-DEAtgGoj.js} +2 -2
  68. package/dist/cli/{exec--Q1ZEWUW.js → exec-Ca5s-ygi.js} +1 -1
  69. package/dist/cli/{gen-CqsUdsB2.js → gen-8Ya8n2sA.js} +16 -16
  70. package/dist/cli/in-stack-diff-Cp-tVPj2.js +186 -0
  71. package/dist/cli/index.d.ts +1 -2
  72. package/dist/cli/index.js +8 -8
  73. package/dist/cli/{init-DryZ5Mp1.js → init-DgL3sDfQ.js} +118 -11
  74. package/dist/cli/{keys-CbaL0lnw.js → keys-CsanNk-2.js} +1 -1
  75. package/dist/cli/{live-Di45imoV.js → live-CMMEct_F.js} +2 -2
  76. package/dist/cli/{mcp-BklC-3eK.js → mcp-DEHtzAkq.js} +4 -4
  77. package/dist/cli/{metadata-7PsBF5Xw.js → metadata-BZh-cOzC.js} +3 -3
  78. package/dist/cli/migrate-sVs1QYTM.js +306 -0
  79. package/dist/cli/{migration-safety-Doy9qYO8.js → migration-safety-ClnYNMdq.js} +2 -2
  80. package/dist/cli/migrations-DWh38tO9.js +117 -0
  81. package/dist/cli/{module-migration-ZIn1NCMi.js → module-migration-CXfRJIV4.js} +2 -2
  82. package/dist/cli/{moved-DVwgE8lV.js → moved-Cnb4fp49.js} +1 -1
  83. package/dist/cli/{parse-B079x40m.js → parse-BWM6IGhF.js} +1 -1
  84. package/dist/cli/powersync-DURhWDVc.js +1 -0
  85. package/dist/cli/{powersync-BRGXOCJ0.js → powersync-Dnyr-Wy5.js} +4 -3
  86. package/dist/cli/{print-Dfqd4DB-.js → print-DJrSr56b.js} +2 -2
  87. package/dist/cli/{migrations-JtsPYv8g.js → providers-CpaISitn.js} +4 -116
  88. package/dist/cli/{remove-CQzSCYTu.js → remove-ChaieK3t.js} +6 -6
  89. package/dist/cli/{render-DWRz-uPQ.js → render-DUNJ4Pss.js} +8 -5
  90. package/dist/cli/{run-DPLedqTF.js → run-ChCQPYOh.js} +41 -39
  91. package/dist/cli/{run-j54rk2w-.js → run-Cl9COGuy.js} +10 -10
  92. package/dist/cli/{run-DmOTMa44.js → run-CxFDjL1Q.js} +4 -4
  93. package/dist/cli/seed-BJ7c-ktX.js +1 -0
  94. package/dist/cli/{seed-BMynpMPy.js → seed-BzVLTdRl.js} +3 -3
  95. package/dist/cli/{shared-CslNcs-R.js → shared-5uqc1GBj.js} +1 -1
  96. package/dist/cli/{skills-FXAVPLzp.js → skills-0gz_qjVb.js} +1 -1
  97. package/dist/cli/{snapshot-DdN5GlhH.js → snapshot-DdAP7LWO.js} +3 -3
  98. package/dist/cli/{source-COARbqch.js → source-2irbWSck.js} +1 -1
  99. package/dist/cli/{source-args-CDmmFmFG.js → source-args-DAcQt-Mh.js} +1 -1
  100. package/dist/cli/{spec-CgLNZc_C.js → spec-B7n4Rthp.js} +3 -3
  101. package/dist/cli/{spec-DIhBQlBF.js → spec-_MS0ym5r.js} +1 -1
  102. package/dist/cli/{sql-layout-8jrP5gIa.js → sql-layout-DYKkQw1k.js} +21 -7
  103. package/dist/cli/{stack-DgASZP0K.js → stack-CteM33gC.js} +3 -3
  104. package/dist/cli/{stack-status-B_Ipd_-z.js → stack-status-BkkYRlXG.js} +1 -1
  105. package/dist/cli/{stacks-BYlQ96WS.js → stacks-CiDBH1dB.js} +1 -1
  106. package/dist/cli/{sync-SqyVHRSJ.js → sync-DnSOrQuA.js} +4 -3
  107. package/dist/cli/table-DeH8X0qz.js +89 -0
  108. package/dist/cli/{upgrade-CY-vj_qh.js → upgrade-CWdrC-K3.js} +5 -4
  109. package/dist/cli/{upgrade-D0aLhluU.js → upgrade-cMy5fKkg.js} +3 -3
  110. package/dist/cli/{version-Bhca9D6q.js → version-C5RAWmrD.js} +1 -1
  111. package/dist/client/index.d.ts +5 -5
  112. package/dist/client/native/index.d.ts +4 -4
  113. package/dist/config/index.d.ts +3 -3
  114. package/dist/config/index.js +4 -4
  115. package/dist/{config-CP-WaboC.js → config-CTeR7XHK.js} +3 -3
  116. package/dist/{config-C19McoGo.js → config-CvJHIy5q.js} +1 -1
  117. package/dist/{context-BJoHD20l.d.ts → context-BFEX0b7H.d.ts} +106 -3
  118. package/dist/{controller-CwGXms17.d.ts → controller-Cl6HmMBk.d.ts} +1 -1
  119. package/dist/create/index.d.ts +62 -3
  120. package/dist/create/index.js +67 -4
  121. package/dist/create/lite/index.d.ts +140 -3
  122. package/dist/create/lite/index.js +399 -47
  123. package/dist/{entitlements-CsZcfllV.d.ts → entitlements-Y-n4RGAd.d.ts} +1 -1
  124. package/dist/{field-errors-6BVg31Yp.d.ts → field-errors-Btn3czyz.d.ts} +4 -4
  125. package/dist/{index-Cagz4Z2k.d.ts → index-8wOL81rB.d.ts} +1 -1
  126. package/dist/{index-D01wHGSN.d.ts → index-C0_cweyT.d.ts} +6 -6
  127. package/dist/{index-CbUCGMqj.d.ts → index-CAY7rIQs.d.ts} +2 -2
  128. package/dist/{index-DOHx3JuB.d.ts → index-DPMVWm_Z.d.ts} +2 -2
  129. package/dist/{index-C0QuN9_P.d.ts → index-k-SyCzcQ.d.ts} +104 -119
  130. package/dist/{instances-qz2MCMyK.js → instances-C7qUTjhJ.js} +1 -1
  131. package/dist/mapper/bin.js +7 -7
  132. package/dist/mcp/index.d.ts +1 -1
  133. package/dist/next/index.d.ts +3 -3
  134. package/dist/{operations-CPhOcuzl.d.ts → operations-DE7SOBw-.d.ts} +1 -1
  135. package/dist/{options-BOGo1qCA.js → options-B5E2MGIz.js} +3 -1
  136. package/dist/{options-D2s7fT1s.js → options-COo7_3MX.js} +2 -1
  137. package/dist/{options-D32-YxnO.js → options-DhoLMknl.js} +3 -1
  138. package/dist/otel/index.js +4 -4
  139. package/dist/{ports-Bw7uxPd_.d.ts → ports-DP0bthUk.d.ts} +1 -1
  140. package/dist/powersync/index.d.ts +2 -2
  141. package/dist/preset/index.d.ts +3 -3
  142. package/dist/preset/index.js +3 -3
  143. package/dist/{preset-BbSWLoXM.js → preset-DwuWNBip.js} +2 -2
  144. package/dist/{project-TN03XDsA.js → project-Bo1vZqVs.js} +5 -5
  145. package/dist/{push-token-vykw2JXT.d.ts → push-token-v3xCcVU7.d.ts} +1 -1
  146. package/dist/react/index.d.ts +5 -5
  147. package/dist/react/native/index.d.ts +1 -1
  148. package/dist/react/server.d.ts +5 -5
  149. package/dist/realtime/index.d.ts +3 -3
  150. package/dist/realtime/index.js +1 -1
  151. package/dist/records/index.d.ts +3 -3
  152. package/dist/{resolved-names-Dsf28_Dr.js → resolved-names-iLBOUaib.js} +2 -2
  153. package/dist/server/index.d.ts +1 -1
  154. package/dist/solid/index.d.ts +5 -5
  155. package/dist/sql/index.d.ts +5 -5
  156. package/dist/sql/index.js +5 -5
  157. package/dist/{sql-Dg3W1ENk.js → sql-B7vBP9g0.js} +3577 -1246
  158. package/dist/ssr/index.d.ts +1 -1
  159. package/dist/storage/index.js +1 -1
  160. package/dist/{subjects-NomQg6Eg.d.ts → subjects-BYCL-6hA.d.ts} +15 -1
  161. package/dist/svelte/index.d.ts +5 -5
  162. package/dist/{tenant-BRmKZ7aq.d.ts → tenant-CyLEXgot.d.ts} +1 -1
  163. package/dist/testing/index.d.ts +3 -3
  164. package/dist/testing/index.js +2 -2
  165. package/dist/{topic-CpsKVBot.d.ts → topic-B_DGdAEs.d.ts} +1 -1
  166. package/dist/{topic-F0FKzJyQ.js → topic-DnsNG4Kj.js} +1 -1
  167. package/dist/{types-CjRwmCRP.d.ts → types-DF8JYEf5.d.ts} +2 -2
  168. package/dist/vue/index.d.ts +5 -5
  169. package/dist/{watch-topic-BaMZX139.d.ts → watch-topic-1zIAtiNM.d.ts} +1 -1
  170. package/dist/workflow-sdk/world/index.js +1 -1
  171. package/dist/{workflow-sdk-CE8sEK57.js → workflow-sdk-CaEw822d.js} +25 -4
  172. package/dist/yjs/index.d.ts +1 -1
  173. package/dist/yjs/index.js +1 -1
  174. package/package.json +11 -1
  175. package/schemas/config-v1.json +42 -0
  176. package/dist/cli/add-Bf1fyCWm.js +0 -1
  177. package/dist/cli/env-xhwXk5Ri.js +0 -1
  178. package/dist/cli/in-stack-diff-DQTW53Vf.js +0 -257
  179. package/dist/cli/powersync-Dq-txa0_.js +0 -1
  180. package/dist/cli/seed-CO3j_bly.js +0 -1
@@ -1,4 +1,132 @@
1
1
  import { a as sqlString } from "./template-Drgg3v2J.js";
2
+ //#region src/core/sql-template-tokens.ts
3
+ const WORD_START = /[A-Za-z_]/;
4
+ const WORD_PART = /[\w$]/;
5
+ function readString(source, start, escapes) {
6
+ let index = start + 1;
7
+ while (index < source.length) {
8
+ const char = source[index];
9
+ if (escapes && char === "\\") {
10
+ index += 2;
11
+ continue;
12
+ }
13
+ if (char === "'") {
14
+ if (source[index + 1] === "'") {
15
+ index += 2;
16
+ continue;
17
+ }
18
+ return index + 1;
19
+ }
20
+ index += 1;
21
+ }
22
+ return -1;
23
+ }
24
+ function readQuoted(source, start) {
25
+ let index = start + 1;
26
+ while (index < source.length) {
27
+ if (source[index] === "\"") {
28
+ if (source[index + 1] === "\"") {
29
+ index += 2;
30
+ continue;
31
+ }
32
+ return index + 1;
33
+ }
34
+ index += 1;
35
+ }
36
+ return -1;
37
+ }
38
+ /**
39
+ * Splits a template into tokens. Strings, quoted identifiers and comments are
40
+ * read whole, so a `;` or `(` inside them is never mistaken for code. A
41
+ * dollar-quote tag (`$$`, `$tag$`), an unterminated string, quoted identifier
42
+ * or block comment, and a stray `{` come back as `dollar` and `error` tokens
43
+ * for the caller to refuse.
44
+ */
45
+ function tokenizeTemplate(source) {
46
+ const tokens = [];
47
+ let index = 0;
48
+ const push = (token, end) => {
49
+ tokens.push(token);
50
+ index = end;
51
+ };
52
+ while (index < source.length) {
53
+ const char = source[index];
54
+ const rest = source.slice(index);
55
+ if (/\s/.test(char)) {
56
+ const end = index + (/^\s+/.exec(rest)?.[0].length ?? 1);
57
+ push({
58
+ kind: "space",
59
+ text: source.slice(index, end)
60
+ }, end);
61
+ } else if (rest.startsWith("--")) {
62
+ const newline = source.indexOf("\n", index);
63
+ const end = newline === -1 ? source.length : newline;
64
+ push({
65
+ kind: "comment",
66
+ text: source.slice(index, end)
67
+ }, end);
68
+ } else if (rest.startsWith("/*")) {
69
+ const close = source.indexOf("*/", index + 2);
70
+ const end = close === -1 ? source.length : close + 2;
71
+ push({
72
+ kind: close === -1 ? "error" : "comment",
73
+ text: source.slice(index, end)
74
+ }, end);
75
+ } else if (char === "'" || /^[eE]'/.test(rest)) {
76
+ const escapes = char !== "'";
77
+ const end = readString(source, escapes ? index + 1 : index, escapes);
78
+ const stop = end === -1 ? source.length : end;
79
+ push({
80
+ kind: end === -1 ? "error" : "string",
81
+ text: source.slice(index, stop)
82
+ }, stop);
83
+ } else if (char === "\"") {
84
+ const end = readQuoted(source, index);
85
+ const stop = end === -1 ? source.length : end;
86
+ push(end === -1 ? {
87
+ kind: "error",
88
+ text: source.slice(index, stop)
89
+ } : {
90
+ kind: "word",
91
+ text: source.slice(index + 1, stop - 1),
92
+ quoted: true
93
+ }, stop);
94
+ } else if (char === "$") {
95
+ const tag = /^\$(?:[A-Za-z_]\w*)?\$/.exec(rest)?.[0];
96
+ if (tag === void 0) push({
97
+ kind: "punct",
98
+ text: char
99
+ }, index + 1);
100
+ else push({
101
+ kind: "dollar",
102
+ text: tag
103
+ }, index + tag.length);
104
+ } else if (char === "{") {
105
+ const match = /^\{(\w+)\}/.exec(rest);
106
+ if (match === null) push({
107
+ kind: "error",
108
+ text: char
109
+ }, index + 1);
110
+ else push({
111
+ kind: "placeholder",
112
+ text: match[1]
113
+ }, index + match[0].length);
114
+ } else if (WORD_START.test(char)) {
115
+ let end = index + 1;
116
+ while (end < source.length && WORD_PART.test(source[end])) end += 1;
117
+ push({
118
+ kind: "word",
119
+ text: source.slice(index, end),
120
+ quoted: false
121
+ }, end);
122
+ } else push({
123
+ kind: "punct",
124
+ text: char
125
+ }, index + 1);
126
+ }
127
+ return tokens;
128
+ }
129
+ //#endregion
2
130
  //#region src/core/access-sql.ts
3
131
  const SCOPE = /^[a-z][a-z0-9_]*$/;
4
132
  /** Whether `name` can be a scope: it is put unquoted into templates. */
@@ -136,21 +264,56 @@ const CALL_KEYWORDS = /* @__PURE__ */ new Set([
136
264
  "where"
137
265
  ]);
138
266
  /**
139
- * What makes a template unsafe to put into generated SQL: a `$$`, `;` or `--`
140
- * (outside string literals), or a function call without a schema.
267
+ * What makes a template unsafe to put into generated SQL: a dollar-quote tag, a
268
+ * `;`, a comment, an unterminated string, quoted identifier or comment, a stray
269
+ * `{`, or a function call without a schema. Strings and quoted identifiers are
270
+ * read whole, so what is inside them never counts.
141
271
  */
142
272
  function templateProblems(template) {
143
- const code = template.replaceAll(/'(?:[^']|'')*'/g, "''").replaceAll(/\{(\w+)\}/g, "$1");
273
+ const tokens = tokenizeTemplate(template);
144
274
  const problems = [];
145
- for (const token of [
146
- "$$",
147
- ";",
148
- "--"
149
- ]) if (code.includes(token)) problems.push(`contains "${token}"`);
150
- for (const match of code.matchAll(/(?<![\w$.":])"?([a-z_][\w$]*)"?\s*\(/gi)) {
151
- const name = match[1];
152
- if (CALL_KEYWORDS.has(name.toLowerCase())) continue;
153
- problems.push(`calls ${name}() without a schema`);
275
+ const seen = /* @__PURE__ */ new Set();
276
+ const report = (problem) => {
277
+ if (!seen.has(problem)) {
278
+ seen.add(problem);
279
+ problems.push(problem);
280
+ }
281
+ };
282
+ let code = [];
283
+ for (const token of tokens) {
284
+ const last = code.at(-1);
285
+ if ((token.kind === "word" || token.kind === "placeholder") && (last?.kind === "word" || last?.kind === "placeholder") && !(last.kind === "word" && last.quoted)) code[code.length - 1] = {
286
+ kind: "word",
287
+ text: last.text + token.text,
288
+ quoted: false
289
+ };
290
+ else if (token.kind === "placeholder") code.push({
291
+ kind: "word",
292
+ text: token.text,
293
+ quoted: false
294
+ });
295
+ else code.push(token);
296
+ }
297
+ code = code.filter((token) => token.kind !== "space");
298
+ for (const [position, token] of code.entries()) switch (token.kind) {
299
+ case "dollar":
300
+ report(`contains "${token.text}"`);
301
+ break;
302
+ case "comment":
303
+ report(`contains "${token.text.startsWith("--") ? "--" : "/*"}"`);
304
+ break;
305
+ case "error":
306
+ report(token.text === "{" ? "contains a \"{\" that is not a {name} placeholder" : `contains an unterminated ${token.text.startsWith("/*") ? "comment" : token.text.startsWith("\"") ? "identifier" : "string"}`);
307
+ break;
308
+ case "punct":
309
+ if (token.text === ";") report("contains \";\"");
310
+ break;
311
+ case "word": {
312
+ const next = code[position + 1];
313
+ const previous = code[position - 1];
314
+ if (next?.kind === "punct" && next.text === "(" && !(previous?.kind === "punct" && [".", ":"].includes(previous.text)) && (token.quoted || !CALL_KEYWORDS.has(token.text.toLowerCase()))) report(`calls ${token.text}() without a schema`);
315
+ break;
316
+ }
154
317
  }
155
318
  return problems;
156
319
  }
@@ -161,6 +324,8 @@ const templatePlaceholders = (template) => [...new Set([...template.matchAll(/\{
161
324
  * error for a placeholder `values` doesn't have.
162
325
  */
163
326
  function fillTemplate(where, template, values) {
327
+ const problems = templateProblems(template);
328
+ if (problems.length > 0) throw new TypeError(`${where}: the template ${problems.join(", ")}`);
164
329
  return template.replaceAll(/\{(\w+)\}/g, (match, name) => {
165
330
  const value = values[name];
166
331
  if (value === void 0) throw new TypeError(`${where}: ${match} is not available here. Use ${Object.keys(values).map((key) => `{${key}}`).join(", ")}`);
@@ -2,8 +2,8 @@ import { a as SessionActor, c as agentClaims, r as AgentActOptions } from "../..
2
2
  import { d as KnowledgeSearchOptions, o as KnowledgeHit, r as Knowledge } from "../../knowledge-F1IhRI4Q.js";
3
3
  import { t as Agent } from "../../agents-CMIB3802.js";
4
4
  import { P as AiToolPolicy, _ as AiModerationAction, b as AiModerationStage, i as AiChat } from "../../ai-chat-BCaKsvLW.js";
5
- import { r as AuthorizationOperation } from "../../authorization-BJV2i8xB.js";
6
- import { t as OperationTable } from "../../operations-CPhOcuzl.js";
5
+ import { r as AuthorizationOperation } from "../../authorization-BCG1v0iC.js";
6
+ import { t as OperationTable } from "../../operations-DE7SOBw-.js";
7
7
  import { i as SearchToolOptions, r as ResultsFilter } from "../../embeddings-D_RsS6ow.js";
8
8
  import { n as GatewayOptions } from "../../gateway-options-BlVCqgb8.js";
9
9
  import { LanguageModel, LanguageModelMiddleware, StopCondition, ToolLoopAgent, ToolLoopAgentSettings, ToolSet } from "ai";
@@ -1,4 +1,4 @@
1
- import { hr as AppTableConfig } from "./context-BJoHD20l.js";
1
+ import { Dr as AppTableConfig } from "./context-BFEX0b7H.js";
2
2
  //#region src/config/app-tables.d.ts
3
3
  /**
4
4
  * The columns every app table gets, which `columns` may not name: `id`,
@@ -647,7 +647,7 @@ interface BlockNameRegistry {
647
647
  readonly "contracts": "id" | "tenant" | "employee" | "startsOn" | "endsOn" | "hoursPerWeek" | "salary" | "currency" | "salaryPeriod" | "note" | "createdBy" | "createdAt";
648
648
  };
649
649
  readonly functions: "add_employee_contract" | "create_employee" | "employee_contracts" | "employee_private_details" | "offboard_employee" | "org_chart" | "reports_of" | "save_employee_private_details" | "update_employees";
650
- readonly actions: "read" | "write" | "viewSensitive";
650
+ readonly actions: "read" | "write" | "viewSensitive" | "create" | "contractsRead" | "contractsWrite" | "privateDetailsWrite";
651
651
  readonly hooks: "before_employee_create" | "after_employee_create" | "before_employee_update" | "after_employee_update" | "before_employee_offboard" | "after_employee_offboard";
652
652
  readonly entities: {
653
653
  readonly "employee": "id" | "tenant_id" | "user_id" | "name" | "email" | "job_title" | "team_id" | "manager_id" | "employment_type" | "status" | "start_date" | "end_date" | "offboard_reason" | "origin_type" | "origin_id" | "created_by" | "created_at" | "updated_at" | "first_name" | "last_name";
@@ -808,7 +808,7 @@ interface BlockNameRegistry {
808
808
  readonly "scorecardScores": "tenant" | "scorecard" | "criterion" | "score" | "notes";
809
809
  };
810
810
  readonly functions: "application_detail" | "apply_to_job" | "close_application" | "save_job" | "schedule_interview" | "submit_scorecard";
811
- readonly actions: "read" | "write" | "manage";
811
+ readonly actions: "read" | "write" | "manage" | "create" | "jobsCreate" | "jobsUpdate" | "score";
812
812
  readonly hooks: "before_application_hire" | "after_application_hire";
813
813
  readonly entities: {
814
814
  readonly "job": "id" | "tenant_id" | "title" | "team_id" | "location" | "employment_type" | "description" | "hiring_manager_user_id" | "status" | "opened_at" | "closed_at" | "created_at" | "updated_at";
@@ -1688,7 +1688,7 @@ interface BlockNameRegistry {
1688
1688
  readonly "iterations": "id" | "tenant" | "team" | "name" | "startsOn" | "endsOn" | "createdAt";
1689
1689
  };
1690
1690
  readonly functions: "archive_work_item" | "create_work_item" | "delete_work_item" | "delete_work_item_checklist_item" | "get_work_item" | "list_work_item_checklist" | "list_work_items" | "save_iteration" | "save_project" | "save_work_item_checklist_item" | "set_work_item_assignees" | "update_work_items" | "work_item_tree";
1691
- readonly actions: "read" | "write" | "manage";
1691
+ readonly actions: "read" | "write" | "manage" | "create" | "delete";
1692
1692
  readonly hooks: "before_work_item_create" | "after_work_item_create" | "before_work_item_update" | "after_work_item_update";
1693
1693
  readonly entities: {
1694
1694
  readonly "work_item": "id" | "tenant_id" | "number" | "identifier" | "title" | "body" | "parent_id" | "team_id" | "project_id" | "iteration_id" | "priority" | "estimate" | "progress" | "start_at" | "end_at" | "due_at" | "pipeline_id" | "stage_id" | "stage_entered_at" | "state" | "close_reason" | "closed_at" | "locked" | "rank" | "archived_at" | "recurs_from" | "created_by" | "created_at" | "updated_at";
@@ -2239,6 +2239,18 @@ type CustomFieldsSqlOptions = {
2239
2239
  * encrypted or sensitive value. Needs the audit block.
2240
2240
  */
2241
2241
  readonly auditReads?: boolean;
2242
+ /**
2243
+ * Keyed layout: the type of the `rank` column. `text` (the default) holds
2244
+ * fractional keys in `collate "C"` order; `integer` holds whole numbers, cast
2245
+ * to the type of the app's own rank column.
2246
+ */
2247
+ readonly rankType?: "text" | "integer";
2248
+ /**
2249
+ * Keyed layout: what `read_field_values` checks. `tenant` (the default) needs
2250
+ * `permissions.read` in the tenant; `record` needs only that the caller can
2251
+ * read the record, through `can_subject(type, id, 'read')`.
2252
+ */
2253
+ readonly readAccess?: "tenant" | "record";
2242
2254
  };
2243
2255
  //#endregion
2244
2256
  //#region src/blocks/data-lifecycle/options.d.ts
@@ -2320,6 +2332,13 @@ type EmployeesSqlOptions = {
2320
2332
  readonly name?: "single" | "split";
2321
2333
  readonly privateDetails?: "json" | "flat";
2322
2334
  readonly contracts?: "append" | "editable";
2335
+ /** Whether the app's salary column holds minor or major units. */
2336
+ readonly salaryUnits?: "minor" | "major";
2337
+ /**
2338
+ * With editable contracts, `allow` adds a contract without the overlap check
2339
+ * and leaves the previous one as it is.
2340
+ */
2341
+ readonly contractOverlap?: "end" | "allow";
2323
2342
  };
2324
2343
  //#endregion
2325
2344
  //#region src/blocks/expenses/options.d.ts
@@ -2873,6 +2892,8 @@ type TasksSqlOptions = {
2873
2892
  readonly prefix?: string;
2874
2893
  readonly maxAssignees?: number;
2875
2894
  readonly extraColumns?: ExtraColumns;
2895
+ /** Whether an item's author can delete it without the delete key. */
2896
+ readonly authorCanDelete?: boolean;
2876
2897
  };
2877
2898
  //#endregion
2878
2899
  //#region src/blocks/teams/options.d.ts
@@ -4,7 +4,7 @@ import { t as BetterSupabase, y as Db } from "./define-BLP6XtoL.js";
4
4
  import { n as DataEngine } from "./data-engine-BWoz9lED.js";
5
5
  import { Dn as GeneratedBlocks } from "./define-block-DibVN37N.js";
6
6
  import { rt as BetterQueries } from "./index-BfYDY6eh.js";
7
- import { t as ClientPorts } from "./ports-Bw7uxPd_.js";
7
+ import { t as ClientPorts } from "./ports-DP0bthUk.js";
8
8
  import { SupabaseClient } from "@supabase/supabase-js";
9
9
  //#region src/client/bind.d.ts
10
10
  interface AuthUser {
@@ -1,7 +1,7 @@
1
1
  import { Dn as GeneratedBlocks } from "./define-block-DibVN37N.js";
2
- import { n as TopicPort } from "./watch-topic-BaMZX139.js";
3
- import { t as ClientPorts } from "./ports-Bw7uxPd_.js";
4
- import { t as AuthPort } from "./controller-CwGXms17.js";
2
+ import { n as TopicPort } from "./watch-topic-1zIAtiNM.js";
3
+ import { t as ClientPorts } from "./ports-DP0bthUk.js";
4
+ import { t as AuthPort } from "./controller-Cl6HmMBk.js";
5
5
  import { SupabaseClient } from "@supabase/supabase-js";
6
6
  //#region src/blocks/block-env.d.ts
7
7
  /**
@@ -4,9 +4,9 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
4
4
  import { a as AiMessagePart, c as AiReasoningPart, d as AiTextPart, f as AiToolApprovalPart, g as isAiMessage, h as aiMessageSchema, i as AiMessage, l as AiSourcePart, m as AiToolResultPart, n as AiDataPart, o as AiMessagePartType, p as AiToolCallPart, r as AiFilePart, s as AiMessageRole, t as AI_MESSAGE_SCHEMA_ID, u as AiStepPart } from "../../message-Bg4TKA12.js";
5
5
  import { $ as AiRunStep, A as AiStoredMessageStatus, B as AiSandbox, C as AiProject, D as AiSaveResult, E as AiRunStatus, F as AiUserMessageTrigger, G as AiHarnessSession, H as AiSandboxStopper, I as SharedAiChat, J as AiHarnessStatus, K as AiHarnessSessionPatch, L as aiChatListTopic, M as AiToolApproval, N as AiToolApprovalRequest, O as AiShareLink, P as AiToolPolicy, Q as AiRunState, R as aiChatTopic, S as AiPendingInputRequest, T as AiRunRelease, U as AiSandboxes, V as AiSandboxStatus, W as NewAiSandbox, X as AiRun, Y as AiPendingApproval, Z as AiRunQuery, _ as AiModerationAction, a as AiChatInput, b as AiModerationStage, c as AiChatPatch, d as AiChatShare, et as AiRunStepInput, f as AiChatVisibility, g as AiModelInput, h as AiModel, i as AiChat, j as AiStreamClaim, k as AiStoredMessage, l as AiChatQuery, m as AiMessageSibling, n as AiApprovalDecision, nt as AiRuns, o as AiChatOptions, p as AiFeedback, q as AiHarnessSessions, r as AiAssistantMessageOptions, rt as createHarnessSessions, s as AiChatPage, t as AiAppendResult, tt as AiRunStepStatus, u as AiChatRecord, v as AiModerationEvent, w as AiProjectInput, x as AiPendingInput, y as AiModerationInput, z as createAiChat } from "../../ai-chat-BCaKsvLW.js";
6
6
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
7
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
8
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
9
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
7
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
8
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
9
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
10
10
  import { StandardSchemaV1 } from "@standard-schema/spec";
11
11
  //#region src/core/contracts/ai-message.d.ts
12
12
  /**
@@ -8,9 +8,9 @@ import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
8
8
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
10
10
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
11
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
12
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
13
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
11
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
12
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
13
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
14
14
  //#region src/blocks/announcements/announcements.d.ts
15
15
  type AnnouncementSeverity = "info" | "success" | "warning" | "critical";
16
16
  /**
@@ -4,7 +4,7 @@ import { r as AuthState } from "../../resolve-Bj1qD7Dy.js";
4
4
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
5
5
  import { t as BlockProblemOptions } from "../../problem-DNwN8iGz.js";
6
6
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
7
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
7
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
8
8
  import { _ as createApiKeys, a as ApiKeyExtraClaims, c as ApiKeyState, d as CreateApiKeyInput, f as CreatedApiKey, g as apiKeyResolver, h as apiKeyClaims, i as ApiKeyExtraClaim, l as ApiKeys, m as apiKeyChecksum, n as ApiKeyCheck, o as ApiKeyReservedClaim, p as ParsedApiKey, r as ApiKeyClaimsOptions, s as ApiKeyResolverOptions, t as ApiKey, u as ApiKeysOptions, v as parseApiKey } from "../../api-keys-ClhKBDcc.js";
9
9
  import { Entry } from "@supabase/middleware";
10
10
  import { AuthMode, JWTClaims, UserClaims } from "@supabase/server";
@@ -3,7 +3,7 @@ import { Ct as Events, ot as StorageObjectEventData, y as AttachmentEventData }
3
3
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
4
4
  import { t as Author } from "../../block-authors-DzXLUiIq.js";
5
5
  import { At as NewAttachment, Ct as AttachmentScannerOptions, Dt as AttachmentVersion, Et as AttachmentUpload, Ft as ScannedObject, It as attachmentVersionOf, Lt as createAttachmentScanner, Mt as ObjectScanner, Nt as ObjectScannerOptions, Ot as Attachments, Pt as ScanVerdict, Rt as createAttachments, Sn as EntitySchema, St as AttachmentScanner, Tt as AttachmentStorage, _t as AttachmentDownload, bt as AttachmentReplacement, c as BlockOf, gt as AttachmentBucket, ht as Attachment, jt as ObjectScanJob, kt as AttachmentsOptions, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding, vt as AttachmentImageUrlOptions, wt as AttachmentStatus, xt as AttachmentScanJob, yt as AttachmentImages, zt as createObjectScanner } from "../../define-block-DibVN37N.js";
6
- import { n as Controller } from "../../controller-CwGXms17.js";
6
+ import { n as Controller } from "../../controller-Cl6HmMBk.js";
7
7
  //#region src/blocks/attachments/record-binding.d.ts
8
8
  /** A pending write to a record's files, for `useOptimistic`. */
9
9
  type AttachmentsOptimisticAction = {
@@ -11,9 +11,9 @@ import { Yt as WhereInput, t as BetterSupabase } from "../../define-BLP6XtoL.js"
11
11
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
12
12
  import { i as EventSink, t as CloudEvent } from "../../cloud-event-DcJwder2.js";
13
13
  import { i as ListDefinition } from "../../list-query-XHoYDlRN.js";
14
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
14
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
15
15
  import { a as UndoToken } from "../../undo-B1jwnVyN.js";
16
- import { n as AuditCategory } from "../../context-BJoHD20l.js";
16
+ import { n as AuditCategory } from "../../context-BFEX0b7H.js";
17
17
  //#region src/blocks/audit/audit.d.ts
18
18
  interface PurgeAuditLogOptions extends BlockTemporalOptions {
19
19
  /**
@@ -8,7 +8,7 @@ import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport,
8
8
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
9
9
  import { _ as FilterRule, d as FilterLimits, f as FilterNode, h as FilterQuery, i as FilterCombinator, m as FilterOperatorSpec, r as FilterClock } from "../../filter-query-BXLs72G9.js";
10
10
  import { $t as createActionRegistry, Bt as Action, Gt as ActionInfo, Ht as ActionContext, Jt as ActionRegistry, Kt as ActionOrigin, L as NotifierInput, Qt as actionKey, Ut as ActionDescriptor, Vt as ActionCall, Wt as ActionHandler, Yt as ActionSpec, Zt as DefaultAutomation, c as BlockOf, en as defineAction, qt as ActionRef } from "../../define-block-DibVN37N.js";
11
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
11
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
12
12
  import { o as ApprovalRequestInput } from "../../approvals-C5fmPLsH.js";
13
13
  import { n as FilterRecordField, t as FilterEvaluation } from "../../filter-evaluate-CPxeae5X.js";
14
14
  import { a as checkRuleConditions, c as ruleFilterFields, i as RuleFieldDefinition, n as RuleField, o as defineRuleFields, r as RuleFieldCatalog, s as ruleFilterFieldInfo, t as RULE_LIMITS } from "../../fields-C3q2ypnO.js";
@@ -9,7 +9,7 @@ import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
9
9
  import { n as StripeSource, r as StripeTaxId, t as StripeClient } from "../../stripe-X22LjuH-.js";
10
10
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
11
11
  import { i as EventSink } from "../../cloud-event-DcJwder2.js";
12
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
12
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
13
13
  import { d as stripeInboxVerify, f as verifyStripeWebhook, u as signStripeWebhook } from "../../verify-CI8LgSpv.js";
14
14
  //#region src/blocks/billing/events.d.ts
15
15
  /** The events of the `billing` block: type to data. */
@@ -1,7 +1,7 @@
1
1
  import { b as DbError } from "../../result-DZeA5KS6.js";
2
2
  import { Ct as Events, tt as SchedulingEventData } from "../../events-Cc9DDQWH.js";
3
3
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
4
- import { n as Controller } from "../../controller-CwGXms17.js";
4
+ import { n as Controller } from "../../controller-Cl6HmMBk.js";
5
5
  import { o as WeeklyHours } from "../../availability-BdeKCHpl.js";
6
6
  import { C as bookingSeriesOf, S as BookingWeekday, T as parseRecurrence, _ as BookedSeries, a as BookingExceptionInput, b as BookingSeriesScope, c as BookingResourceInput, d as BookingStatus, f as Bookings, g as createBookings, h as PublicBookingService, i as BookingDuration, l as BookingServiceInput, m as PlacedBooking, n as Booking, o as BookingExpirePayload, p as BookingsOptions, r as BookingCustomer, s as BookingRange, t as BOOKING_EXPIRE_QUEUE, u as BookingSlot, v as BookingRecurrence, w as formatRecurrence, x as BookingSeriesStatus, y as BookingSeries } from "../../bookings-CVw5-Q0Z.js";
7
7
  import { t as EventCalendarEvent } from "../../event-calendar-DVLs2wUO.js";
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
7
7
  import { t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
8
8
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
9
9
  import { Sn as EntitySchema, c as BlockOf } from "../../define-block-DibVN37N.js";
10
- import { n as Controller } from "../../controller-CwGXms17.js";
10
+ import { n as Controller } from "../../controller-Cl6HmMBk.js";
11
11
  import { C as IcsEvent, D as parseIcs, E as ToIcsOptions, O as toIcs, S as CalendarEventStatus, T as ParsedIcs, _ as expandOccurrences, a as FreeBusy, b as AttendeeRole, c as WorkingHoursInput, d as workingHoursOf, f as CalendarEvent, g as SplitRules, h as OccurrenceRange, i as CommonFreeTimeOptions, l as commonFreeTime, m as OccurrenceOptions, n as CalendarEventKind, o as WeeklyHours, p as CalendarOccurrence, r as CalendarTransparency, s as WorkingHours, t as BusyRange, u as freeBusyOf, v as splitRule, w as IcsSource, x as CalendarAttendee, y as AttendeeResponse } from "../../availability-BdeKCHpl.js";
12
12
  import { a as fromEventCalendarUpdate, c as toEventCalendarResources, i as OccurrenceMove, n as EventCalendarOptions, o as seriesOf, r as EventCalendarResource, s as toEventCalendarEvents, t as EventCalendarEvent } from "../../event-calendar-DVLs2wUO.js";
13
13
  import { t as VisibleRange } from "../../range-p5V4rBhZ.js";
@@ -7,14 +7,14 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
7
7
  import { a as BlockTenantOptions, i as CursorPageOptions, r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
8
8
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
10
- import { F as CommentsSqlOptions } from "../../authorization-BJV2i8xB.js";
10
+ import { F as CommentsSqlOptions } from "../../authorization-BCG1v0iC.js";
11
11
  import { t as Author } from "../../block-authors-DzXLUiIq.js";
12
12
  import { a as isFileAnchor, i as fileAnchor, n as FileAnchor, o as conversationTopic, r as FileAnchorAt, t as AnchorRegion } from "../../anchors-7F34QyHa.js";
13
13
  import { c as MessageEdit, l as MessageEdition, o as Message } from "../../messaging-C_Pr9tGx.js";
14
14
  import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-DibVN37N.js";
15
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
16
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
17
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
15
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
16
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
17
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
18
18
  //#region src/blocks/comments/comments.d.ts
19
19
  interface CommentsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions, BlockTenantOptions {
20
20
  /**
@@ -1,6 +1,6 @@
1
1
  import { t as AsyncResult } from "../../result-ntFBW2p2.js";
2
2
  import { n as CUSTOM_FIELD_TYPES } from "../../field-formats-C6QKA3UR.js";
3
- import { t as customFieldsSqlOptions } from "../../options-D32-YxnO.js";
3
+ import { t as customFieldsSqlOptions } from "../../options-DhoLMknl.js";
4
4
  import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
5
5
  import { A as recordsOf, L as textOf, O as recordOf, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
6
6
  import { r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
@@ -9,7 +9,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
9
9
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
10
10
  import { Ot as Attachments, Tt as AttachmentStorage, _t as AttachmentDownload, c as BlockOf, ht as Attachment } from "../../define-block-DibVN37N.js";
11
11
  import { s as ApprovalStatus } from "../../approvals-C5fmPLsH.js";
12
- import { t as SubjectConfig } from "../../subjects-NomQg6Eg.js";
12
+ import { t as SubjectConfig } from "../../subjects-BYCL-6hA.js";
13
13
  //#region src/blocks/drive/drive.d.ts
14
14
  interface DriveOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockTemporalOptions {
15
15
  /** The caller's transport (`rpcTransport(supabase)`), so grants apply. */
@@ -1,7 +1,7 @@
1
1
  import { n as isRecord } from "../../guards-6F2bCtQR.js";
2
2
  import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
3
3
  import { a as ok, t as AsyncResult } from "../../result-ntFBW2p2.js";
4
- import { t as employeesSqlOptions } from "../../options-BOGo1qCA.js";
4
+ import { t as employeesSqlOptions } from "../../options-B5E2MGIz.js";
5
5
  import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
6
6
  import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
7
7
  import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
@@ -4,8 +4,8 @@ import { n as SqlClient } from "../../executor-hGjrop3A.js";
4
4
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
5
5
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
6
6
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
7
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
8
- import { i as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-CsZcfllV.js";
7
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
8
+ import { i as hasEntitlement, n as EntitlementKey, t as EntitlementClaimOptions } from "../../entitlements-Y-n4RGAd.js";
9
9
  //#region src/blocks/entitlements/entitlements.d.ts
10
10
  /** The Stripe event sent when a customer's active entitlements change. */
11
11
  export declare const ENTITLEMENTS_UPDATED = "entitlements.active_entitlement_summary.updated";
@@ -8,7 +8,7 @@ import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
8
8
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
10
10
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
11
- import { n as Controller } from "../../controller-CwGXms17.js";
11
+ import { n as Controller } from "../../controller-Cl6HmMBk.js";
12
12
  import { _ as isFormDefinition, a as FormDefinition, c as FormJson, d as FormScoring, f as FormStep, g as formSchema, h as formDefinitionProblems, i as FormCondition, l as FormJsonSchema, m as UNSCORED_FIELD_TYPES, n as FORM_FIELD_TYPES, o as FormField, p as NPS_MAX, r as FORM_SCHEMA_DIALECT, s as FormFieldType, t as FORM_DEFINITION_SCHEMA, u as FormOption } from "../../form-definition-BjEtH8BT.js";
13
13
  import { StandardSchemaV1 } from "@standard-schema/spec";
14
14
  //#region src/blocks/forms/validate.d.ts
@@ -2,10 +2,10 @@ import { Ct as Events, H as InboxEventData } from "../../events-Cc9DDQWH.js";
2
2
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
3
3
  import { d as MessageKind, p as MessageReaction, u as MessageFile } from "../../messaging-C_Pr9tGx.js";
4
4
  import { Zt as DefaultAutomation, c as BlockOf } from "../../define-block-DibVN37N.js";
5
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
6
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
7
- import { l as StoragePort } from "../../ports-Bw7uxPd_.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
5
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
6
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
7
+ import { l as StoragePort } from "../../ports-DP0bthUk.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
9
9
  import { S as StoredInboundEvent, _ as MessageDirection, a as ConversationEvent, b as PurgedContact, c as DeliveryStatus, d as InboxCounts, f as InboxFileSource, g as MessageDelivery, h as InboxUpload, i as Conversation, l as InboundResult, m as InboxRow, n as BotMode, o as ConversationPriority, p as InboxMessage, r as Contact, s as ConversationStatus, t as AuthorType, u as InboxChannel, v as MessageTemplate, x as ScheduledInboxMessage, y as PendingInboxFile } from "../../types-Dp3UCr1e.js";
10
10
  import { a as Inbox, c as InboxPatch, d as StartConversationInput, f as TemplateInput, i as InboundInput, l as MessageInput, n as ConversationFilter, o as InboxHooks, p as createInbox, r as CreateInboxInput, s as InboxOptions, t as ContactInput, u as ScheduledMessageInput } from "../../inbox-NDKwSk_H.js";
11
11
  //#region src/blocks/inbox/rows.d.ts
@@ -12,7 +12,7 @@ import { a as OptionInput, c as OptionSpecs, d as optionsJsonSchema, i as Option
12
12
  import { A as CreateBlocksOptions, An as BlockNaming, C as BlockContext, Cn as EntitySchemaSpec, D as Blocks, Dn as GeneratedBlocks, E as BlockSinks, En as GeneratedBlock, F as BlockPorts, Fn as entityNames, I as Notifier, L as NotifierInput, M as createBlockClient, Mn as EntityNames, N as createBlocks, Nn as EntityNoun, O as BlocksEventMap, On as fillTopic, P as defineBlocks, Pn as EntityRename, R as PortName, S as BlockClientSource, Sn as EntitySchema, T as BlockSet, Tn as entitySchema, _ as BlockProvider, a as BlockConsumes, b as BLOCK_EVENT_SOURCE, bn as BlockSchemas, c as BlockOf, d as ClientOf, f as ConsumedPorts, g as BlockEnvKey, h as defineBlock, i as BlockCategory, j as UniquePort, jn as blockNames, k as BlocksHooks, kn as generatedOptions, l as BlockOptionSchemas, m as UsingOptions, n as BLOCK_CATEGORIES, o as BlockDefinition, p as ProvidedPorts, r as Block, s as BlockInvalidates, t as AnyBlock, tn as AnyRecordBinding, u as BlockProvides, v as BlockWiring, w as BlockMap, wn as EntitySchemas, x as BlockClientOptions, xn as EntityFieldSpecs, y as BlockWorker } from "../define-block-DibVN37N.js";
13
13
  import { t as VisibleRange } from "../range-p5V4rBhZ.js";
14
14
  import { t as subjectKey } from "../block-subjects-CphkQPxp.js";
15
- import { t as BlockEnv } from "../block-env-wVLz0KMV.js";
15
+ import { t as BlockEnv } from "../block-env-CM-LFfj4.js";
16
16
  //#region src/blocks/block-env-options.d.ts
17
17
  /** What a hook passes a block creator from the env. */
18
18
  interface EnvBlockOptions {
@@ -4,14 +4,14 @@ import { Ct as Events } from "../../events-Cc9DDQWH.js";
4
4
  import { _ as ConversationEventData, k as MessageEventData } from "../../index-C_qlBJ3k.js";
5
5
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
6
6
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
7
- import { P as MessagingSqlOptions } from "../../authorization-BJV2i8xB.js";
7
+ import { P as MessagingSqlOptions } from "../../authorization-BCG1v0iC.js";
8
8
  import { a as isFileAnchor, i as fileAnchor, n as FileAnchor, o as conversationTopic, r as FileAnchorAt, t as AnchorRegion } from "../../anchors-7F34QyHa.js";
9
9
  import { _ as NotifyLevel, a as FollowTarget, b as UnreadCount, c as MessageEdit, d as MessageKind, f as MessageListOptions, g as NewMessage, h as MessagingOptions, i as ConversationSummary, l as MessageEdition, m as Messaging, n as ConversationAccess, o as Message, p as MessageReaction, r as ConversationKind, s as MessageCursor, t as Conversation, u as MessageFile, v as OpenConversation, x as createMessaging, y as RecordMention } from "../../messaging-C_Pr9tGx.js";
10
10
  import { a as ThreadSummary, i as ThreadSummarizer, n as SummaryMessage, o as ThreadSummaryInput, r as SummaryTarget, s as ThreadSummaryOutput, t as SummarizeOptions } from "../../summaries-8jQTELIX.js";
11
11
  import { Sn as EntitySchema, c as BlockOf } from "../../define-block-DibVN37N.js";
12
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
13
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
14
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
12
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
13
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
14
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
15
15
  //#region src/blocks/messaging/mentions.d.ts
16
16
  type MentionScope = "channel" | "here";
17
17
  interface ParsedMentions {
@@ -1,7 +1,7 @@
1
1
  import { b as DbError, f as Result } from "../../result-DZeA5KS6.js";
2
2
  import { t as Aal } from "../../mfa-oIOYTpvc.js";
3
3
  import { r as Block } from "../../define-block-DibVN37N.js";
4
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
4
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
5
5
  import { t as AuthReply } from "../../auth-reply-Dj124sbX.js";
6
6
  //#region src/blocks/mfa/client.d.ts
7
7
  /** A factor as `auth.mfa.listFactors()` returns it. */
@@ -10,9 +10,9 @@ import { t as BlockProblemOptions } from "../../problem-DNwN8iGz.js";
10
10
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
11
11
  import { i as EventSink, t as CloudEvent } from "../../cloud-event-DcJwder2.js";
12
12
  import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-DtzreCAq.js";
13
- import { p as SubscriptionStatus } from "../../topic-CpsKVBot.js";
14
- import { n as TopicPort } from "../../watch-topic-BaMZX139.js";
15
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
13
+ import { p as SubscriptionStatus } from "../../topic-B_DGdAEs.js";
14
+ import { n as TopicPort } from "../../watch-topic-1zIAtiNM.js";
15
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
16
16
  import { n as VerifyOptions } from "../../signatures-Dkx9OE8j.js";
17
17
  import { a as NotificationItem, i as NotificationAction, n as NotificationMessage, o as NotificationSubject, r as NotificationSendResult, s as RenderedText, t as NotificationChannel } from "../../channel-JcMd5lNP.js";
18
18
  import { a as DeliveryTransport, c as UnsubscribeTarget, i as DeliverySendOptions, l as mailHeaders, n as DeliveryMessages, o as EmailMessage, r as DeliveryReceipt, s as MailCategory, t as DeliveryChannel } from "../../delivery-n6lZGuGx.js";
@@ -5,7 +5,7 @@ import { n as BlockOptions } from "../../block-helpers-CRpAHrp_.js";
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
6
6
  import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
7
7
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
9
9
  //#region src/blocks/onboarding/onboarding.d.ts
10
10
  type ChecklistScope = "user" | "organization";
11
11
  /** One step. `events` completes it when the outbox records one of those types. */
@@ -7,9 +7,9 @@ import { Ct as Events, W as InvitationEventData, Z as OrganizationEventData, o a
7
7
  import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
8
8
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
9
9
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DZN2w69m.js";
10
- import { N as PlatformRolesOption } from "../../authorization-BJV2i8xB.js";
10
+ import { N as PlatformRolesOption } from "../../authorization-BCG1v0iC.js";
11
11
  import { c as BlockOf } from "../../define-block-DibVN37N.js";
12
- import { n as Controller, t as AuthPort } from "../../controller-CwGXms17.js";
12
+ import { n as Controller, t as AuthPort } from "../../controller-Cl6HmMBk.js";
13
13
  //#region src/sql/modules/invitations-tables.d.ts
14
14
  declare const INVITATION_ERRORS: {
15
15
  readonly INVITATION_FORBIDDEN: "42501";