better-supabase 0.36.0 → 0.37.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 (360) hide show
  1. package/dist/{ai-schedules-BZPmySUa.d.ts → ai-schedules-ChJkI2jo.d.ts} +1 -1
  2. package/dist/ai-sdk/agents/index.d.ts +2 -2
  3. package/dist/ai-sdk/batches/index.d.ts +1 -1
  4. package/dist/ai-sdk/index.d.ts +1 -1
  5. package/dist/ai-sdk/mcp/index.d.ts +3 -3
  6. package/dist/{api-XEaCJbgv.d.ts → api-CbY2qdzT.d.ts} +3 -3
  7. package/dist/{api-keys-C82fMru4.d.ts → api-keys-BncNDlWG.d.ts} +1 -1
  8. package/dist/{app-tables-C0XVpQEJ.d.ts → app-tables-BlhdqqHf.d.ts} +1 -1
  9. package/dist/{approvals-DqCv7f-G.d.ts → approvals-CXW3yFWZ.d.ts} +1 -1
  10. package/dist/astro/index.d.ts +5 -5
  11. package/dist/{authorization-2Rv1AJQJ.d.ts → authorization-C7yjZttV.d.ts} +44 -18
  12. package/dist/{authorization-hooks-C0GfMvFm.d.ts → authorization-hooks-CR8TVvqo.d.ts} +1 -1
  13. package/dist/better-result/index.d.ts +2 -2
  14. package/dist/{bind-C2XvMlfg.d.ts → bind-BspFMDdW.d.ts} +4 -4
  15. package/dist/{block-env-BQrtLPyc.d.ts → block-env-CLco8YUl.d.ts} +4 -4
  16. package/dist/{block-tables-DPOgnT3y.d.ts → block-tables-DfomofFv.d.ts} +1 -1
  17. package/dist/blocks/access-requests/index.d.ts +2 -2
  18. package/dist/blocks/activities/index.d.ts +3 -3
  19. package/dist/blocks/agents/index.d.ts +2 -2
  20. package/dist/blocks/ai-cache/index.d.ts +1 -1
  21. package/dist/blocks/ai-chat/index.d.ts +5 -5
  22. package/dist/blocks/ai-files/index.d.ts +1 -1
  23. package/dist/blocks/ai-keys/index.d.ts +3 -3
  24. package/dist/blocks/ai-schedules/index.d.ts +2 -2
  25. package/dist/blocks/announcements/index.d.ts +5 -5
  26. package/dist/blocks/api-keys/index.d.ts +2 -2
  27. package/dist/blocks/approvals/index.d.ts +3 -3
  28. package/dist/blocks/assets/index.d.ts +2 -2
  29. package/dist/blocks/assignment/index.d.ts +3 -3
  30. package/dist/blocks/attachments/index.d.ts +3 -3
  31. package/dist/blocks/audit/index.d.ts +7 -7
  32. package/dist/blocks/automations/index.d.ts +5 -5
  33. package/dist/blocks/billable-time/index.d.ts +2 -2
  34. package/dist/blocks/billing/index.d.ts +5 -5
  35. package/dist/blocks/bookings/index.d.ts +3 -3
  36. package/dist/blocks/bulk/index.d.ts +2 -2
  37. package/dist/blocks/calendar/index.d.ts +3 -3
  38. package/dist/blocks/catalog/index.d.ts +22 -3
  39. package/dist/blocks/catalog/index.js +31 -2
  40. package/dist/blocks/channels/index.d.ts +3 -3
  41. package/dist/blocks/collections/index.d.ts +3 -3
  42. package/dist/blocks/comments/index.d.ts +5 -5
  43. package/dist/blocks/compliance/index.d.ts +2 -2
  44. package/dist/blocks/connectors/index.d.ts +3 -3
  45. package/dist/blocks/contacts/index.d.ts +3 -3
  46. package/dist/blocks/content/index.d.ts +2 -2
  47. package/dist/blocks/contracts/index.d.ts +2 -2
  48. package/dist/blocks/courses/index.d.ts +2 -2
  49. package/dist/blocks/created-by/index.d.ts +1 -1
  50. package/dist/blocks/custom-fields/index.d.ts +2 -2
  51. package/dist/blocks/data-lifecycle/index.d.ts +4 -4
  52. package/dist/blocks/deals/index.d.ts +3 -3
  53. package/dist/blocks/dispatch/index.d.ts +2 -2
  54. package/dist/blocks/documents/index.d.ts +2 -2
  55. package/dist/blocks/domains/index.d.ts +2 -2
  56. package/dist/blocks/donations/index.d.ts +2 -2
  57. package/dist/blocks/drive/index.d.ts +3 -3
  58. package/dist/blocks/employees/index.d.ts +4 -4
  59. package/dist/blocks/enrichment/index.d.ts +3 -3
  60. package/dist/blocks/enrollments/index.d.ts +2 -2
  61. package/dist/blocks/entitlements/index.d.ts +3 -3
  62. package/dist/blocks/expenses/index.d.ts +2 -2
  63. package/dist/blocks/field-history/index.d.ts +1 -1
  64. package/dist/blocks/flags/index.d.ts +2 -2
  65. package/dist/blocks/forecasts/index.d.ts +3 -3
  66. package/dist/blocks/forms/index.d.ts +3 -3
  67. package/dist/blocks/goals/index.d.ts +1 -1
  68. package/dist/blocks/guests/index.d.ts +2 -2
  69. package/dist/blocks/hiring/index.d.ts +3 -3
  70. package/dist/blocks/identities/index.d.ts +2 -2
  71. package/dist/blocks/imports/index.d.ts +2 -2
  72. package/dist/blocks/inbox/index.d.ts +6 -6
  73. package/dist/blocks/incidents/index.d.ts +2 -2
  74. package/dist/blocks/index.d.ts +4 -4
  75. package/dist/blocks/inventory/index.d.ts +171 -10
  76. package/dist/blocks/inventory/index.js +206 -13
  77. package/dist/blocks/invoices/index.d.ts +3 -3
  78. package/dist/blocks/knowledge/index.d.ts +1 -1
  79. package/dist/blocks/lead-scoring/index.d.ts +1 -1
  80. package/dist/blocks/leases/index.d.ts +2 -2
  81. package/dist/blocks/leave/index.d.ts +2 -2
  82. package/dist/blocks/ledger/index.d.ts +2 -2
  83. package/dist/blocks/mail-sync/index.d.ts +3 -3
  84. package/dist/blocks/memberships/index.d.ts +1 -1
  85. package/dist/blocks/memory/index.d.ts +1 -1
  86. package/dist/blocks/messaging/index.d.ts +7 -7
  87. package/dist/blocks/metrics/index.d.ts +2 -2
  88. package/dist/blocks/mfa/index.d.ts +2 -2
  89. package/dist/blocks/moderation/index.d.ts +2 -2
  90. package/dist/blocks/notifications/index.d.ts +7 -7
  91. package/dist/blocks/numbering/index.d.ts +2 -2
  92. package/dist/blocks/oauth-server/index.d.ts +2 -2
  93. package/dist/blocks/onboarding/index.d.ts +2 -2
  94. package/dist/blocks/orders/index.d.ts +80 -13
  95. package/dist/blocks/orders/index.js +63 -4
  96. package/dist/blocks/organizations/index.d.ts +4 -4
  97. package/dist/blocks/outbox/index.d.ts +2 -2
  98. package/dist/blocks/passes/index.d.ts +2 -2
  99. package/dist/blocks/permissions/index.d.ts +3 -3
  100. package/dist/blocks/pipelines/index.d.ts +3 -3
  101. package/dist/blocks/posts/index.d.ts +2 -2
  102. package/dist/blocks/profiles/index.d.ts +1 -1
  103. package/dist/blocks/promotions/index.d.ts +3 -3
  104. package/dist/blocks/promotions/index.js +1 -1
  105. package/dist/blocks/push/index.d.ts +3 -3
  106. package/dist/blocks/queue/index.d.ts +1 -1
  107. package/dist/blocks/quotes/index.d.ts +3 -3
  108. package/dist/blocks/rank/index.d.ts +1 -1
  109. package/dist/blocks/reactions/index.d.ts +5 -5
  110. package/dist/blocks/relations/index.d.ts +2 -2
  111. package/dist/blocks/reminders/index.d.ts +3 -3
  112. package/dist/blocks/reviews/index.d.ts +2 -2
  113. package/dist/blocks/saved-views/index.d.ts +4 -4
  114. package/dist/blocks/scores/index.d.ts +2 -2
  115. package/dist/blocks/search/index.d.ts +4 -4
  116. package/dist/blocks/security-events/index.d.ts +3 -3
  117. package/dist/blocks/segments/index.d.ts +3 -3
  118. package/dist/blocks/sequences/index.d.ts +2 -2
  119. package/dist/blocks/service-accounts/index.d.ts +2 -2
  120. package/dist/blocks/sessions/index.d.ts +2 -2
  121. package/dist/blocks/settings/index.d.ts +3 -3
  122. package/dist/blocks/share-links/index.d.ts +2 -2
  123. package/dist/blocks/shipments/index.d.ts +73 -4
  124. package/dist/blocks/shipments/index.js +57 -4
  125. package/dist/blocks/signatures/index.d.ts +2 -2
  126. package/dist/blocks/signing-keys/index.d.ts +2 -2
  127. package/dist/blocks/sla/index.d.ts +3 -3
  128. package/dist/blocks/sso/index.d.ts +3 -3
  129. package/dist/blocks/state-machine/index.d.ts +9 -2
  130. package/dist/blocks/state-machine/index.js +2 -0
  131. package/dist/blocks/subjects/index.d.ts +2 -2
  132. package/dist/blocks/tags/index.d.ts +3 -3
  133. package/dist/blocks/tasks/index.d.ts +5 -5
  134. package/dist/blocks/teams/index.d.ts +2 -2
  135. package/dist/blocks/templates/index.d.ts +122 -9
  136. package/dist/blocks/templates/index.js +157 -7
  137. package/dist/blocks/time-tracking/index.d.ts +3 -3
  138. package/dist/blocks/timeline/index.d.ts +9 -7
  139. package/dist/blocks/timeline/index.js +3 -1
  140. package/dist/blocks/trash/index.d.ts +2 -2
  141. package/dist/blocks/undo/index.d.ts +2 -2
  142. package/dist/blocks/updated-at/index.d.ts +1 -1
  143. package/dist/blocks/usage/index.d.ts +2 -2
  144. package/dist/blocks/vercel-marketplace/index.d.ts +2 -2
  145. package/dist/blocks/versions/index.d.ts +2 -2
  146. package/dist/blocks/waitlist/index.d.ts +2 -2
  147. package/dist/blocks/webhooks/index.d.ts +6 -6
  148. package/dist/blocks/workflow-editor/index.d.ts +7 -7
  149. package/dist/blocks/workflows/index.d.ts +5 -5
  150. package/dist/{carrier-D2b_028L.d.ts → carrier-B2eytEjR.d.ts} +10 -1
  151. package/dist/chat-sdk/index.d.ts +2 -2
  152. package/dist/claims/index.d.ts +5 -5
  153. package/dist/cli/add-8zKWiO0X.js +1 -0
  154. package/dist/cli/{add-D2CH8t_B.js → add-Buuy7BSU.js} +2 -2
  155. package/dist/cli/{add-Duf1-19E.js → add-DqfJVb1F.js} +11 -11
  156. package/dist/cli/{app-table-files-ha8X0rRE.js → app-table-files-Ku-4tPUu.js} +2 -2
  157. package/dist/cli/{app-tables-BIyQcsHH.js → app-tables-Dg0sh4dH.js} +2 -2
  158. package/dist/cli/{backfill-CLgA6-ll.js → backfill-Dspz6kVJ.js} +2 -2
  159. package/dist/cli/bin.js +1 -1
  160. package/dist/cli/{blocks-BVB1fMMj.js → blocks-B8LAph-w.js} +1 -1
  161. package/dist/cli/{blocks-9AeouX4h.js → blocks-CqVBlc4L.js} +2 -2
  162. package/dist/cli/{cache-aMk9vF1_.js → cache-BbuuCIRU.js} +1 -1
  163. package/dist/cli/{codemod-B5wrcnF2.js → codemod-DIAy8uXt.js} +88 -62
  164. package/dist/cli/{command-DM_x_yzZ.js → command-67WobzTC.js} +7 -1
  165. package/dist/cli/{completion-DbYb3N8e.js → completion-C3nMZgUZ.js} +2 -2
  166. package/dist/cli/{completion-CusuUJNn.js → completion-DSrus7H1.js} +1 -1
  167. package/dist/cli/{completion-Cx2UYd-y.js → completion-Dm0S3ub0.js} +2 -2
  168. package/dist/cli/{config-BeuImpav.js → config-cbK-wiNs.js} +1 -1
  169. package/dist/cli/{content-mapper-CEtdbshU.js → content-mapper-NXfJ5VkP.js} +2 -2
  170. package/dist/cli/{db-CeiQzhPq.js → db-bK5eCLaE.js} +1 -1
  171. package/dist/cli/{doctor-DaOUWfRN.js → doctor-CUOyLE0c.js} +16 -16
  172. package/dist/cli/env-AFfMXxWw.js +1 -0
  173. package/dist/cli/{env-DVV10l_r.js → env-CCT-dMFm.js} +1 -1
  174. package/dist/cli/{gen-BO-2NF-G.js → gen-s9canfdC.js} +14 -14
  175. package/dist/cli/index.d.ts +1 -1
  176. package/dist/cli/index.js +7 -7
  177. package/dist/cli/{init-Xit9Hnbb.js → init-Zs0Ca5on.js} +9 -9
  178. package/dist/cli/{keys-DJTN2Avl.js → keys-Dj5sJNj7.js} +1 -1
  179. package/dist/cli/{live-CuMpyRjF.js → live-BaLsNove.js} +2 -2
  180. package/dist/cli/{mcp-C7d4j5cq.js → mcp-ST7bVpJD.js} +3 -3
  181. package/dist/cli/{metadata-D2YvkY2D.js → metadata-aOvlCOOg.js} +3 -3
  182. package/dist/cli/{migrate-BCXxyTKt.js → migrate-ClBx3Ggx.js} +2 -2
  183. package/dist/cli/{migration-safety-DfwTOBQ4.js → migration-safety-mjm1pghO.js} +1 -1
  184. package/dist/cli/{migrations-nomh4TBo.js → migrations-tzItvwxT.js} +2 -2
  185. package/dist/cli/{module-migration--9T_T-zt.js → module-migration-D0Rjdvdx.js} +2 -2
  186. package/dist/cli/{moved-CT6i1csY.js → moved-CY0yDtAr.js} +1 -1
  187. package/dist/cli/{parse-qgJylE_A.js → parse-yAC-NFMq.js} +1 -1
  188. package/dist/cli/{powersync-DB9WZsIv.js → powersync-DryX_DMG.js} +4 -4
  189. package/dist/cli/powersync-vvu2-72V.js +1 -0
  190. package/dist/cli/{print-S6IF5rZm.js → print-fOUnKwA9.js} +2 -2
  191. package/dist/cli/{providers-BDTcal71.js → providers-BR1d_5jA.js} +1 -1
  192. package/dist/cli/{prune-workflows-Zr2DjByi.js → prune-workflows-CCjzNrxl.js} +2 -2
  193. package/dist/cli/{remove-CPX5Tg5s.js → remove-B_0OIusa.js} +6 -6
  194. package/dist/cli/{render-Bp7a7XQ9.js → render-BCJKDX3c.js} +3 -3
  195. package/dist/cli/{run-BclCFEyP.js → run-4VUQTR-R.js} +9 -9
  196. package/dist/cli/{run-kgG50x_Z.js → run-BctvQX_g.js} +44 -43
  197. package/dist/cli/{run-BlVaLnt_.js → run-DX4X7xqV.js} +2 -2
  198. package/dist/cli/seed-CLlvrV8I.js +1 -0
  199. package/dist/cli/{seed-Cn2R91cd.js → seed-DSC6f0oh.js} +1 -1
  200. package/dist/cli/{shared-D60W9NS-.js → shared-oY7PGamd.js} +1 -1
  201. package/dist/cli/{skills-DH-yPDny.js → skills-B5p6bDwe.js} +1 -1
  202. package/dist/cli/{snapshot-C3_eQUgY.js → snapshot-CWtER9-4.js} +2 -2
  203. package/dist/cli/{source-Bk6XwIAK.js → source-D4uav_v9.js} +1 -1
  204. package/dist/cli/{spec-BDTpcBns.js → spec-BPsyEzqH.js} +1 -1
  205. package/dist/cli/{spec-C8ydQwZC.js → spec-DTnBeaCD.js} +3 -3
  206. package/dist/cli/{sql-layout-DVQ20UMi.js → sql-layout-DbhEQqq0.js} +2 -2
  207. package/dist/cli/{stack-CmhSfY5V.js → stack-CQXLe5j0.js} +1 -1
  208. package/dist/cli/{sync-D-WO4Yvl.js → sync-CazH5FX4.js} +4 -4
  209. package/dist/cli/{table-k5OABwy3.js → table-BIQA9Hdt.js} +1 -1
  210. package/dist/cli/{upgrade-DGe5Pv6v.js → upgrade-Cyx6ESpc.js} +5 -5
  211. package/dist/cli/{upgrade-XdhMuHAu.js → upgrade-Dyb4-f0Q.js} +3 -3
  212. package/dist/cli/{version-DKfeme2I.js → version-D1ZKUFng.js} +1 -1
  213. package/dist/client/index.d.ts +5 -5
  214. package/dist/client/native/index.d.ts +4 -4
  215. package/dist/{cloud-event-BEmAUdl1.d.ts → cloud-event-BjgxkfJJ.d.ts} +1 -1
  216. package/dist/{codecs-B9v5Y5HH.js → codecs-D_pOvjvD.js} +1 -0
  217. package/dist/{codecs-B1VO2BGL.d.ts → codecs-DaP45ETv.d.ts} +1 -1
  218. package/dist/{composite-B-oAH16L.d.ts → composite-DPN4SFud.d.ts} +6 -6
  219. package/dist/config/index.d.ts +2 -2
  220. package/dist/config/index.js +4 -4
  221. package/dist/{config-BrRlSxhx.js → config-Dx3bEPlX.js} +1 -1
  222. package/dist/{config-BKxjItQ-.js → config-uSliwPS6.js} +3 -3
  223. package/dist/{connectors-CrLRW4Ol.d.ts → connectors-DDsdz-cn.d.ts} +1 -1
  224. package/dist/{context-yfOlyAqb.d.ts → context-D6OZQdcT.d.ts} +2 -2
  225. package/dist/contract/index.d.ts +8 -8
  226. package/dist/{controller-CAcLEndc.d.ts → controller-DhcSXkAC.d.ts} +1 -1
  227. package/dist/{conversion-s1NtB6S-.d.ts → conversion-CLBBITW5.d.ts} +1 -1
  228. package/dist/create/index.d.ts +3 -3
  229. package/dist/create/index.js +3 -3
  230. package/dist/create/lite/index.d.ts +3 -3
  231. package/dist/create/lite/index.js +2 -2
  232. package/dist/credentials/index.d.ts +3 -3
  233. package/dist/{define-BvkaC3Oh.d.ts → define-C_He1bQO.d.ts} +1 -1
  234. package/dist/{define-block-Ds3aLZwz.d.ts → define-block-CDw9YGVh.d.ts} +4 -4
  235. package/dist/edge/index.d.ts +8 -8
  236. package/dist/elysia/index.d.ts +1 -1
  237. package/dist/{ended-iq2wp8fc.d.ts → ended-BwpmNC5k.d.ts} +1 -1
  238. package/dist/{entitlements-Dhu-4vlH.d.ts → entitlements-Bi4y8w8e.d.ts} +2 -2
  239. package/dist/eve/index.d.ts +3 -3
  240. package/dist/events/index.d.ts +3 -3
  241. package/dist/{events-DCw3c6pj.d.ts → events-DddDlibJ.d.ts} +8 -0
  242. package/dist/{executor-H8ZLkeHj.d.ts → executor-CxMHiDp_.d.ts} +2 -2
  243. package/dist/{executor-B-o7QMPp.d.ts → executor-uNDJBzT8.d.ts} +1 -1
  244. package/dist/expo/index.d.ts +3 -3
  245. package/dist/{field-errors-DXZk9Qjt.d.ts → field-errors-CJ_i6HFg.d.ts} +7 -7
  246. package/dist/flags-sdk/index.d.ts +1 -1
  247. package/dist/{framework-Byr_j8G-.d.ts → framework-B6JAPr1i.d.ts} +7 -7
  248. package/dist/h3/index.d.ts +1 -1
  249. package/dist/h3/v1/index.d.ts +1 -1
  250. package/dist/hono/index.d.ts +8 -8
  251. package/dist/{index-Dv6lfL5p.d.ts → index-Bc5t2QRU.d.ts} +11 -11
  252. package/dist/{index-6H-8Ib1w.d.ts → index-Bm1ftdBA.d.ts} +3 -3
  253. package/dist/{index-lMApFSAd.d.ts → index-C71uHfVj.d.ts} +3 -3
  254. package/dist/{index-C78VPlXW.d.ts → index-CRwpDGxd.d.ts} +1 -1
  255. package/dist/{index-CnzGRpeH.d.ts → index-Cbwvf4yE.d.ts} +5 -5
  256. package/dist/{index-kkZwp5M1.d.ts → index-ChvuVimY.d.ts} +4 -4
  257. package/dist/{index-Ag-T51Jl.d.ts → index-CvLTqmdq.d.ts} +1 -1
  258. package/dist/{index-Dbd1E5Au.d.ts → index-DAS_5OfK.d.ts} +3 -3
  259. package/dist/{index-CY612vAg.d.ts → index-DjJUamhw.d.ts} +2 -2
  260. package/dist/{index-BUluRi0b.d.ts → index-DrDCN45q.d.ts} +5 -5
  261. package/dist/index.d.ts +2 -2
  262. package/dist/{instances-xQ2lupVE.js → instances-DKULdpWB.js} +73 -6
  263. package/dist/{kit-DCuO1ZhB.d.ts → kit-lHFpu2_1.d.ts} +3 -3
  264. package/dist/list/index.d.ts +1 -1
  265. package/dist/{list-query-D1h3Dmnk.d.ts → list-query-BkbLV-Yc.d.ts} +1 -1
  266. package/dist/mapper/bin.js +5 -5
  267. package/dist/mcp/index.d.ts +3 -3
  268. package/dist/mcp/sdk/index.d.ts +5 -5
  269. package/dist/nestjs/index.d.ts +2 -2
  270. package/dist/next/client/index.d.ts +1 -1
  271. package/dist/next/index.d.ts +22 -22
  272. package/dist/node/index.d.ts +2 -2
  273. package/dist/{operations-SWpzGC_K.d.ts → operations-BDjgCmT9.d.ts} +1 -1
  274. package/dist/{options-DqmTs2nv.js → options-CEwoGUk_.js} +2 -1
  275. package/dist/{options-yRwYr4up.js → options-CGQC7Wue.js} +4 -1
  276. package/dist/orpc/index.d.ts +7 -7
  277. package/dist/otel/index.d.ts +1 -1
  278. package/dist/otel/index.js +4 -4
  279. package/dist/{outbox-BFZS6Kvz.d.ts → outbox-DikdzUKf.d.ts} +2 -2
  280. package/dist/{permissions-2UlVQDzY.d.ts → permissions-BGx22GP3.d.ts} +1 -1
  281. package/dist/{pool-yO-LzZAd.d.ts → pool-BJAjQcrJ.d.ts} +1 -1
  282. package/dist/{ports-prqYrReN.d.ts → ports-D63bA3p4.d.ts} +1 -1
  283. package/dist/postgres/index.d.ts +1 -1
  284. package/dist/powersync/index.d.ts +3 -3
  285. package/dist/preset/index.d.ts +3 -3
  286. package/dist/preset/index.js +3 -3
  287. package/dist/{preset-BvHNleCo.js → preset-oc_liUHz.js} +2 -2
  288. package/dist/{project-CBvowdKY.js → project-Cs0kz5OP.js} +5 -5
  289. package/dist/{provider-bIAzxVMB.d.ts → provider-CVlXXbda.d.ts} +1 -1
  290. package/dist/{push-token-DtqJeg8w.d.ts → push-token-BsyX0KlT.d.ts} +1 -1
  291. package/dist/query/index.d.ts +1 -1
  292. package/dist/react/index.d.ts +8 -8
  293. package/dist/react/native/index.d.ts +1 -1
  294. package/dist/react/server.d.ts +9 -9
  295. package/dist/react/session.d.ts +1 -1
  296. package/dist/react-router/index.d.ts +5 -5
  297. package/dist/realtime/index.d.ts +4 -4
  298. package/dist/{record-form-BQA-lawE.d.ts → record-form-C-gIxGXe.d.ts} +1 -1
  299. package/dist/records/index.d.ts +7 -7
  300. package/dist/{refusal-BX1EvmpJ.d.ts → refusal-CjUUBfhY.d.ts} +2 -2
  301. package/dist/{resolve-BIpQRhvF.d.ts → resolve-XlMQRUeG.d.ts} +1 -1
  302. package/dist/{resolved-names-b6P2--jK.js → resolved-names-sd6RuTju.js} +1 -1
  303. package/dist/{resource-execute-A1NbR-sd.d.ts → resource-execute-B7-QaS6R.d.ts} +1 -1
  304. package/dist/{resource-types-CTcc37WL.d.ts → resource-types-CF3Uc6OW.d.ts} +2 -2
  305. package/dist/{resources-13ZFX1G6.d.ts → resources-DnHSmJIM.d.ts} +1 -1
  306. package/dist/{respond-CAxhkwAi.d.ts → respond-D7kUatjc.d.ts} +1 -1
  307. package/dist/server/index.d.ts +21 -21
  308. package/dist/{server-types-DEjva0MW.d.ts → server-types-DpI82uNq.d.ts} +8 -8
  309. package/dist/{session-CeYL3EPm.d.ts → session-JV1z0kxa.d.ts} +2 -2
  310. package/dist/{session-BA0YDmjt.d.ts → session-s-mUZ8RQ.d.ts} +5 -5
  311. package/dist/{session-status-Df6tuKY9.d.ts → session-status-CJjTuFtA.d.ts} +2 -2
  312. package/dist/{sign-in-4u4vLtXG.d.ts → sign-in-D5Bg7R47.d.ts} +1 -1
  313. package/dist/solid/index.d.ts +9 -9
  314. package/dist/solid-start/index.d.ts +5 -5
  315. package/dist/spec/index.d.ts +1 -1
  316. package/dist/sql/index.d.ts +5 -5
  317. package/dist/sql/index.js +3 -3
  318. package/dist/{sql-BChN3Hxv.js → sql-CWYbu_6y.js} +3853 -714
  319. package/dist/sqlite/index.d.ts +1 -1
  320. package/dist/ssr/index.d.ts +4 -4
  321. package/dist/{statuses-BTrQ5H4S.js → statuses-Qqpzda35.js} +12 -1
  322. package/dist/stock-detail-BMqvwq1q.js +12 -0
  323. package/dist/stock-detail-BRIt7CjU.d.ts +19 -0
  324. package/dist/{subject-readers-YL8H9G8X.d.ts → subject-readers-D1Km_Q42.d.ts} +1 -1
  325. package/dist/{support-BwtMgjVg.d.ts → support-Dj5V2WTs.d.ts} +4 -4
  326. package/dist/{support-view-GykHOIQ2.d.ts → support-view-DKZkZeM5.d.ts} +1 -1
  327. package/dist/svelte/index.d.ts +8 -8
  328. package/dist/sveltekit/index.d.ts +6 -6
  329. package/dist/{tags-CAfvzA1U.d.ts → tags-BihwKkTT.d.ts} +1 -1
  330. package/dist/tanstack-db/index.d.ts +1 -1
  331. package/dist/tanstack-start/index.d.ts +5 -5
  332. package/dist/{tenant-lBgoqg9T.d.ts → tenant-DqnE50Ju.d.ts} +1 -1
  333. package/dist/testing/index.d.ts +17 -17
  334. package/dist/testing/index.js +2 -2
  335. package/dist/{timeline-CrO48Qa6.d.ts → timeline-c6I3uxya.d.ts} +3 -3
  336. package/dist/{topic-x-mrN_Ff.d.ts → topic-Dp7VGPd-.d.ts} +3 -3
  337. package/dist/{types-auvHrNWC.d.ts → types-BXLiM6VM.d.ts} +1 -1
  338. package/dist/{types-CJqNGQKb.d.ts → types-DLXTmZtm.d.ts} +2 -2
  339. package/dist/{types-C9XfFGmA.d.ts → types-DtiDatvu.d.ts} +2 -2
  340. package/dist/{vault-DjbG4XQS.d.ts → vault-CbhvnoVC.d.ts} +1 -1
  341. package/dist/vercel-connect/index.d.ts +1 -1
  342. package/dist/vercel-sandbox/index.d.ts +1 -1
  343. package/dist/{verify-HOiu3lRR.d.ts → verify-Cpc1upDA.d.ts} +1 -1
  344. package/dist/{view-DdDY88SC.d.ts → view-eHgOOyRS.d.ts} +1 -1
  345. package/dist/vue/index.d.ts +9 -9
  346. package/dist/{watch-topic-D6bcqOrJ.d.ts → watch-topic-CtJAkWT4.d.ts} +1 -1
  347. package/dist/workflow-sdk/builder/index.d.ts +3 -3
  348. package/dist/workflow-sdk/index.d.ts +1 -1
  349. package/dist/workflow-sdk/world/index.d.ts +1 -1
  350. package/dist/workflow-sdk/world/index.js +1 -1
  351. package/dist/{workflow-sdk-D3H10W5h.d.ts → workflow-sdk-CUt0E4v6.d.ts} +1 -1
  352. package/dist/{workflow-sdk-CBS8L2Ku.js → workflow-sdk-pB1jCLIL.js} +21 -1
  353. package/dist/yjs/index.d.ts +1 -1
  354. package/package.json +1 -1
  355. package/schemas/config-v1.json +5 -0
  356. package/skills/better-supabase-auth/SKILL.md +1 -1
  357. package/dist/cli/add-De73Ghlh.js +0 -1
  358. package/dist/cli/env-BfWbheiC.js +0 -1
  359. package/dist/cli/powersync-IBM_v_eJ.js +0 -1
  360. package/dist/cli/seed-DGGjReq4.js +0 -1
@@ -1,14 +1,14 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
- import { Ct as Events } from "../../events-DCw3c6pj.js";
4
- import { F as SegmentEventData, I as SegmentMemberEventData } from "../../index-CY612vAg.js";
3
+ import { Ct as Events } from "../../events-DddDlibJ.js";
4
+ import { F as SegmentEventData, I as SegmentMemberEventData } from "../../index-DjJUamhw.js";
5
5
  import { n as Logger } from "../../logger-0LfhvwE4.js";
6
6
  import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
7
7
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
8
8
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
9
9
  import { n as segmentsSqlOptions, t as SegmentsSqlOptions } from "../../options-BLQePOPy.js";
10
10
  import { h as FilterQuery } from "../../filter-query-Xj40B5KT.js";
11
- import { Sn as EntitySchema, c as BlockOf } from "../../define-block-Ds3aLZwz.js";
11
+ import { Sn as EntitySchema, c as BlockOf } from "../../define-block-CDw9YGVh.js";
12
12
  /** A saved filter over one subject type, with its materialized members. */
13
13
  interface Segment {
14
14
  readonly id: string;
@@ -1,13 +1,13 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
4
- import { Ct as Events } from "../../events-DCw3c6pj.js";
4
+ import { Ct as Events } from "../../events-DddDlibJ.js";
5
5
  import { n as Logger } from "../../logger-0LfhvwE4.js";
6
6
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
7
7
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
8
8
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
9
9
  import { n as sequencesSqlOptions, t as SequencesSqlOptions } from "../../options-D6tpMRvp.js";
10
- import { F as BlockPorts, Sn as EntitySchema, V as MailSendDraft, c as BlockOf } from "../../define-block-Ds3aLZwz.js";
10
+ import { F as BlockPorts, Sn as EntitySchema, V as MailSendDraft, c as BlockOf } from "../../define-block-CDw9YGVh.js";
11
11
  declare const SEQUENCE_STATUSES: readonly ["draft", "active", "paused", "archived"];
12
12
  declare const RUN_STATUSES: readonly ["active", "paused", "completed", "exited"];
13
13
  declare const EXIT_REASONS: readonly ["replied", "manual", "failed", "archived"];
@@ -2,12 +2,12 @@
2
2
  import { T as ErrorMapper, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { i as RowFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { $ as SaasEventData, Ct as Events } from "../../events-DCw3c6pj.js";
5
+ import { $ as SaasEventData, Ct as Events } from "../../events-DddDlibJ.js";
6
6
  import { n as Logger } from "../../logger-0LfhvwE4.js";
7
7
  import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
8
8
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
10
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
10
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
11
11
  /** The `app_metadata` key that marks an `auth.users` row as a service principal. */
12
12
  export declare const SERVICE_PRINCIPAL_CLAIM = "bsb_service_principal";
13
13
  /**
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { b as DbError, f as Result } from "../../result-DTOQRyGY.js";
3
- import { r as Block } from "../../define-block-Ds3aLZwz.js";
4
- import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
3
+ import { r as Block } from "../../define-block-CDw9YGVh.js";
4
+ import { n as Controller, t as AuthPort } from "../../controller-DhcSXkAC.js";
5
5
  import { t as AuthReply } from "../../auth-reply-BMPJQssh.js";
6
6
  /** An OAuth client as the Auth OAuth server describes it. */
7
7
  interface RawOAuthClient {
@@ -1,11 +1,11 @@
1
1
  import { b as DbError, f as Result, t as AsyncResult } from "../../result-DTOQRyGY.js";
2
- import { Ct as Events, rt as SettingEventData } from "../../events-DCw3c6pj.js";
2
+ import { Ct as Events, rt as SettingEventData } from "../../events-DddDlibJ.js";
3
3
  import { n as Logger } from "../../logger-0LfhvwE4.js";
4
4
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
6
6
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
7
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
7
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-DhcSXkAC.js";
9
9
  import { StandardSchemaV1 } from "@standard-schema/spec";
10
10
  /**
11
11
  * One setting: its Standard Schema and the value `get` returns when none is
@@ -3,11 +3,11 @@ import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
5
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
6
- import { $ as SaasEventData, Ct as Events, et as SaasSubjectEventData } from "../../events-DCw3c6pj.js";
6
+ import { $ as SaasEventData, Ct as Events, et as SaasSubjectEventData } from "../../events-DddDlibJ.js";
7
7
  import { n as Logger } from "../../logger-0LfhvwE4.js";
8
8
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
10
- import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-Ds3aLZwz.js";
10
+ import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
11
11
  interface ShareLinksOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
12
12
  /**
13
13
  * A Standard Schema for the link's extra columns
@@ -3,16 +3,63 @@ import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
5
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
6
- import { Ct as Events } from "../../events-DCw3c6pj.js";
6
+ import { Ct as Events } from "../../events-DddDlibJ.js";
7
7
  import { n as Logger } from "../../logger-0LfhvwE4.js";
8
8
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
9
9
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
10
10
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
11
11
  import { n as shipmentsSqlOptions, t as ShipmentsSqlOptions } from "../../options-B-JqrC61.js";
12
- import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-Ds3aLZwz.js";
12
+ import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, mn as RecordRowInput, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
13
13
  import { n as Money } from "../../money-BgpAd7d3.js";
14
14
  import { r as WebhookInput } from "../../signatures-jPr9JXyw.js";
15
- import { C as TrackingStatus, S as TRACKING_STATUSES, _ as trackingUpdatesOf, a as FlatRateCarrierOptions, b as SHIPMENT_STATUSES, c as ShipmentLabel, d as ShipmentRate, f as ShipmentRateRequest, g as shipmentCarrierOf, h as invalidShipmentRequest, i as CarrierTrackingUpdate, l as ShipmentLabelRequest, m as flatRateCarrier, n as CarrierCancelInput, o as FlatRateService, p as ShippingProvider, r as CarrierTrackingEvent, s as ShipmentAddress, t as CarrierCallOptions, u as ShipmentParcel, v as LABEL_FORMATS, x as ShipmentStatus, y as LabelFormat } from "../../carrier-D2b_028L.js";
15
+ import { t as StockDetail } from "../../stock-detail-BRIt7CjU.js";
16
+ import { C as ReturnDisposition, D as TrackingStatus, E as TRACKING_STATUSES, S as RETURN_DISPOSITIONS, T as ShipmentStatus, _ as trackingUpdatesOf, a as FlatRateCarrierOptions, b as LabelFormat, c as ShipmentLabel, d as ShipmentRate, f as ShipmentRateRequest, g as shipmentCarrierOf, h as invalidShipmentRequest, i as CarrierTrackingUpdate, l as ShipmentLabelRequest, m as flatRateCarrier, n as CarrierCancelInput, o as FlatRateService, p as ShippingProvider, r as CarrierTrackingEvent, s as ShipmentAddress, t as CarrierCallOptions, u as ShipmentParcel, v as LABEL_FORMATS, w as SHIPMENT_STATUSES, x as LineDirection, y as LINE_DIRECTIONS } from "../../carrier-B2eytEjR.js";
17
+ /** The stock a shipment carries, set while it is a draft. */
18
+ interface ShipmentLineInput {
19
+ readonly variantId: string;
20
+ /** The inventory location the stock leaves from. */
21
+ readonly locationId: string;
22
+ /** A decimal in the variant's unit, up to its scale. */
23
+ readonly quantity: number | string;
24
+ /**
25
+ * An open inventory allocation the line fills, such as an order's. Without
26
+ * one the stock leaves as a `sale`.
27
+ */
28
+ readonly allocationId?: string;
29
+ /** The bin, lot or serials the stock leaves from. */
30
+ readonly detail?: StockDetail;
31
+ }
32
+ /** Stock a recipient sent back. */
33
+ interface ShipmentReturnInput {
34
+ readonly variantId: string;
35
+ /** The inventory location the stock comes back to. */
36
+ readonly locationId: string;
37
+ readonly quantity: number | string;
38
+ readonly disposition: ReturnDisposition;
39
+ /** For `hold`, `binId` names a hold bin at the location. */
40
+ readonly detail?: StockDetail;
41
+ }
42
+ /** A shipment line: stock out, or a return with its disposition. */
43
+ interface ShipmentLine {
44
+ readonly id: string;
45
+ /** From 1, in the order the lines were added. */
46
+ readonly position: number;
47
+ readonly direction: LineDirection;
48
+ readonly variantId: string;
49
+ readonly locationId: string;
50
+ /** A decimal string, so fractional units keep their precision. */
51
+ readonly quantity: string;
52
+ readonly allocationId?: string;
53
+ /**
54
+ * The bin, lot and serials, plus `parts`: the lots an outbound line took,
55
+ * once it moved.
56
+ */
57
+ readonly detail?: Readonly<Record<string, unknown>>;
58
+ readonly disposition?: ReturnDisposition;
59
+ /** The inventory movement, once the stock moved. */
60
+ readonly movementId?: string;
61
+ readonly movedAt?: Temporal.Instant;
62
+ }
16
63
  interface ShipmentsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
17
64
  /**
18
65
  * A Standard Schema for the shipments' extra columns
@@ -69,6 +116,8 @@ interface Shipment<F extends object = Record<never, never>> {
69
116
  readonly createdAt: Temporal.Instant;
70
117
  readonly updatedAt: Temporal.Instant;
71
118
  readonly packages: readonly ShipmentPackage[];
119
+ /** The stock it carries and the returns against it, in position order. */
120
+ readonly lines: readonly ShipmentLine[];
72
121
  /** The extra columns, keyed by database name. */
73
122
  readonly fields: ExtraFields<F>;
74
123
  }
@@ -161,6 +210,16 @@ interface Shipments<F extends object = Record<never, never>> {
161
210
  cancel(id: string): AsyncResult<Shipment<F>>;
162
211
  /** The tracking timeline, oldest first. */
163
212
  trackingEvents(id: string): AsyncResult<readonly TrackingEvent[]>;
213
+ /**
214
+ * Replaces the stock a draft shipment carries. The stock leaves inventory
215
+ * when the shipment gets its label and comes back when it is cancelled.
216
+ */
217
+ setLines(id: string, lines: readonly ShipmentLineInput[]): AsyncResult<Shipment<F>>;
218
+ /**
219
+ * Receives stock sent back on a shipment that left, with a disposition per
220
+ * line. A variant comes back at most as often as it went out.
221
+ */
222
+ receiveReturn(id: string, lines: readonly ShipmentReturnInput[]): AsyncResult<Shipment<F>>;
164
223
  }
165
224
  /** The `shipments` SQL module and the configured carriers as typed calls. */
166
225
  export declare function createShipments<S extends StandardSchemaV1 | undefined = undefined>(options: ShipmentsOptions<S>): Shipments<FieldsOf<S>>;
@@ -196,12 +255,22 @@ interface ShipmentCancelledEventData {
196
255
  /** Set when the shipment had a label the carrier voided. */
197
256
  readonly trackingNumber: string | null;
198
257
  }
258
+ /** `shipment.return_received`: stock came back on a shipment that left. */
259
+ interface ShipmentReturnReceivedEventData {
260
+ readonly organizationId: string;
261
+ readonly id: string;
262
+ /** The return lines received in this call. */
263
+ readonly lines: number;
264
+ /** Their total quantity, as a decimal string. */
265
+ readonly quantity: string;
266
+ }
199
267
  /** The events of the `shipments` block: type to data. */
200
268
  type ShipmentsEvents = {
201
269
  readonly "shipment.created": ShipmentCreatedEventData;
202
270
  readonly "shipment.labeled": ShipmentLabeledEventData;
203
271
  readonly "shipment.status_changed": ShipmentStatusChangedEventData;
204
272
  readonly "shipment.cancelled": ShipmentCancelledEventData;
273
+ readonly "shipment.return_received": ShipmentReturnReceivedEventData;
205
274
  };
206
275
  /** The `shipments` block's event types, for its manifest and `onBlockEvent`. */
207
276
  export declare const shipmentsEvents: Events<ShipmentsEvents>;
@@ -223,4 +292,4 @@ type ShipmentsWrites = {
223
292
  export declare const shipmentsBinding: RecordBinding<Shipments, readonly Shipment[], undefined, never, ShipmentsWrites>;
224
293
  /** The `shipments` block's manifest (ADR 0029). */
225
294
  export declare const shipmentsBlock: BlockOf<"shipments", typeof createShipments, ShipmentsEvents, Record<never, never>, never, typeof shipmentsBinding>;
226
- export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type CarrierCallOptions, type CarrierCancelInput, type CarrierTrackingEvent, type CarrierTrackingUpdate, type FlatRateCarrierOptions, type FlatRateService, LABEL_FORMATS, type LabelFormat, type RpcClient, SHIPMENT_STATUSES, type Shipment, type ShipmentAddress, type ShipmentCancelledEventData, type ShipmentCreatedEventData, type ShipmentInput, type ShipmentLabel, type ShipmentLabelChoice, type ShipmentLabelRequest, type ShipmentLabeledEventData, type ShipmentListOptions, type ShipmentPackage, type ShipmentParcel, type ShipmentRate, type ShipmentRateRequest, type ShipmentSectionInput, type ShipmentStatus, type ShipmentStatusChangedEventData, type Shipments, type ShipmentsEvents, type ShipmentsOptions, type ShipmentsSqlOptions, type ShipmentsWrites, type ShippingProvider, TRACKING_STATUSES, type TrackingEvent, type TrackingIngested, type TrackingRecorded, type TrackingStatus, dbTransport, extendBlock, flatRateCarrier, invalidShipmentRequest, rpcTransport, shipmentCarrierOf, shipmentsSqlOptions, sqlTransport, trackingUpdatesOf, withBlockHooks, wrapTransport };
295
+ export { type BlockHooks, type BlockTransport, type BlockTransportMiddleware, type CarrierCallOptions, type CarrierCancelInput, type CarrierTrackingEvent, type CarrierTrackingUpdate, type FlatRateCarrierOptions, type FlatRateService, LABEL_FORMATS, LINE_DIRECTIONS, type LabelFormat, type LineDirection, RETURN_DISPOSITIONS, type ReturnDisposition, type RpcClient, SHIPMENT_STATUSES, type Shipment, type ShipmentAddress, type ShipmentCancelledEventData, type ShipmentCreatedEventData, type ShipmentInput, type ShipmentLabel, type ShipmentLabelChoice, type ShipmentLabelRequest, type ShipmentLabeledEventData, type ShipmentLine, type ShipmentLineInput, type ShipmentListOptions, type ShipmentPackage, type ShipmentParcel, type ShipmentRate, type ShipmentRateRequest, type ShipmentReturnInput, type ShipmentReturnReceivedEventData, type ShipmentSectionInput, type ShipmentStatus, type ShipmentStatusChangedEventData, type Shipments, type ShipmentsEvents, type ShipmentsOptions, type ShipmentsSqlOptions, type ShipmentsWrites, type ShippingProvider, type StockDetail, TRACKING_STATUSES, type TrackingEvent, type TrackingIngested, type TrackingRecorded, type TrackingStatus, dbTransport, extendBlock, flatRateCarrier, invalidShipmentRequest, rpcTransport, shipmentCarrierOf, shipmentsSqlOptions, sqlTransport, trackingUpdatesOf, withBlockHooks, wrapTransport };
@@ -3,7 +3,7 @@ import { n as isRecord } from "../../guards-CsRa6v57.js";
3
3
  import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
4
4
  import { a as ok, r as err, t as AsyncResult } from "../../result-8xza7w5W.js";
5
5
  import { t as shipmentsSqlOptions } from "../../options-Bkx8vwip.js";
6
- import { n as SHIPMENT_STATUSES, r as TRACKING_STATUSES, t as LABEL_FORMATS } from "../../statuses-BTrQ5H4S.js";
6
+ import { a as TRACKING_STATUSES, i as SHIPMENT_STATUSES, n as LINE_DIRECTIONS, r as RETURN_DISPOSITIONS, t as LABEL_FORMATS } from "../../statuses-Qqpzda35.js";
7
7
  import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
8
8
  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, j as requiredInstant, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
9
9
  import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
@@ -16,6 +16,7 @@ import { n as optionalRecordRefOf } from "../../block-subjects-cRlVtKDO.js";
16
16
  import { t as requireTenant } from "../../block-tenant-Bun03JuO.js";
17
17
  import { a as compareMoney, c as isMoney, d as money } from "../../money-DH--bbYr.js";
18
18
  import { o as optionalMoneyOf, t as amountText } from "../../money-codec-SKPm8FPw.js";
19
+ import { t as detailArg } from "../../stock-detail-BMqvwq1q.js";
19
20
  // src/blocks/shipments/carrier.ts
20
21
  /** Checks the carrier's `apiVersion` before a block uses it. */
21
22
  function shipmentCarrierOf(carrier) {
@@ -145,6 +146,48 @@ function flatRateCarrier(options) {
145
146
  }) }
146
147
  };
147
148
  }
149
+ // src/blocks/shipments/lines.ts
150
+ /** Parses a line of a shipment's `lines`. */
151
+ function lineOf(row) {
152
+ const disposition = optionalText(row["disposition"]);
153
+ const detail = row["detail"];
154
+ const allocationId = optionalText(row["allocationId"]);
155
+ const movementId = optionalText(row["movementId"]);
156
+ const movedAt = optionalInstant(row["movedAt"]);
157
+ return {
158
+ id: textOf(row["id"]),
159
+ position: Number(row["position"]),
160
+ direction: enumOrThrow(row["direction"], LINE_DIRECTIONS, "direction"),
161
+ variantId: textOf(row["variantId"]),
162
+ locationId: textOf(row["locationId"]),
163
+ quantity: textOf(row["quantity"]),
164
+ ...allocationId === void 0 ? {} : { allocationId },
165
+ ...isRecord(detail) ? { detail } : {},
166
+ ...disposition === void 0 ? {} : { disposition: enumOrThrow(disposition, RETURN_DISPOSITIONS, "disposition") },
167
+ ...movementId === void 0 ? {} : { movementId },
168
+ ...movedAt === void 0 ? {} : { movedAt }
169
+ };
170
+ }
171
+ /** The `lines` argument of `set_shipment_lines`. */
172
+ function linesArg(lines) {
173
+ return lines.map((line) => ({
174
+ variantId: line.variantId,
175
+ locationId: line.locationId,
176
+ quantity: String(line.quantity),
177
+ ...line.allocationId === void 0 ? {} : { allocationId: line.allocationId },
178
+ ...line.detail === void 0 ? {} : { detail: detailArg(line.detail) }
179
+ }));
180
+ }
181
+ /** The `lines` argument of `receive_shipment_return`. */
182
+ function returnsArg(lines) {
183
+ return lines.map((line) => ({
184
+ variantId: line.variantId,
185
+ locationId: line.locationId,
186
+ quantity: String(line.quantity),
187
+ disposition: line.disposition,
188
+ ...line.detail === void 0 ? {} : { detail: detailArg(line.detail) }
189
+ }));
190
+ }
148
191
  // src/blocks/shipments/shipments.ts
149
192
  /** Copies the defined values only, so absent fields stay absent. */
150
193
  function defined(values) {
@@ -194,6 +237,7 @@ function shipmentOf(value, fn) {
194
237
  createdAt: requiredInstant(row["createdAt"], "createdAt"),
195
238
  updatedAt: requiredInstant(row["updatedAt"], "updatedAt"),
196
239
  packages: recordsOf(row["packages"], fn).map(packageOf),
240
+ lines: (row["lines"] === void 0 ? [] : recordsOf(row["lines"], fn)).map(lineOf),
197
241
  fields: isRecord(row["fields"]) ? row["fields"] : {},
198
242
  ...defined({
199
243
  fromLocationId: optionalText(row["fromLocationId"]),
@@ -391,7 +435,15 @@ function createShipments(options) {
391
435
  trackingNumber
392
436
  }, { idempotencyKey: `void:${id}` }).andThen(cancelled));
393
437
  }),
394
- trackingEvents: (id) => call("list_tracking_events", { shipment_id: id }, (value) => recordsOf(value, "list_tracking_events").map(trackingEventOf))
438
+ trackingEvents: (id) => call("list_tracking_events", { shipment_id: id }, (value) => recordsOf(value, "list_tracking_events").map(trackingEventOf)),
439
+ setLines: (id, lines) => call("set_shipment_lines", {
440
+ shipment_id: id,
441
+ lines: linesArg(lines)
442
+ }, one("set_shipment_lines")).andThen(fields.row),
443
+ receiveReturn: (id, lines) => call("receive_shipment_return", {
444
+ shipment_id: id,
445
+ lines: returnsArg(lines)
446
+ }, one("receive_shipment_return")).andThen(fields.row)
395
447
  }, options.hooks, {
396
448
  block: "shipments",
397
449
  ...options.logger ? { logger: options.logger } : {}
@@ -403,7 +455,8 @@ const shipmentsEvents = defineEvents({
403
455
  "shipment.created": event(),
404
456
  "shipment.labeled": event(),
405
457
  "shipment.status_changed": event(),
406
- "shipment.cancelled": event()
458
+ "shipment.cancelled": event(),
459
+ "shipment.return_received": event()
407
460
  });
408
461
  // src/blocks/shipments/schemas.ts
409
462
  const address = {
@@ -539,4 +592,4 @@ const shipmentsBlock = defineBlock({
539
592
  example: "[yourCarrier]"
540
593
  }]
541
594
  });
542
- export { LABEL_FORMATS, SHIPMENT_STATUSES, TRACKING_STATUSES, createShipments, dbTransport, extendBlock, flatRateCarrier, invalidShipmentRequest, rpcTransport, shipmentCarrierOf, shipmentInputSchema, shipmentSectionInputSchema, shipmentsBinding, shipmentsBlock, shipmentsEvents, shipmentsSqlOptions, sqlTransport, trackingEventInputSchema, trackingUpdatesOf, withBlockHooks, wrapTransport };
595
+ export { LABEL_FORMATS, LINE_DIRECTIONS, RETURN_DISPOSITIONS, SHIPMENT_STATUSES, TRACKING_STATUSES, createShipments, dbTransport, extendBlock, flatRateCarrier, invalidShipmentRequest, rpcTransport, shipmentCarrierOf, shipmentInputSchema, shipmentSectionInputSchema, shipmentsBinding, shipmentsBlock, shipmentsEvents, shipmentsSqlOptions, sqlTransport, trackingEventInputSchema, trackingUpdatesOf, withBlockHooks, wrapTransport };
@@ -2,13 +2,13 @@
2
2
  import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { Ct as Events, it as SignatureEventData } from "../../events-DCw3c6pj.js";
5
+ import { Ct as Events, it as SignatureEventData } from "../../events-DddDlibJ.js";
6
6
  import { n as Logger } from "../../logger-0LfhvwE4.js";
7
7
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
8
8
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
9
9
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
10
10
  import { t as SignaturesSqlOptions } from "../../options-B9w_Y08G.js";
11
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
11
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
12
12
  interface SignaturesOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
13
13
  /**
14
14
  * A Standard Schema for the request's extra columns
@@ -1,6 +1,6 @@
1
- import { Ct as Events } from "../../events-DCw3c6pj.js";
1
+ import { Ct as Events } from "../../events-DddDlibJ.js";
2
2
  import { s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
3
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
3
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
4
4
  import { a as JwsError, c as VerifyCompactOptions, d as verifyCompact, i as JwsAlgorithm, l as jwkThumbprint, n as Jwks, o as SigningAlgorithm, s as VerifiedJws, t as Jwk, u as jwksOf } from "../../jws-CxgTsbgG.js";
5
5
  import { a as Signature, c as SigningKeyOwner, d as createSigningKeys, f as jwtType, i as PLATFORM_OWNER, l as SigningKeys, n as JwksOptions, o as Signer, r as JwksResponseOptions, s as SignerOptions, t as CreatedSigningKey, u as SigningKeysOptions } from "../../signing-keys-FglIQ6iL.js";
6
6
  /** `signing_key.*`: the key's owner and kid, never key material. */
@@ -3,13 +3,13 @@ import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
5
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
6
- import { Ct as Events } from "../../events-DCw3c6pj.js";
7
- import { L as SlaEventData } from "../../index-CY612vAg.js";
6
+ import { Ct as Events } from "../../events-DddDlibJ.js";
7
+ import { L as SlaEventData } from "../../index-DjJUamhw.js";
8
8
  import { n as Logger } from "../../logger-0LfhvwE4.js";
9
9
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
10
10
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
11
11
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
12
- import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-Ds3aLZwz.js";
12
+ import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
13
13
  type SlaMetric = "first_response" | "next_response" | "resolution";
14
14
  type SlaState = "running" | "paused" | "met" | "breached";
15
15
  /** What happened on a record, moving its clocks. */
@@ -1,10 +1,10 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { f as Result } from "../../result-DTOQRyGY.js";
3
- import { Ct as Events, X as OrganizationDomainEventData, Z as OrganizationEventData, at as SsoProviderEventData, nt as ScimEventData } from "../../events-DCw3c6pj.js";
3
+ import { Ct as Events, X as OrganizationDomainEventData, Z as OrganizationEventData, at as SsoProviderEventData, nt as ScimEventData } from "../../events-DddDlibJ.js";
4
4
  import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
6
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
7
- import { l as ApiKeys } from "../../api-keys-C82fMru4.js";
6
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
7
+ import { l as ApiKeys } from "../../api-keys-BncNDlWG.js";
8
8
  import { _ as dohResolver, a as SamlProviderInput, c as SsoAdmin, d as SsoDomain, f as SsoOptions, g as createSsoAdmin, h as createSso, i as SamlMetadata, l as SsoAdminOptions, m as TxtResolver, n as DomainRecord, o as Sso, p as SsoProvider, r as OrganizationDomain, s as SsoActor, t as DohResolverOptions, u as SsoAuthAdmin } from "../../sso-B7w7h8RJ.js";
9
9
  type CompareOp = "eq" | "ne" | "co" | "sw" | "ew" | "gt" | "ge" | "lt" | "le";
10
10
  type ScimFilter = {
@@ -1,11 +1,11 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
4
- import { Ct as Events, et as SaasSubjectEventData } from "../../events-DCw3c6pj.js";
4
+ import { Ct as Events, et as SaasSubjectEventData } from "../../events-DddDlibJ.js";
5
5
  import { n as Logger } from "../../logger-0LfhvwE4.js";
6
6
  import { i as CursorPageOptions, n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
7
7
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
8
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
8
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
9
9
  interface StateMachineOptions<S extends string = string> extends BlockOptions {
10
10
  /** `withBlockHooks` hooks around the client's methods. */
11
11
  readonly hooks?: NoInfer<BlockHooks<StateMachine<S>>>;
@@ -30,6 +30,13 @@ interface StatusState {
30
30
  * paused or flagged since.
31
31
  */
32
32
  readonly version: number | undefined;
33
+ /** The workflow slug of a machine with `workflow`; `undefined` otherwise. */
34
+ readonly workflow: string | undefined;
35
+ /**
36
+ * The `workflow_versions` row the record runs on, pinned when it was created.
37
+ * A later published version applies to new records only.
38
+ */
39
+ readonly workflowVersionId: string | undefined;
33
40
  readonly flags: readonly string[];
34
41
  /** True while a pause holds: no end, or an end still in the future. */
35
42
  readonly paused: boolean;
@@ -17,6 +17,8 @@ function stateOf(value) {
17
17
  steps: optionalNumber(row["steps"]),
18
18
  progress: optionalNumber(row["progress"]),
19
19
  version: optionalNumber(row["version"]),
20
+ workflow: optionalText(row["workflow"]),
21
+ workflowVersionId: optionalText(row["workflowVersionId"]),
20
22
  flags: stringsOf(row["flags"]),
21
23
  paused: row["paused"] === true,
22
24
  pausedAt: optionalInstant(row["pausedAt"]),
@@ -1,8 +1,8 @@
1
1
  import { b as DbError } from "../../result-DTOQRyGY.js";
2
2
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
3
3
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
4
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
5
- import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
4
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
5
+ import { n as Controller, t as AuthPort } from "../../controller-DhcSXkAC.js";
6
6
  import { t as subjectKey } from "../../block-subjects-Bkieh2Xk.js";
7
7
  import { c as Subjects, d as MY_WORK_KINDS, f as MyWorkKind, l as SubjectsOptions, n as MyWorkItem, o as ResolvedSubject, r as MyWorkOptions, s as SUBJECT_TITLES_LIMIT, t as MY_WORK_LIMIT, u as createSubjects } from "../../subjects-CVjAE7nz.js";
8
8
  /** The `subjects` block's manifest (ADR 0029). */
@@ -2,12 +2,12 @@ import { b as DbError, f as Result, t as AsyncResult } from "../../result-DTOQRy
2
2
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
3
3
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
4
4
  import { et as RecordRef } from "../../types-BzIYSSWK.js";
5
- import { $ as SaasEventData, Ct as Events, et as SaasSubjectEventData } from "../../events-DCw3c6pj.js";
5
+ import { $ as SaasEventData, Ct as Events, et as SaasSubjectEventData } from "../../events-DddDlibJ.js";
6
6
  import { n as Logger } from "../../logger-0LfhvwE4.js";
7
7
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
8
8
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
9
- import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-Ds3aLZwz.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-CAcLEndc.js";
9
+ import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
10
+ import { n as Controller, t as AuthPort } from "../../controller-DhcSXkAC.js";
11
11
  import { t as RankNeighbors } from "../../rank-result-B_xLQCBV.js";
12
12
  interface TagsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
13
13
  /**
@@ -2,15 +2,15 @@
2
2
  import { T as ErrorMapper, f as Result, t as AsyncResult } from "../../result-DTOQRyGY.js";
3
3
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
4
4
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
5
- import { Ct as Events } from "../../events-DCw3c6pj.js";
6
- import { R as WorkItemEventData } from "../../index-CY612vAg.js";
5
+ import { Ct as Events } from "../../events-DddDlibJ.js";
6
+ import { R as WorkItemEventData } from "../../index-DjJUamhw.js";
7
7
  import { n as Logger } from "../../logger-0LfhvwE4.js";
8
8
  import { r as BlockTemporalOptions } from "../../block-helpers-BNtM1tqy.js";
9
9
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-CDmOUuLZ.js";
10
10
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-CtMsgLQr.js";
11
- import { Bt as Action, Sn as EntitySchema, c as BlockOf, rn as RecordBinding } from "../../define-block-Ds3aLZwz.js";
12
- import { i as EventSink } from "../../cloud-event-BEmAUdl1.js";
13
- import { n as ConversionContext, t as ConversionClients } from "../../conversion-s1NtB6S-.js";
11
+ import { Bt as Action, Sn as EntitySchema, c as BlockOf, rn as RecordBinding } from "../../define-block-CDw9YGVh.js";
12
+ import { i as EventSink } from "../../cloud-event-BjgxkfJJ.js";
13
+ import { n as ConversionContext, t as ConversionClients } from "../../conversion-CLBBITW5.js";
14
14
  import { i as Conversation } from "../../types-D5uf0l4_.js";
15
15
  /** The state a stage's category sets; `completed` and `canceled` are closed. */
16
16
  type WorkItemState = "triage" | "backlog" | "unstarted" | "started" | "completed" | "canceled";
@@ -1,11 +1,11 @@
1
1
  import { t as AsyncResult } from "../../result-DTOQRyGY.js";
2
2
  import { t as StandardSchemaV1 } from "../../standard-DRX6Ch1j.js";
3
3
  import { n as ExtraFields, r as FieldsOf } from "../../block-fields-Puv5m5D3.js";
4
- import { $ as SaasEventData, Ct as Events } from "../../events-DCw3c6pj.js";
4
+ import { $ as SaasEventData, Ct as Events } from "../../events-DddDlibJ.js";
5
5
  import { n as Logger } from "../../logger-0LfhvwE4.js";
6
6
  import { n as BlockOptions } from "../../block-helpers-BNtM1tqy.js";
7
7
  import { n as BlockHooks } from "../../block-hooks-CtMsgLQr.js";
8
- import { c as BlockOf } from "../../define-block-Ds3aLZwz.js";
8
+ import { c as BlockOf } from "../../define-block-CDw9YGVh.js";
9
9
  interface TeamsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
10
10
  /**
11
11
  * A Standard Schema for the team's extra columns